/* =========================================================
   Lollo Caffé — Shared Styles (cafe.css)
   Used by: index.html & shop.html
   Production build
   ========================================================= */

/* ---------- CSS Variables ---------- */
:root {
  --lollo-dark: #151313;
  --header-height: 74px;
  --topbar-height: 36px;
  --shell-height: calc(100vh - var(--header-height) - var(--topbar-height));

  /* Dynamic glow defaults (JS can update) */
  --glow-color: rgba(109,184,172,1);        /* teal-green accent */
  --glow-color-soft: rgba(109,184,172,.38);

  /* On-dark text */
  --muted-on-dark: rgba(233,233,233,.88);
  --muted-on-dark-soft: rgba(233,233,233,.68);

  /* Links */
  --brand-link: #7f3834;
  --brand-link-hover: #7f3834;              /* text links hover color */
  --brand-hover: #1d1b1b;                   /* deep hover for brand buttons */

  /* Main nav palette */
  --nav-link: #81a8a7;
  --nav-link-hover: #7f3834;
  --nav-underline: #81a8a7;

  /* Underline geometry */
  --nav-underline-height: 2px;
  --nav-underline-offset: 10px;
}

/* ---------- Global Resets ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
a { color: var(--brand-link); text-decoration: none; }
a:visited { color: var(--brand-link); }
a:hover, a:focus { color: var(--brand-link-hover); text-decoration: underline; }

body {
  background: #000;
  color: #111;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden; /* desktop uses scroll-in-card model */
}

/* === Buttons: never underline on hover (site-wide) === */
.btn,
.btn:hover,
.btn:focus,
.btn:active,
.btn:visited,
.btn-link,
.btn-link:hover,
.btn-link:focus,
.btn-link:active {
  text-decoration: none !important;
  background-image: none !important;
}
.btn::before,
.btn::after,
.btn-link::before,
.btn-link::after { content: none !important; }

/* ---------- Topbar ---------- */
.topbar {
  background: #000;
  color: #fff;
  font-size: 0.75rem;
  padding: 6px 0;
  z-index: 30;
  position: relative;
}
.topbar a { color: #fff; text-decoration: none; }

/* Remove underline from the 🇮🇹 “Made in Italy” trigger (icon + text) */
.topbar .btn.btn-link[data-bs-target="#madeInItalyModal"] { text-decoration: none !important; }
.topbar .btn.btn-link[data-bs-target="#madeInItalyModal"]:hover,
.topbar .btn.btn-link[data-bs-target="#madeInItalyModal"]:focus,
.topbar .btn.btn-link[data-bs-target="#madeInItalyModal"]:active { text-decoration: none !important; }
.topbar .btn.btn-link[data-bs-target="#madeInItalyModal"] span {
  text-decoration: none !important; border-bottom: 0 !important;
}
/* Keep topbar promo on one line on very small phones */
@media (max-width: 374.98px) {
  .topbar-offer {
    font-size: 10px;          /* nudge down until it fits */
    white-space: nowrap;      /* prevent line breaks */
  }
  .topbar-offer .fa-solid {
    font-size: 0.95em;        /* slightly smaller icon */
    margin-right: .35rem;     /* tighter spacing than .me-2 */
  }
}

/* ---------- Navbar (desktop default) ---------- */
.navbar {
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  height: var(--header-height);
  z-index: 1040;
  position: sticky;
  position: -webkit-sticky; top: 0;
}
.navbar, .navbar > .container, .navbar > .container-fluid { overflow: visible; }

/* Brand */
.navbar-brand {
  font-weight: 700; display: flex; align-items: center; gap: .4rem; color: #111;
  text-decoration: none; transition: color .2s ease;
}
.navbar-brand:hover, .navbar-brand:focus { color: var(--nav-link); }
.logo-mark {
  width: 40px; height: 40px; background: #000; color: #fff; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; font-weight: 800; text-transform: uppercase;
}
.logo-mark-sm { width: 34px; height: 34px; font-size: .9rem; }

/* Hamburger */
.navbar-toggler { border: 0; box-shadow: none !important; padding: .5rem .25rem; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 44px; }
.navbar-toggler:focus { outline: 2px solid rgba(0,0,0,.3); outline-offset: 2px; }
.hamburger-box { position: relative; display: inline-block; width: 28px; height: 18px; }
.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: rgba(0,0,0,.9);
  transition: transform .25s ease, opacity .2s ease, top .25s ease, background-color .2s ease;
  will-change: transform, opacity, top;
}
.hamburger-inner { top: 8px; }
.hamburger-inner::before { content: ""; top: -6px; }
.hamburger-inner::after { content: ""; top: 6px; }
.navbar-toggler[aria-expanded="true"] .hamburger-inner { background-color: transparent; }
.navbar-toggler[aria-expanded="true"] .hamburger-inner::before { top: 0; transform: rotate(45deg); }
.navbar-toggler[aria-expanded="true"] .hamburger-inner::after { top: 0; transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) {
  .hamburger-inner, .hamburger-inner::before, .hamburger-inner::after { transition: none; }
}

