/* ══════════════════════════════════════════════
 PANAPAANTIPARA OPTICAL – MASTER STYLESHEET
 Brand Palette (exact from provided image):
 Forest Green   #3C543C  R:60  G:84  B:60
 Deep Green     #2D3428  R:45  G:52  B:40
 Lime/Light     #ADF591  R:173 G:245 B:145
 Off-White      #EBEEE7  R:235 G:238 B:231
 Warm Taupe     #9D8E79  R:157 G:142 B:121
 ══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');
@font-face {
  font-family: 'Cactus';
  src: url('../fonts/Cactus-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Cactus only ships one weight — stop browsers from "faux-bolding"
 it (which thickens strokes until letters touch and blur together,
 the main cause of it looking unreadable at any size). */
.section-title,
h1,
h2 {
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

/* ─── CSS Variables ─────────────────────────── */
:root {
  /* Brand colors — exact palette */
  --forest: #3C543C;
  --deep: #283428;
  --lime: #ADF591;
  --offwhite: #EBECE7;
  --taupe: #9D8E79;
  /* Derived */
  --mid-green: #4A6548;
  --pale-lime: #D4F0C2;
  --dark-lime: #7EC860;
  --dark-text: #1A2118;
  --mid-text: #526050;
  --border: #C8D4C0;
  --card-bg: #FFFFFF;
  --section-alt: #E5EAE0;
  --deep-overlay: rgba(40, 52, 40, 0.90);
  /* Sizing */
  --radius-sm: 4px;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(45, 52, 40, 0.10);
  --shadow: 0 6px 24px rgba(45, 52, 40, 0.14);
  --shadow-lg: 0 16px 48px rgba(45, 52, 40, 0.20);
  --transition: 0.22s ease;
  /* Page layout — ONE width + gutter used by the navbar, hero and every section */
  --page-max: 1200px;
  --page-gutter: clamp(1rem, 4vw, 2rem);
  /* Spacing rhythm for text blocks (badge → heading → text → button) */
  --gap-eyebrow: .75rem;
  /* badge / eyebrow  → heading   */
  --gap-heading: 1rem;
  /* heading          → paragraph */
  --gap-text: 1rem;
  /* paragraph        → paragraph */
  --gap-action: 2rem;
  /* last paragraph   → button    */
  --icon-gap: .6rem;
  /* icon             ↔ label     */
}

/* ─── Reset ─────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--dark-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* NOTE: deliberately no overflow-x:hidden here — setting it forces the
   browser to also treat overflow-y as an implicit scroll container
   (a CSS spec quirk: if one axis is non-visible, the other computes to
   auto instead of staying visible), which silently breaks every
   position:sticky element on the page (e.g. .checkout-summary below).
   The actual fixes for stray horizontal overflow are the min-width:0 /
   minmax(0,1fr) rules on the specific flex/grid containers that needed
   them — keep fixing overflow at its source, not with this. */
}

img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

input,
select,
textarea,
button {
  font-family: inherit;
}

.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

/* ─── Typography ─────────────────────────────────────────────
 Two-tier system:
 • Cactus (display)  → big, short, attention-grabbing headlines
 only (h1, h2, hero/section titles). It's a bold stencil-style
 face that gets cramped and hard to read below ~1.5rem, so it
 never appears at small sizes.
 • Poppins (text)     → everything else: sub-headings (h3–h6),
 card/product titles, nav, buttons, body copy. Bold Poppins
 keeps things feeling on-brand while staying crisp and legible
 at small sizes.
 ──────────────────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.28;
  color: var(--deep);
}

h1,
h2 {
  font-family: 'Cactus', 'Poppins', sans-serif;
  font-weight: 400;
  /* Cactus is a display weight on its own; 700 over-thickens it */
  line-height: 1.18;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

/* h3–h6: readable Poppins sub-headings, tiered by weight/size/spacing
 instead of switching typeface, so the hierarchy stays clear. */
h3,
h4,
h5,
h6 {
  font-family: 'Poppins', sans-serif;
}

h3 {
  font-size: 1.28rem;
  font-weight: 700;
}

h4 {
  font-size: 1.08rem;
  font-weight: 700;
}

h5 {
  font-size: 0.98rem;
  font-weight: 600;
}

h6 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mid-text);
}

.section-title {
  font-family: 'Cactus', 'Poppins', sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--deep);
  margin-bottom: 2.5rem;
  font-size: clamp(1.7rem, 2.5vw, 2.3rem);
}

.section-title.light {
  color: var(--offwhite);
}

/* Any short, prominent display line that should read like the
 brand headlines but sits below the 1.5rem Cactus-safe floor —
 use Poppins Bold with brand-style spacing instead of shrinking
 Cactus, which is what made small headings unreadable before. */
.display-label {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* ─── Buttons — STYLE GUIDE ─────────────────────────────────
 One shape, one type style, one set of interactions for the whole site.
 
 Variant            Class                    Use it for
 ─────────────────  ───────────────────────  ──────────────────────────────
 Primary            .btn-primary             Main action on LIGHT backgrounds
 Accent             .btn-lime                Main action on DARK backgrounds
 Secondary          .btn-outline.dark        Second action on LIGHT backgrounds
 Secondary (dark)   .btn-outline             Second action on DARK backgrounds
 Link               .btn-link / .on-dark     Inline "Read more →" style actions
 
 Sizes:  .small  ·  (default)  ·  .lg      Full width:  .block
 Hover:  lift 2px + shadow (filled)  /  fill in (outline)   ·   Press: settles back
 Focus:  2px ring   ·   Disabled: 50% opacity, no hover
 ──────────────────────────────────────────────────────────── */
.btn-primary,
.btn-outline,
.btn-lime {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--icon-gap);
  padding: .78rem 2rem;
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.2;
  letter-spacing: .02em;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-primary:hover,
.btn-lime:hover {
  transform: translateY(-2px);
}

.btn-primary:active,
.btn-outline:active,
.btn-lime:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary:focus-visible,
.btn-outline:focus-visible,
.btn-lime:focus-visible,
.btn-link:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--forest);
}

.btn-primary {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}

.btn-primary:hover {
  background: var(--deep);
  border-color: var(--deep);
  box-shadow: var(--shadow);
}

.btn-lime {
  background: var(--lime);
  color: var(--deep);
  border-color: var(--lime);
}

.btn-lime:hover {
  background: var(--dark-lime);
  border-color: var(--dark-lime);
  box-shadow: 0 6px 20px rgba(173, 245, 145, 0.40);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}

.btn-outline.dark {
  color: var(--forest);
  border-color: var(--forest);
}

.btn-outline.dark:hover {
  background: var(--forest);
  color: #fff;
}

.btn-primary.small,
.btn-outline.small,
.btn-lime.small {
  padding: .5rem 1.25rem;
  font-size: .82rem;
  gap: .5rem;
}

.btn-primary.lg,
.btn-outline.lg,
.btn-lime.lg {
  padding: 1rem 2.5rem;
  font-size: .98rem;
}

.btn-primary.block,
.btn-outline.block,
.btn-lime.block {
  display: flex;
  width: 100%;
}

.btn-primary:disabled,
.btn-primary[disabled],
.btn-primary.disabled,
.btn-outline:disabled,
.btn-outline[disabled],
.btn-lime:disabled,
.btn-lime[disabled] {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.btn-link {
  font-weight: 700;
  color: var(--forest);
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  transition: gap var(--transition), color var(--transition);
}

.btn-link:hover {
  gap: .7rem;
  color: var(--deep);
}

.btn-link.on-dark {
  color: var(--lime);
}

.btn-link.on-dark:hover {
  color: #fff;
}

.btn-cart {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--forest);
  padding: .42rem .9rem;
  border-radius: var(--radius);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-cart:hover {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}

/* ─── Badge ─────────────────────────────────── */
.badge {
  display: inline-block;
  background: var(--lime);
  color: var(--deep);
  padding: .28rem .9rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 30px;
  margin-bottom: var(--gap-eyebrow);
}

.badge.dark {
  background: var(--forest);
  color: #fff;
}

/* ══════════════════════════════════════════════
 NAVBAR
 ══════════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--deep);
  border-bottom: 1px solid rgba(173, 245, 145, 0.08);
  backdrop-filter: blur(8px);
}

.nav-container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* This is key */
  height: 68px;
  gap: 1.5rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-img {
  width: 100px;
  height: 50px;
  border-radius: 25px;
  object-fit: cover;
}

.logo-text strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.01em;
  color: var(--lime);
}

