/* ── Medication Cards Section ────────────────────────────── */

.sh-med-section {
  position: relative;
  width: 100%;
  background: #f8faf9;
  padding: 80px 0;
  overflow: hidden;
}

.sh-med-section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.sh-med-section__heading {
  font-family: var(--font-nexa-heavy), sans-serif;
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  color: #231f20;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.sh-med-section__subheading {
  font-family: var(--font-deuterium), sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: #777;
  margin: 0;
}

/* ── Scroll wrapper ─────────────────────────────────────── */

.sh-med-section__scroll-wrap {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
}

/* ── Scroll track ───────────────────────────────────────── */

.sh-med-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px max(24px, calc((100vw - 1360px) / 2)) 8px;
}

.sh-med-track::-webkit-scrollbar {
  display: none;
}

/* ── Card container ─────────────────────────────────────── */

.sh-med-card {
  --card-h: 440px;
  flex: 0 0 300px;
  height: var(--card-h);
  scroll-snap-align: start;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  position: relative;
  transition: box-shadow 0.4s ease;
}

.sh-med-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* ── Slider (holds both faces) ──────────────────────────── */

.sh-med-card__slider {
  display: flex;
  flex-direction: column;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.sh-med-card:hover .sh-med-card__slider,
.sh-med-card--flipped .sh-med-card__slider {
  transform: translateY(calc(-1 * var(--card-h)));
}

/* ── Front face ─────────────────────────────────────────── */

.sh-med-card__front {
  height: var(--card-h);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

/* ── Gradient visual ────────────────────────────────────── */

.sh-med-card__visual {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 18px 20px 18px;
  overflow: hidden;
}

.sh-med-card__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 36%, rgba(0, 0, 0, 0.18) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Gradient variants */
.sh-med-card__visual--sema {
  background: linear-gradient(145deg, #009b8c 0%, #00c9a7 50%, #7de8d0 100%);
}

.sh-med-card__visual--tirz {
  background: linear-gradient(145deg, #006b5e 0%, #009b8c 40%, #5bb370 100%);
}

.sh-med-card__visual--lira {
  background: linear-gradient(145deg, #0077b6 0%, #009b8c 55%, #48c6a8 100%);
}

.sh-med-card__visual--metf {
  background: linear-gradient(145deg, #2e7d32 0%, #4caf50 45%, #82c566 100%);
}

.sh-med-card__visual--nalt {
  background: linear-gradient(145deg, #37474f 0%, #546e7a 45%, #009b8c 100%);
}

/* Decorative orbs */
.sh-med-card__visual-orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.sh-med-card__visual-orb--1 {
  width: 180px;
  height: 180px;
  background: #fff;
  top: -40px;
  right: -40px;
  animation: sh-orb-float 8s ease-in-out infinite;
}

.sh-med-card__visual-orb--2 {
  width: 120px;
  height: 120px;
  background: #fff;
  bottom: -20px;
  left: -30px;
  animation: sh-orb-float 10s ease-in-out infinite reverse;
}

.sh-med-card__visual-orb--3 {
  width: 60px;
  height: 60px;
  background: #fff;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.1;
  animation: sh-orb-pulse 6s ease-in-out infinite;
}

@keyframes sh-orb-float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-10px, 12px); }
}

@keyframes sh-orb-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.1; }
  50% { transform: translate(-50%, -50%) scale(1.4); opacity: 0.18; }
}

.sh-med-card__visual-name {
  font-family: var(--font-nexa-heavy), sans-serif;
  font-size: 28px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  text-align: center;
  line-height: 1.1;
}

.sh-med-card__visual-form {
  font-family: var(--font-deuterium), sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 2;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* Medication image */
.sh-med-card__visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  z-index: 1;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.sh-med-card:hover .sh-med-card__visual-img {
  transform: scale(1.06);
}

/* Badge on visual */
.sh-med-card__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-deuterium), sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #231f20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 100px;
  padding: 5px 14px;
  z-index: 3;
}

/* ── Front info (below visual) ──────────────────────────── */

.sh-med-card__front-info {
  padding: 16px 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sh-med-card__name {
  font-family: var(--font-nexa-heavy), sans-serif;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #231f20;
  margin: 0;
  line-height: 1.2;
}

.sh-med-card__front-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.sh-med-card__price-label {
  font-family: var(--font-deuterium), sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #999;
  text-transform: lowercase;
  line-height: 1;
}

.sh-med-card__price {
  font-family: var(--font-nexa-heavy), sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #009b8c;
  line-height: 1;
}

.sh-med-card__price-period {
  font-family: var(--font-deuterium), sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #8c8c8c;
}

/* ── Back face ──────────────────────────────────────────── */

.sh-med-card__back {
  height: var(--card-h);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 28px 24px 24px;
  background: #fff;
}

.sh-med-card__back-top {
  margin-bottom: 20px;
}

.sh-med-card__back-price {
  font-family: var(--font-nexa-heavy), sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: #009b8c;
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}

.sh-med-card__back-name {
  font-family: var(--font-nexa-heavy), sans-serif;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #231f20;
  margin: 0 0 4px;
}

.sh-med-card__back-form {
  font-family: var(--font-deuterium), sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #8c8c8c;
}

/* ── Marketing points ───────────────────────────────────── */

.sh-med-card__points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.sh-med-card__point {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--font-deuterium), sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.4;
  color: #444;
}

.sh-med-card__point svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Card CTA ───────────────────────────────────────────── */

.sh-med-card__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-deuterium), sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: #231f20;
  border-radius: 100px;
  padding: 14px 24px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease;
  margin-top: auto;
}

