.routine-exercises-table-wrapper {
  margin: 1rem 0;
}

.routine-exercises-table-wrapper .routine-session-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.routine-exercises-table-wrapper .routine-exercises-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

.routine-exercises-table-wrapper .routine-exercises-table th,
.routine-exercises-table-wrapper .routine-exercises-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 0.625rem 0.75rem;
  vertical-align: middle;
  text-align: left;
}

.routine-exercises-table-wrapper .routine-exercises-table th {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b5563;
  background: #f8fafc;
}

.routine-exercises-table-wrapper .routine-col-thumb {
  width: 72px;
}

.routine-exercises-table-wrapper .routine-col-thumb img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.routine-exercises-table-wrapper .routine-col-series,
.routine-exercises-table-wrapper .routine-col-reps {
  width: 80px;
  white-space: nowrap;
}

.routine-exercises-table-wrapper .routine-col-empty {
  height: 40px;
}

.routine-exercises-table-wrapper {
  width: 100% !important;
  max-width: 1262px !important;
}

.routine-exercises-table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
}

.routine-exercises-table th,
.routine-exercises-table td {
  border: 1px solid #ddd !important;
  padding: 10px !important;
  vertical-align: middle !important;
  text-align: left !important;
}

.routine-col-thumb {
  width: 80px !important;
}

.routine-col-thumb img {
  width: 50px !important;
  height: 50px !important;
  object-fit: cover !important;
  border-radius: 4px !important;
}

/* Routine detail UI fix */
.node--type-routine {
  max-width: 1320px;
  margin: 30px auto;
  padding: 0 24px;
  font-family: 'Poppins', sans-serif;
}

.node--type-routine .node__content {
  display: flex;
  gap: 75px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, .08);
  padding: 28px;
}

.node--type-routine .field {
  margin-bottom: 14px;
}

.routine-exercises-table-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 28px 0;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .08);
  overflow: hidden;
}

.routine-session-title {
  font-size: 24px;
  font-weight: 700;
  padding: 22px 24px;
  margin: 0;
  background: #f8f9fb;
}

.routine-exercises-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.routine-exercises-table th {
  background: #f3f4f6;
  color: #111;
  font-weight: 700;
  padding: 18px 14px;
  border: 1px solid #ddd;
}

.routine-exercises-table td {
  padding: 16px 14px;
  border: 1px solid #e1e1e1;
  vertical-align: middle;
}

.routine-exercises-table tbody tr:nth-child(even) {
  background: #f7f7f7;
}

.routine-col-thumb img,
.routine-exercise-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
}

.exercise-gallery-card {
  margin: 28px auto;
  max-width: 760px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
  padding: 26px;
  text-align: center;
}

.exercise-gallery-main img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
}

.exercise-gallery-thumbs {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.exercise-gallery-thumbs img {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 3px solid #eee;
}

.exercise-gallery-thumbs img:hover {
  border-color: #dc1117;
}

/* Hide Drupal bottom tabs on routine detail UI */
.node--type-routine+.tabs,
.region-content .tabs {
  display: none;
}



.routine-detail-page {
  max-width: 1500px;
  margin: 35px auto;
  padding: 0 30px;
}

.routine-detail-card {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 12px 38px rgba(0, 0, 0, .08);
  overflow: hidden;
}

.routine-meta-bar {
  background: #1f201d;
  color: #fff;
  padding: 18px 24px;
  font-weight: 600;
}

.routine-info-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px;
  padding: 30px 34px;
}

.routine-info-grid strong {
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
  color: #111;
}

.routine-info-grid a {
  color: #dc1117;
  text-decoration: none;
}

.routine-sessions-full {
  padding: 0 34px 36px;
}

.routine-sessions-full>h2 {
  font-size: 26px;
  margin: 10px 0 20px;
}

.routine-sessions-full .routine-exercises-table-wrapper {
  max-width: 100%;
  margin: 0 0 30px;
}

.routine-sessions-full .routine-exercises-table {
  width: 100%;
  table-layout: auto;
}

.routine-sessions-full .routine-exercises-table th,
.routine-sessions-full .routine-exercises-table td {
  padding: 18px;
  font-size: 16px;
}

.exercise-gallery-card {
  max-width: 850px;
}



/* MAIN BIG IMAGE CONTAINER */
.exercise-gallery {
  width: 100%;
  max-width: 100%;
}

/* BIG IMAGE WRAPPER */
.exercise-main-image {
  width: 100%;
  background: #202528;
  /* dark background like mockup */
  padding: 12px;
  border-radius: 8px;
}

/* BIG IMAGE */
.exercise-main-image img {
  width: 100%;
  height: 320px;
  /* adjust height as per mockup */
  object-fit: cover;
  border-radius: 6px;
}

/* THUMBNAILS */
.exercise-carousel-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.exercise-carousel-thumbs img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid #ddd;
}

.exercise-carousel-thumbs img.is-active,
.exercise-carousel-thumbs img:hover {
  border-color: red;
}













.carousel-main {
  position: relative;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 40px;
  cursor: pointer;
}

.carousel-prev {
  left: 20px;
}

.carousel-next {
  right: 20px;
}