.logo-text span {
  display: block;
  font-size: .62rem;
  font-weight: 500;
  color: rgba(173, 245, 145, 0.65);
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Navigation Links */
.nav-links {
  display: flex;
  gap: 1.75rem;
  flex: 1;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(235, 238, 231, 0.75);
  font-size: .875rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--lime);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active-link {
  color: #fff;
}

.nav-links a:hover::after,
.nav-links a.active-link::after {
  width: 100%;
}

/* Nav Actions (Search + Cart + User) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-search {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--offwhite);
  padding: .4rem .9rem;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  width: 160px;
  transition: all var(--transition);
}

.nav-search:focus {
  outline: none;
  border-color: var(--lime);
  width: 200px;
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: .3rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 210;
  /* above the .navbar (200) so nothing can ever sit over it and eat the click */
  pointer-events: auto;
}

/* Mobile-only Sign In / Sign Up shown inside the dropdown panel (see
 .nav-links-auth below); hidden on desktop where the top-bar versions
 in .nav-actions are used instead. */
.nav-links-auth {
  display: none;
}

.nav-links-user,
.nav-links-logout {
  display: none;
}

.cart-icon-btn {
  color: rgba(235, 238, 231, 0.9);
  font-size: 1.35rem;
  text-decoration: none;
  position: relative;
  padding: 6px 8px;
}

.cart-icon-btn:hover {
  color: var(--lime);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--lime);
  color: var(--deep);
  font-size: .65rem;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}

/* ── "Added to Bag" feedback animation ── */
.cart-icon-btn.bag-bump {
  animation: bagBump .55s cubic-bezier(.34, 1.56, .64, 1);
}

.cart-icon-btn.bag-bump .cart-count {
  animation: bagCountPop .55s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes bagBump {
  0% {
    transform: scale(1) rotate(0deg);
  }
  30% {
    transform: scale(1.28) rotate(-10deg);
  }
  55% {
    transform: scale(.95) rotate(6deg);
  }
  75% {
    transform: scale(1.1) rotate(-3deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes bagCountPop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.5);
  }
  100% {
    transform: scale(1);
  }
}

/* Quick "added" flash used on product cards / product page add buttons */
.btn-added-flash {
  animation: addedFlash .45s ease;
}

@keyframes addedFlash {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.07);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cart-icon-btn.bag-bump,
  .cart-icon-btn.bag-bump .cart-count,
  .btn-added-flash {
    animation: none;
  }
}

/* Auth Buttons & User — compact versions of .btn-outline / .btn-lime */
.btn-signin,
.btn-login {
  font-size: .82rem;
  font-weight: 700;
  padding: .4rem 1rem;
  line-height: 1.2;
  border-radius: var(--radius);
  border: 2px solid var(--lime);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-signin {
  color: var(--lime);
  background: transparent;
}

.btn-signin:hover {
  background: rgba(173, 245, 145, .14);
  color: var(--lime);
}

.btn-login {
  background: var(--lime);
  color: var(--deep);
}

.btn-login:hover {
  background: var(--dark-lime);
  border-color: var(--dark-lime);
  color: var(--deep);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(173, 245, 145, 0.40);
}

.nav-user {
  color: var(--lime);
  font-size: .85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-user a {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.nav-user a:hover {
  color: var(--lime);
}

/* ══════════════════════════════════════════════
 HERO – Full bleed image with text overlay
 (Inspired by sunglasses-on-beach reference)
 ══════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 660px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--deep);
}

/* Real photo background — carousel */
.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1.2s ease-in-out, transform 8s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1.0);
}

/* Dot navigation */
.hero-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .6rem;
  z-index: 4;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .4);
  cursor: pointer;
  transition: background .25s, transform .25s;
}

.hero-dot.active {
  background: var(--lime);
  transform: scale(1.3);
}

/* Layered gradient: dark on left for text legibility, fades right */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient( 100deg, rgba(45, 52, 40, 0.92) 0%, rgba(45, 52, 40, 0.78) 38%, rgba(45, 52, 40, 0.30) 65%, rgba(45, 52, 40, 0.05) 100% );
  z-index: 1;
}

/* Bottom fade for smooth section transition */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, var(--offwhite), transparent);
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  /* Same width + gutters as .container so the hero text lines up with every section */
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 5rem max(var(--page-gutter), env(safe-area-inset-right, 0px)) 6rem max(var(--page-gutter), env(safe-area-inset-left, 0px));
}

/* Text only takes the left column — the photo shows on the right */
.hero-content > * {
  max-width: 620px;
}

.hero-content > .hero-sub {
  max-width: 420px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--lime);
  background: rgba(173, 245, 145, 0.10);
  border: 1px solid rgba(173, 245, 145, 0.28);
  padding: .3rem 1rem;
  border-radius: 30px;
  margin-bottom: 1.4rem;
}

/* Hero headline – matches reference's large bold treatment */
.hero h1 {
  color: #fff;
  font-size: clamp(3rem, 6.5vw, 5.5rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -.03em;
  margin-bottom: .75rem;
  text-transform: uppercase;
}

.hero h1 .line1 {
  display: block;
}

.hero h1 .line2 {
  display: block;
  color: var(--lime);
}

/* Tagline in italic below heading – "Panapaantipara sa Lahat" */
.hero-tagline {
  font-size: clamp(.95rem, 1.8vw, 1.2rem);
  color: rgba(213, 240, 200, 0.90);
  font-weight: 400;
  font-style: italic;
  margin-bottom: .85rem;
  letter-spacing: .02em;
}

.hero-sub {
  color: rgba(235, 238, 231, 0.72);
  font-size: .98rem;
  max-width: 420px;
  margin-bottom: var(--gap-action);
  line-height: 1.75;
}

/* Two CTAs side by side */
.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ══════════════════════════════════════════════
 CATEGORIES
 ══════════════════════════════════════════════ */
.categories {
  padding: 4.5rem 0;
  background: var(--offwhite);
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.category-card {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  min-height: 220px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-card img {
  height: 230px;
  object-fit: cover;
  transition: transform .45s ease;
}

.category-card:hover img {
  transform: scale(1.06);
}

.category-label {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(45, 52, 40, 0.88) 40%, rgba(45, 52, 40, 0.10) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.75rem;
}

.category-label h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: .2rem;
}

.category-label span {
  font-size: .82rem;
  color: var(--lime);
  font-weight: 600;
  letter-spacing: .03em;
}

/* ══════════════════════════════════════════════
 BEST SELLERS
 ══════════════════════════════════════════════ */
.bestsellers {
  background: var(--forest);
  padding: 4.5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(197, 209, 189, 0.30);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-img {
  position: relative;
  display: block;
  overflow: hidden;
}

.product-img img {
  height: 200px;
  width: 100%;
  object-fit: contain;
  transition: opacity .3s ease;
}

/* Front photo is shown by default; on hover it fades out and the side-view
 photo (uploaded as "Side View" in the admin) fades in on top of it. */
.product-img .img-front {
  position: relative;
  z-index: 1;
}

.product-img .img-side {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
}

.product-img:hover .img-front {
  opacity: 0;
}

.product-img:hover .img-side {
  opacity: 1;
}

.product-badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  background: var(--lime);
  color: var(--deep);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .22rem .7rem;
  border-radius: 30px;
  z-index: 3;
}

.ar-badge {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: var(--forest);
  color: #fff;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .65rem;
  border-radius: 30px;
  z-index: 3;
}

.product-info {
  padding: 1rem 1.1rem 1.2rem;
  text-align: left;
}

.product-cat {
  font-size: .68rem;
  color: var(--taupe);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .2rem;
}

.product-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--deep);
  margin-bottom: 0;
  display: block;
}

.product-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: .15rem;
}

.product-price {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--forest);
  display: block;
}

/* ── Color swatch dots (shown under name/price, click to swap photo) ── */
.product-swatches {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  margin-top: .65rem;
}

.swatch-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, .12);
  padding: 0;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  flex-shrink: 0;
}

.swatch-dot:hover {
  transform: translateY(-1px);
}

.swatch-dot.active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--forest);
}

