/* NUTRIPOP — shared UI polish layer. Loaded last on every page. */

::selection { background: var(--gold-bright); color: #10200c; }
html { scroll-padding-top: 88px; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }

/* Typography rhythm */
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.section-title { letter-spacing: -0.02em; line-height: 1.1; }
.eyebrow { letter-spacing: .18em; text-transform: uppercase; }

/* Nav: clearer active state + hover underline */
.nav-link { position: relative; transition: color .25s ease; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--gold-bright); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.25,1,.5,1);
}
.nav-link:hover::after, .nav-link.active-page::after { transform: scaleX(1); }
.mobile-menu-link { min-height: 48px; display: flex; align-items: center; }
.nav-mobile-btn { min-width: 44px; min-height: 44px; }

/* Buttons: consistent press feedback and touch targets */
.btn-brand, .filter-btn, .hero-slide-btn, .home-text-link, .chef-add, .chef-variant-add {
  transition: transform .2s ease, box-shadow .25s ease, background-color .25s ease, border-color .25s ease;
}
.btn-brand:active, .filter-btn:active, .hero-slide-btn:active { transform: translateY(1px) scale(.98); }
.btn-brand, .filter-btn { min-height: 44px; }
.filter-btn.active, .filter-btn[aria-pressed="true"] { box-shadow: 0 0 0 1px var(--gold-line-hi), 0 8px 20px rgba(231,189,88,.14); }

/* Cards: unified lift, border glow and image zoom */
.product-card, .tea-card, .cat-card, .home-best-card, .home-feature-card, .testimonial-card, .stat-card, .chef-teaser-card {
  border-radius: var(--radius-lg);
  transition: transform .4s cubic-bezier(.25,1,.5,1), border-color .35s ease, box-shadow .4s ease;
}
@media (hover: hover) {
  .product-card:hover, .tea-card:hover, .home-best-card:hover, .home-feature-card:hover, .testimonial-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold-line-hi);
    box-shadow: 0 22px 44px rgba(0,0,0,.45), 0 0 0 1px rgba(255,217,120,.08);
  }
  .product-card img, .tea-card img, .cat-card img, .home-best-card img { transition: transform .6s cubic-bezier(.25,1,.5,1); }
  .product-card:hover img, .tea-card:hover img, .cat-card:hover img, .home-best-card:hover img { transform: scale(1.05); }
}
.product-card, .tea-card, .cat-card, .home-best-card { overflow: hidden; }

/* Form controls */
input, select, textarea {
  border-radius: var(--radius-md);
  transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(255,217,120,.22);
}
.shop-toolbar-search input, .shop-toolbar-sort select { min-height: 44px; }

/* Footer polish */
.footer-links a, .social-icon { transition: color .25s ease, transform .25s ease, border-color .25s ease; }
.footer-links a:hover { color: var(--gold-bright); transform: translateX(3px); }
.social-icon:hover { color: var(--gold-bright); transform: translateY(-3px); }

/* Refined dark scrollbar */
* { scrollbar-width: thin; scrollbar-color: rgba(231,189,88,.4) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(231,189,88,.35); border-radius: 10px; border: 2px solid var(--bg-base); }
::-webkit-scrollbar-thumb:hover { background: rgba(231,189,88,.6); }

