/* ============================================================
   Site header: delivery banner, nav bar, mega menus, compact-on-scroll,
   account popover, mobile drawer foot, welcome-voucher nudge.

   Lives in its own head-loaded file rather than inline in the navbar
   template because frappe renders that template as the "Standard Navbar"
   Web Template and re-appends any inline <style> AFTER the markup, which
   left the first paint unstyled: every mega menu flashed fully expanded on
   refresh. Loaded from hooks.web_include_css, so it is in <head> before
   the header is parsed.
   ============================================================ */

html {
  scroll-behavior: smooth;
}

/* ============================================================
   Header shell. Transparent: the banner and the bar paint their own
   grounds, and a shadow only appears once the header is floating over
   scrolled content, where it has something to separate from. That shadow
   is the whole of the scrolled state: nothing folds or shrinks.
   ============================================================ */
.wh-header {
  background: transparent;
  box-shadow: 0 6px 24px rgba(124, 45, 18, 0);
  transition: box-shadow 0.3s ease;
}

.wh-header.is-compact {
  box-shadow: 0 6px 24px rgba(124, 45, 18, 0.18);
}

/* ---- delivery banner ----------------------------------------------
   One line, in the site's own warm ink rather than a purple-to-red
   gradient. Stays on screen when the header compacts: the promise is
   part of the header, only the bar below it tightens. */
.wh-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #fde68a 0%, #fed7aa 55%, #fef3c7 100%);
  animation: whBannerIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes whBannerIn {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: none; }
}

.wh-banner-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.55) 1px, transparent 1px);
  background-size: 12px 12px;
  animation: moveRadial 3.5s linear infinite;
}

@keyframes moveRadial {
  from { background-position: 0 0; }
  to   { background-position: 12px 12px; }
}

.wh-banner-text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.45rem 0.75rem;
  font-family: 'Poppins-Regular', system-ui, sans-serif;
  font-size: 0.75rem;
  line-height: 1.3;
  color: #7c2d12;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .wh-banner-text {
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    gap: 0.45rem;
  }
}

.wh-banner-truck {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  color: #c2410c;
  /* Drives in once behind the banner; no perpetual bounce in a fixed header. */
  animation: whTruckIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

@keyframes whTruckIn {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: none; }
}

.wh-banner-strong {
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #c2410c;
}

.wh-banner-text strong {
  font-weight: 700;
  color: #7c2d12;
}

.wh-banner-muted {
  color: #9a3412;
}

.wh-banner-muted::before {
  content: "·";
  margin-right: 0.35rem;
}

/* Narrowest phones: the promise alone, the region note returns at 360px. */
@media (max-width: 359.98px) {
  .wh-banner-muted {
    display: none;
  }
}

/* ---- bar + logo ----------------------------------------------------
   The header keeps its full size on scroll; `is-compact` only adds the
   shadow above. */

/* ---- desktop links ------------------------------------------------- */
.wh-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: 'Poppins-Regular', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.wh-nav-btn:hover,
.wh-nav-btn:focus-visible,
.wh-mega:hover > .wh-nav-btn,
.wh-mega:focus-within > .wh-nav-btn,
.wh-mega.is-open > .wh-nav-btn {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  text-decoration: none;
  outline: none;
}

.wh-nav-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55);
}

.wh-nav-chev {
  width: 0.9rem;
  height: 0.9rem;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.wh-mega:hover .wh-nav-chev,
.wh-mega:focus-within .wh-nav-chev,
.wh-mega.is-open .wh-nav-chev {
  transform: rotate(180deg);
}

.wh-nav-ico {
  width: 1.1rem;
  height: 1.1rem;
}

/* ---- mega menus ----------------------------------------------------
   Shown by :hover, :focus-within (keyboard) or .is-open (tap). The panel
   keeps a transparent strip above the card so the pointer can cross from
   the trigger without the menu dropping, and it lingers 0.2s on exit. */
.wh-mega {
  position: relative;
}

.wh-mega-panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  padding-top: 0.6rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0s linear 0.22s;
}