.swatch-color-label {
  display: block;
  font-size: .72rem;
  color: var(--taupe);
  margin-top: .4rem;
  letter-spacing: .02em;
}

/* ══════════════════════════════════════════════
 UNIFIED PRODUCT CARD  (.product-card = home / related / wishlist,
 .shop-card = shop grid). Soft white image panel, left-aligned info,
 swatches + color name grouped on one row.
 ══════════════════════════════════════════════ */
.product-card,
.shop-card {
  display: flex;
  flex-direction: column;
  padding: .6rem;
  border-radius: 18px;
}

.product-img,
.shop-card-img {
  border-radius: 12px;
  background: #fff;
}

.product-img img,
.shop-card-img img {
  height: auto;
  aspect-ratio: 4 / 3;
  padding: .9rem;
  box-sizing: border-box;
  object-fit: contain;
}

.product-img .img-side,
.shop-card-img .img-side {
  height: 100%;
}

.product-info,
.shop-card-info {
  padding: .9rem .5rem .6rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.product-cat,
.shop-card-cat {
  margin: 0;
}

.product-name,
.shop-card-name {
  font-size: 1rem;
  line-height: 1.3;
}

.product-footer,
.shop-card-price-row {
  align-items: flex-start;
  gap: .1rem;
}

.product-price,
.shop-card-price {
  font-size: 1rem;
}

.bs-swatch-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: .55rem;
  flex-wrap: wrap;
}

.bs-swatch-row .product-swatches {
  margin-top: 0;
  justify-content: flex-start;
}

.bs-swatch-row .swatch-color-label {
  margin-top: 0;
}

/* ══════════════════════════════════════════════
 PROMOTIONS
 ══════════════════════════════════════════════ */
.promo {
  padding: 4.5rem 0;
  background: var(--offwhite);
}

.promo-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.5rem;
}

.promo-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.promo-card img {
  height: 100%;
  min-height: 180px;
  transition: transform .38s;
}

.promo-card:hover img {
  transform: scale(1.05);
}

.promo-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(45, 52, 40, 0.95), transparent);
  padding: 1.6rem 1.6rem 1.3rem;
  color: #fff;
}

.promo-text h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.promo-text p {
  font-size: .82rem;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: .75rem;
}

.promo-main img {
  min-height: 340px;
}

.promo-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.promo-small img {
  min-height: 155px;
}

.promo-text .btn-link {
  color: var(--lime);
}

/* ══════════════════════════════════════════════
 OUR STORY
 ══════════════════════════════════════════════ */
.story {
  padding: 5rem 0;
  background: var(--section-alt);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.story-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.story-image img {
  height: 420px;
}

.story-content h2 {
  color: var(--deep);
}

.story-content p {
  color: var(--mid-text);
  font-size: .97rem;
}

/* ══════════════════════════════════════════════
 APPOINTMENT BANNER
 ══════════════════════════════════════════════ */
.appt-banner {
  background: var(--deep);
  padding: 4.5rem 0;
  position: relative;
  overflow: hidden;
}

.appt-banner::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(173, 245, 145, 0.04);
  pointer-events: none;
}

.appt-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
  justify-content: space-between;
}

.appt-text {
  color: var(--offwhite);
}

.appt-text h2 {
  color: #fff;
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0.01em;
}

.appt-text p {
  color: rgba(235, 238, 231, 0.65);
  max-width: 400px;
  font-size: .97rem;
}

.appt-image {
  flex-shrink: 0;
  width: 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  opacity: .88;
  box-shadow: var(--shadow);
}

/* ══════════════════════════════════════════════
 REVIEWS
 ══════════════════════════════════════════════ */
.reviews {
  padding: 4.5rem 0;
  background: var(--offwhite);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.review-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  gap: 1rem;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.review-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  border-color: var(--lime);
}

.review-avatar img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--pale-lime);
}

.review-stars {
  color: var(--forest);
  font-size: .95rem;
  margin-bottom: .5rem;
}

.review-text {
  font-size: .88rem;
  color: var(--mid-text);
  margin-bottom: .5rem;
  font-style: italic;
  line-height: 1.65;
}

.review-name {
  font-size: .8rem;
  font-weight: 700;
  color: var(--forest);
  letter-spacing: .05em;
}

/* ══════════════════════════════════════════════
 NEWSLETTER
 ══════════════════════════════════════════════ */
.newsletter {
  background: var(--forest);
  padding: 3.5rem 0;
}

.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.newsletter h2 {
  color: var(--offwhite);
  font-size: 1.75rem;
  margin-bottom: .4rem;
}

.newsletter p {
  color: rgba(235, 238, 231, 0.70);
  font-size: .9rem;
}

.newsletter-form {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
}

.newsletter-form input {
  background: rgba(255, 255, 255, 0.10);
  border: 1.5px solid rgba(173, 245, 145, 0.22);
  color: #fff;
  padding: .72rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  width: 280px;
}

.newsletter-form input::placeholder {
  color: rgba(200, 220, 180, 0.50);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--lime);
}

.newsletter-msg {
  color: var(--lime);
  font-size: .88rem;
  width: 100%;
  font-style: italic;
}

/* ══════════════════════════════════════════════
 FOOTER
 ══════════════════════════════════════════════ */
.footer {
  background: var(--deep);
  padding: 3.5rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.6fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer h4 {
  color: var(--lime);
  font-size: .73rem;
  letter-spacing: .20em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  font-weight: 700;
}

.footer-col ul li {
  margin-bottom: .6rem;
}

.footer-col ul li a {
  color: rgba(197, 209, 189, 0.55);
  font-size: .88rem;
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: white;
}

.footer-about p {
  color: rgba(197, 209, 189, 0.55);
  font-size: .85rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.footer-contact a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(197, 209, 189, 0.35);
  transition: color var(--transition), border-color var(--transition);
  overflow-wrap: anywhere;
}

.footer-contact a:hover,
.footer-contact a:focus-visible {
  color: #fff;
  border-bottom-color: var(--lime);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid .footer-about {
    grid-column: 1 / -1;
  }
}

.social-links {
  display: flex;
  gap: .5rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: .75rem;
  font-weight: 700;
  border: 1px solid rgba(173, 245, 145, 0.12);
  transition: all var(--transition);
}

.social-links a:hover {
  background: var(--lime);
  color: var(--deep);
}

.social-links .social-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.footer-bottom {
  text-align: center;
  padding: 1.25rem;
  color: rgba(197, 209, 189, 0.30);
  font-size: .78rem;
}

/* ══════════════════════════════════════════════
 BREADCRUMB
 ══════════════════════════════════════════════ */
.breadcrumb {
  background: var(--section-alt);
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .8rem;
  color: var(--mid-text);
}

.breadcrumb a {
  color: var(--forest);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════════════
 SHOP PAGE
 ══════════════════════════════════════════════ */
.shop-page {
  padding: 3rem 0 4rem;
  background: var(--offwhite);
  min-height: calc(100vh - 68px);
}

.shop-header {
  text-align: center;
  margin-bottom: 2rem;
}

.shop-header h1 {
  color: var(--deep);
}

.cat-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  margin-bottom: 2rem;
}

.cat-pill {
  padding: .52rem 1.6rem;
  border-radius: 30px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--mid-text);
  font-size: .85rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
}

.cat-pill:hover {
  border-color: var(--forest);
  color: var(--forest);
  background: var(--section-alt);
}

.cat-pill.active {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.shop-search-input {
  background: #fff;
  border: 1.5px solid var(--border);
  padding: .62rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  width: 260px;
  transition: border-color var(--transition);
}

.shop-search-input:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(60, 84, 60, 0.10);
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.sort-wrap label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--mid-text);
  text-transform: uppercase;
}

.sort-wrap select {
  border: 1.5px solid var(--border);
  background: #fff;
  padding: .55rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  color: var(--dark-text);
  cursor: pointer;
}

.sort-wrap select:focus {
  outline: none;
  border-color: var(--forest);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.no-products {
  grid-column: 1/-1;
  text-align: center;
  color: var(--mid-text);
  padding: 3rem 0;
  font-style: italic;
}

.shop-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: .6rem;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.shop-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--pale-lime);
}

