/* =====================================================================
   components.css — buttons, cards, forms, header, footer, overlays
   ===================================================================== */

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface);
  --btn-color: var(--text);
  --btn-border: var(--border-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1.5px solid var(--btn-border);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-color);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-base);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
    background-color var(--dur), color var(--dur), border-color var(--dur);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform var(--dur) var(--ease-out);
}

.btn:hover svg.icon-move {
  transform: translateX(4px);
}

.btn--primary {
  --btn-bg: var(--primary);
  --btn-color: #fff;
  --btn-border: transparent;
  background: var(--grad-brand);
}

.btn--primary:hover {
  box-shadow: var(--sh-glow);
}

.btn--cta {
  --btn-color: #fff;
  --btn-border: transparent;
  background: var(--grad-cta);
}

.btn--cta:hover {
  box-shadow: var(--sh-glow-cta);
}

/* Light sweep across main buttons on hover (and on a loop for .btn--shine) */
.btn--cta::after,
.btn--primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

.btn--cta:hover::after,
.btn--primary:hover::after {
  animation: shine 0.85s var(--ease-out);
}

.btn--shine::after {
  animation: shine 4.5s var(--ease-out) 1.5s infinite;
}

@keyframes shine {
  0%   { left: -80%; }
  25%, 100% { left: 130%; }
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-border: transparent;
  --btn-color: var(--primary);
}

.btn--ghost:hover {
  --btn-bg: var(--primary-50);
  box-shadow: none;
}

.btn--outline {
  --btn-bg: transparent;
  --btn-border: var(--primary);
  --btn-color: var(--primary);
}

.btn--outline:hover {
  --btn-bg: var(--primary);
  --btn-color: #fff;
}

.btn--white {
  --btn-bg: #fff;
  --btn-color: var(--primary-700);
  --btn-border: transparent;
}

.btn--sm {
  min-height: 38px;
  padding: 8px 16px;
  font-size: var(--fs-sm);
}

.btn--lg {
  min-height: 56px;
  padding: 16px 32px;
  font-size: var(--fs-md);
}

.btn--block {
  width: 100%;
}

.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text);
  position: relative;
  transition: background-color var(--dur), color var(--dur), transform var(--dur) var(--ease-out);
}

.btn-icon:hover {
  background: var(--primary-50);
  color: var(--primary);
}

.btn-icon:active {
  transform: scale(0.92);
}

/* Ripple (created by JS) */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.25;
  transform: scale(0);
  pointer-events: none;
  animation: ripple 0.6s var(--ease-out) forwards;
  z-index: -1;
}

/* ---------- Badges & chips ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.3;
  background: var(--primary-50);
  color: var(--primary);
}

.badge--accent { background: var(--accent-50); color: var(--accent-600); }
.badge--cta { background: var(--cta-50); color: var(--cta-600); }
.badge--success { background: rgba(22, 163, 74, 0.12); color: var(--success); }

.badge svg { width: 13px; height: 13px; }

.count-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--cta);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border: 2px solid var(--surface);
}

.count-badge[data-count="0"] {
  display: none;
}

.count-badge.bump {
  animation: bump 0.5s var(--ease-spring);
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--sh-sm);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
    border-color var(--dur);
}

.card:hover {
  box-shadow: var(--sh-lg);
  border-color: transparent;
}

/* Animated gradient border on hover */
/* Mouse-following spotlight inside every card (position set by main.js) */
.card {
  --mx: 50%;
  --my: 50%;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(10, 108, 255, 0.08), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.card:hover::after {
  opacity: 1;
}

/* Gradient border that glows where the cursor is */
.card--glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1.5px;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx) var(--my), var(--primary), var(--accent) 40%, rgba(10, 108, 255, 0.15) 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--dur);
  pointer-events: none;
}

.card--glow:hover::before {
  opacity: 1;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--primary-50);
  color: var(--primary);
  margin-bottom: var(--sp-4);
  transition: transform var(--dur) var(--ease-spring), background-color var(--dur), color var(--dur);
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.card:hover .card-icon {
  transform: scale(1.08);
  background: var(--primary);
  color: #fff;
}

.card-icon--accent { background: var(--accent-50); color: var(--accent-600); }
.card:hover .card-icon--accent { background: var(--accent); }
.card-icon--cta { background: var(--cta-50); color: var(--cta); }
.card:hover .card-icon--cta { background: var(--cta); }