/* Links (keep teal underline; suppress text underlines) */
.navbar-nav .nav-link {
  font-weight: 500; padding: .9rem 1rem !important; color: var(--nav-link) !important; transition: color .2s ease;
  background-image: linear-gradient(var(--nav-underline), var(--nav-underline)); background-repeat: no-repeat;
  background-size: 0% var(--nav-underline-height);
  background-position: left calc(100% - var(--nav-underline-offset));
  text-decoration: none !important;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.show,
.navbar-nav .nav-link.active {
  color: var(--nav-link-hover) !important;
  background-size: 100% var(--nav-underline-height);
  text-decoration: none !important;
}
.navbar-nav .nav-link:focus-visible { outline: 2px solid rgba(0,0,0,.25); outline-offset: 3px; }
.navbar .dropdown-toggle::after { border-top-color: currentColor; }

/* Desktop right actions */
.navbar .align-items-center { align-items: center !important; }
.navbar .ec-cart-widget,
.navbar .ec-minicart,
.navbar [id^="my-search-"],
.navbar [id^="my-search-"] > *,
.navbar [id^="my-search-"] .ecwid-search-widget {
  display: flex !important; align-items: center !important; line-height: 1 !important; height: auto; min-height: 40px;
}
.navbar .ec-cart-widget *, .navbar [id^="my-search-"] * { vertical-align: middle !important; }
.navbar .collapse .d-flex.gap-2 { gap: .5rem !important; }
.navbar .ec-cart-widget { margin-left: .15rem; }

/* Account icon */
.navbar .nav-account-link {
  background-image: none !important; background-size: 0 0 !important; text-decoration: none !important;
  width: 40px; height: 40px; padding: 0 !important; border: none !important; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  --bs-btn-color: var(--nav-link); --bs-btn-hover-color: var(--nav-link-hover);
  color: var(--nav-link) !important; transition: color .2s ease, background-color .2s ease, box-shadow .2s ease; line-height: 1; margin-right: -.05rem;
}
.navbar .nav-account-link i, .navbar .nav-account-link .fa-regular, .navbar .nav-account-link .fa-solid, .navbar .nav-account-link svg {
  font-size: 1.15rem; color: inherit !important; fill: currentColor !important; -webkit-text-fill-color: currentColor;
}
.navbar .nav-account-link:hover, .navbar .nav-account-link:focus { color: var(--nav-link-hover) !important; background-color: rgba(129,168,167,.10); }
.navbar .btn.btn-link.text-dark { --bs-btn-color: var(--nav-link); --bs-btn-hover-color: var(--nav-link-hover); color: var(--nav-link) !important; text-decoration: none !important; }
.navbar .btn.btn-link.text-dark:hover, .navbar .btn.btn-link.text-dark:focus { color: var(--nav-link-hover) !important; }

/* Mobile quick actions next to hamburger */
.nav-quick-actions { display: none; align-items: center; gap: .35rem; margin-right: .25rem; }
@media (max-width: 991.98px) {
  .nav-quick-actions { display: inline-flex; }
  .nav-quick-actions .ec-cart-widget, .nav-quick-actions .ec-minicart {
    display: inline-flex !important; align-items: center !important; line-height: 1 !important; min-height: 40px;
  }
  .nav-quick-actions .nav-account-link { width: 36px; height: 36px; margin-right: 0; }

  /* Eliminate large gap between quick-actions and hamburger */
  .navbar .container, .navbar .container-fluid { display: flex; align-items: center; justify-content: flex-start !important; }
  .navbar .navbar-brand { order: 1; margin-right: auto !important; }
  .navbar .nav-quick-actions { order: 2; flex: 0 0 auto !important; gap: .15rem !important; margin-right: 0 !important; }
  .navbar .navbar-toggler { order: 3; flex: 0 0 auto !important; margin-left: .2rem !important; padding-left: .35rem; }
}
.navbar .nav-account-link.btn.btn-link.text-dark { color: var(--nav-link) !important; }

/* ---------- Mega menu ---------- */
.nav-item.dropdown.megamenu { position: static; }
.dropdown-menu.megamenu-content {
  border: none; border-radius: 0; width: 100%; left: 0; right: 0; top: 100%;
  background: #fff; padding: 2rem 4rem; position: absolute; border-top: 3px solid var(--glow-color);
  box-shadow: 0 10px 40px rgba(0,0,0,.08), 0 -6px 26px rgba(0,0,0,0.12); transition: border-top-color .6s ease;
  overflow: visible;
}
.navbar .dropdown-menu { margin-top: 0 !important; }
.dropdown-menu.megamenu-content h6 { font-weight: 700; font-size: .9rem; margin-bottom: .5rem; }
.dropdown-menu.megamenu-content a {
  display: inline-block; color: #333; text-decoration: none; padding: .15rem 0; transition: color .18s ease, transform .18s ease;
  background-image: linear-gradient(var(--nav-underline), var(--nav-underline)); background-repeat: no-repeat;
  background-size: 0% var(--nav-underline-height); background-position: left calc(100% - 2px);
}
.dropdown-menu.megamenu-content a:hover,
.dropdown-menu.megamenu-content a:focus {
  color: var(--nav-link-hover); transform: translateX(2px); background-size: 100% var(--nav-underline-height);
  text-decoration: none !important;
}
@media (max-width: 991px) {
  .dropdown-menu.megamenu-content { position: static !important; width: 100% !important; padding: 1rem 1.4rem; box-shadow: none; border-top: 2px solid var(--glow-color); }
}

/* === Megamenu promo (dark) + brand button === */
.megamenu-promo.dark {
  background: radial-gradient(120% 120% at 100% 0%, rgba(18,18,18,.98) 0%, rgba(14,14,14,.92) 60%, rgba(10,10,10,.88) 100%);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 28px rgba(0,0,0,.20), 0 0 36px var(--glow-color-soft);
  color: #f1f1f1;
  min-height: 100%;
}
.megamenu-promo.dark .brand-badge {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .25rem .6rem;
  border-radius: 999px;
}
.megamenu-promo.dark h6 { color: #fff; }
.megamenu-promo.dark p { margin-bottom: .9rem; color: rgba(255,255,255,.7); }

/* Brand button (usable anywhere, including navbar/mega) */
.btn-brand {
  background-color: #7f3834 !important;
  border-color: #7f3834 !important;
  color: #fff !important;
}
.btn-brand:hover,
.btn-brand:focus {
  background-color: var(--brand-hover) !important; /* #1d1b1b */
  border-color: var(--brand-hover) !important;
  color: #fff !important;
}
/* Megamenu promo image */
.megamenu-promo .promo-thumb { overflow: hidden; border-radius: .6rem; }
.megamenu-promo .promo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Fixed video background & overlay ---------- */
.bg-video { position: fixed; inset: 0; width: 100vw; height: 100vh; object-fit: cover; z-index: -2; filter: brightness(.55); }
.hero-overlay { position: fixed; inset: 0; background: radial-gradient(circle at top, rgba(0,0,0,.3), rgba(0,0,0,.85)); z-index: -1; }

/* ---------- Shell (scrollable card container) ---------- */
.home-shell { height: var(--shell-height); display: flex; justify-content: center; align-items: flex-start; padding: 0rem 1rem 0rem; }
.home-card {
  background: rgba(255, 255, 255, 0.0); border-radius: 1.6rem; max-width: 1480px; width: 100%; height: 100%;
  display: flex; flex-direction: column; overflow: hidden; color: #f3f3f3;
}
.home-card-body { flex: 1 1 auto; overflow-y: auto; padding: 1rem 1rem 1rem; min-height: 0; color: #fff; }

/* ---------- Glow styles ---------- */
.glow-card {
  border: 1px solid var(--glow-color);
  box-shadow: 0 0 14px rgba(0,0,0,.24), 0 0 30px var(--glow-color-soft);
  background: rgba(0,0,0,.24);
  transition: border-color .6s ease, box-shadow .6s ease, background .6s ease;
}
.dynamic-glow {
  border-color: var(--glow-color) !important;
  box-shadow: 0 0 18px rgba(0,0,0,.16), 0 0 28px rgba(0,0,0,.26), 0 0 30px var(--glow-color-soft) !important;
  transition: border-color .6s ease, box-shadow .6s ease;
}

/* ---------- Hero Block ---------- */
.hero-block {
  background: radial-gradient(circle at top, rgba(0,0,0,.55), rgba(0,0,0,0));
  border-radius: 1.4rem; padding: 2.8rem 2.4rem 2.2rem;
  display: flex; gap: 2.5rem; align-items: center; flex-wrap: wrap; position: relative; overflow: hidden; min-height: 320px;
}

/* Ensure hero content is above the absolute hero image */
.hero-block > *:not(img) { position: relative; z-index: 2; }

/* Machine image behind everything else in the hero */
.hero-machine-img {
  position: absolute;
  right: -188px;
  bottom: -52px;
  height: 100%;
  width: auto;
  max-width: none;
  filter: drop-shadow(0 14px 35px rgba(0,0,0,.55));
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* Mobile-only readability card for the hero subtitle */
@media (max-width: 919.98px) {
  .hero-subtitle {
    background: linear-gradient(180deg, rgba(0,0,0,.46), rgba(0,0,0,.30));
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 8px 24px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.10);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    padding: .85rem 1rem;
    border-radius: .85rem;
    margin-bottom: 1rem;
  }
}

/* Headings and CTAs */
.hero-title { font-size: clamp(2.1rem, 4vw, 3.2rem); font-weight: 700; line-height: 1.05; margin-bottom: 1.1rem; }
.hero-subtitle { max-width: 520px; color: var(--muted-on-dark); margin-bottom: 1.6rem; font-weight: 500; letter-spacing: .01em; }
.hero-cta-wrap { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-cta-wrap .btn, .machine-spotlight .btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; line-height: 1; height: 44px; padding-inline: 1.4rem; }

/* Hero stats (inside a Bootstrap .row) */
.hero-stats { margin-top: .25rem; }
.hero-stats [class*="col-"] .hero-stat-card { height: 100%; }

.hero-stat-card {
  position: relative; border-radius: 1rem; padding: .85rem 1.1rem .75rem; min-width: 145px; overflow: hidden;
  background: rgba(0,0,0,.22); backdrop-filter: blur(4px);
  border: 1px solid var(--glow-color);
  box-shadow: 0 0 16px rgba(0,0,0,.42), 0 0 30px rgba(0,0,0,.35);
  transition: background .6s ease, border-color .6s ease, box-shadow .6s ease, color .6s ease;
  color: #fff;
}
.hero-stat-card .small { font-size: .7rem; opacity: .85; font-weight: 500; }
.hero-stat-card .label { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; }
.hero-stat-card .value { font-size: 1.6rem; font-weight: 700; line-height: 1.05; }

/* ---------- Section headings ---------- */
.section-heading { margin-top: 2.4rem; margin-bottom: 1.1rem; font-size: 1.1rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.95); }

/* ---------- Featured Coffee Grid ---------- */
/* Let Bootstrap's .row control layout. Do NOT override display with block/grid. */
.coffee-line-grid { align-items: stretch; }
.coffee-line-grid.row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0 !important;              /* spacing comes from Bootstrap's g-* classes */
  align-items: stretch;
}
.coffee-line-grid.row > [class*="col-"] { display: block; }

.coffee-line-card {
  background: rgba(0,0,0,.35); border-radius: 1.1rem; padding: 1.2rem 1.3rem 1.05rem;
  display: flex; gap: 1rem; align-items: stretch;
  border: 1px solid var(--glow-color); box-shadow: 0 0 16px rgba(0,0,0,.28), 0 0 25px rgba(0,0,0,.22);
  transition: border-color .6s ease, box-shadow .6s ease;
  height: 100%;
}
.coffee-line-icon {
  width: 40px; height: 40px; border-radius: 999px; background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  flex: 0 0 auto;
}
.coffee-line-title { font-weight: 600; margin-bottom: .35rem; color: #fff; }
.coffee-line-text { font-size: .8rem; color: var(--muted-on-dark-soft); font-weight: 500; }

/* Make the right-side stack a column so the link can pin to the bottom */
.coffee-line-card > div:last-child {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Coffee card link: bottom-pinned, no-wrap, responsive size */
.coffee-line-card a {
  font-size: clamp(.72rem, 1.35vw, .85rem) !important;
  color: rgba(255,255,255,.95);
  text-decoration: none;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  white-space: nowrap;
}
.coffee-line-card a:hover,
.coffee-line-card a:focus {
  color: #7f3834;
  text-decoration: underline;
}

/* ---------- Machine Spotlight ---------- */
.machine-spotlight {
  background: radial-gradient(circle at top, rgba(24,24,24,.8), rgba(9,9,9,.3));
  border-radius: 1.3rem; padding: 2.2rem 2.1rem 2rem; margin-top: 2rem;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.2rem; align-items: stretch;
  border: 1px solid var(--glow-color); box-shadow: 0 0 20px rgba(0,0,0,.28), 0 0 28px rgba(0,0,0,.26);
  transition: border-color .6s ease, box-shadow .6s ease;
}
.machine-spotlight h3 { font-size: 1.6rem; margin-bottom: 1rem; }
.badge-light-outline {
  display: inline-block; padding: .25rem .8rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.3);
  font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 1rem;
}
.machine-spotlight p { color: var(--muted-on-dark); max-width: 530px; font-weight: 500; }
.machine-img-wrap { position: relative; width: 100%; height: 100%; min-height: 240px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.machine-swappable { position: relative; width: 100%; height: 100%; }
.machine-swappable img {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  max-width: 100%; max-height: 100%; height: auto; opacity: 0; transition: opacity .85s ease;
  filter: drop-shadow(0 12px 35px rgba(0,0,0,.32)); border-radius: 1.2rem;
}
.machine-swappable img.active { opacity: 1; }

/* ---------- Footer (inside card) ---------- */
.inner-footer { background: #0f0e0e; color: #c4c2c2; border-radius: 1.2rem; margin-top: 2.5rem; padding: 2.4rem 2rem 1.6rem; }
.inner-footer a { color: #fff; text-decoration: none; }
.inner-footer a:hover { text-decoration: underline; }
.inner-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 1.6rem; padding-top: 1rem; font-size: .875rem; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .navbar-nav .nav-link, .dropdown-menu.megamenu-content a, .machine-swappable img, .dynamic-glow, .glow-card { transition: none; }
}

/* ---------- Responsive (global mobile content adjustments) ---------- */
@media (max-width: 991px) {
  :root { --shell-height: auto; }
  body { overflow: auto; }
  .home-shell { height: auto; padding: 0; }
  .home-card { height: auto; }
  .home-card-body { max-height: none; overflow-y: visible; }
  .home-card-body { padding: .2rem .2rem .2rem !important;}
  .hero-block { padding: 2.1rem 1.4rem 2.05rem; min-height: 280px; }
  .machine-spotlight { grid-template-columns: 1fr; }
  .machine-img-wrap { min-height: 280px; }
  .hero-cta-wrap { gap: .65rem; }

  /* Default offcanvas link styling (non-themed) */
  .offcanvas a.d-block.py-2 {
    color: #111;
    background-image: linear-gradient(var(--nav-underline), var(--nav-underline));
    background-repeat: no-repeat; background-size: 0% var(--nav-underline-height);
    background-position: left calc(100% - 6px);
    font-weight: 600;
    text-decoration: none;
  }
  .offcanvas a.d-block.py-2:hover, .offcanvas a.d-block.py-2:focus {
    color: var(--nav-link-hover);
    background-size: 100% var(--nav-underline-height);
    text-decoration: none;
  }
}

@media (max-width: 575.98px) {
  .hero-machine-img { right: -200px; bottom: 0px; height: 68%; opacity: .5; }
  .hero-stats { width: 100%; }
}
@media (min-width: 576px) and (max-width: 766.98px) {
  .hero-machine-img { right: -100px; bottom: -80px; height: 80%; opacity: .75; }
}
@media (min-width: 767px) and (max-width: 991px) {
  .hero-machine-img { right: -85px; bottom: -66px; height: 110%; opacity: .8; }
}
@media (min-width: 992px) and (max-width: 1399px) {
  .hero-machine-img { height: 120%; right: -80px; bottom: -75px; }
  .hero-title, .hero-subtitle { max-width: 520px; }
}
@media (min-width: 1400px) {
  .hero-machine-img { height: 122%; right: -30px; bottom: -80px; }
  .hero-title, .hero-subtitle { max-width: 660px; }
}

/* =========================================================
   UPGRADED MOBILE OFFCANVAS THEME
   ========================================================= */
.offcanvas-backdrop.show {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background-color: rgba(0,0,0,.55);
}

/* Panel container */
.offcanvas-theme {
  --panel-bg: rgba(12, 12, 12, 0.82);
  --panel-grad: radial-gradient(120% 100% at 100% 0%, rgba(15,15,15,.95) 0%, rgba(12,12,12,.82) 60%, rgba(8,8,8,.78) 100%);
  --panel-border: rgba(255,255,255,.08);
  --panel-glow: 0 0 28px rgba(0,0,0,.26), 0 0 36px var(--glow-color-soft);

  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.55)), var(--panel-grad);
  color: #f1f1f1;
  width: min(92vw, 420px);
  border-left: 1px solid var(--panel-border);
  box-shadow: var(--panel-glow);
  border-radius: 18px 0 0 18px;
}
/* Fallback: classic viewport units */
.offcanvas-theme {
  --bs-offcanvas-width: min(92vw, 420px);  /* guarantees ≥8% overlay on the left */
  width: var(--bs-offcanvas-width) !important;
}

/* Prefer dynamic viewport on modern mobile (prevents iOS URL bar issues) */
@supports (width: 1dvw) {
  .offcanvas-theme {
    --bs-offcanvas-width: min(92dvw, 420px);
  }
}

.offcanvas-theme .btn-close { filter: invert(1) grayscale(100%); opacity: .85; }
.offcanvas-theme .offcanvas-header {
  padding: 1rem 1rem 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  /* NEW: make header background opaque (not transparent) */
  background: #0f0f0f !important;
  background-clip: padding-box;
}
.offcanvas-theme .offcanvas-title { font-weight: 700; letter-spacing: .02em; }
.offcanvas-theme .offcanvas-body { padding: 1rem; }

/* Section separators */
.offcanvas-sep {
  margin: 1rem 0 1rem;
  border: 0; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.12), rgba(255,255,255,.06));
}