.wh-mega:hover .wh-mega-panel,
.wh-mega:focus-within .wh-mega-panel,
.wh-mega.is-open .wh-mega-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.wh-mega-card {
  padding: 0.625rem;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12), 0 16px 40px rgba(124, 45, 18, 0.18);
}

.wh-mega-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(var(--wh-rows, 6), auto);
  column-gap: 0.25rem;
  row-gap: 0.125rem;
}

.wh-mega-link {
  display: block;
  padding: 0.5rem 0.875rem;
  border-radius: 0.75rem;
  white-space: nowrap;
  font-family: 'Poppins-Regular', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #292524;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.wh-mega-link:hover,
.wh-mega-link:focus-visible {
  background: #fff7ed;
  color: #c2410c;
  text-decoration: none;
  outline: none;
}

.wh-mega-link:focus-visible {
  box-shadow: inset 0 0 0 2px #ea580c;
}

.wh-mega-all {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.6rem 0.875rem 0.25rem;
  border-top: 1px solid #fef3e7;
  font-family: 'Poppins-Regular', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #c2410c;
  text-decoration: none;
}

.wh-mega-all svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.wh-mega-all:hover,
.wh-mega-all:focus-visible {
  color: #7c2d12;
  text-decoration: none;
}

.wh-mega-all:hover svg {
  transform: translateX(3px);
}

/* ---- customer service ---------------------------------------------- */
.wh-cs-btn {
  align-items: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-family: 'Poppins-Regular', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  color: #ffffff;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.wh-cs-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.wh-cs-btn:hover,
.wh-cs-btn:focus-visible {
  background: #ffffff;
  border-color: #ffffff;
  color: #c2410c;
  text-decoration: none;
}

/* ---- cart badge ----------------------------------------------------
   White on the orange bar, the inverse of the drawer's orange-on-white
   count. Bootstrap's .badge:empty keeps it hidden until there is a number. */
.wh-cart-badge {
  top: 0;
  left: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ffffff !important;
  color: #c2410c !important;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 2px #f97316;
}

/* ---- welcome-voucher nudge (guests) ------------------------------- */
.wh-pill {
  opacity: 0;
  transform: translate(-50%, 40px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.wh-pill.tw-show-banner {
  display: block;
  opacity: 1;
  transform: translate(-50%, 0);
}

.wh-pill.tw-hide-banner {
  opacity: 0;
  transform: translate(-50%, 40px);
}

.wh-pill-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.625rem 0.625rem 1.1rem;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12), 0 12px 32px rgba(124, 45, 18, 0.2);
}

.wh-pill-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.wh-pill-title {
  font-family: 'Poppins-Regular', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  color: #c2410c;
  text-decoration: none;
}

.wh-pill-title:hover {
  color: #7c2d12;
  text-decoration: none;
}

.wh-pill-sub {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.15rem;
  font-size: 0.7rem;
  color: #78716c;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
}

.wh-pill-sub svg {
  width: 0.8rem;
  height: 0.8rem;
  color: #16a34a;
}

.wh-pill-sub.tw-show-text {
  opacity: 1;
  transform: none;
}

.wh-pill-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #a8a29e;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.wh-pill-close:hover {
  background: #fff7ed;
  color: #c2410c;
}

.wh-pill-close svg {
  width: 0.9rem;
  height: 0.9rem;
}

/* ---- drawer foot ---------------------------------------------------- */
.wh-nav-who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
  padding: 0.5rem 0.75rem 0.875rem;
  border-bottom: 1px solid #fef3e7;
}

.wh-nav-foot .wh-acct-link {
  font-family: 'Poppins-Regular', system-ui, sans-serif;
}

.wh-nav-login {
  width: calc(100% - 1rem);
  margin: 0.25rem 0.5rem 0.5rem;
}