/* ---------- Icon colour tones (one per health concern / department) ---------- */
.tone--red     { --tone: #e11d48; --tone-bg: #ffe4e8; }
.tone--rose    { --tone: #db2777; --tone-bg: #fce7f3; }
.tone--orange  { --tone: #ea580c; --tone-bg: #ffedd5; }
.tone--amber   { --tone: #d97706; --tone-bg: #fef3c7; }
.tone--lime    { --tone: #65a30d; --tone-bg: #ecfccb; }
.tone--green   { --tone: #16a34a; --tone-bg: #dcfce7; }
.tone--teal    { --tone: #0d9488; --tone-bg: #ccfbf1; }
.tone--sky     { --tone: #0284c7; --tone-bg: #e0f2fe; }
.tone--blue    { --tone: #2563eb; --tone-bg: #dbeafe; }
.tone--indigo  { --tone: #4f46e5; --tone-bg: #e0e7ff; }
.tone--violet  { --tone: #7c3aed; --tone-bg: #ede9fe; }
.tone--fuchsia { --tone: #c026d3; --tone-bg: #fae8ff; }

.card-icon.tone,
.concern__icon.tone {
  background: linear-gradient(150deg, var(--tone-bg), color-mix(in srgb, var(--tone-bg) 55%, #fff));
  color: var(--tone);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 14%, transparent);
  transition: transform 0.45s var(--ease-spring), background 0.3s, color 0.3s, box-shadow 0.3s;
}

.card:hover .card-icon.tone,
.concern:hover .concern__icon.tone,
.dept:hover .concern__icon.tone,
.save-item:hover .card-icon.tone {
  background: linear-gradient(150deg, var(--tone), color-mix(in srgb, var(--tone) 72%, #000));
  color: #fff;
  box-shadow: 0 12px 24px -10px color-mix(in srgb, var(--tone) 70%, transparent);
}

/* ---------- Hover zoom for listing cards ----------
   Uses the individual `scale` / `translate` properties so it stacks with the
   GSAP reveal and tilt transforms instead of fighting them. */
.test-card,
.pkg-card,
.concern,
.dept {
  transition: scale 0.4s var(--ease-out), translate 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out),
    border-color 0.3s;
}

.test-card:hover,
.pkg-card:hover {
  z-index: 2;
  scale: 1.035;
  translate: 0 -4px;
}

.concern:hover,
.dept:hover {
  scale: 1.06;
  translate: 0 -4px;
}

@media (prefers-reduced-motion: reduce) {
  .test-card:hover,
  .pkg-card:hover,
  .concern:hover,
  .dept:hover { scale: none; translate: none; }
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--glass-border);
}

/* Test / package card (used across pages) */
.test-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  height: 100%;
}

.test-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
}

/* Big, centred organ icon at the top of test & package cards;
   the "% OFF" badge sits in the top-right corner */
.card .test-card__top,
.card .pkg-card__head {
  position: relative;
  justify-content: center;
  padding-block: 4px 6px;
}

.card .test-card__top .card-icon,
.card .pkg-card__head .card-icon {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px rgba(10, 108, 255, 0.06);
}

.card .test-card__top .card-icon svg,
.card .pkg-card__head .card-icon svg {
  width: 40px;
  height: 40px;
  stroke-width: 1.75;
}

.card .test-card__top .badge,
.card .pkg-card__head .badge {
  position: absolute;
  top: 0;
  right: 0;
}

/* Cards with a corner ribbon ("Best Seller"): badge moves to the top-left */
.card .pkg-card__ribbon + .pkg-card__head .badge {
  right: auto;
  left: 0;
  margin-right: 0;
}

.test-card__title {
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.3;
  /* Always reserve 2 lines so cards in the same row line up */
  min-height: 2.6em;
}

/* Package taglines also get the same 2-line space */
.pkg-card__tagline {
  min-height: 3.2em;
  line-height: 1.6;
}

.test-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.test-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.test-card__meta svg {
  width: 15px;
  height: 15px;
}

.test-card__foot {
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 0;
}

.price__now {
  font-family: var(--font-head);
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--text);
}

.price__mrp {
  font-size: var(--fs-sm);
  color: var(--muted);
  text-decoration: line-through;
}

/* ---------- Forms ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--dur), box-shadow var(--dur);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-100);
}

.field-error {
  color: var(--danger);
  font-size: var(--fs-sm);
}

/* ---------- Alerts / flash ---------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-weight: 500;
  background: var(--primary-50);
  color: var(--primary-700);
}

.alert--success { background: rgba(22, 163, 74, 0.1); color: var(--success); }
.alert--error { background: rgba(225, 29, 72, 0.1); color: var(--danger); }
.alert--warning { background: rgba(245, 158, 11, 0.12); color: #b45309; }

.toast-stack {
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--mobile-bar-h));
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 32px));
}

@media (min-width: 768px) {
  .toast-stack { bottom: 96px; }
}

.toast {
  box-shadow: var(--sh-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  animation: toast-in 0.45s var(--ease-spring);
}

/* ---------- Page transition overlay ---------- */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: var(--grad-brand);
  transform: scaleY(0);
  transform-origin: bottom;
}

.page-transition.is-leaving {
  animation: curtain-in 0.45s var(--ease-in-out) forwards;
}

/* Arriving from an internal link: start covered, then reveal (pure CSS) */
.pt-enter .page-transition {
  transform: scaleY(1);
  animation: curtain-out 0.55s var(--ease-in-out) 0.05s forwards;
}

/* ---------- Top strip ---------- */
.topbar {
  height: var(--topbar-h);
  background: var(--grad-dark);
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fs-sm);
}

.topbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.topbar__list {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-width: 0;
}

.topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: color var(--dur-fast);
}

a.topbar__item:hover {
  color: #fff;
}

.topbar__item svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.topbar__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(46, 224, 198, 0.7);
  animation: pulse-ring 2s infinite;
}

.lang-select {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--r-pill);
  padding: 2px 10px;
  color: #fff;
  font-size: var(--fs-xs);
}

.lang-select option {
  color: #0f1b33;
}

@media (max-width: 767px) {
  .topbar__hide-sm { display: none; }
  .topbar__list { gap: var(--sp-4); }
}

@media (max-width: 1023px) {
  .topbar__hide-md { display: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid transparent;
  transition: transform 0.4s var(--ease-out), background-color var(--dur), border-color var(--dur),
    box-shadow var(--dur);
}

/* On scroll the header turns into a floating bar with rounded corners (same big size) */
.site-header.is-scrolled {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  border: 1px solid transparent;
  transition: height var(--dur) var(--ease-out), margin var(--dur) var(--ease-out), padding var(--dur) var(--ease-out),
    border-radius var(--dur) var(--ease-out), background-color var(--dur), box-shadow var(--dur), border-color var(--dur);
}

.site-header.is-scrolled .header__inner {
  width: calc(100% - 24px);
  height: calc(var(--header-h) - 8px);
  margin-top: 10px;
  padding-inline: 18px 12px;
  border-radius: var(--r-pill);
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 14px 40px -14px rgba(15, 27, 51, 0.22), 0 0 0 1px rgba(15, 27, 51, 0.04);
}

@media (max-width: 767px) {
  .site-header.is-scrolled .header__inner {
    width: calc(100% - 16px);
    height: 60px;
    margin-top: 8px;
  }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo__mark {
  width: 48px;
  height: 48px;
  transition: transform 0.6s var(--ease-spring);
}

.logo:hover .logo__mark {
  transform: rotate(-12deg) scale(1.05);
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo__name {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo__sub {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Big header: wider than the page content so the larger logo, menu and buttons fit */
.site-header .header__inner {
  max-width: 1440px;
  padding-inline: min(var(--gutter), 24px);
  gap: var(--sp-4);
}

.header__actions { gap: 6px; }
.header__actions .btn-icon { width: 42px; height: 42px; }
.header__actions .btn-icon svg { width: 21px; height: 21px; }
.header__book.btn--sm { min-height: 42px; padding: 9px 18px; font-size: 0.875rem; }
.header__book.btn--sm svg { width: 16px; height: 16px; }

/* Staff login link */
.header__login.btn--sm { min-height: 42px; padding: 9px 14px; font-size: 0.875rem; }
.header__login svg { width: 18px; height: 18px; }

/* When the full navigation collapses, keep the login button compact. */
@media (max-width: 1279px) {
  .header__login.btn--sm { width: 42px; padding: 0; justify-content: center; border-radius: 50%; }
  .header__login span { display: none; }
}

/* Phones: a compact version so the header doesn't take a big part of the screen */
@media (max-width: 767px) {
  .site-header .header__inner { height: 66px; }
  .logo__mark { width: 40px; height: 40px; }
  .site-header .header__inner { gap: 8px; }
  .header__actions { gap: 2px; }
  .header__actions .btn-icon { width: 40px; height: 40px; }
  .header__login.btn--sm { width: 40px; min-height: 40px; }
}

/* Menu links: compact text with clear space between items */
.main-nav__list .main-nav__link {
  padding-inline: 12px;
  font-size: 0.92rem;
}

/* Main navigation */
.main-nav {
  margin-left: auto;
}

.main-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.main-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 10px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  color: var(--text-2);
  transition: color var(--dur-fast);
}

.main-nav__link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--dur) var(--ease-out);
}

.main-nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--ease-out);
}

.main-nav__link:hover,
.main-nav__link.is-active,
.has-mega.is-open > .main-nav__link {
  color: var(--primary);
}

.main-nav__link:hover::after,
.main-nav__link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.has-mega.is-open > .main-nav__link svg {
  transform: rotate(180deg);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav + .header__actions {
  margin-left: var(--sp-3);
}

/* Mega menu */
.has-mega {
  position: static;
}

.mega {
  position: absolute;
  left: 50%;
  top: 100%;
  width: min(1100px, calc(100vw - 2 * var(--gutter)));
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh-lg);
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap: var(--sp-6);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility var(--dur);
}

.has-mega.is-open .mega {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.mega__title {
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-3);
}

.mega__list {
  display: grid;
  gap: 2px;
}

.mega__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--text-2);
  transition: background-color var(--dur-fast), color var(--dur-fast), transform var(--dur) var(--ease-out);
}

.mega__link span.mega__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary-50);
  color: var(--primary);
}

.mega__link svg {
  width: 18px;
  height: 18px;
}

.mega__link:hover {
  background: var(--primary-50);
  color: var(--primary);
  transform: translateX(4px);
}

.mega__promo {
  position: relative;
  overflow: hidden;
  padding: var(--sp-5);
  border-radius: var(--r-md);
  background: var(--grad-brand);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.mega__promo h4 {
  color: #fff;
  font-size: var(--fs-lg);
}

.mega__promo p {
  opacity: 0.9;
  font-size: var(--fs-sm);
}

.mega__promo .btn {
  align-self: flex-start;
  margin-top: auto;
}

.mega__promo::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

/* Hamburger */
.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  position: relative;
}

.hamburger span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur-fast), top var(--dur) var(--ease-out);
}