/* Mobile */
@media (max-width: 680px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .home-page .slide-content { padding: 0 22px; }
  .home-page .hero-section { min-height: 540px; }
  .home-page .cat-grid { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ===== MOBILE OPTIMISATION (consistent across all pages) ===== */
html, body { max-width: 100%; overflow-x: clip; }

@media (max-width: 768px) {
  /* Nav: brand left, search + cart + menu right, never clipped */
  .nav-inner { display: flex; align-items: center; gap: 8px; padding: 0 14px; }
  .nav-brand { min-width: 0; flex: 1 1 auto; gap: 8px; }
  .nav-brand-name { font-size: .88rem; letter-spacing: .1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-brand img, .nav-logo-icon { flex-shrink: 0; }
  .nav-actions { margin-left: 0; gap: 6px; flex-shrink: 0; }
  .nav-search-toggle, .shop-search-toggle { width: 44px; height: 44px; }
  .cart-toggle { min-height: 44px; padding: 0 12px; }
  .cart-count { font-size: 11px; min-width: 20px; height: 20px; }
  .nav .nav-mobile-btn {
    order: 3; flex-shrink: 0; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin: 0; color: var(--text-white);
    background: rgba(255,255,255,.04); border: 1px solid var(--border-subtle); border-radius: 50%;
  }
  .nav .nav-mobile-btn svg { stroke: currentColor; }
  .mobile-menu-link { padding: 0 20px; font-size: 1rem; border-bottom: 1px solid var(--border-faint); }

  /* Layout rhythm */
  .section { padding-top: 56px; padding-bottom: 56px; }
  .section-title { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .product-grid, .tea-grid { gap: 12px; }
  .stats-row { gap: 10px; }
  .home-hero-actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .home-hero-actions .btn-brand { width: 100%; justify-content: center; text-align: center; }

  /* Readable minimum type size */
  .badge, .depth-price-tag, .depth-mood-kicker, .depth-shop-cta, .home-best-tag, .home-best-shop,
  .chef-variant-tier, .feature-pill, .chef-teaser-tag, .tea-visual-badge, .mood-badge,
  .hero-gateway-tab, .cat-explore, cite, small, dt, .pd-cart-note, .pd-eyebrow, .filter-btn { font-size: 12px !important; }

  /* Touch targets */
  .filter-btn, .hero-gateway-tab, .chef-variant-add, .chef-add, .home-text-link, .pd-breadcrumb { min-height: 44px; display: inline-flex; align-items: center; }
  .footer-links a, .footer a { display: inline-block; padding: 10px 0; }
  .footer { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .footer-grid { gap: 28px 20px; }

  /* Stop iOS zooming into inputs */
  input, select, textarea { font-size: 16px !important; }

  /* Decorative glows must not widen the page */
  .tea-tagline-glow, .tea-story-img-accent { max-width: 100%; }
  .tea-tagline-glow-1, .tea-tagline-glow-2 { display: none; }
}

@media (max-width: 380px) {
  .nav-brand-name { font-size: .78rem; letter-spacing: .06em; }
  .cart-toggle { padding: 0 10px; }
  .product-grid, .tea-grid { gap: 10px; }
}

@media (max-width: 768px) {
  .mobile-menu { background: #0b0d0f !important; border-bottom: 1px solid var(--gold-line); box-shadow: 0 24px 40px rgba(0,0,0,.6); padding: 8px 0 16px; max-height: calc(100vh - 70px); overflow-y: auto; }
  .mobile-menu-link { padding: 0 24px; }
  .mobile-menu-link.active-page { color: var(--gold-bright); }
}

/* ===== NUTRICHEF: let the fixed bubble/aurora background show through the whole page ===== */
.chef-page .chef-range-section,
.chef-page .chef-story-section,
.chef-page .chef-features-section,
.chef-page .chef-pro-section,
.chef-page .chef-newsletter-section,
.chef-page .philosophy-section,
.chef-page .chef-faq-section,
.chef-page .footer { background: transparent !important; background-image: none !important; }
.chef-page .chef-value-strip { background: rgba(24,33,42,.35) !important; backdrop-filter: blur(6px); }
.chef-page .chef-range-section,
.chef-page .chef-story-section,
.chef-page .chef-features-section,
.chef-page .chef-pro-section,
.chef-page .philosophy-section { border-color: rgba(216,226,236,.08); }

/* ===== NUTRICHEF: showcase image section ===== */
.chef-page .chef-showcase-section { padding: 24px 0 96px; background: transparent; }
.chef-showcase { margin: 0; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.chef-showcase-media {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-2xl);
  border: 1px solid var(--gold-line); background: var(--card-bg);
  box-shadow: 0 30px 70px rgba(0,0,0,.5);
}
.chef-showcase-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chef-showcase-placeholder { display: none; }
.chef-showcase-media.is-empty { display: grid; place-items: center; border-style: dashed; background: rgba(255,255,255,.03); }
.chef-showcase-media.is-empty .chef-showcase-placeholder { display: block; color: var(--text-muted); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.chef-showcase-text { display: flex; flex-direction: column; gap: 18px; }
.chef-showcase-text h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; margin: 0; color: var(--text-primary); }
.chef-showcase-text p { margin: 0; color: var(--text-muted-organic); font-size: 1.05rem; line-height: 1.75; max-width: 42ch; }

@media (max-width: 900px) {
  .chef-showcase { grid-template-columns: 1fr; gap: 28px; }
  .chef-showcase-text { text-align: center; align-items: center; }
}
@media (max-width: 768px) {
  .chef-page .chef-showcase-section { padding: 8px 0 64px; }
  .chef-showcase-media { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); }
  .chef-showcase-text p { font-size: 1rem; }
}

/* Feature pills now live inside the showcase section */
.chef-showcase .chef-pro-grid, .chef-showcase-section .chef-pro-grid { margin-top: clamp(40px, 6vw, 72px); }
@media (max-width: 768px) { .chef-showcase-section .chef-pro-grid { margin-top: 36px; } }

/* ==========================================================================
   Readability fixes — text that was left with old light-theme (dark) colours
   on the dark site background. Keep this block last so it wins.
   ========================================================================== */

/* Teas page: "From garden to cup" story section */
.tea-page .tea-story-heading { color: var(--text-primary) !important; }
.tea-page .tea-story-copy    { color: #c9cfd6 !important; }
.tea-page .tea-story-pill {
  color: var(--gold-bright) !important;
  border-color: var(--gold-line) !important;
  background: rgba(231,189,88,.06) !important;
}

/* Teas page: breadcrumb */
.tea-page .tea-hero-breadcrumb,
.tea-page .tea-hero-breadcrumb a,
.tea-page .tea-hero-breadcrumb span { color: var(--text-muted) !important; }
.tea-page .tea-hero-breadcrumb .tea-breadcrumb-current { color: var(--text-primary) !important; }

/* Teas page: hero stat cards (were white cards with light text) */
.tea-page .stat-card { background: rgba(255,255,255,.05) !important; border-color: var(--gold-line) !important; }
.tea-page .stat-value { color: var(--gold-bright) !important; }
.tea-page .stat-label { color: var(--text-muted) !important; }

/* Teas page: brew guide */
.tea-brew-guide h3 { color: var(--text-primary) !important; }
.tea-brew-steps p  { color: #c9cfd6 !important; }

/* Empty cart heading and related product titles */
.cart-empty-state h2 { color: var(--text-primary) !important; }
.tea-related-card strong { color: var(--text-primary) !important; }