.shop-card-img {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.shop-card-img img {
  height: auto;
  aspect-ratio: 4 / 3;
  width: 100%;
  padding: .9rem;
  box-sizing: border-box;
  object-fit: contain;
  transition: opacity .3s ease;
}

.shop-card-img .img-front {
  position: relative;
  z-index: 1;
}

.shop-card-img .img-side {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  height: 100%;
}

.shop-card-img:hover .img-front {
  opacity: 0;
}

.shop-card-img:hover .img-side {
  opacity: 1;
}

.shop-card-info {
  padding: .9rem .5rem .6rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.shop-card-cat {
  font-size: .68rem;
  color: var(--taupe);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .2rem;
}

.shop-card-price-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: .1rem;
}

.shop-card-name {
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 600;
  color: var(--deep);
  margin-bottom: 0;
  display: block;
}

.shop-card-price {
  font-weight: 900;
  color: var(--forest);
  font-size: 1.05rem;
  display: block;
}

.shop-card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: .4rem;
  width: 100%;
}

.shop-card-actions .btn-view {
  padding: .55rem .6rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--deep);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all .18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  text-decoration: none;
}

.shop-card-actions .btn-view:hover {
  border-color: var(--forest);
  background: var(--section-alt);
  color: var(--forest);
}

.shop-card-actions .btn-add-to-cart {
  padding: .55rem .6rem;
  border-radius: 8px;
  border: none;
  background: var(--forest);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all .18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
}

.shop-card-actions .btn-add-to-cart:hover {
  background: var(--deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 52, 40, .2);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: .4rem;
  margin-top: 2.5rem;
}

.pg-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  color: var(--mid-text);
  background: #fff;
  transition: all var(--transition);
  font-weight: 600;
}

.pg-btn:hover:not(.disabled) {
  border-color: var(--forest);
  color: var(--forest);
}

.pg-btn.active {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}

.pg-btn.disabled {
  opacity: .35;
  cursor: default;
}

/* ══════════════════════════════════════════════
 PRODUCT DETAIL
 ══════════════════════════════════════════════ */
.product-detail-page {
  padding: 3rem 0 4rem;
  background: var(--offwhite);
}

.pd-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3.5rem;
  align-items: start;
  margin-bottom: 4rem;
}

.pd-main-img {
  background: var(--section-alt);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid var(--border);
}

.pd-main-img img {
  width: 100%;
  height: 380px;
  object-fit: contain;
  padding: 1.5rem;
}

.pd-thumbs {
  display: flex;
  gap: .75rem;
  margin-top: .85rem;
}

.pd-thumb {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: none;
  cursor: pointer;
  padding: 0;
  flex: 1;
  transition: border-color var(--transition);
}

.pd-thumb img {
  height: 72px;
  object-fit: cover;
}

.pd-thumb.active {
  border-color: var(--forest);
}

.pd-cat {
  font-size: .7rem;
  color: var(--taupe);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .3rem;
}

.pd-title {
  font-size: 2rem;
  color: var(--deep);
  margin-bottom: .75rem;
  font-weight: 800;
}

.pd-rating {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.star {
  color: #ddd;
  font-size: 1.1rem;
}

.star.filled {
  color: var(--forest);
}

.pd-review-count {
  font-size: .8rem;
  color: var(--taupe);
}

.pd-section {
  margin-bottom: 1.25rem;
}

.pd-section h4 {
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mid-text);
  margin-bottom: .5rem;
}

.pd-desc {
  font-size: .92rem;
  color: var(--mid-text);
  line-height: 1.72;
}

.pd-price {
  font-size: 2.2rem;
  color: var(--forest);
  font-weight: 900;
  margin-bottom: 1.25rem;
}

.pd-colors {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.color-btn {
  padding: .4rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: .82rem;
  color: var(--mid-text);
  cursor: pointer;
  transition: all var(--transition);
}

.color-btn:hover {
  border-color: var(--forest);
  color: var(--forest);
}

.color-btn.active {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}

.pd-select {
  width: 100%;
  padding: .72rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: .92rem;
  color: var(--dark-text);
}

.pd-select:focus {
  outline: none;
  border-color: var(--forest);
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
}

.qty-btn {
  width: 38px;
  height: 38px;
  background: var(--section-alt);
  border: none;
  font-size: 1.1rem;
  color: var(--forest);
  cursor: pointer;
  transition: background var(--transition);
}

.qty-btn:hover {
  background: var(--forest);
  color: #fff;
}

#qtyInput {
  width: 52px;
  height: 38px;
  text-align: center;
  border: none;
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  font-size: .95rem;
  font-weight: 600;
}

.pd-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1.5rem;
}

.btn-buy-now {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lime);
  color: var(--deep);
  padding: .78rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  transition: all var(--transition);
  border: 2px solid var(--lime);
}

.btn-buy-now:hover {
  background: var(--dark-lime);
  border-color: var(--dark-lime);
  transform: translateY(-1px);
}

.pd-add-cart {
  flex: 1;
  text-align: center;
}

.pd-related {
  border-top: 1.5px solid var(--border);
  padding-top: 3rem;
}

.related-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}

/* ══════════════════════════════════════════════
 CART
 ══════════════════════════════════════════════ */
.cart-page {
  padding: 3rem 0 4rem;
  background: var(--offwhite);
  min-height: calc(100vh - 68px);
}

.cart-title {
  color: var(--deep);
  margin-bottom: 2rem;
}

.cart-empty {
  text-align: center;
  padding: 5rem 2rem;
}

.cart-empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: .3;
}

.cart-empty h3 {
  color: var(--deep);
  margin-bottom: .5rem;
}

.cart-empty p {
  color: var(--mid-text);
  margin-bottom: 1.5rem;
}

/* min-width:0 on the grid items below is required: CSS grid tracks/items
 default to min-width:auto, meaning they refuse to shrink below their
 content's intrinsic width. A long product name (e.g. "Blush Memory Flex
 (Pink) [Ultrathin & Blue Light Anti-UV & Photochromic]") would otherwise
 force .ci-details wider, which forces .cart-item wider, which forces the
 whole page into a horizontal scroll and pushes the summary panel off
 past the right edge. */
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 2rem;
  align-items: start;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-width: 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 1rem;
  background: #fff;
  padding: 1.25rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
}

.ci-img img {
  width: 100px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.ci-details {
  min-width: 0;
}

.ci-cat {
  font-size: .68rem;
  color: var(--taupe);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ci-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--deep);
  margin-bottom: .2rem;
  overflow-wrap: break-word;
}

.ci-meta {
  font-size: .78rem;
  color: var(--mid-text);
}

.ci-qty {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.ci-qty span {
  font-weight: 700;
  width: 24px;
  text-align: center;
}

.ci-price {
  font-weight: 800;
  color: var(--forest);
  font-size: 1rem;
  white-space: nowrap;
}

.ci-remove {
  background: none;
  border: none;
  color: #bbb;
  font-size: .9rem;
  cursor: pointer;
  padding: .25rem;
  transition: color var(--transition);
}

.ci-remove:hover {
  color: #c62828;
}

.cart-summary {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: sticky;
  top: 80px;
}

.cart-summary h3 {
  color: var(--deep);
  margin-bottom: 1.25rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .6rem 0;
  font-size: .9rem;
  color: var(--mid-text);
  border-bottom: 1px solid var(--border);
}

.summary-divider {
  border-top: 2px solid var(--border);
  margin: .5rem 0;
}

.total-row {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--deep);
  border-bottom: none;
}

.promo-row {
  gap: .5rem;
}

.promo-row input {
  flex: 1;
  padding: .45rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .82rem;
}

.promo-row input:focus {
  outline: none;
  border-color: var(--forest);
}

.btn-promo {
  background: var(--section-alt);
  border: 1.5px solid var(--border);
  color: var(--forest);
  padding: .45rem .85rem;
  border-radius: var(--radius);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-promo:hover {
  background: var(--forest);
  color: #fff;
}

.checkout-btn {
  display: block;
  text-align: center;
  margin-top: 1.25rem;
  width: 100%;
}

.continue-link {
  display: block;
  text-align: center;
  margin-top: .75rem;
  font-size: .85rem;
}

/* ══════════════════════════════════════════════
 CHECKOUT
 ══════════════════════════════════════════════ */
.checkout-steps {
  background: var(--section-alt);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
}

.step {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--border);
}

.step span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
}

.step.active {
  color: var(--forest);
}

.step.active span {
  background: var(--forest);
}

.step.done {
  color: var(--mid-green);
}