.hamburger span:nth-child(1) { top: 14px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 28px; }

.hamburger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.hamburger[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 1279px) {
  .main-nav { display: none; }
  .hamburger { display: inline-block; }
  .header__actions,
  .main-nav + .header__actions { margin-left: auto; }
}

@media (max-width: 480px) {
  .logo__sub { display: none; }
  .logo__name { font-size: 1.05rem; }
  .header__book { display: none; }
}

/* ---------- Mobile drawer ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(7, 15, 31, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur), visibility var(--dur);
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  width: min(380px, 88vw);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  box-shadow: var(--sh-lg);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.5s var(--ease-out), visibility 0.5s;
}

body.nav-open .mobile-nav {
  transform: translateX(0);
  visibility: visible;
}

body.nav-open .drawer-backdrop {
  opacity: 1;
  visibility: visible;
}

.mobile-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.mobile-nav__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4) var(--sp-5);
  overscroll-behavior: contain;
}

.mobile-nav__link,
.mobile-nav__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: var(--fs-md);
  text-align: left;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out), color var(--dur-fast);
}

body.nav-open .mobile-nav__link,
body.nav-open .mobile-nav__toggle {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.08s + var(--i, 0) * 0.04s);
}

.mobile-nav__link.is-active,
.mobile-nav__link:hover {
  color: var(--primary);
}

.mobile-nav__toggle svg {
  transition: transform var(--dur) var(--ease-out);
}

.mobile-nav__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.mobile-nav__sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur) var(--ease-out);
}

.mobile-nav__sub > div {
  overflow: hidden;
}

.mobile-nav__toggle[aria-expanded="true"] + .mobile-nav__sub {
  grid-template-rows: 1fr;
}

.mobile-nav__sub a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  color: var(--text-2);
  font-weight: 500;
}

.mobile-nav__sub a svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.mobile-nav__foot {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border);
  display: grid;
  gap: var(--sp-3);
}

/* ---------- Search overlay ---------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh var(--gutter) var(--gutter);
  background: rgba(7, 15, 31, 0.55);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur), visibility var(--dur);
}

.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.search-panel {
  width: min(720px, 100%);
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  overflow: hidden;
  transform: translateY(-20px) scale(0.98);
  transition: transform 0.45s var(--ease-spring);
}

.search-overlay.is-open .search-panel {
  transform: none;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 20px;
}

.search-box svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 56px;
  border: 0;
  background: transparent;
  font-size: var(--fs-md);
}

.search-box input:focus {
  outline: none;
}

.search-results {
  border-top: 1px solid var(--border);
  max-height: 55vh;
  overflow-y: auto;
  padding: var(--sp-3);
}

.search-hint {
  padding: var(--sp-3);
  color: var(--muted);
  font-size: var(--fs-sm);
}

.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 var(--sp-3) var(--sp-3);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
  transition: all var(--dur-fast);
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: var(--grad-dark);
  color: rgba(255, 255, 255, 0.72);
  padding-top: var(--sp-8);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -150px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 194, 168, 0.18), transparent 70%);
  pointer-events: none;
}

.site-footer h4 {
  color: #fff;
  font-size: var(--fs-base);
  margin-bottom: var(--sp-4);
}

.footer-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  padding: var(--sp-6);
  margin-bottom: var(--sp-7);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-cta h3 {
  color: #fff;
}

.footer-cta p {
  margin-top: 6px;
}

.newsletter {
  display: flex;
  gap: 8px;
  flex: 1 1 340px;
  max-width: 460px;
}

.newsletter .input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: var(--r-pill);
}

.newsletter .input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--sp-6);
}

@media (max-width: 1023px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-about p {
  margin: var(--sp-4) 0;
  max-width: 340px;
}

.site-footer .logo__name { color: #fff; }
.site-footer .logo__sub { color: rgba(255, 255, 255, 0.55); }

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--dur-fast), transform var(--dur) var(--ease-out);
}

.footer-links a:hover {
  color: #fff;
  transform: translateX(4px);
}

.footer-contact li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.footer-contact svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  margin-top: 3px;
}

.socials {
  display: flex;
  gap: 10px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background-color var(--dur), transform var(--dur) var(--ease-spring);
}

.socials a:hover {
  background: var(--primary);
  transform: translateY(-4px);
}

.socials svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  margin-top: var(--sp-7);
  padding: var(--sp-5) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
}

.footer-bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.footer-bottom a:hover {
  color: #fff;
}

/* Giant brand name at the very bottom of the footer */
.footer-mark {
  margin-top: -0.12em;
  font-family: var(--font-head);
  font-size: clamp(4rem, 2rem + 17vw, 17rem);
  font-weight: 800;
  line-height: 0.78;
  letter-spacing: -0.05em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  color: transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.02) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
  pointer-events: none;
}