/* Primary CTA grid */
.mobile-cta.grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .9rem;
}
.btn-mobile-primary, .btn-mobile-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 44px; border-radius: 999px; font-weight: 700; text-decoration: none; letter-spacing: .02em;
}
.btn-mobile-primary {
  color: #0b0b0b; background: linear-gradient(180deg, #a8e0d8, #7dbeb4);
  box-shadow: 0 8px 22px rgba(109,184,172,.35);
}
.btn-mobile-primary:hover { filter: brightness(1.02); }
.btn-mobile-ghost {
  color: #e8f7f5; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(6px);
}
.btn-mobile-ghost:hover { background: rgba(255,255,255,.12); }

/* Quick row (account + cart chip) */
.mobile-quick-row {
  display: flex; gap: .5rem; align-items: center; margin: .2rem 0 0.8rem;
}
.btn-mobile-chip {
  display: inline-flex; align-items: center; gap: .45rem; height: 38px; padding: 0 .9rem;
  color: #eaeaea; text-decoration: none; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
}
.btn-mobile-chip:hover { background: rgba(255,255,255,.12); }
.mobile-chip-cart .ec-cart-widget { display: inline-flex !important; align-items: center !important; min-height: 36px; }

/* Section label + pill lists */
.offcanvas-section { margin-bottom: .85rem; }
.section-label {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(255,255,255,.86); margin-bottom: .55rem;
}
.list-pills { display: flex; flex-wrap: wrap; gap: .45rem; }
.pill-link {
  display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .8rem; border-radius: 999px;
  color: #f3f3f3; text-decoration: none; font-weight: 600; font-size: .92rem;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  transition: transform .15s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.pill-link:hover {
  background: rgba(129,168,167,.18);
  border-color: var(--glow-color);
  box-shadow: 0 0 0 2px rgba(109,184,172,.18) inset, 0 0 18px rgba(109,184,172,.25);
  transform: translateY(-1px);
}