.step.done span {
  background: var(--lime);
  color: var(--deep);
}

.step-line {
  width: 60px;
  height: 2px;
  background: var(--border);
  margin: 0 .5rem;
}

.step-line.done {
  background: var(--lime);
}

.checkout-page {
  padding: 3rem 0 4rem;
  background: var(--offwhite);
  min-height: calc(100vh - 120px);
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 2rem;
  align-items: start;
}

.checkout-section {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}

.cs-title {
  font-size: 1.2rem;
  color: var(--deep);
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.sopt-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sopt-name {
  font-weight: 600;
  font-size: .9rem;
  color: var(--dark-text);
}

.sopt-days {
  font-size: .75rem;
  color: var(--taupe);
}

.sopt-price {
  font-weight: 700;
  color: var(--forest);
  font-size: .92rem;
}

.payment-extra {
  margin-top: 1rem;
}

.ewallet-info {
  background: var(--section-alt);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: .9rem;
  color: var(--mid-text);
  border: 1px dashed var(--border);
}

/* Reservation Summary: header and totals stay put, only the item list scrolls */
.checkout-summary {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 100px);
  overflow: hidden;
}

.checkout-summary h3 {
  color: var(--deep);
  margin: 0;
}

.co-sum-head {
  flex: 0 0 auto;
  padding: 1.4rem 1.75rem 1rem;
  border-bottom: 1.5px solid var(--border);
  background: #fff;
}

.co-sum-body {
  flex: 1 1 auto;
  min-height: 90px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.1rem 1.75rem 1rem 1.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.co-sum-body::-webkit-scrollbar {
  width: 6px;
}

.co-sum-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
}

.co-sum-body .co-items {
  margin-bottom: 0;
}

.co-sum-foot {
  flex: 0 0 auto;
  padding: 1rem 1.75rem 1.4rem;
  border-top: 1.5px solid var(--border);
  background: #fff;
  box-shadow: 0 -8px 14px -10px rgba(30, 45, 30, .18);
}

.co-items {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin-bottom: 1rem;
}

.co-item {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.co-item img {
  width: 60px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.co-item-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--deep);
}

.co-item-meta {
  font-size: .75rem;
  color: var(--mid-text);
}

.co-item span {
  font-weight: 700;
  color: var(--forest);
  font-size: .9rem;
  margin-left: auto;
  white-space: nowrap;
}

.co-divider {
  border-top: 1.5px solid var(--border);
  margin: .75rem 0;
}

.co-row {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  color: var(--mid-text);
  padding: .3rem 0;
}

.co-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--deep);
}

.co-note {
  font-size: .75rem;
  color: var(--taupe);
  text-align: center;
  margin-top: 1rem;
}

.order-confirm {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 560px;
  margin: 0 auto;
}

.confirm-icon {
  font-size: 4rem;
  margin-bottom: 1.25rem;
}

.order-confirm h2 {
  color: var(--deep);
  margin-bottom: .75rem;
}

.order-confirm p {
  color: var(--mid-text);
  margin-bottom: .5rem;
}

.confirm-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════
 APPOINTMENT PAGE
 ══════════════════════════════════════════════ */
.appt-page {
  padding: 4rem 0;
  background: var(--section-alt);
  min-height: calc(100vh - 68px);
}

.appt-page h1 {
  color: var(--deep);
  margin-bottom: .5rem;
}

.appt-page .sub {
  color: var(--mid-text);
  margin-bottom: 2.5rem;
}

.appt-form-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 660px;
}

.appt-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.appt-layout > * {
  min-width: 0;
}

/* stop inputs/selects from pushing past their grid cell (the overflow you saw at tablet widths) */
.form-grid > * {
  min-width: 0;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.appt-aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Tablet & phone: form only — hide the clinic photo/address and "What to Bring" cards */
@media (max-width: 1100px) {
  .appt-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .appt-aside {
    display: none;
  }
  .appt-form-card {
    max-width: 760px;
    margin: 0 auto;
  }
  .appt-page {
    padding: 1.5rem 0;
  }
  .appt-page h1 {
    font-size: 1.6rem;
    margin-bottom: .25rem;
  }
  .appt-page .sub {
    margin-bottom: 1rem;
    font-size: .88rem;
  }
  /* Compact form: keep two columns (beats the global 1-column .form-grid rule) */
  .appt-page .appt-form-card {
    padding: 1.1rem;
  }
  .appt-form-card .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: .75rem 1rem;
  }
  .appt-form-card .form-group {
    gap: .25rem;
    min-width: 0;
  }
  .appt-form-card .form-group label {
    font-size: .65rem;
  }
  .appt-form-card .form-group input,
  .appt-form-card .form-group select,
  .appt-form-card .form-group textarea {
    padding: .5rem .7rem;
    font-size: .86rem;
    width: 100%;
    min-width: 0;
  }
  .appt-form-card .form-group textarea {
    min-height: 56px;
    height: 56px;
  }
  .appt-form-card .form-submit {
    margin-top: 1rem;
  }
  .appt-form-card .form-submit .btn-primary {
    padding: .75rem !important;
    font-size: .92rem !important;
  }
  /* the "info is pre-filled" notice: shrink to one slim line */
  .appt-page .error-msg,
  .appt-page .success-msg {
    padding: .6rem .85rem;
    font-size: .8rem;
    line-height: 1.45;
    margin-bottom: .9rem;
  }
  .appt-page .error-msg p {
    margin: 0;
  }
  .appt-form-card > div:first-child {
    padding: .45rem .7rem !important;
    margin-bottom: .75rem !important;
    font-size: .74rem !important;
    line-height: 1.35;
  }
}

/* Small phones: email & phone get a full row each; everything else stays paired */
@media (max-width: 480px) {
  .appt-page .appt-form-card {
    padding: .9rem;
  }
  .appt-form-card .form-grid > .form-group:nth-child(3),
  .appt-form-card .form-grid > .form-group:nth-child(4) {
    grid-column: 1 / -1;
  }
}

/* ══════════════════════════════════════════════
 FORMS (shared)
 ══════════════════════════════════════════════ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: .73rem;
  font-weight: 700;
  color: var(--forest);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--offwhite);
  border: 1.5px solid var(--border);
  padding: .72rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  color: var(--dark-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(60, 84, 60, 0.10);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-submit {
  margin-top: 1.5rem;
}

.success-msg {
  background: #e8f5e9;
  border: 1.5px solid #a5d6a7;
  color: #2e7d32;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: .92rem;
}

.error-msg {
  background: #fdecea;
  border: 1.5px solid #ef9a9a;
  color: #c62828;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: .92rem;
}

/* ══════════════════════════════════════════════
 AUTH PAGES (Login / Sign Up)
 ══════════════════════════════════════════════ */

/* Pins the topnav + page content to exactly one viewport tall, so nothing
 stacks an extra 100vh underneath the topnav and creates a page scrollbar. */
.auth-shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-shell > .auth-topnav {
  flex-shrink: 0;
}

.auth-shell > .auth-page,
.auth-shell > .auth-center {
  flex: 1 1 auto;
  min-height: 0;
}

.auth-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--deep);
  overflow: hidden;
}

.auth-visual {
  position: relative;
  overflow: hidden;
}

.auth-visual img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.auth-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(45, 52, 40, 0.65), rgba(60, 84, 60, 0.25));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3.5rem;
}

.auth-visual-overlay h2 {
  font-size: 2.4rem;
  color: var(--lime);
  margin-bottom: .4rem;
  font-weight: 800;
  line-height: 1.1;
}

.auth-visual-overlay p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  font-style: italic;
  max-width: 320px;
}

/* Form Side
 NOTE: don't use align-items/justify-content:center here. In a scrolling flex
 container that makes tall content overflow equally above AND below, and the
 part above the top edge can never be scrolled to (the cut-off heading on short
 screens). `margin:auto` on the child centers it when there's room and falls
 back to top-aligned + fully scrollable when there isn't. */
.auth-panel {
  display: flex;
  padding: 3rem 2.5rem;
  background: var(--offwhite);
  overflow-y: auto;
}

.auth-panel > .auth-form-wrap {
  margin: auto;
}

/* Single-column auth pages (Forgot Password / Verify OTP) — same idea:
 fills whatever's left under the topnav instead of adding its own 100vh. */