/* ---------- Mobile bottom bar ---------- */
.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  height: var(--mobile-bar-h);
  display: none;
  grid-template-columns: repeat(4, 1fr);
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 767px) {
  .mobile-bar { display: grid; }
}

.mobile-bar a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}

.mobile-bar a svg {
  width: 22px;
  height: 22px;
}

.mobile-bar a.is-primary {
  color: #fff;
}

.mobile-bar a.is-primary::before {
  content: "";
  position: absolute;
  inset: 6px 8px;
  z-index: -1;
  border-radius: 16px;
  background: var(--grad-cta);
  box-shadow: var(--sh-glow-cta);
}

.mobile-bar .count-badge {
  top: 6px;
  right: calc(50% - 22px);
}

/* ---------- Floating buttons ---------- */
.fab-whatsapp {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 95;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 30px -6px rgba(37, 211, 102, 0.6);
  transition: transform var(--dur) var(--ease-spring);
}

.fab-whatsapp::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25d366;
  animation: ping 2s var(--ease-out) infinite;
}

.fab-whatsapp:hover {
  transform: scale(1.1) rotate(-8deg);
}

.fab-whatsapp svg {
  width: 30px;
  height: 30px;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 95;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--sh-md);
  display: grid;
  place-items: center;
  color: var(--primary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity var(--dur), visibility var(--dur), transform var(--dur) var(--ease-out);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-to-top svg.progress-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring__track {
  stroke: var(--border);
}

.progress-ring__bar {
  stroke: var(--primary);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear;
}

@media (max-width: 767px) {
  .fab-whatsapp {
    bottom: calc(var(--mobile-bar-h) + 16px);
    right: 16px;
    width: 52px;
    height: 52px;
  }

  .back-to-top {
    bottom: calc(var(--mobile-bar-h) + 80px);
    right: 17px;
  }
}

/* ---------- Scroll progress bar (top of page) ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 110;
  height: 3px;
  width: 100%;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* =====================================================================
   Shared components added in Phase 2
   ===================================================================== */

/* Whole-card link: <a class="stretched"> covers its .card */
.stretched::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.card :is(button, .btn, .add-cart) {
  position: relative;
  z-index: 2;
}

/* Add to cart button */
.add-cart {
  --btn-bg: var(--primary-50);
  --btn-color: var(--primary);
  --btn-border: transparent;
  min-width: 92px;
}

.add-cart:hover {
  --btn-bg: var(--primary);
  --btn-color: #fff;
}

.add-cart .ac-done,
.add-cart .ac-label-done,
.add-cart.is-added .ac-add,
.add-cart.is-added .ac-label-add {
  display: none;
}

.add-cart.is-added .ac-done,
.add-cart.is-added .ac-label-done {
  display: inline;
}

.add-cart.is-added {
  --btn-bg: var(--success);
  --btn-color: #fff;
}

.add-cart.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

/* Stars */
.stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #f5b301;
}