.wh-nav-login-note {
  margin: 0 0.5rem 0.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #78716c;
}

.wh-nav-login-note a {
  font-weight: 600;
  color: #c2410c;
}

.tw-relative {
  position: relative;
}

/* ============================================================
   Mobile menu: burger, scrim and slide-out drawer.
   State is one `is-open` class on each of #menu-toggle, #overlay
   and #mobile-nav, toggled together by openMobileNav/closeMobileNav.
   ============================================================ */

/* --- burger button: three bars that fold into an X --- */
.wh-burger {
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s ease, transform 0.2s ease;
}

.wh-burger:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.wh-burger:active {
  transform: scale(0.9);
}

.wh-burger-box {
  position: relative;
  display: block;
  width: 22px;
  height: 16px;
}

.wh-burger-bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2.5px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.2s ease;
}

.wh-burger-bar:nth-child(1) { top: 0; }
.wh-burger-bar:nth-child(2) { top: 50%; margin-top: -1.25px; }
.wh-burger-bar:nth-child(3) { bottom: 0; }

/* 6.75px = half the box height minus half a bar, i.e. each outer bar
   travels to the centre line before rotating. */
.wh-burger.is-open .wh-burger-bar:nth-child(1) { transform: translateY(6.75px) rotate(45deg); }
.wh-burger.is-open .wh-burger-bar:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
.wh-burger.is-open .wh-burger-bar:nth-child(3) { transform: translateY(-6.75px) rotate(-45deg); }

/* --- scrim: fades rather than snapping in, and blurs the page behind --- */
#overlay {
  background: rgba(41, 16, 4, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

#overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* --- drawer panel --- */
#mobile-nav {
  max-width: 22rem;
  border-radius: 0 1.5rem 1.5rem 0;
  /* Deliberately not a springy curve: an overshoot past 0 would open a
     gap at the screen edge on the way in. */
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s ease;
  box-shadow: none;
}

#mobile-nav.is-open {
  box-shadow: 0 0 70px rgba(124, 45, 18, 0.35);
}

.wh-nav-close {
  transition: background-color 0.2s ease, transform 0.25s ease;
}