.auth-center {
  display: flex;
  background: var(--offwhite);
  padding: 2rem;
  overflow-y: auto;
}

.auth-center > * {
  margin: auto;
}

/* see note on .auth-panel */
.auth-form-wrap {
  width: 100%;
  max-width: 420px;
}

/* Logo - Easy to customize size */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2.5rem;
  text-decoration: none;
}

.auth-logo img {
  width: 56px;
  height: auto;
  background: none;
  padding: 6px;
  flex-shrink: 0;
  object-fit: contain;
}

.auth-logo-text {
  font-weight: 800;
  font-size: 1.18rem;
  color: var(--forest);
  line-height: 1.1;
}

.auth-logo-text span {
  display: block;
  font-size: .68rem;
  font-weight: 500;
  color: var(--taupe);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Form Content */
.auth-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--deep);
  margin-bottom: .4rem;
}

.auth-sub {
  color: var(--mid-text);
  font-size: .95rem;
  margin-bottom: 2.2rem;
  line-height: 1.5;
}

.auth-field {
  position: relative;
  margin-bottom: 1.1rem;
}

.auth-field .field-icon {
  position: absolute;
  left: .95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--taupe);
  font-size: .95rem;
  pointer-events: none;
}

.auth-field input {
  width: 100%;
  padding: .82rem 1rem .82rem 2.7rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font-size: .93rem;
  color: var(--dark-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-field input:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(60, 84, 60, 0.12);
}

.auth-field .toggle-pw {
  position: absolute;
  right: .6rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--taupe);
  background: none;
  border: none;
  padding: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  transition: color .15s, background .15s;
}

.auth-field .toggle-pw:hover {
  color: var(--forest);
  background: rgba(60, 84, 60, 0.09);
}

.auth-field .toggle-pw:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 1px;
}

/* Name fields row */
.auth-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
}

/* Terms */
.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin-bottom: 1.4rem;
  font-size: .84rem;
  color: var(--mid-text);
}

.auth-terms input[type="checkbox"] {
  accent-color: var(--forest);
  margin-top: 3px;
  flex-shrink: 0;
}

.auth-terms a {
  color: var(--forest);
  text-decoration: underline;
}

/* Submit Button */
.auth-btn {
  width: 100%;
  padding: .9rem;
  background: var(--forest);
  color: #fff;
  border: 2px solid var(--forest);
  border-radius: var(--radius);
  font-size: .98rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 1.3rem;
  letter-spacing: .02em;
}

.auth-btn:hover {
  background: var(--deep);
  border-color: var(--deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* OR Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: .85rem;
  color: var(--taupe);
  font-size: .82rem;
  margin: 1.2rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Social Buttons */
.auth-socials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  margin-bottom: 1.6rem;
}

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .78rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 600;
  color: var(--dark-text);
  background: #fff;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.auth-social-btn:hover {
  border-color: var(--forest);
  color: var(--forest);
  background: var(--section-alt);
}

/* Switch Link */
.auth-switch {
  text-align: center;
  font-size: .88rem;
  color: var(--mid-text);
}

.auth-switch a {
  color: var(--forest);
  font-weight: 700;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Error Message */
.auth-error {
  background: #fdecea;
  border: 1.5px solid #ef9a9a;
  color: #c62828;
  padding: .85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  margin-bottom: 1.4rem;
}

/* Need Help Link */
.need-help {
  position: absolute;
  top: 1.5rem;
  right: 1.8rem;
  font-size: .84rem;
  color: var(--mid-text);
  z-index: 10;
  text-decoration: none;
}

.need-help:hover {
  color: var(--forest);
}

/* ══════════════════════════════════════════════
 PROFILE PAGE
 ══════════════════════════════════════════════ */
.profile-page {
  padding: 3rem 0 4rem;
  background: var(--offwhite);
  min-height: calc(100vh - 68px);
}

.profile-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

.profile-sidebar {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  position: sticky;
  top: 80px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--lime);
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.profile-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--deep);
}

.profile-email {
  font-size: .82rem;
  color: var(--mid-text);
  margin-bottom: 1.5rem;
}

.profile-nav {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  text-align: left;
}

.profile-nav a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  color: var(--mid-text);
  font-weight: 500;
  transition: all var(--transition);
}

.profile-nav a:hover,
.profile-nav a.active {
  background: var(--section-alt);
  color: var(--forest);
  font-weight: 700;
}

.profile-nav .logout-link {
  color: #c62828;
}

.profile-nav .logout-link:hover {
  background: #fdecea;
  color: #c62828;
}

.pnav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  flex-shrink: 0;
  font-size: 1rem;
}

.pnav-badge {
  margin-left: auto;
  background: #e53935;
  color: #fff;
  border-radius: 100px;
  padding: 1px 7px;
  font-size: .67rem;
  font-weight: 800;
}

.profile-nav-divider {
  height: 1px;
  background: var(--border);
  margin: .5rem .25rem;
}

.profile-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.profile-card h3 {
  color: var(--deep);
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .75rem;
}

/* Unified card header row (title + count pill / action) */
.pc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .8rem;
  margin-bottom: 1.3rem;
}

.pc-head h3 {
  margin: 0;
  padding: 0;
  border: none;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.pc-count {
  font-size: .74rem;
  font-weight: 700;
  color: var(--forest);
  background: var(--section-alt);
  padding: .22rem .7rem;
  border-radius: 100px;
  white-space: nowrap;
}

.pc-sub {
  font-size: .74rem;
  color: var(--taupe);
  font-weight: 500;
}

/* Wishlist product cards */
.wishlist-remove-form {
  position: absolute;
  top: .6rem;
  right: .6rem;
  margin: 0;
  z-index: 4;
}

.wishlist-remove-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .94);
  color: #c0435a;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .18s;
}

.wishlist-remove-btn:hover {
  background: #c0435a;
  color: #fff;
  transform: scale(1.08);
}

.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .88rem;
}

.order-row:last-child {
  border-bottom: none;
}