.stars svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.stars svg.is-off {
  color: var(--border-strong);
}

.stars strong {
  margin-left: 6px;
  color: var(--text);
  font-family: var(--font-head);
}

.stars--sm svg {
  width: 15px;
  height: 15px;
}

/* Initial avatars */
.avatar {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: hsl(var(--hue, 214) 85% 94%);
  color: hsl(var(--hue, 214) 70% 38%);
  font-family: var(--font-head);
  font-weight: 800;
}

/* Check list */
.check-list {
  display: grid;
  gap: 12px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
  color: var(--text-2);
}

.check-list svg {
  color: var(--success);
  margin-top: 2px;
}

/* Tabs with sliding indicator */
.tabs {
  position: relative;
  display: flex;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto var(--sp-6);
  padding: 6px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  z-index: 1;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--text-2);
  white-space: nowrap;
  transition: color var(--dur);
}

.tab.is-active {
  color: #fff;
}

.tabs__indicator {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 0;
  border-radius: var(--r-pill);
  background: var(--grad-brand);
  box-shadow: var(--sh-glow);
  transition: transform 0.45s var(--ease-out), width 0.45s var(--ease-out);
}

/* Slider buttons */
.slider-nav {
  display: flex;
  gap: 10px;
}

.slider-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--sh-sm);
  transition: background-color var(--dur), color var(--dur), transform var(--dur) var(--ease-out);
}

