/* ==========================================================================
   St Chad's Pharmacy — public stylesheet (v4, full refresh + reference design)
   Keeps every v3 selector so existing pages keep working.
   Adds the reference-matched homepage design (hero-new, mega-cards, etc.)
   and refreshes .filters / .card / .pagination / .notice for the new look.
   ========================================================================== */

/* 1. Tokens --------------------------------------------------------------- */
:root {
  /* Brand */
  --ink:      #272336;
  --muted:    #655d70;
  --green:    #592d80;   /* brand purple (name kept for compatibility) */
  --green-2:  #7a4fa0;
  --pink:     #b81870;
  --pink-2:   #d81b7a;   /* brighter pink used on the reference homepage */
  --pink-3:   #b01262;
  --lime:     #f3d4e7;
  --line:     #ebe3ef;
  --cream:    #faf7fc;
  --white:    #ffffff;
  --danger:   #8c1c46;
  --success:  #1f6e43;
  --purple:   #7a4a9c;   /* mega-card purple */

  /* Derived tints */
  --green-tint:   color-mix(in srgb, var(--green) 7%,  white);
  --green-tint-2: color-mix(in srgb, var(--green) 13%, white);
  --pink-tint:    color-mix(in srgb, var(--pink) 7%,  white);
  --pink-tint-2:  color-mix(in srgb, var(--pink) 13%, white);
  --pink-soft:    #fce8f1;
  --pink-line:    #eecfe0;
  --focus-ring:   color-mix(in srgb, var(--green) 26%, transparent);

  /* Signature gradient used on primary actions */
  --grad: linear-gradient(120deg, #5a2c84 0%, #7b3a9c 45%, #b81870 100%);

  /* Shape */
  --radius:    14px;
  --radius-lg: 22px;
  --pill:      999px;

  /* Elevation (tinted, soft, layered) */
  --shadow-sm: 0 1px 2px rgb(39 35 54 / .06), 0 2px 6px rgb(39 35 54 / .04);
  --shadow:    0 1px 2px rgb(39 35 54 / .05), 0 12px 32px -10px rgb(89 45 128 / .22);
  --shadow-lg: 0 30px 90px -20px rgb(39 35 54 / .45);
  --glow:      0 10px 26px -8px rgb(184 24 112 / .45);

  /* Type */
  --font: "Inter var", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step--1: clamp(.8rem, .78rem + .1vw, .875rem);
  --step-0:  clamp(1rem, .97rem + .15vw, 1.0625rem);
  --step-1:  clamp(1.15rem, 1.08rem + .35vw, 1.35rem);
  --step-2:  clamp(1.4rem, 1.2rem + 1vw, 2rem);
  --step-3:  clamp(1.8rem, 1.4rem + 2vw, 2.65rem);
  --step-4:  clamp(2.2rem, 1.5rem + 3.4vw, 4.1rem);

  /* Layout */
  --gutter:   clamp(16px, 4vw, 28px);
  --header-h: 84px;
  --ease:     cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

/* 2. Reset & base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font: var(--step-0)/1.6 var(--font);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

main { flex: 1; }
img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
h1, h2 { letter-spacing: -.045em; }
h2 { font-size: var(--step-3); line-height: 1.08; }
h3 { font-size: var(--step-1); line-height: 1.25; letter-spacing: -.015em; }

::selection { background: var(--lime); color: var(--ink); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 8px;
}

/* 3. Helpers -------------------------------------------------------------- */
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.muted { color: var(--muted); }
.section { padding-block: clamp(36px, 6vw, 72px); }
.section.soft { background: var(--cream); }
.section.sale-area {
  background:
    radial-gradient(ellipse 50% 80% at 100% 0%, var(--pink-tint-2), transparent 70%),
    var(--pink-tint);
}

/* 4. Buttons -------------------------------------------------------------- */
.btn, .solid {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 22px;
  border: 0;
  border-radius: var(--pill);
  background: var(--grad);
  background-size: 160% 100%;
  background-position: 0% 0;
  color: #fff;
  font-weight: 700; line-height: 1.2; text-align: center;
  letter-spacing: -.005em;
  cursor: pointer;
  box-shadow: 0 1px 0 rgb(255 255 255 / .25) inset, 0 8px 20px -8px rgb(89 45 128 / .6);
  transition: background-position .4s var(--ease), box-shadow .25s ease, transform .15s var(--ease);
}
.btn:hover, .solid:hover {
  background-position: 100% 0;
  box-shadow: 0 1px 0 rgb(255 255 255 / .25) inset, var(--glow);
  transform: translateY(-1px);
}
.btn:active, .solid:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn[disabled], .btn[disabled]:hover {
  background: #d9cfe0; box-shadow: none; transform: none;
  color: #fff; cursor: not-allowed;
}
.btn.outline {
  background: #fff; color: var(--green);
  box-shadow: inset 0 0 0 1.5px var(--green);
}
.btn.outline:hover { background: var(--green-tint); box-shadow: inset 0 0 0 1.5px var(--green); transform: none; }
.btn.danger { background: var(--danger); box-shadow: var(--shadow-sm); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 82%, black); box-shadow: var(--shadow-sm); }
.btn.full { width: 100%; }

.quiet {
  background: none; border: 0; padding: 0;
  color: var(--green); font-weight: 700;
  text-decoration: underline; text-decoration-thickness: 2px;
  text-decoration-color: color-mix(in srgb, var(--green) 35%, transparent);
  text-underline-offset: 5px;
  cursor: pointer;
  transition: text-decoration-color .15s ease, color .15s ease;
}
.quiet:hover { color: var(--pink); text-decoration-color: currentColor; }

/* 5. Notice bar ----------------------------------------------------------- */
.notice {
  padding: 9px var(--gutter);
  background: linear-gradient(90deg, #4a2268, #5a2c84 50%, #4a2268);
  color: #fff; text-align: center;
  font-size: var(--step--1); font-weight: 500;
  text-wrap: balance;
}

/* ==========================================================================
   REFERENCE-MATCHED HEADER (top bar + nav used on index.php)
   ========================================================================== */

.top-bar { padding: 15px 0; background: #fff; }
.top-bar-wrap {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 20px;
}
.header-logo { display: flex; flex-direction: column; }
.logo-row { display: flex; align-items: center; gap: 10px; }
.logo-row h1 {
  font-size: 2.2rem; font-weight: 800; color: #333;
  margin: 0; letter-spacing: -.04em; line-height: 1;
  display: flex; align-items: center;
}
.logo-row h1 span { color: var(--pink-2); }
.header-logo p {
  font-size: .8rem; color: #333; margin: 6px 0 0 0;
  line-height: 1.3; font-weight: 500;
}
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }

.social-icons { display: flex; gap: 8px; }
.social-icons a {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--pink-2); color: #fff;
  display: grid; place-items: center;
  transition: background .2s;
}
.social-icons a:hover { background: var(--pink-3); }
.social-icons svg { width: 16px; height: 16px; stroke-width: 2.5; }

.header-search { display: flex; position: relative; width: 300px; }
.header-search input {
  width: 100%; padding: 10px 40px 10px 16px;
  border: 1px solid #ddd; border-radius: 4px; font-size: .9rem;
}
.header-search button {
  position: absolute; right: 0; top: 0; height: 100%; width: 45px;
  background: var(--pink-2); border: none; color: #fff;
  border-radius: 0 4px 4px 0; cursor: pointer;
  display: grid; place-items: center;
}
.header-search svg { width: 18px; height: 18px; }

.main-nav { background: var(--pink-soft); border-bottom: 1px solid var(--pink-line); }
.nav-inner { display: flex; }
.main-nav a {
  padding: 16px 25px;
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; color: #333; font-size: 1rem;
  border-right: 1px solid var(--pink-line);
  transition: background .2s, color .2s;
}
.main-nav a:first-child { border-left: 1px solid var(--pink-line); }
.main-nav a.active { background: var(--pink-2); color: #fff; border-color: var(--pink-2); }
.main-nav a:not(.active):hover { background: #f6d6e5; }
.main-nav svg { width: 18px; height: 18px; stroke: var(--pink-2); }
.main-nav a.active svg { stroke: #fff; }
.nav-chevron svg { width: 14px; height: 14px; }

/* 6. Original site header (still used on other pages) -------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / .86);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: 0 1px 0 var(--line);
}
.mast {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  padding-block: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; min-width: 0; }
.mark {
  display: grid; place-items: center; flex: none;
  width: 48px; aspect-ratio: 1; border-radius: 14px;
  background: linear-gradient(145deg, #fff, var(--pink-tint-2));
  color: var(--pink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pink) 22%, white), var(--shadow-sm);
}
.mark svg { width: 28px; }
.brand-name { line-height: 1.05; font-size: 1.35rem; letter-spacing: -.035em; }
.brand-name b { color: var(--pink); }
.brand-name small {
  display: block; margin-top: 4px;
  color: var(--muted); font-size: .68rem;
  letter-spacing: .01em; font-weight: 500;
}

.mast-actions { display: flex; gap: 10px 8px; align-items: center; flex-wrap: wrap; }
.mast-actions a.desktop-only {
  padding: 8px 14px; border-radius: var(--pill);
  color: var(--green); font-size: .9rem; font-weight: 700;
  transition: background-color .15s ease;
}
.mast-actions a.desktop-only:hover { background: var(--green-tint-2); }

.basket {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 46px; padding: 8px 8px 8px 16px;
  background: #fff;
  border: 1px solid var(--line); border-radius: var(--pill);
  box-shadow: var(--shadow-sm);
  font-weight: 700; cursor: pointer;
  transition: border-color .15s ease, box-shadow .2s ease, transform .15s var(--ease);
}
.basket:hover { border-color: var(--green-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.basket svg { width: 19px; color: var(--green); }
.count {
  display: inline-grid; place-items: center;
  min-width: 28px; height: 28px; padding: 0 8px;
  background: var(--grad); color: #fff;
  border-radius: var(--pill);
  font-size: .82rem; font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* 7. Navigation (desktop) ------------------------------------------------- */
.nav { background: transparent; }
.nav .wrap {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 4px clamp(2px, 1vw, 10px);
  padding-block: 8px 12px;
  font-weight: 700; font-size: .94rem;
}
.nav .wrap > a {
  padding: 8px 16px; border-radius: var(--pill);
  transition: background-color .15s ease, color .15s ease;
}
.nav .wrap > a:hover { background: var(--green-tint-2); color: var(--green); }
.nav .wrap > a[aria-current="page"] { background: var(--green-tint-2); color: var(--green); }
.nav .sale { color: var(--pink); }
.nav .wrap > a.sale:hover { background: var(--pink-tint-2); color: var(--pink); }

/* Mobile-only pieces are hidden on desktop */
.mobile-menu-toggle { display: none; }
.mobile-only-links { display: none; }

/* ==========================================================================
   HERO — reference layout (index.php)
   ========================================================================== */
.hero-new { position: relative; background: var(--cream); overflow: hidden; }
.hero-content-wrap {
  display: flex; align-items: center; gap: 40px;
  padding: 60px 0 100px; position: relative; z-index: 2;
}
.hero-text { flex: 1; max-width: 550px; }
.hero-text h2 {
  font-size: 3.8rem; font-weight: 800; color: #3b2a4a;
  line-height: 1.05; letter-spacing: -.04em; margin-bottom: 20px;
}
.hero-text h2 span { color: var(--pink-2); }
.hero-text p {
  font-size: 1.1rem; color: #333; margin-bottom: 30px;
  line-height: 1.6; font-weight: 500; max-width: 90%;
}
.btn-hero {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--pink-2); color: #fff;
  padding: 14px 28px; border-radius: var(--pill);
  font-weight: 700; font-size: 1.05rem;
  transition: transform .2s, background .2s;
}
.btn-hero:hover { transform: translateY(-2px); background: var(--pink-3); }
.btn-hero svg { width: 18px; height: 18px; stroke-width: 2.5; }
.hero-image { flex: 1; position: relative; display: flex; justify-content: flex-end; }
.hero-image img {
  width: 100%; max-width: 600px;
  border-radius: 20px 20px 0 0;
  box-shadow: -10px 20px 40px rgba(0,0,0,.08);
}
.hero-curve {
  position: absolute; bottom: -1px; left: 0; right: 0;
  width: 100%; z-index: 1; line-height: 0;
}

/* 8. Original hero (kept for other pages) -------------------------------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(44px, 8vw, 96px) clamp(40px, 6vw, 72px);
  text-align: center;
  background:
    radial-gradient(ellipse 55% 65% at 92% 8%,  #f8cfe5 0%, transparent 65%),
    radial-gradient(ellipse 50% 60% at 4% 95%,  #dcc8f1 0%, transparent 65%),
    linear-gradient(115deg, #fbf8ff, #efe3f9 55%, #fcecf4);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgb(89 45 128 / .12) 1px, transparent 1.4px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 40%, #000 20%, transparent 75%);
}
.hero h1 {
  max-width: 20ch;
  margin: 0 auto 20px;
  font-size: var(--step-4);
  font-weight: 800; letter-spacing: -.06em; line-height: 1.02;
}
.hero h1 span {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-intro { max-width: 56ch; margin: 0 auto 32px; color: #51465f; font-size: var(--step-1); line-height: 1.55; }

.search {
  display: flex; align-items: center; gap: 6px;
  width: min(760px, 100%);
  margin-inline: auto;
  padding: 7px 7px 7px 20px;
  border: 1.5px solid transparent;
  border-radius: var(--pill);
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(120deg, #c9a9e3, #f0a6cc) border-box;
  box-shadow: 0 20px 50px -18px rgb(89 45 128 / .45), 0 4px 12px -4px rgb(89 45 128 / .12);
  text-align: left;
  transition: box-shadow .25s ease, background .25s ease;
}
.search:focus-within {
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--grad) border-box;
  box-shadow: 0 0 0 5px var(--focus-ring), 0 22px 54px -18px rgb(89 45 128 / .55);
}
.search svg { width: 22px; flex: none; color: var(--green-2); }
.search input {
  flex: 1; min-width: 0;
  padding: 14px 8px; border: 0; outline: none; background: transparent;
  font-size: max(1.02rem, 16px);
}
.search input::placeholder { color: #9a90a6; }
.search button, .search .btn, .search [type="submit"] {
  flex: none;
  min-height: 52px;
  padding: 0 30px;
  border: 0; border-radius: var(--pill);
  background: var(--grad); background-size: 160% 100%; background-position: 0 0;
  color: #fff;
  font-weight: 700; font-size: 1rem; letter-spacing: -.005em;
  cursor: pointer;
  box-shadow: 0 1px 0 rgb(255 255 255 / .3) inset, 0 10px 22px -8px rgb(184 24 112 / .55);
  transition: background-position .4s var(--ease), box-shadow .25s ease, transform .15s var(--ease);
}
.search button:hover, .search .btn:hover, .search [type="submit"]:hover {
  background-position: 100% 0;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgb(255 255 255 / .3) inset, 0 14px 26px -8px rgb(184 24 112 / .65);
}
.search button:active, .search .btn:active, .search [type="submit"]:active { transform: scale(.98); }
.search button svg, .search .btn svg { width: 20px; color: inherit; }

.popular {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 8px; margin-top: 22px;
  color: var(--muted); font-size: var(--step--1);
}
.pill {
  display: inline-flex; align-items: center;
  min-height: 34px; padding: 5px 14px;
  background: rgb(255 255 255 / .75);
  border: 1px solid #e3cfec; border-radius: var(--pill);
  color: var(--green); font-weight: 600; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color .15s ease, border-color .15s ease, transform .15s var(--ease);
}
.pill:hover { background: #fff; border-color: var(--green-2); transform: translateY(-1px); }

/* 9. Mega cards (reference homepage) ------------------------------------- */
.mega-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: -50px; position: relative; z-index: 5; margin-bottom: 60px;
}
.mega-card {
  border-radius: var(--radius); padding: 30px; color: #fff;
  display: flex; flex-direction: column; align-items: flex-start;
}
.mega-card.pink { background: var(--pink-2); }
.mega-card.purple { background: var(--purple); }
.mega-card-header { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; width: 100%; }
.mega-card svg.main-icon { width: 45px; height: 45px; stroke: #fff; flex-shrink: 0; }
.mega-card h3 { font-size: 1.6rem; font-weight: 800; line-height: 1.1; margin: 0; letter-spacing: -.02em; }
.mega-card p { font-size: .95rem; opacity: .9; margin-bottom: 25px; font-weight: 500; line-height: 1.4; }
.btn-mega {
  background: #fff; color: #333; padding: 10px 20px;
  border-radius: var(--pill); font-weight: 700; font-size: .85rem;
  display: inline-flex; align-items: center; gap: 8px; margin-top: auto;
}
.btn-mega svg { width: 14px; height: 14px; stroke-width: 3; }

/* 10. Reference services grid (used on index.php) ------------------------- */
.section-title-wrap {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; margin-bottom: 30px;
}
.section-title-wrap h2 {
  font-size: 2.2rem; font-weight: 800; color: #3b2a4a;
  letter-spacing: -.03em; margin: 0;
}
.section-title-wrap hr {
  flex: 1; border: 0; height: 2px; background: var(--pink-2); max-width: 400px;
}

.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-bottom: 60px;
}
.service-box {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #fff;
  transition: transform .2s, box-shadow .2s;
}
.service-box:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.service-img { height: 180px; background-size: cover; background-position: center; }
.service-info {
  padding: 15px 20px; display: flex; justify-content: space-between;
  align-items: center; background: #fdf5f9;
}
.service-text h4 {
  font-size: 1.1rem; font-weight: 700; color: var(--pink-2);
  margin: 0 0 4px 0; display: flex; align-items: center; gap: 4px;
}
.service-text p { font-size: .85rem; color: #555; margin: 0; }
.service-arrow {
  width: 30px; height: 30px; background: var(--pink-2); border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
}
.service-arrow svg { width: 16px; height: 16px; stroke: #fff; }

/* 11. Products ------------------------------------------------------------ */
.products, .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: clamp(12px, 2vw, 20px);
}
.product {
  display: flex; flex-direction: column; min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s ease, box-shadow .3s var(--ease), transform .3s var(--ease);
}
.product:hover {
  border-color: color-mix(in srgb, var(--green) 28%, white);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.product .art {
  position: relative;
  display: grid; place-items: center;
  height: clamp(136px, 22vw, 190px);
  padding: clamp(12px, 2vw, 20px) 16px;
  background: linear-gradient(180deg, #fff 40%, var(--cream));
}
.product .product-photo {
  width: 100%; height: 100%; max-height: 146px;
  object-fit: contain;
  transition: transform .4s var(--ease);
}
.product:hover .product-photo { transform: scale(1.05); }
.product .stamp {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  padding: 4px 10px; border-radius: var(--pill);
  background: var(--pink-tint-2); color: var(--pink);
  font-size: .75rem; font-weight: 800; letter-spacing: .01em;
}
.stamp.review { color: var(--green); background: var(--green-tint-2); }
.product-body {
  display: flex; flex: 1; flex-direction: column;
  gap: 7px; padding: 14px 16px 16px;
}
.product-brand { color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .01em; }
.product h3 { font-size: 1rem; line-height: 1.3; }
.product .product-detail-link {
  padding: 0; border: 0; background: none;
  color: var(--ink); text-align: left; cursor: pointer;
}
.product .product-detail-link:hover { color: var(--green); }
.product small { color: var(--muted); }
.product .price { font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.product .price del { margin-left: 7px; color: var(--muted); font-size: .86rem; font-weight: 400; }
.product button, .product .btn {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: auto; min-height: 44px; padding: 9px 14px;
  background: var(--green-tint-2); color: var(--green);
  border: 0; border-radius: var(--pill);
  box-shadow: none;
  font-weight: 700; text-align: center; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .15s var(--ease);
}
.product button:hover, .product .btn:hover {
  background: var(--green); background-image: none; color: #fff;
  box-shadow: none; transform: none;
}
.product button:active, .product .btn:active { transform: scale(.98); }
.product button[disabled] { background: #eee; color: #9a9a9a; cursor: not-allowed; }

/* 12. Reference product carousel (used on index.php) --------------------- */
.carousel-wrap { position: relative; margin-bottom: 60px; padding: 0 40px; }
.carousel-track {
  display: flex; gap: 20px; overflow-x: auto;
  scroll-behavior: smooth; padding-bottom: 20px;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.prod-card {
  flex: 0 0 calc(25% - 15px); min-width: 220px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column;
  align-items: center; text-align: center; background: #fff;
}
.prod-card img { width: 120px; height: 120px; object-fit: contain; margin-bottom: 15px; }
.prod-card h4 { font-size: .95rem; font-weight: 600; color: #333; margin: 0 0 5px 0; line-height: 1.3; }
.prod-card p { font-size: .8rem; color: #777; margin: 0 0 10px 0; }
.prod-price { font-size: 1.1rem; font-weight: 800; color: #3b2a4a; margin-bottom: 15px; }
.btn-basket {
  width: 100%; padding: 10px; border-radius: var(--pill);
  background: var(--pink-2); color: #fff; border: none;
  font-weight: 700; cursor: pointer; transition: background .2s; font-size: .9rem;
}
.btn-basket:hover { background: var(--pink-3); }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--purple); color: #fff; border: none;
  display: grid; place-items: center; cursor: pointer; z-index: 10;
}
.carousel-btn.left { left: 0; }
.carousel-btn.right { right: 0; }
.carousel-btn svg { width: 20px; height: 20px; stroke: #fff; }

/* 13. Reference features bar (used on index.php) ------------------------- */
.features-bar {
  background: var(--pink-soft); padding: 30px 0;
  border-top: 1px solid var(--pink-line); position: relative; overflow: hidden;
}
.features-bar::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 15px; background: var(--pink-2);
}
.features-inner {
  display: flex; justify-content: space-around; align-items: center;
  flex-wrap: wrap; gap: 20px; position: relative; z-index: 2; padding-bottom: 15px;
}
.feature-item {
  display: flex; align-items: center; gap: 15px;
  padding-right: 30px; border-right: 1px solid #d8b4c9;
}
.feature-item:last-child { border-right: none; padding-right: 0; }
.feature-item svg { width: 35px; height: 35px; stroke: var(--pink-2); }
.feature-item span { font-weight: 600; color: #3b2a4a; font-size: 1rem; line-height: 1.3; }
.follow-us { display: flex; align-items: center; gap: 15px; }
.follow-us span { font-weight: 600; color: #3b2a4a; font-size: 1rem; }

/* 14. Condition tiles ----------------------------------------------------- */
.conditions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
  gap: 12px;
}
.condition {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  transition: border-color .15s ease, box-shadow .25s ease, transform .25s var(--ease);
}
.condition:hover { border-color: var(--green-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.condition > span:first-child {
  display: grid; place-items: center; flex: none;
  width: 42px; aspect-ratio: 1;
  background: var(--green-tint-2); color: var(--green);
  border-radius: 12px;
  transition: background-color .2s ease, color .2s ease;
}
.condition:hover > span:first-child { background: var(--green); color: #fff; }
.condition svg { width: 22px; }

/* 15. Featured service cards (used on services.php) ---------------------- */
.featured-services {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.featured-services article {
  display: flex; flex-direction: column; gap: 10px;
  padding: clamp(18px, 2.6vw, 28px);
  background: #fff;
  border: 1px solid #e8dcef; border-radius: var(--radius-lg);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.featured-services article:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.featured-services article:nth-child(2n) { background: linear-gradient(160deg, #f6eefb, #efe3f8); }
.featured-services article:nth-child(3n) { background: linear-gradient(160deg, #fff3f9, #fde6f1); }
.featured-services h3 { font-size: var(--step-1); }
.featured-services .solid { margin-top: auto; align-self: flex-start; }
.service-label { font-size: .86rem; color: var(--green); font-weight: 700; }

/* 16. Section headings ---------------------------------------------------- */
.heading {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end;
  gap: 12px 16px; margin-bottom: clamp(18px, 3vw, 28px);
}
.heading p { margin-top: 6px; color: var(--muted); }

/* 17. Process list -------------------------------------------------------- */
.process { background: var(--cream); }
.process-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 28px;
  margin: 0; padding-left: 24px;
  list-style: decimal;
}
.process-list li::marker { color: var(--pink); font-weight: 800; }
.process-list h3 { margin-bottom: 4px; font-size: 1.06rem; }
.process-list p { color: var(--muted); }

/* 18. Help & FAQ ---------------------------------------------------------- */
.help-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 32px);
  align-items: start;
}
.help details, .help aside {
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.help details { transition: border-color .2s ease, box-shadow .25s ease; }
.help details:hover { border-color: #d9c6e6; }
.help details[open] { border-color: #d3bddf; box-shadow: var(--shadow); }
.help details + details { margin-top: 10px; }
.help summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 28px;
  font-weight: 700; cursor: pointer; list-style: none;
}
.help summary::-webkit-details-marker { display: none; }
.help summary::after {
  content: ""; flex: none;
  width: 9px; height: 9px;
  border-right: 2px solid var(--green); border-bottom: 2px solid var(--green);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .25s var(--ease);
}
.help details[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.help p { margin: 10px 0 2px; color: var(--muted); }
.help aside { background: var(--cream); }
.help aside a { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* 19. Alerts -------------------------------------------------------------- */
.error, .success, .info {
  margin-bottom: 12px; padding: 12px 16px;
  border: 1px solid; border-radius: var(--radius);
  font-size: .95rem;
}
.error   { background: #fdf2f8; color: var(--danger);  border-color: #f2c5de; }
.success { background: #f0f9f3; color: var(--success); border-color: #c4dcce; }
.info    { background: #faf4fc; color: var(--green);   border-color: #decae9; }

/* 20. Forms --------------------------------------------------------------- */
form label, .field { display: block; margin-bottom: 16px; font-weight: 600; font-size: .9rem; }
form label span.req { color: var(--danger); }
form input[type=text], form input[type=email], form input[type=password],
form input[type=search], form input[type=number], form input[type=tel],
form input[type=date], form input[type=url], form select, form textarea {
  display: block; width: 100%;
  min-height: 48px;
  margin-top: 6px; padding: 11px 14px;
  background: #fff; color: var(--ink);
  border: 1.5px solid #ddd0e4; border-radius: 12px;
  font-size: max(1rem, 16px);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
form input:hover, form select:hover, form textarea:hover { border-color: #c9b5d6; }
form select {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
form input:focus, form select:focus, form textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px var(--focus-ring);
  outline: none;
}
form input:user-invalid, form select:user-invalid, form textarea:user-invalid {
  border-color: var(--danger);
  background: #fffafc;
}
form textarea { min-height: 120px; resize: vertical; }
form input[disabled] { background: #f6f1f9; color: var(--muted); cursor: not-allowed; }
.field-row { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.check-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; font-weight: 600; font-size: .9rem;
}
.check-row input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--green); }

/* 21. Filters (treatments.php) ------------------------------------------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: clamp(18px, 3vw, 28px);
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.filters input[type=search],
.filters input[type=text],
.filters select {
  flex: 1 1 240px;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 10px 14px;
  border: 1.5px solid #ddd0e4; border-radius: var(--pill);
  font-size: max(1rem, 16px);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.filters input:focus, .filters select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px var(--focus-ring);
  outline: none;
}
.filters .btn,
.filters button {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 11px 24px;
}

/* 22. Generic card (treatments.php) -------------------------------------- */
.card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s ease, box-shadow .3s var(--ease), transform .3s var(--ease);
}
.card:hover {
  border-color: color-mix(in srgb, var(--green) 28%, white);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.card h3 { font-size: 1.05rem; line-height: 1.3; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--pink-2); }
.card p { color: var(--muted); font-size: .92rem; }
.card .muted { margin-top: auto; font-size: .82rem; font-weight: 600; letter-spacing: .01em; color: var(--green); }

/* 23. Auth pages ---------------------------------------------------------- */
.auth-wrap { max-width: 470px; margin-inline: auto; padding-block: clamp(28px, 7vw, 64px); }
.auth-card {
  padding: clamp(22px, 4.5vw, 36px);
  background: #fff;
  border: 1px solid var(--line); border-radius: 26px;
  box-shadow: var(--shadow);
}
.auth-card h1 { margin-bottom: 6px; font-size: var(--step-2); letter-spacing: -.035em; }
.auth-card .auth-sub { margin-bottom: 24px; color: var(--muted); font-size: .95rem; }
.auth-card .form-actions { margin-top: 10px; }
.auth-card .auth-links {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px;
  margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: .9rem;
}
.auth-card .auth-links a { color: var(--green); font-weight: 700; }
.auth-card .auth-links a:hover { color: var(--pink); text-decoration: underline; text-underline-offset: 3px; }

/* 24. Patient panel ------------------------------------------------------- */
.panel { padding-block: clamp(26px, 4vw, 44px); }
.panel h1 { margin-bottom: 4px; font-size: var(--step-2); letter-spacing: -.035em; }
.panel .panel-sub { margin-bottom: 26px; color: var(--muted); }
.panel-back {
  display: inline-flex; align-items: center; min-height: 32px;
  margin-bottom: 14px;
  color: var(--muted); font-weight: 600; font-size: .9rem;
  transition: color .15s ease;
}
.panel-back:hover { color: var(--green); }

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 16px; margin-bottom: 28px;
}
.panel-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, transform .25s var(--ease), box-shadow .25s ease;
}
a.panel-card:hover { border-color: var(--green-2); box-shadow: var(--shadow); transform: translateY(-3px); }
.panel-card h3 { font-size: 1.05rem; }
.panel-card p { color: var(--muted); font-size: .9rem; }
.panel-card .panel-value {
  margin-top: 8px;
  color: var(--green);
  font-size: clamp(1.7rem, 1.3rem + 1.1vw, 2.2rem);
  font-weight: 800; letter-spacing: -.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* 25. Tables -------------------------------------------------------------- */
.panel-table, .table-wrap {
  background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.panel-table table, .table-wrap table {
  width: 100%; min-width: 560px;
  border-collapse: collapse; font-size: .92rem;
}
.panel-table th, .panel-table td { padding: 14px 18px; }
.table-wrap th, .table-wrap td { padding: 12px 16px; }
.panel-table th, .panel-table td,
.table-wrap th, .table-wrap td {
  text-align: left; vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.panel-table th, .table-wrap th {
  background: var(--cream); color: var(--muted);
  font-size: .76rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  white-space: nowrap;
}
.panel-table tbody tr:last-child td,
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.panel-table tbody tr, .table-wrap tbody tr { transition: background-color .12s ease; }
.panel-table tbody tr:hover, .table-wrap tbody tr:hover { background: var(--cream); }
.panel-table td.num, .table-wrap td.num { text-align: right; font-variant-numeric: tabular-nums; }
.panel-table td.status { white-space: nowrap; }

.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--pill);
  background: #efe7f5; color: var(--green);
  font-size: .75rem; font-weight: 700; letter-spacing: .01em;
  text-transform: capitalize; white-space: nowrap;
}
.status-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.status-badge.pending    { background: #fbf1dd; color: #a86b16; }
.status-badge.paid       { background: #e6f5ec; color: var(--success); }
.status-badge.processing { background: #e8eef7; color: #2d5b8e; }
.status-badge.dispatched { background: #f0ebfa; color: var(--green); }
.status-badge.completed  { background: #e6f5ec; color: var(--success); }
.status-badge.cancelled,
.status-badge.declined   { background: #fbe6ee; color: var(--danger); }
.status-badge.approved   { background: #e6f5ec; color: var(--success); }
.status-badge.in_review,
.status-badge.submitted  { background: #fbf1dd; color: #a86b16; }

.panel-empty {
  padding: 44px 20px; text-align: center;
  background: var(--cream); color: var(--muted);
  border: 1.5px dashed #d8cae0; border-radius: var(--radius-lg);
}
.panel-empty p { margin-bottom: 14px; }

/* 26. Basket dialog ------------------------------------------------------- */
dialog {
  width: min(520px, 100% - 32px);
  max-height: min(86dvh, 720px);
  margin: auto;
  padding: 24px;
  border: 0; border-radius: 26px;
  background: #fff; color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: auto; overscroll-behavior: contain;
}
dialog[open] { animation: dialog-in .3s var(--ease); }
dialog::backdrop {
  background: rgb(39 35 54 / .5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
dialog .heading { margin-bottom: 12px; }
.basket-list { margin: 0; padding: 0; list-style: none; }
.basket-list li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.basket-list li:last-child { border-bottom: 0; }
.basket-list li > span:last-of-type { font-weight: 700; font-variant-numeric: tabular-nums; }
.basket-list button {
  min-height: 36px; padding: 4px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--pill);
  font-size: .85rem; font-weight: 600; cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.basket-list button:hover { border-color: var(--danger); color: var(--danger); background: #fff6f9; }
#basket-total {
  margin: 16px 0; padding: 14px 16px;
  background: var(--cream); border-radius: var(--radius);
  font-weight: 700; font-variant-numeric: tabular-nums;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* 27. Footer -------------------------------------------------------------- */
footer {
  margin-top: clamp(28px, 5vw, 56px);
  padding-block: 32px;
  background: linear-gradient(180deg, #2b2640, var(--ink));
  color: #fff;
}
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 14px 20px;
}
.foot span { color: #ddd1e6; font-size: .9rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .9rem; }
.foot-links a { padding-block: 5px; color: #f1e8f6; transition: color .15s ease; }
.foot-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* 28. Pagination ---------------------------------------------------------- */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.pagination a, .pagination span {
  display: grid; place-items: center;
  min-width: 42px; height: 42px; padding-inline: 8px;
  background: #fff;
  border: 1px solid var(--line); border-radius: var(--pill);
  font-size: .9rem; font-variant-numeric: tabular-nums;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.pagination a:hover { border-color: var(--pink-2); background: var(--pink-soft); color: var(--pink-2); }
.pagination .active { background: var(--grad); color: #fff; border-color: transparent; font-weight: 700; }
.pagination .active:hover { color: #fff; }

/* ==========================================================================
   29. Responsive
   ========================================================================== */

@media (max-width: 900px) {
  :root { --header-h: 70px; }

  .help-grid { grid-template-columns: 1fr; }
  .featured-services { grid-template-columns: 1fr; }
  .products, .card-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }

  .hero-content-wrap { flex-direction: column; text-align: center; padding: 40px 0 80px; }
  .hero-text h2 { font-size: 2.8rem; margin: 0 auto 15px; }
  .hero-text p { margin: 0 auto 20px; }
  .hero-image { margin-top: 30px; justify-content: center; }
  .mega-cards { grid-template-columns: 1fr; margin-top: 20px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-card { flex: 0 0 calc(50% - 10px); }
  .features-inner { flex-direction: column; align-items: flex-start; padding-left: 20px; }
  .feature-item { border-right: none; border-bottom: 1px solid #d8b4c9; padding-bottom: 20px; width: 100%; }
  .feature-item:last-child { border-bottom: none; }

  .top-bar-wrap { flex-direction: column; text-align: center; }
  .header-logo { align-items: center; }
  .header-right { align-items: center; width: 100%; }
  .header-search { width: 100%; }
  .nav-inner { flex-wrap: wrap; }

  /* Hamburger button */
  .mobile-menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; padding: 0;
    background: #fff; color: var(--ink);
    border: 1px solid var(--line); border-radius: var(--pill);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    flex-direction: column; gap: 5px;
    transition: background-color .15s ease, border-color .15s ease;
  }
  .mobile-menu-toggle:hover { background: var(--cream); border-color: var(--green-2); }
  .burger-line {
    display: block;
    width: 20px; height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .3s var(--ease), opacity .2s ease;
  }
  .mobile-menu-toggle.is-active .burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mobile-menu-toggle.is-active .burger-line:nth-child(2) { opacity: 0; transform: scaleX(.2); }
  .mobile-menu-toggle.is-active .burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .mast-actions a.desktop-only { display: none; }

  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto; overscroll-behavior: contain;
    background: #fff;
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 22px 22px;
    box-shadow: 0 24px 40px -16px rgb(39 35 54 / .25);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s ease, transform .3s var(--ease), visibility .25s;
    z-index: 100;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; }

  .nav .wrap {
    flex-direction: column; flex-wrap: nowrap; justify-content: flex-start;
    width: 100%; gap: 0; padding: 0;
  }
  .nav .wrap > a {
    padding: 17px var(--gutter);
    border-bottom: 1px solid var(--cream);
    border-radius: 0;
    font-size: 1.05rem; text-align: left;
  }
  .nav .wrap > a:hover,
  .nav .wrap > a:focus-visible { background: var(--cream); text-decoration: none; }

  .mobile-only-links { display: flex; flex-direction: column; background: var(--cream); }
  .mobile-only-links hr { margin: 0; border: 0; border-top: 1px solid var(--line); }
  .mobile-only-links a {
    padding: 14px var(--gutter);
    border-bottom: 1px solid var(--line);
    color: var(--muted); font-size: .95rem; font-weight: 600;
  }
  .mobile-only-links a:hover { color: var(--green); text-decoration: none; }
}

@media (max-width: 640px) {
  .search { padding: 6px 6px 6px 16px; }
  .search button, .search .btn, .search [type="submit"] { padding: 0 22px; min-height: 48px; }
  .search input { padding-block: 12px; }
  .foot { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
  .prod-card { flex: 0 0 100%; }
  .logo-row h1 { font-size: 1.6rem; }
  .filters { padding: 12px; }
}

@media (max-width: 480px) {
  :root { --header-h: 64px; }

  .brand-name { font-size: 1.1rem; }
  .brand-name small { font-size: .6rem; }
  .mark { width: 40px; border-radius: 12px; }
  .mark svg { width: 24px; }

  .field-row { grid-template-columns: 1fr; }
  .panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .product .art { padding: 12px; }
  .product .product-photo { max-height: 104px; }
  .product-body { padding: 12px; }

  .search svg { display: none; }
  .search { padding-left: 10px; }
  .search button, .search .btn, .search [type="submit"] { padding: 0 18px; }

  .heading { align-items: start; }
  dialog { padding: 20px; border-radius: 22px; }
  .basket-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .basket-list li button { grid-column: 1 / -1; justify-self: start; }

  .mast-actions .basket-text { display: none; }
  .mast-actions .basket { padding: 8px 10px; }
}

@media (max-width: 340px) {
  .products, .card-grid { grid-template-columns: 1fr; }
}

@media (max-height: 480px) and (orientation: landscape) {
  .site-header { position: relative; }
}

/* 30. User preferences ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (hover: none) {
  .product:hover, .condition:hover, a.panel-card:hover,
  .featured-services article:hover, .basket:hover, .pill:hover { transform: none; }
  .product:hover .product-photo { transform: none; }
}

@media (forced-colors: active) {
  .btn, .solid, .basket, .product, .panel-card, .search,
  .mega-card, .service-box, .prod-card, .card { border: 1px solid CanvasText; }
  .hero h1 span { -webkit-text-fill-color: currentColor; color: currentColor; background: none; }
}

/* 31. Print --------------------------------------------------------------- */
@media print {
  .notice, .nav, .mast-actions, footer, .hero .search,
  .mobile-menu-toggle, .main-nav, .top-bar, .features-bar,
  .header-search, .filters, .pagination, .carousel-btn { display: none !important; }
  .site-header { position: static; backdrop-filter: none; box-shadow: none; }
  body { background: #fff; color: #000; }
  .product, .panel-card, .panel-table, .card, .prod-card, .service-box { break-inside: avoid; box-shadow: none; }
}