.order-badge {
  padding: .22rem .75rem;
  border-radius: 30px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.badge-pending {
  background: #fff3e0;
  color: #e65100;
}

.badge-processing {
  background: #e3f2fd;
  color: #1565c0;
}

.badge-shipped {
  background: var(--pale-lime);
  color: var(--forest);
}

.badge-delivered {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-cancelled {
  background: #fdecea;
  color: #c62828;
}

/* ══════════════════════════════════════════════
 RESPONSIVE
 ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .shop-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .story-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .story-image img {
    height: 280px;
  }
  .promo-grid {
    grid-template-columns: 1fr;
  }
  .appt-inner {
    flex-direction: column;
  }
  .appt-image {
    width: 100%;
    max-width: 480px;
  }
  .pd-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .cart-summary {
    position: static;
  }
  .checkout-layout {
    grid-template-columns: 1fr;
  }
  .checkout-summary {
    position: static;
    max-height: none;
  }
  .co-sum-body {
    max-height: 55vh;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .profile-sidebar {
    position: static;
  }
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-visual {
    display: none;
  }
  .hero-content {
    padding-top: 4rem;
    padding-bottom: 5rem;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 540px;
  }
  .hero h1 {
    font-size: 2.8rem;
  }
  .hero-content {
    padding-top: 3.5rem;
    padding-bottom: 4.5rem;
  }
  /* Nav: inline links collapse into the hamburger dropdown; the search bar
   stays visible in the top bar (Search - Bag - Hamburger). */
  .nav-hamburger {
    display: flex;
  }
  .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--deep);
    gap: 0;
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    justify-content: flex-start;
    transition: max-height .3s ease, padding .3s ease;
    z-index: 90;
    flex: none;
  }
  .nav-links.mobile-open {
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    padding: .5rem 2rem 1.25rem;
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links a {
    display: block;
    padding: .8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .nav-links a::after {
    display: none;
  }
  .nav-container {
    padding: 0 var(--page-gutter);
    gap: .5rem;
    justify-content: flex-start;
  }
  /* Actions fill the space after the logo, right-aligned, so the order is
   Search - Bag - Hamburger */
  .nav-actions {
    gap: 6px;
    flex: 1;
    min-width: 0;
    justify-content: flex-end;
  }
  .nav-search-wrap {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 280px;
  }
  .nav-search-box,
  .nav-search-box:focus-within {
    width: 100%;
    padding: .25rem .25rem .25rem .7rem;
  }
  .nav-search-box input {
    min-width: 0;
    font-size: .8rem;
  }
  .nav-search-dropdown {
    position: fixed;
    top: 68px;
    left: .5rem;
    right: .5rem;
    min-width: 0;
    max-height: 70vh;
    overflow-y: auto;
  }
  .cart-icon-btn {
    flex-shrink: 0;
    padding: 6px;
  }
  .nav-hamburger {
    margin-left: 0;
  }
  /* Avatar/account button moves into the hamburger menu on phones */
  .nav-actions .nav-user-wrap {
    display: none;
  }
  /* Account card at the top of the hamburger menu */
  .nav-links .nav-links-user {
    display: block;
  }
  .nav-links .nav-links-user a.nlu-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .9rem .8rem;
    margin: .4rem 0 .3rem;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
  }
  .nlu-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--lime);
    color: var(--deep);
    font-weight: 800;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .nlu-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
  }
  .nlu-name {
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nlu-sub {
    color: rgba(255, 255, 255, .6);
    font-size: .74rem;
  }
  .nlu-chev {
    color: rgba(255, 255, 255, .55);
    font-size: 1.1rem;
  }
  /* Log Out pinned at the bottom of the menu */
  .nav-links .nav-links-logout {
    display: block;
    margin-top: .6rem;
    padding-top: .9rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
  }
  .nav-links .nav-links-logout a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .75rem 0;
    border: 1.5px solid rgba(255, 138, 128, .55);
    border-radius: 10px;
    color: #ff8a80;
    font-weight: 700;
    font-size: .9rem;
  }
  .nav-links .nav-links-logout a:active {
    background: rgba(255, 138, 128, .12);
  }
  /* Guest Sign In / Sign Up move from the top bar into the dropdown */
  .nav-actions > .btn-signin,
  .nav-actions > .btn-login {
    display: none;
  }
  .nav-links-auth {
    display: flex;
    gap: .6rem;
    width: 100%;
    padding: .9rem 0 .2rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    margin-top: .3rem;
  }
  .nav-links-auth a {
    flex: 1;
    display: block;
    text-align: center;
    padding: .65rem 0;
    border-bottom: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: .88rem;
  }
  .nav-links-auth a::after {
    display: none;
  }
  .nav-links .nav-links-auth a.nav-mobile-signin {
    background: transparent;
    color: var(--lime);
    border: 1.5px solid var(--lime);
  }
  .nav-links .nav-links-auth a.nav-mobile-signin:active,
  .nav-links .nav-links-auth a.nav-mobile-signin:hover {
    background: rgba(173, 245, 145, .12);
    color: var(--lime);
  }
  .nav-links .nav-links-auth a.nav-mobile-signup {
    background: var(--lime);
    color: var(--deep);
    border: 1.5px solid var(--lime);
    box-shadow: 0 4px 14px rgba(173, 245, 145, .25);
  }
  .nav-links .nav-links-auth a.nav-mobile-signup:hover {
    background: #c4f9ad;
    color: var(--deep);
  }
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .review-grid {
    grid-column: 1fr;
  }
  .newsletter-inner {
    flex-direction: column;
    gap: 1.5rem;
  }
  .newsletter-form input {
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cart-item {
    grid-template-columns: 80px 1fr;
    row-gap: .5rem;
  }
  .ci-qty,
  .ci-price,
  .ci-remove {
    grid-column: 2;
    justify-self: start;
  }
  .related-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .auth-name-row {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .category-grid {
    grid-template-columns: 1fr;
  }
  .auth-panel {
    padding: 2.5rem 1.5rem;
  }
  .auth-center {
    padding: 1.5rem;
  }
  .need-help {
    position: static;
    display: block;
    text-align: right;
    margin-bottom: .5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }
  .social-btns-row {
    flex-direction: column;
  }
  .shop-grid {
    grid-template-columns: 1fr;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .related-grid {
    grid-template-columns: 1fr !important;
  }
  .hero h1 {
    font-size: 2.3rem;
  }
  .hero-btns {
    flex-direction: column;
    align-items: flex-start;
  }
  .appt-form-card {
    padding: 1.5rem;
  }
  .nav-container {
    padding: 0 var(--page-gutter);
  }
  .logo-img {
    width: 80px;
    height: 40px;
  }
  .nav-search-box input::placeholder {
    font-size: .76rem;
  }
}

/* ─── Auth topnav ─────────────────────────────── */
.auth-topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 2rem;
  background: var(--deep);
  position: sticky;
  top: 0;
  z-index: 100;
}

.auth-topnav-logo {
  display: flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
}

.auth-topnav-logo span {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.01em;
}

.auth-topnav-logo em {
  color: var(--lime);
  font-style: normal;
}

.auth-topnav-help {
  color: rgba(255, 255, 255, .7);
  font-size: .85rem;
  text-decoration: none;
  font-weight: 600;
}

.auth-topnav-help:hover {
  color: var(--lime);
}

.auth-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
  border-radius: 10px;
  padding: .7rem 1rem;
  margin-bottom: 1rem;
  font-size: .88rem;
}

/* ─── Cancel button on profile items ─────────── */
.btn-cancel-item {
  padding: .3rem .8rem;
  background: none;
  border: 1.5px solid #e57373;
  color: #c62828;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  transition: all .15s;
  white-space: nowrap;
}

.btn-cancel-item:hover {
  background: #c62828;
  color: #fff;
  border-color: #c62828;
}

/* ─── Notification badge on nav ──────────────── */
.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #e53935;
  color: #fff;
  font-size: .6rem;
  font-weight: 800;
  border-radius: 50%;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ─── Dark Mode (User side) ───────────────────── */
[data-theme="dark"] {
  --forest: #5a8c5a;
  --deep: #1a1f16;
  --lime: #ADF591;
  --offwhite: #1e2419;
  --taupe: #8a7f72;
  --mid-text: #a8c4a0;
  --border: #2e3829;
  --card-bg: #242b1e;
  --section-alt: #1c2318;
  --dark-text: #ddeedd;
  --mid-green: #3d6e3d;
}

[data-theme="dark"] body {
  background: #1a1f16;
  color: #ddeedd;
}

[data-theme="dark"] .navbar {
  background: #131710;
}

[data-theme="dark"] .shop-card,
[data-theme="dark"] .product-card,
[data-theme="dark"] .pd-card {
  background: #242b1e;
  border-color: #2e3829;
}

[data-theme="dark"] .shop-card-name,
[data-theme="dark"] .product-name {
  color: #ddeedd;
}

[data-theme="dark"] .pd-info {
  background: #242b1e;
}

[data-theme="dark"] .pd-name {
  color: #ddeedd;
}

[data-theme="dark"] .pd-description {
  color: #a8c4a0;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #242b1e;
  border-color: #2e3829;
  color: #ddeedd;
}

[data-theme="dark"] .checkout-section,
[data-theme="dark"] .appt-form-card,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .panel {
  background: #242b1e;
  border-color: #2e3829;
}

[data-theme="dark"] .checkout-summary {
  background: #242b1e;
  border-color: #2e3829;
}

[data-theme="dark"] .co-sum-head,
[data-theme="dark"] .co-sum-foot {
  background: #242b1e;
  border-color: #2e3829;
}

[data-theme="dark"] .shop-filters {
  background: #242b1e;
  border-color: #2e3829;
}

[data-theme="dark"] .filter-link {
  color: #a8c4a0;
}

[data-theme="dark"] .filter-link:hover {
  background: #1c2318;
}

[data-theme="dark"] .filter-section h4 {
  color: #8a7f72;
  border-color: #2e3829;
}

[data-theme="dark"] .type-tabs {
  border-color: #2e3829;
}

[data-theme="dark"] .type-tab {
  color: #8a7f72;
}

[data-theme="dark"] .profile-sidebar {
  background: #242b1e;
  border-color: #2e3829;
}

[data-theme="dark"] .profile-name {
  color: #ddeedd;
}

[data-theme="dark"] .order-row {
  border-color: #2e3829;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
  color: #ddeedd;
}

[data-theme="dark"] .breadcrumb {
  background: #1c2318;
  border-color: #2e3829;
}

[data-theme="dark"] .breadcrumb a {
  color: #a8c4a0;
}

[data-theme="dark"] footer {
  background: #131710;
}

[data-theme="dark"] .cs-title {
  color: #ddeedd;
}