.slider-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: scale(1.06);
}

.slider-btn.swiper-button-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Swiper pagination in brand colours */
.swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: var(--border-strong);
  opacity: 1;
  transition: width var(--dur) var(--ease-out), background-color var(--dur);
}

.swiper-pagination-bullet-active {
  width: 26px;
  border-radius: 6px;
  background: var(--primary);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: var(--gutter);
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 15, 31, 0.55);
  backdrop-filter: blur(6px);
  animation: fade-in 0.3s ease;
}

.modal__panel {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--sh-lg);
  animation: modal-in 0.45s var(--ease-spring);
}

.modal__panel h3 {
  margin-bottom: 6px;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.modal__form {
  display: grid;
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}

.modal__note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.modal__note svg {
  width: 14px;
  height: 14px;
}

@keyframes fade-in {
  from { opacity: 0; }
}

/* =====================================================================
   Shared components added in Phase 3
   ===================================================================== */

/* Inner-page hero: same light grid + warm flare as the homepage */
.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(1.75rem, 1rem + 3vw, 3.5rem) clamp(2rem, 1.5rem + 2vw, 3rem);
  background: #f7f9fc;
  border-bottom: 1px solid var(--border);
}

.page-hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(15, 27, 51, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 27, 51, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 20%, transparent 100%);
}

.page-hero__flare {
  position: absolute;
  z-index: -1;
  top: -220px;
  right: -160px;
  width: 560px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 107, 53, 0.3), rgba(255, 150, 90, 0.1) 60%, transparent);
  filter: blur(16px);
  pointer-events: none;
}

.page-hero h1 {
  max-width: 820px;
  font-size: var(--fs-2xl);
}