.wh-nav-close:hover { background-color: #ffedd5; }
.wh-nav-close:active { transform: scale(0.88) rotate(90deg); }

/* --- rows fade up in sequence behind the opening panel; --d is the
       row's place in that sequence, set inline in the markup --- */
.wh-nav-row {
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

#mobile-nav.is-open .wh-nav-row {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--d, 0) * 55ms + 90ms);
}

/* --- tappable rows --- */
.wh-nav-link {
  padding: 0.7rem 0.75rem;
  border-radius: 0.75rem;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.wh-nav-link:hover,
.wh-nav-link:focus-visible {
  background-color: #fff7ed;
  color: #c2410c;
  text-decoration: none;
}

.wh-nav-link:active { transform: scale(0.98); }

.wh-nav-chevron {
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.wh-nav-link:hover .wh-nav-chevron { transform: translateX(4px); }

.wh-nav-back { transition: background-color 0.2s ease; }
.wh-nav-back:hover { background-color: #fff7ed; }
.wh-nav-back-arrow { transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
.wh-nav-back:hover .wh-nav-back-arrow { transform: translateX(-4px); }

/* --- drilling in / out between the main list and a child list --- */
@keyframes whNavPaneIn {
  from { opacity: 0; transform: translateX(22px); }
  to   { opacity: 1; transform: none; }
}

@keyframes whNavPaneBack {
  from { opacity: 0; transform: translateX(-22px); }
  to   { opacity: 1; transform: none; }
}

/* A pane going from display:none to visible restarts this animation on
   its own, so drilling in needs no JS beyond the existing class toggle. */
.wh-nav-pane:not(.tw-hidden) {
  animation: whNavPaneIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Coming back is JS-driven (playPane) because the main rows are already
   displayed; the class is stripped on animationend so it cannot pin the
   rows visible and break the drawer's closing fade. */
.wh-pane-back {
  animation: whNavPaneBack 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#child-items-container li,
#child-brands-container li {
  animation: whNavPaneIn 0.3s ease both;
}

#child-items-container a,
#child-brands-container a {
  display: block;
  padding: 0.5rem 0.6rem;
  border-radius: 0.6rem;
  font-size: 0.8125rem;
  color: #57534e;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

#child-items-container a:hover,
#child-brands-container a:hover {
  background-color: #fff7ed;
  color: #c2410c;
  transform: translateX(3px);
  text-decoration: none;
}

.badge {
  padding: 0.25em 0.6em;
}

/* ---- account popover (navbar_login.html) ---- */
/* ---- account popover --------------------------------------------------
   A small card hung from the avatar. Same surface as the cart drawer and
   checkout panels (white, 16px radius, warm hairline), opening from its
   top-right corner where the icon is, so it reads as coming out of the
   button rather than dropping from nowhere.
   ---------------------------------------------------------------------- */
.wh-acct-btn[aria-expanded="true"] > span {
    background-color: #f97316;
    color: #fef3c7;
}

.wh-acct {
    position: absolute;
    top: calc(100% + 0.625rem);
    right: 0;
    z-index: 60;
    width: 17.5rem;
    max-width: calc(100vw - 1.5rem);
    padding: 0.5rem;
    background: #ffffff;
    border: 1px solid #fed7aa;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12), 0 16px 40px rgba(124, 45, 18, 0.18);
    font-family: 'Poppins-Regular', system-ui, sans-serif;
    text-align: left;
    transform-origin: top right;
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.wh-acct.is-open {
    opacity: 1;
    transform: none;
}

.wh-acct[hidden] {
    display: none;
}

/* The caret points at the icon it came from. */
.wh-acct::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 1rem;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-left: 1px solid #fed7aa;
    border-top: 1px solid #fed7aa;
    transform: rotate(45deg);
}

.wh-acct-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.625rem 0.875rem;
}

.wh-acct-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    overflow: hidden;
    border-radius: 999px;
    background: #ffedd5;
    color: #c2410c;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.wh-acct-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wh-acct-who {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.wh-acct-name,
.wh-acct-email {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.wh-acct-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #292524;
}

.wh-acct-email {
    font-size: 0.75rem;
    color: #78716c;
}

.wh-acct-links,
.wh-acct-foot {
    padding-top: 0.375rem;
    border-top: 1px solid #fef3e7;
}

.wh-acct-links {
    padding-bottom: 0.375rem;
}

.wh-acct-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* 44px rows: a thumb target, not just a pointer one. */
    min-height: 2.75rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    color: #292524;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.wh-acct-link:hover,
.wh-acct-link:focus-visible {
    background: #fff7ed;
    color: #c2410c;
    text-decoration: none;
    outline: none;
}

.wh-acct-link:focus-visible {
    box-shadow: inset 0 0 0 2px #ea580c;
}

.wh-acct-link:active {
    transform: scale(0.985);
}

.wh-acct-link svg {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    color: #a8a29e;
    transition: color 0.15s ease;
}

.wh-acct-link:hover svg,
.wh-acct-link:focus-visible svg {
    color: #ea580c;
}

/* Leaving is quieter than the destinations above it, and set apart by the
   rule rather than by red: red on this site means "fix this". */
.wh-acct-link-out {
    color: #78716c;
}

/* Legacy: hides Bootstrap's dropdown caret and list markers site-wide.
   Kept because other templates still lean on it. */
.dropdown-toggle::after {
    display: none;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0px;
    border-left: 0.3em solid transparent;
}

::marker {
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
    text-transform: none;
    text-indent: 0px !important;
    text-align: start !important;
    text-align-last: auto !important;
    display: none;
}
