:root {
  --chrome-header-h: calc(76px + env(safe-area-inset-top, 0px));
  --chrome-gold: #f2b544;
  --chrome-ink: #071820;
  --chrome-bg: #0b1f2a;
  --chrome-surface: #0e2a38;
  --chrome-orange: #ff8a1f;
  --chrome-red: #e8461e;
}

html { scroll-padding-top: calc(var(--chrome-header-h) + 76px); }
body { padding-top: var(--chrome-header-h); }
body.chrome-drawer-open { overflow: hidden !important; }

.chrome-header,
.chrome-header *,
.chrome-drawer,
.chrome-drawer *,
.chrome-whatsapp,
.bespoke-cart-peek { box-sizing: border-box; }

.chrome-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 250;
  height: var(--chrome-header-h);
  padding-top: env(safe-area-inset-top, 0px); /* barra de estado en webviews/PWA: el logo nunca queda tapado */
  border-bottom: 1px solid rgba(242, 181, 68, .3);
  background: rgba(7, 24, 32, .95);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .24);
}

.chrome-header__inner {
  width: min(1180px, calc(100% - 24px));
  height: 100%;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
}

.chrome-menu-button,
.chrome-cart-button,
.chrome-drawer-close {
  min-width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.chrome-menu-button { justify-self: start; }
.chrome-menu-button svg,
.chrome-cart-button svg { width: 24px; height: 24px; }
.chrome-cart-button { position: relative; justify-self: end; }

.chrome-logo {
  width: 150px;
  height: 70px;
  display: grid;
  place-items: center;
  justify-self: center;
}
.chrome-logo img { width: 100%; height: 64px; display: block; object-fit: contain; }
.chrome-desktop-nav { display: none; }

.chrome-cart-badge {
  position: absolute;
  top: 1px;
  right: -1px;
  min-width: 20px;
  height: 20px;
  display: none;
  place-items: center;
  padding: 0 5px;
  border: 2px solid var(--chrome-ink);
  border-radius: 999px;
  background: linear-gradient(120deg, var(--chrome-orange), var(--chrome-red));
  color: #fff;
  font: 800 11px/1 "Nunito", system-ui, sans-serif;
}
.chrome-cart-badge.is-visible { display: grid; }

.chrome-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(0, 0, 0, .64);
  opacity: 0;
  transition: opacity .22s ease;
}
.chrome-drawer-backdrop.is-open { opacity: 1; }

.chrome-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1002;
  width: min(330px, 86vw);
  padding: 18px 18px calc(28px + env(safe-area-inset-bottom));
  transform: translateX(-105%);
  border-right: 1px solid rgba(242, 181, 68, .3);
  background: linear-gradient(155deg, #0e2a38, #071820);
  box-shadow: 28px 0 70px rgba(0, 0, 0, .45);
  transition: transform .25s ease;
}
.chrome-drawer.is-open { transform: none; }
.chrome-drawer__top {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--chrome-gold);
  font: 400 24px/1 "Lilita One", Impact, sans-serif;
}
.chrome-drawer nav { display: grid; gap: 6px; margin-top: 24px; }
.chrome-drawer nav a {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
  font: 800 17px/1.2 "Nunito", system-ui, sans-serif;
  text-decoration: none;
}
.chrome-drawer nav a:hover,
.chrome-drawer nav a:focus-visible { color: var(--chrome-gold); background: rgba(255, 255, 255, .05); }
.chrome-drawer nav .chrome-drawer__wa { margin-top: 12px; justify-content: center; border: 0; border-radius: 999px; background: #25d366; color: #071820; }

.wa-float.chrome-whatsapp {
  position: fixed;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 190;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 8px 28px rgba(37, 211, 102, .42);
  transition: transform .2s ease, bottom .25s ease;
}
.wa-float.chrome-whatsapp:hover { transform: translateY(-2px) scale(1.04); }
.wa-float.chrome-whatsapp svg { width: 28px; height: 28px; }
body.has-cart-peek .wa-float.chrome-whatsapp { bottom: calc(78px + env(safe-area-inset-bottom)); }
body.menu-engine.has-cart-peek .wa-float.chrome-whatsapp { bottom: calc(var(--nav-h, 66px) + var(--peek-h, 64px) + 24px + env(safe-area-inset-bottom)); }

.bespoke-cart-peek {
  position: fixed;
  inset: auto 0 0;
  z-index: 200;
  min-height: 60px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(16px, calc((100vw - 1180px) / 2));
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  border: 0;
  background: linear-gradient(110deg, var(--chrome-orange), var(--chrome-red));
  color: #fff;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, .34);
  font: 900 15px/1.2 "Nunito", system-ui, sans-serif;
  text-decoration: none;
}
.bespoke-cart-peek.is-visible { display: flex; }
.bespoke-cart-peek__total { white-space: nowrap; font-size: 16px; }
body.has-cart-peek { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }

@media (min-width: 800px) {
  :root { --chrome-header-h: 80px; }
  .chrome-header__inner { grid-template-columns: auto 1fr auto; gap: 36px; }
  .chrome-menu-button { display: none; }
  .chrome-logo { width: 142px; height: 72px; justify-self: start; }
  .chrome-logo img { height: 58px; }
  .chrome-desktop-nav { display: flex; justify-content: center; align-items: center; gap: 8px; }
  .chrome-desktop-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    color: #dbe7e9;
    font: 800 14px/1 "Nunito", system-ui, sans-serif;
    text-decoration: none;
  }
  .chrome-desktop-nav a:hover,
  .chrome-desktop-nav a:focus-visible { color: #fff; background: rgba(255, 255, 255, .07); }
  .chrome-cart-button { border: 1px solid rgba(242, 181, 68, .45); border-radius: 50%; background: rgba(255, 255, 255, .05); }
  .chrome-drawer,
  .chrome-drawer-backdrop { display: none !important; }
  .wa-float.chrome-whatsapp { right: 24px; }
  .bespoke-cart-peek { padding-inline: max(24px, calc((100vw - 1180px) / 2)); }
}

@media (prefers-reduced-motion: reduce) {
  .chrome-drawer,
  .chrome-drawer-backdrop,
  .wa-float.chrome-whatsapp { transition: none; }
}