.page-hero__lead {
  max-width: 680px;
  margin-top: var(--sp-3);
  color: var(--text-2);
  font-size: var(--fs-md);
}

.page-hero--center {
  text-align: center;
}

.page-hero--center h1,
.page-hero--center .page-hero__lead {
  margin-inline: auto;
}

.page-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: var(--sp-5);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
}

.page-hero__chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.page-hero__chips svg {
  width: 17px;
  height: 17px;
  color: var(--success);
}

.not-found__code {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(5rem, 3rem + 10vw, 9rem);
  font-weight: 800;
  line-height: 1;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Breadcrumbs */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 var(--sp-4);
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 4px;
  color: var(--border-strong);
}

.breadcrumbs a {
  font-weight: 600;
  color: var(--text-2);
  transition: color var(--dur-fast);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

/* Removable filter chip */
.chip--remove svg {
  width: 14px;
  height: 14px;
}

.chip--remove:hover {
  border-color: var(--danger);
  background: rgba(225, 29, 72, 0.06);
  color: var(--danger);
}

/* Empty state */
.empty-state {
  display: grid;
  justify-items: center;
  gap: var(--sp-3);
  padding: var(--sp-7) var(--sp-5);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  text-align: center;
}

.empty-state p {
  max-width: 420px;
  color: var(--muted);
}

.empty-state__icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--grad-soft);
  color: var(--primary);
  animation: float 5s var(--ease-in-out) infinite;
}

.empty-state__icon svg {
  width: 38px;
  height: 38px;
}

/* Help band (prescription / call back) */
.help-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh-md);
}

.help-band > div:nth-child(2) {
  flex: 1 1 320px;
}

.help-band p {
  margin-top: 4px;
  color: var(--muted);
}

.help-band__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--grad-cta);
  color: #fff;
  box-shadow: var(--sh-glow-cta);
}

.help-band .btn svg {
  width: 18px;
  height: 18px;
}

/* Live search dropdown (header overlay + hero) */
.ac-group + .ac-group {
  margin-top: var(--sp-3);
}

.ac-title {
  padding: 6px 10px;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.ac-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--r-sm);
  transition: background-color var(--dur-fast);
}

.ac-item:hover,
.ac-item.is-active {
  background: var(--primary-50);
}

.ac-item__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--primary);
}

.ac-item__icon svg {
  width: 18px;
  height: 18px;
}

.ac-item__body {
  flex: 1;
  min-width: 0;
}

.ac-item__name {
  display: block;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ac-item__name mark {
  background: none;
  color: var(--primary);
}

.ac-item__meta {
  display: block;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.ac-item__price {
  font-family: var(--font-head);
  font-weight: 800;
  white-space: nowrap;
}

.ac-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: var(--sp-3);
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-weight: 700;
  color: var(--primary);
}

.ac-all:hover {
  background: var(--primary-50);
}

.ac-empty {
  padding: var(--sp-4) 10px;
  color: var(--muted);
}

.ac-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  max-height: min(60vh, 460px);
  overflow-y: auto;
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh-lg);
  text-align: left;
  animation: modal-in 0.3s var(--ease-out);
}

.ac-dropdown[hidden] {
  display: none;
}

/* Mobile sticky price bar on detail pages */
.detail-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--mobile-bar-h);
  z-index: 89;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 10px var(--gutter);
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -10px 30px -12px rgba(15, 27, 51, 0.2);
  transform: translateY(110%);
  transition: transform 0.4s var(--ease-out);
}

.detail-bar.is-visible {
  transform: none;
}

.detail-bar__name {
  display: block;
  max-width: 50vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-sm);
  font-weight: 700;
}

@media (max-width: 1023px) {
  .detail-bar { display: flex; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .detail-bar { bottom: 0; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
}

/* Blog covers with an uploaded photo: hide the placeholder icon */
.has-photo > svg,
.has-photo > i,
.has-photo > span {
  display: none;
}


/* "About test" link at the bottom of every test card (above the card's full-size link) */
.test-card__about {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px -4px -4px;
  padding: 8px 10px;
  border-top: 1px dashed var(--border);
  border-radius: 0 0 12px 12px;
  color: var(--primary);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-decoration: none;
  transition: background var(--dur), color var(--dur);
}

.test-card__about:hover {
  background: var(--primary-50);
}

.test-card__about svg {
  width: 16px;
  height: 16px;
}