/* Wide footer CTA in offcanvas */
.btn-mobile-wide {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  width: 100%; height: 48px; border-radius: 12px; font-weight: 800; letter-spacing: .02em; text-decoration: none;
  color: #0b0b0b; background: linear-gradient(180deg, #a8e0d8, #7dbeb4);
  box-shadow: 0 12px 28px rgba(109,184,172,.38), inset 0 1px 0 rgba(255,255,255,.38);
}
.btn-mobile-wide:hover { filter: brightness(1.03); }

/* Make simple link list in offcanvas-theme match dark UI */
.offcanvas-theme a.d-block.py-2 {
  color: #f1f1f1;
  background-image: linear-gradient(var(--glow-color), var(--glow-color));
  background-repeat: no-repeat; background-size: 0% var(--nav-underline-height);
  background-position: left calc(100% - 6px);
  font-weight: 700;
  text-decoration: none;
}
.offcanvas-theme a.d-block.py-2:hover,
.offcanvas-theme a.d-block.py-2:focus {
  color: #d9fffb;
  background-size: 100% var(--nav-underline-height);
  text-decoration: none;
}

/* Small screens: tighten a touch */
@media (max-width: 380px) {
  .mobile-cta.grid-2 { grid-template-columns: 1fr; }
}

/* =========================================================
   MOBILE NAV HAND-OFF (Topbar → Navbar on scroll)
   ========================================================= */