.sh-med-card__cta:hover {
  background: #009b8c;
}

.sh-med-card__cta svg {
  transition: transform 0.2s ease;
}

.sh-med-card__cta:hover svg {
  transform: translateX(3px);
}

/* ── Desktop arrows ─────────────────────────────────────── */

.sh-med-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #231f20;
  transition: opacity 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sh-med-arrow:hover {
  background: #f5f5f5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.sh-med-arrow--left {
  left: max(8px, calc((100vw - 1440px) / 2 - 24px));
}

.sh-med-arrow--right {
  right: max(8px, calc((100vw - 1440px) / 2 - 24px));
}

.sh-med-arrow--hidden {
  opacity: 0;
  pointer-events: none;
}

/* ── Responsive: Tablet ─────────────────────────────────── */

@media (max-width: 1200px) {
  .sh-med-section__heading {
    font-size: 36px;
  }

  .sh-med-card {
    --card-h: 420px;
    flex: 0 0 280px;
  }

  .sh-med-card__visual-name {
    font-size: 24px;
  }

  .sh-med-card__back-price {
    font-size: 32px;
  }
}

/* ── Responsive: Mobile ─────────────────────────────────── */

@media (max-width: 809px) {
  .sh-med-section {
    padding: 56px 0;
  }

  .sh-med-section__heading {
    font-size: 28px;
  }

  .sh-med-section__subheading {
    font-size: 16px;
  }

  .sh-med-section__header {
    margin-bottom: 32px;
  }

  .sh-med-card {
    --card-h: 400px;
    flex: 0 0 260px;
  }

  .sh-med-card__visual-name {
    font-size: 22px;
  }

  .sh-med-card__visual-form {
    font-size: 12px;
  }

  .sh-med-card__name {
    font-size: 14px;
  }

  .sh-med-card__price {
    font-size: 22px;
  }

  .sh-med-card__back-price {
    font-size: 28px;
  }

  .sh-med-card__back-name {
    font-size: 16px;
  }

  .sh-med-card__point {
    font-size: 12.5px;
    gap: 8px;
  }

  .sh-med-card__cta {
    padding: 12px 20px;
    font-size: 13px;
  }

  /* Mobile: disable hover, use tap (--flipped class) */
  .sh-med-card:hover .sh-med-card__slider {
    transform: none;
  }

  .sh-med-card--flipped .sh-med-card__slider {
    transform: translateY(calc(-1 * var(--card-h)));
  }

  /* Hide desktop arrows */
  .sh-med-arrow {
    display: none;
  }
}