[data-theme="dark"] label {
  color: #a8c4a0;
}

[data-theme="dark"] .co-row {
  border-color: #2e3829;
  color: #ddeedd;
}

[data-theme="dark"] .faq-item {
  background: #242b1e;
  border-color: #2e3829;
}

[data-theme="dark"] .faq-q {
  color: #ddeedd;
}

[data-theme="dark"] .auth-panel {
  background: #1a1f16;
}

[data-theme="dark"] .auth-form-wrap {
  background: #242b1e;
}

[data-theme="dark"] .auth-field {
  background: #1c2318;
  border-color: #2e3829;
}

[data-theme="dark"] .auth-field input {
  color: #ddeedd;
}

[data-theme="dark"] .auth-title {
  color: #ddeedd;
}

[data-theme="dark"] .auth-sub {
  color: #8a7f72;
}

/* ══════════════════════════════════════════════
 ADDED-TO-BAG POPUP (center-screen confirmation)
 ══════════════════════════════════════════════ */
.bag-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 999998;
  background: rgba(20, 26, 18, .38);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.bag-popup-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.bag-popup {
  background: var(--card-bg, #fff);
  border-radius: 22px;
  padding: 2.1rem 2.4rem 1.9rem;
  max-width: 320px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28), 0 4px 16px rgba(0, 0, 0, .12);
  transform: scale(.82) translateY(10px);
  opacity: 0;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), opacity .3s ease;
}

.bag-popup-overlay.show .bag-popup {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.bag-popup-icon-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--lime, #ADF591);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.9rem;
  animation: bagPopupPop .45s cubic-bezier(.34, 1.56, .64, 1) .05s both;
}

@keyframes bagPopupPop {
  0% {
    transform: scale(0);
  }
  60% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

.bag-popup-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--deep, #283428);
  margin-bottom: .3rem;
  letter-spacing: -.01em;
}

.bag-popup-sub {
  font-size: .82rem;
  color: var(--taupe, #9D8E79);
  line-height: 1.5;
  margin-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bag-popup-thumb {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--offwhite, #f4f6f0);
  border: 1px solid rgba(0, 0, 0, .06);
  margin: 0 auto .8rem;
  display: block;
}

.bag-popup-actions {
  display: flex;
  gap: .6rem;
  margin-top: 1.3rem;
}

.bag-popup-actions a {
  flex: 1;
  padding: .65rem .5rem;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease;
}

.bag-popup-actions .bag-popup-view {
  background: var(--forest, #3C543C);
  color: #fff;
}

.bag-popup-actions .bag-popup-view:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(60, 84, 60, .25);
}

.bag-popup-actions .bag-popup-continue {
  background: transparent;
  color: var(--forest, #3C543C);
  border: 1.5px solid var(--border, #e0e5da);
}

.bag-popup-actions .bag-popup-continue:hover {
  background: var(--section-alt, #f4f6f0);
}

@media (max-width: 480px) {
  .bag-popup {
    padding: 1.8rem 1.6rem 1.6rem;
  }
}

/* ══════════════════════════════════════════════
 CONFIRM ACTION POPUP (replaces native confirm())
 ══════════════════════════════════════════════ */
.confirm-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: rgba(20, 26, 18, .48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.confirm-popup-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.confirm-popup {
  background: var(--card-bg, #fff);
  border-radius: 22px;
  padding: 2.1rem 2.2rem 1.9rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .14);
  transform: scale(.85) translateY(8px);
  opacity: 0;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .25s ease;
  font-family: 'Poppins', sans-serif;
}

.confirm-popup-overlay.show .confirm-popup {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.confirm-popup-icon-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .9rem;
  font-size: 1.75rem;
  animation: confirmPop .4s cubic-bezier(.34, 1.56, .64, 1) .05s both;
}

@keyframes confirmPop {
  0% {
    transform: scale(0);
  }
  60% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

.confirm-popup.confirm-danger .confirm-popup-icon-ring {
  background: #ffc7c2;
}

.confirm-popup.confirm-neutral .confirm-popup-icon-ring {
  background: #ffe0b2;
}

.confirm-popup-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--deep, #283428);
  margin-bottom: .4rem;
  letter-spacing: -.01em;
}

.confirm-popup-msg {
  font-size: .87rem;
  color: var(--taupe, #9D8E79);
  line-height: 1.55;
}

.confirm-popup-actions {
  display: flex;
  gap: .7rem;
  margin-top: 1.5rem;
}

.confirm-popup-actions button {
  flex: 1;
  padding: .7rem .6rem;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: transform .15s ease, box-shadow .15s ease;
}

.confirm-popup-cancel {
  background: transparent;
  color: var(--deep, #283428);
  border: 1.5px solid var(--border, #e0e5da);
}

.confirm-popup-cancel:hover {
  background: var(--section-alt, #f4f6f0);
}

.confirm-popup-confirm {
  border: none;
  color: #fff;
}

.confirm-popup.confirm-danger .confirm-popup-confirm {
  background: #c62828;
}

.confirm-popup.confirm-danger .confirm-popup-confirm:hover {
  background: #b71c1c;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(198, 40, 40, .3);
}

.confirm-popup.confirm-neutral .confirm-popup-confirm {
  background: var(--forest, #3C543C);
}

.confirm-popup.confirm-neutral .confirm-popup-confirm:hover {
  background: var(--deep, #283428);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(60, 84, 60, .3);
}

@media (max-width: 480px) {
  .confirm-popup {
    padding: 1.8rem 1.6rem 1.6rem;
  }
  .confirm-popup-actions {
    flex-direction: column-reverse;
  }
}

.badge-no-show {
  background: #efebe9;
  color: #5d4037;
  border: 1px solid #bcaaa4;
}

.badge-no-claim {
  background: #efebe9;
  color: #5d4037;
  border: 1px solid #bcaaa4;
}

/* ═══════════════════════════════════════
 TEXT TRUNCATION (long names / emails / product names)
 Person names & emails: one line, cut off with "…".
 Product names: up to 2 lines, then "…" (keeps cards the same height).
 Full text is shown on hover via the title attribute (assets/js/main.js).
 ═══════════════════════════════════════ */
.trunc,
.trunc-name,
.trunc-email {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trunc-2,
.product-name,
.shop-card-name,
.co-item-name,
.pd-card-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  min-width: 0;
}

.nav-user-name,
.nlu-name,
.nlu-sub,
.prc-name,
.pf-val {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-name {
  display: inline-block;
  max-width: 120px;
  vertical-align: middle;
}

.nlu-name {
  display: block;
}

.user-dd-id {
  min-width: 0;
  flex: 1;
}

.pf-val {
  display: block;
  word-break: normal;
}

.co-item > div,
.nlu-text {
  min-width: 0;
}

/* ═════════════════════════════════════════════════════════════
 SPACING & ICON RHYTHM
 Text blocks follow one scale (see --gap-* tokens in :root):
 badge → heading  .75rem  ·  heading → text  1rem
 text → text      1rem    ·  text → button   2rem
 Icons sit --icon-gap away from their label, in buttons AND headings.
 ═════════════════════════════════════════════════════════════ */
.story-content,
.appt-text {
  display: block;
}

.story-content > h2,
.appt-text > h2 {
  font-size: clamp(1.7rem, 2.5vw, 2.3rem);
  margin: 0 0 var(--gap-heading);
}

.story-content > p,
.appt-text > p {
  margin: 0 0 var(--gap-text);
}

.story-content > p:last-child,
.appt-text > p:last-child {
  margin-bottom: 0;
}

/* last paragraph → button */
.story-content > p + :is(a, button),
.appt-text > p + :is(a, button) {
  margin-top: calc(var(--gap-action) - var(--gap-text));
}

/* Icons next to text in headings and the lighter button styles used in the account area */
:is(h1, h2, h3, h4, h5, h6) > i.ti:first-child,
:is(.btn-g, .btn-r, .btn-o) > i.ti:first-child {
  margin-right: calc(var(--icon-gap) - .25em);
}

/* the markup already has a space (~.25em) */
:is(.btn-g, .btn-r, .btn-o) > i.ti:last-child:not(:first-child) {
  margin-left: calc(var(--icon-gap) - .25em);
}

:is(h1, h2, h3, h4, h5, h6) > i.ti {
  vertical-align: -.08em;
}