@media (max-width: 991.98px) {
  .topbar {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1050; transition: transform .28s ease; will-change: transform;
  }
  .navbar {
    position: fixed; top: var(--topbar-height); left: 0; right: 0;
    width: 100%; z-index: 1040; overflow: visible; transition: top .28s ease;
  }
  .home-shell { margin-top: calc(var(--topbar-height) + var(--header-height)); }
  body.navbar-takes-top .topbar { transform: translateY(-100%); }
  body.navbar-takes-top .navbar { top: 0; }
  body.navbar-takes-top .home-shell { margin-top: var(--header-height); }
}

/* ===== Mobile offcanvas: centered stack tiles ===== */
.menu-tile .menu-tile-bg {
  background-image: var(--tile-img);
  background-size: cover;
  background-position: center;
  filter: saturate(1.02) contrast(1.02);
}
.menu-tile-label {
  font-size: 1.2rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-shadow: 0 6px 28px rgba(0,0,0,.65), 0 2px 8px rgba(0,0,0,.45);
  pointer-events: none;
}
.offcanvas-theme .offcanvas-body { padding-top: 1rem; padding-bottom: 1.25rem; }
.offcanvas-link {
  color: #f1f1f1;
  background-image: linear-gradient(var(--glow-color), var(--glow-color));
  background-repeat: no-repeat;
  background-size: 0% var(--nav-underline-height);
  background-position: left calc(100% - 6px);
  font-weight: 700;
  text-decoration: none;
}
.offcanvas-link:hover,
.offcanvas-link:focus {
  color: #d9fffb;
  background-size: 100% var(--nav-underline-height);
  text-decoration: none;
}

/* =========================================================
   MAIN AREA BRAND BUTTONS
   ========================================================= */
.home-shell .btn,
.home-shell .btn-light,
.home-shell .btn-outline-light {
  background-color: #7f3834 !important;
  border-color: #7f3834 !important;
  color: #fff !important;
}
.home-shell .btn:hover,
.home-shell .btn:active,
.home-shell .btn:focus {
  background-color: var(--brand-hover) !important; /* #1d1b1b */
  border-color: var(--brand-hover) !important;
  color: #fff !important;
}
.home-shell .btn:focus-visible {
  box-shadow: 0 0 0 .25rem rgba(127, 56, 52, .35) !important;
  outline: none !important;
}
.home-shell .btn:disabled,
.home-shell .btn.disabled {
  background-color: #7f3834 !important;
  border-color: #7f3834 !important;
  opacity: .65;
  color: #fff !important;
}
.home-shell .btn i,
.home-shell .btn svg {
  color: inherit !important;
  fill: currentColor !important;
}

/* =========================================================
   MOBILE Z-INDEX STACK OVERRIDES (navbar & offcanvas above topbar)
   ========================================================= */
@media (max-width: 991.98px) {
  .topbar { z-index: 1040 !important; }             /* lower than nav/offcanvas */
  .navbar { z-index: 1051 !important; }             /* above topbar */
  .offcanvas-backdrop { z-index: 1052 !important; } /* behind panel, above nav */
  .offcanvas { z-index: 1053 !important; }          /* panel itself */
  /* Bootstrap modals remain on top (default 1055). */
}