/**
 * Vitrine DS — cardápio público premium (camada FINAL).
 * Logo uma vez (hero). Full-bleed. Dual viewport.
 * Não altera data-* do carrinho.
 * Cores: --brand-primary / --brand-accent da empresa.
 */
@import url("../design-system/tokens.css");

:root {
  --menu-font: "Plus Jakarta Sans", var(--wx-font-ui, system-ui);
  --menu-display: "Plus Jakarta Sans", var(--wx-font-display, system-ui);
  /* Desktop: aproveita 1366–1920 sem faixa morta; mobile usa gutter fluido */
  --menu-max: min(1520px, 98vw);
  --menu-gutter: clamp(16px, 2.4vw, 36px);
  --menu-touch: 48px;
  --menu-radius: 16px;
  --menu-sidebar-w: 200px;
}

body.wx-public,
body.wx-public button,
body.wx-public input,
body.wx-public select,
body.wx-public textarea {
  font-family: var(--menu-font) !important;
}

body.wx-public {
  margin: 0;
  min-height: 100dvh;
  color: #f4f6fb;
  overflow-x: hidden;
  background:
    radial-gradient(1000px 480px at 8% -8%, color-mix(in srgb, var(--brand-accent, #1b6bff) 14%, transparent), transparent 55%),
    linear-gradient(180deg, var(--bg, #05070d), #03050a 60%, #020308) !important;
}

/* —— Nav utilitária (sem logo) —— */
body.wx-public .wx-nav.wx-nav-utility {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.4rem var(--menu-gutter);
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid color-mix(in srgb, #fff 8%, transparent);
  background: color-mix(in srgb, #05070d 86%, transparent) !important;
  backdrop-filter: blur(16px);
}

body.wx-public .wx-brand-text,
body.wx-public .wx-brand-text strong {
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, #fff 72%, transparent);
  text-decoration: none;
  background: none !important;
  -webkit-text-fill-color: unset !important;
}

body.wx-public .wx-brand img,
body.wx-public .wx-nav .wx-brand-logo-only {
  display: none !important;
}

body.wx-public .club-nav-button {
  min-height: 40px;
  padding: 0.35rem 0.85rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--brand-accent, #1b6bff) 32%, transparent);
  background: color-mix(in srgb, var(--brand-accent, #1b6bff) 12%, transparent);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 650;
}

body.wx-public .club-nav-button small {
  display: none;
}

/* —— Hero —— */
.menu-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 0;
  margin: 0 !important;
  padding: clamp(1.35rem, 3.5vw, 2.4rem) var(--menu-gutter) clamp(1.25rem, 3vw, 2rem) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(
      125deg,
      color-mix(in srgb, var(--brand-primary, #0b1220) 92%, #000) 0%,
      color-mix(in srgb, var(--brand-accent, #1b6bff) 32%, #05070d) 100%
    ) !important;
}

.menu-hero.has-banner {
  min-height: clamp(180px, 28vw, 280px);
  background-image:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--brand-primary, #0b1220) 28%, transparent) 0%,
      color-mix(in srgb, #03050a 82%, transparent) 68%,
      #03050a 100%
    ),
    var(--menu-hero-image) !important;
  background-size: cover !important;
  background-position: center !important;
}

.menu-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 65% 55% at 15% 25%,
    color-mix(in srgb, var(--brand-accent, #1b6bff) 20%, transparent),
    transparent 70%
  );
}

.menu-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--menu-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.menu-hero-brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
}

.menu-hero-logo,
.menu-hero-logo-fallback {
  width: 88px;
  height: 88px;
  border-radius: 0;
  object-fit: cover;
  flex: 0 0 auto;
  border: 0;
  box-shadow: none;
}

.menu-hero-logo-fallback {
  display: grid;
  place-items: center;
  font-family: var(--menu-display);
  font-size: 2.2rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--brand-accent, #1b6bff) 22%, #111);
  color: #fff;
}

.menu-hero h1 {
  margin: 0;
  font-family: var(--menu-display) !important;
  font-size: clamp(1.85rem, 4.8vw, 2.85rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff !important;
  background: none !important;
  -webkit-text-fill-color: #fff !important;
  overflow-wrap: anywhere;
  text-shadow: 0 8px 24px color-mix(in srgb, #000 35%, transparent);
}

.menu-hero-status {
  margin: 0.4rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid color-mix(in srgb, #fff 14%, transparent);
  background: color-mix(in srgb, #000 28%, transparent);
  color: #fff;
}

.menu-hero-status.is-open {
  border-color: color-mix(in srgb, #3dd68c 45%, transparent);
  color: #b8f5d2;
}

.menu-hero-status.is-closed {
  border-color: color-mix(in srgb, #ff7b7b 40%, transparent);
  color: #ffc4c4;
}

.menu-hero-desc {
  margin: 0.55rem 0 0;
  max-width: 56ch;
  color: color-mix(in srgb, #fff 72%, transparent);
  font-size: 0.98rem;
  line-height: 1.45;
  font-weight: 500;
}

.menu-hero-lead {
  margin: 0.55rem 0 0;
  color: color-mix(in srgb, #fff 80%, transparent);
  font-size: 0.95rem;
  font-weight: 600;
}

.menu-hero-note {
  margin: 0.4rem 0 0;
  color: color-mix(in srgb, #fff 62%, transparent);
  font-size: 0.94rem;
  max-width: 40ch;
  line-height: 1.4;
}

.menu-status-pill,
.menu-hero-eta,
.menu-hero-meta {
  display: none !important;
}

.menu-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.menu-hero-cta .btn {
  min-height: var(--menu-touch);
  padding: 0.8rem 1.35rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 750;
  font-size: 0.98rem;
}

.menu-hero-cta .btn.primary,
body.wx-public .add-btn,
body.wx-public .btn.primary,
body.wx-public .cartbar button,
body.wx-public .coupon-entry button {
  background: var(--brand-accent, var(--gold, #1b6bff)) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--brand-accent, #1b6bff) 30%, transparent);
}

.menu-hero-cta .btn:not(.primary) {
  background: color-mix(in srgb, #fff 10%, transparent);
  border: 1px solid color-mix(in srgb, #fff 18%, transparent);
  color: #fff;
}

.menu-store-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.25rem;
  max-width: var(--menu-max);
  margin: 0.85rem auto 0;
  padding: 0.75rem var(--menu-gutter);
  color: color-mix(in srgb, #fff 58%, #8b93a3);
  font-size: 0.86rem;
  border-bottom: 1px solid color-mix(in srgb, #fff 6%, transparent);
}

.menu-store-meta span {
  position: relative;
}

.menu-store-meta span + span::before {
  content: "·";
  margin-right: 1.25rem;
  margin-left: -0.15rem;
  opacity: 0.45;
}

/* —— Layout / rails —— */
.menu-rail,
.menu-layout {
  max-width: var(--menu-max);
  margin-left: auto;
  margin-right: auto;
  padding-inline: var(--menu-gutter);
}

.menu-rail {
  margin-top: 1.75rem;
}

.menu-rail-head h2,
.product-section h2,
.product-body h3 {
  font-family: var(--menu-display) !important;
  letter-spacing: -0.025em;
}

.menu-rail-head h2,
.product-section h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 750;
}

/* Destaques: preenche a largura do conteúdo no desktop (sem faixa morta à direita).
   Mobile: trilho horizontal (override em max-width 767). */
.menu-rail-track {
  display: grid !important;
  grid-auto-flow: row !important;
  grid-auto-columns: unset !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  justify-content: stretch;
  overflow: visible !important;
  overflow-x: visible !important;
  scroll-snap-type: none;
  padding-bottom: 0.2rem;
  width: 100%;
}

@media (min-width: 981px) {
  .menu-rail-track {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1280px) {
  .menu-rail-track {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1600px) {
  .menu-rail-track {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

.menu-search {
  position: relative !important;
  top: auto !important;
  margin-bottom: 1.1rem;
  z-index: 1;
}

.menu-search input,
.coupon-entry input,
.drawer-panel input,
.drawer-panel select,
.drawer-panel textarea {
  border-radius: 14px;
  min-height: var(--menu-touch);
  font-size: 16px;
  width: 100%;
}

.menu-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 36px;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, #fff 10%, transparent);
  color: #fff;
  font-weight: 650;
  cursor: pointer;
}

/* Boot suave — evita flash sem esconder conteúdo útil */
body.wx-public[data-menu-boot] .menu-layout .product-card {
  animation: menu-card-in 0.28s ease both;
}

@keyframes menu-card-in {
  from { opacity: 0.55; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

body.wx-public .menu-search.is-searching input {
  border-color: color-mix(in srgb, var(--brand-accent, #1b6bff) 45%, transparent);
}

body.wx-public .cart-empty,
body.wx-public .menu-empty-search:not([hidden]),
body.wx-public .menu-empty-catalog {
  min-height: 88px;
  display: grid;
  place-content: center;
  gap: 0.25rem;
}

/* Não sobrescrever o atributo HTML hidden (display:none) */
body.wx-public .menu-empty-search[hidden] {
  display: none !important;
}

body.wx-public .checkout-form.is-submitting button[type="submit"],
body.wx-public [data-checkout-form].is-submitting button[type="submit"] {
  opacity: 0.72;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .product-media:has(img:not(.is-loaded)) {
    animation: menu-media-shimmer 1.1s ease-in-out infinite;
  }
}

@keyframes menu-media-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.menu-empty-search strong,
.cat-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

.menu-empty-search span,
.cat-card span {
  color: color-mix(in srgb, #fff 55%, transparent);
  font-size: 0.92rem;
}

/* —— Product cards —— */
.product-grid {
  display: grid;
  align-items: stretch;
}

.product-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.85rem;
  height: 100%;
  min-height: 0;
  padding: 0.85rem;
  border-radius: var(--menu-radius) !important;
  border: 1px solid color-mix(in srgb, var(--line, #333) 65%, transparent) !important;
  background: color-mix(in srgb, var(--panel, #0c111b) 96%, #000) !important;
  box-shadow: none !important;
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand-accent, #1b6bff) 42%, transparent) !important;
}

.product-card.is-unavailable {
  opacity: 0.62;
}

.product-card .badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 750;
  background: color-mix(in srgb, #000 55%, transparent);
  color: #fff;
  backdrop-filter: blur(8px);
}

.product-card .badge-promo {
  background: color-mix(in srgb, var(--brand-accent, #1b6bff) 85%, #000);
}

.product-media {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  max-height: none !important;
  background:
    linear-gradient(
      110deg,
      color-mix(in srgb, var(--panel2, #121826) 88%, #000) 25%,
      color-mix(in srgb, var(--brand-accent, #1b6bff) 12%, #1a2030) 45%,
      color-mix(in srgb, var(--panel2, #121826) 88%, #000) 65%
    );
  background-size: 200% 100%;
}

.product-media img,
.product-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.product-media img.is-loaded,
.product-media-img.is-loaded {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .product-media img,
  .product-media-img {
    opacity: 1;
    transition: none;
  }
}

.product-media-placeholder {
  display: grid;
  place-content: center;
  gap: 0.35rem;
  height: 100%;
  min-height: 140px;
  letter-spacing: -0.03em;
  color: color-mix(in srgb, #fff 78%, var(--brand-accent, #8ab4ff));
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--brand-accent, #1b6bff) 18%, #151b28),
      color-mix(in srgb, var(--panel2, #121826) 90%, #000)
    );
  opacity: 1;
  text-align: center;
}

.product-media-placeholder-mark {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}

.product-media-placeholder-label {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, #fff 48%, transparent);
}

.product-body {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0.7rem;
  min-height: 0;
  height: 100%;
  padding: 0 !important; /* evita padding duplo com menu-pro.css */
}

.product-copy {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  min-height: 0;
}

.product-body h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  color: #fff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
}

.product-body .product-desc,
.product-body p.product-desc {
  margin: 0;
  color: color-mix(in srgb, #fff 62%, transparent);
  font-size: 0.9rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  display: grid;
  gap: 0.55rem;
  margin-top: auto;
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.price-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  background: color-mix(in srgb, #fff 6%, transparent);
  border: 1px solid color-mix(in srgb, #fff 9%, transparent);
}

.price-pill small {
  font-size: 0.72rem;
  color: color-mix(in srgb, #fff 55%, transparent);
}

.price-pill b {
  font-size: 1rem;
  font-weight: 750;
}

.add-btn,
.cartbar button,
.coupon-entry button {
  min-height: var(--menu-touch);
  font-weight: 750;
  border-radius: 14px;
  margin-top: 0.2rem;
}

/* —— Cart bar —— */
.cartbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: min(640px, calc(100% - 20px));
  padding: 0.7rem 0.8rem 0.7rem 1rem;
  border-radius: 18px;
  backdrop-filter: blur(16px);
  border: 1px solid color-mix(in srgb, var(--brand-accent, #1b6bff) 30%, transparent);
  background: color-mix(in srgb, #070b14 92%, transparent) !important;
  box-shadow: 0 18px 40px color-mix(in srgb, #000 45%, transparent);
}

.cartbar.show {
  display: flex !important;
}

.cartbar-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.cartbar-copy strong {
  font-size: 0.95rem;
}

.cartbar-copy span {
  color: color-mix(in srgb, #fff 65%, transparent);
  font-size: 0.85rem;
}

.cartbar-main-action {
  flex: 0 0 auto;
  min-width: 128px;
}

/* —— Drawers / sheets —— */
body.wx-public .drawer {
  z-index: 80;
}

body.wx-public .drawer-panel {
  border-radius: 20px 20px 0 0;
  max-height: min(92dvh, 900px);
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

body.wx-public .sticky-action,
body.wx-public .cart-drawer-foot,
body.wx-public .drawer-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-top: 0.75rem;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--panel, #0c111b) 96%, #000) 28%);
}

body.wx-public .checkout-panel {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* —— Desktop —— */
@media (min-width: 981px) {
  .menu-layout {
    display: grid !important;
    grid-template-columns: var(--menu-sidebar-w) minmax(0, 1fr);
    gap: 1.5rem 1.75rem;
    align-items: start;
    padding-top: 1.4rem;
    padding-bottom: 150px;
    width: 100%;
  }

  .menu-sidebar {
    position: sticky;
    top: 68px;
    align-self: start;
    display: grid !important;
    gap: 0.25rem;
    max-height: calc(100vh - 96px);
    overflow: auto;
    width: auto !important;
    padding: 0.85rem;
    border-radius: var(--menu-radius);
    border: 1px solid color-mix(in srgb, var(--line, #333) 65%, transparent);
    background: color-mix(in srgb, var(--panel, #0c111b) 96%, transparent) !important;
  }

  .menu-sidebar .eyebrow {
    margin: 0 0 0.45rem;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: color-mix(in srgb, #fff 45%, transparent);
  }

  .menu-sidebar a {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.65rem;
    border-radius: 11px;
    color: color-mix(in srgb, #fff 78%, transparent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
  }

  .menu-sidebar a[data-cat-link="active"],
  .menu-sidebar a.active,
  .menu-sidebar a:hover {
    background: color-mix(in srgb, var(--brand-accent, #1b6bff) 16%, transparent);
    color: #fff;
  }

  /* 2 colunas base; 3–4 nos breakpoints maiores — sem faixa morta */
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch;
    gap: 1rem 1.1rem;
    width: 100%;
  }

  .product-media {
    aspect-ratio: 4 / 3 !important;
    height: auto !important;
    max-height: none !important;
  }

  /* Carrinho lateral no desktop */
  body.wx-public .cart-sheet .drawer-panel,
  body.wx-public .drawer[data-cart-drawer] .drawer-panel {
    margin-left: auto;
    margin-right: 0;
    width: min(420px, 100vw);
    max-width: 420px;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  body.wx-public .drawer[data-cart-drawer] .drawer-panel [data-cart-list] {
    flex: 1 1 auto;
    overflow: auto;
  }

  /* Modal de produto / checkout centrado e amplo no desktop */
  body.wx-public .drawer[data-drawer] .drawer-panel.product-drawer-panel {
    width: min(920px, calc(100vw - 48px));
    margin: auto;
    border-radius: 20px;
    max-height: min(90dvh, 880px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.wx-public .drawer[data-checkout-modal] .drawer-panel {
    width: min(560px, calc(100vw - 48px));
    margin: auto;
    border-radius: 20px;
    max-height: min(90dvh, 880px);
  }

  body.wx-public .drawer[data-drawer],
  body.wx-public .drawer[data-checkout-modal] {
    align-items: center;
    justify-content: center;
    padding: 24px;
  }

  body.wx-public .product-drawer-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 1.25rem 1.5rem;
    align-items: start;
    overflow: auto;
    flex: 1 1 auto;
    padding: 0 0.15rem 0.35rem;
    min-height: 0;
  }

  body.wx-public .product-drawer-info {
    display: grid;
    gap: 0.65rem;
    align-content: start;
    position: sticky;
    top: 0;
  }

  body.wx-public .product-drawer-info-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 750;
    color: #fff;
  }

  body.wx-public .product-drawer-unit-price {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 750;
    color: color-mix(in srgb, var(--brand-accent, #8dffb0) 85%, #fff);
  }

  body.wx-public .product-drawer-options {
    display: grid;
    gap: 0.35rem;
    align-content: start;
  }

  body.wx-public .product-drawer-options .choice {
    min-height: 40px;
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
  }

  body.wx-public .product-drawer-options .size-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  body.wx-public .product-drawer-options .size-grid .choice {
    min-height: 40px;
    padding: 0.45rem 0.6rem;
    font-weight: 650;
  }

  body.wx-public .product-drawer-options .extras-grid {
    gap: 0.4rem;
  }

  body.wx-public .product-drawer-panel .drawer-footer.sticky-action {
    flex: 0 0 auto;
    margin-top: 0.5rem;
    border-top: 1px solid color-mix(in srgb, #fff 10%, transparent);
    padding-top: 0.85rem;
  }

  body.wx-public .drawer-media {
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    margin-bottom: 0;
  }

  body.wx-public .drawer-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  body.wx-public .cartbar {
    width: min(420px, calc(100% - 32px));
    left: auto;
    right: 20px;
    transform: none;
  }
}

@media (min-width: 1280px) {
  :root {
    --menu-sidebar-w: 210px;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1366px) {
  :root {
    --menu-max: min(1560px, 98vw);
    --menu-sidebar-w: 220px;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1.15rem 1.2rem;
  }
}

@media (min-width: 1440px) {
  :root {
    --menu-max: min(1640px, 97vw);
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1600px) {
  :root {
    --menu-max: min(1760px, 96vw);
  }

  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1920px) {
  :root {
    --menu-max: min(1840px, 96vw);
  }

  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* —— Tablet —— */
@media (min-width: 768px) and (max-width: 980px) {
  .menu-layout {
    display: block !important;
    padding-top: 1.1rem;
    padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
  }

  .menu-sidebar {
    position: sticky;
    top: 52px;
    z-index: 30;
    display: flex !important;
    gap: 8px;
    overflow-x: auto;
    margin: 0 calc(-1 * var(--menu-gutter)) 1rem;
    padding: 0.55rem var(--menu-gutter);
    background: color-mix(in srgb, #05070d 92%, transparent) !important;
    backdrop-filter: blur(12px);
    scrollbar-width: none;
  }

  .menu-sidebar .eyebrow,
  .menu-sidebar-empty {
    display: none;
  }

  .menu-sidebar a {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 42px;
    padding: 0.4rem 0.9rem;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, #fff 12%, transparent);
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 650;
  }

  .menu-sidebar a[data-cat-link="active"],
  .menu-sidebar a.active {
    background: var(--brand-accent, #1b6bff);
    border-color: transparent;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.95rem;
  }
}

/* Modal produto: uma coluna no mobile/tablet */
@media (max-width: 980px) {
  body.wx-public .product-drawer-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  body.wx-public .product-drawer-info {
    position: static;
  }

  body.wx-public .product-drawer-info-title {
    display: none; /* nome já está no drawer-head */
  }

  body.wx-public .product-drawer-options .choice {
    min-height: 44px;
  }
}

/* —— Phone —— */
@media (max-width: 767px) {
  .menu-hero {
    min-height: 0;
    padding: 1.15rem var(--menu-gutter) 1.1rem !important;
  }

  .menu-hero.has-banner {
    min-height: 160px;
  }

  .menu-hero-logo,
  .menu-hero-logo-fallback {
    width: 72px;
    height: 72px;
  }

  .menu-hero h1 {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .menu-hero-cta {
    width: 100%;
  }

  .menu-hero-cta .btn {
    flex: 1 1 auto;
    min-height: 44px;
    padding: 0.65rem 1rem;
  }

  .menu-layout {
    display: block !important;
    padding-top: 1rem;
    padding-bottom: calc(130px + env(safe-area-inset-bottom, 0px));
  }

  .menu-sidebar {
    position: sticky;
    top: 52px;
    z-index: 30;
    display: flex !important;
    gap: 8px;
    overflow-x: auto;
    width: auto !important;
    margin: 0 calc(-1 * var(--menu-gutter)) 0.9rem;
    padding: 0.5rem var(--menu-gutter);
    border: 0;
    border-radius: 0;
    background: color-mix(in srgb, #05070d 92%, transparent) !important;
    backdrop-filter: blur(12px);
    scrollbar-width: none;
  }

  .menu-sidebar::-webkit-scrollbar {
    display: none;
  }

  .menu-sidebar .eyebrow,
  .menu-sidebar-empty {
    display: none;
  }

  .menu-sidebar a {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 40px;
    padding: 0.35rem 0.85rem;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, #fff 12%, transparent);
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 650;
  }

  .menu-sidebar a[data-cat-link="active"],
  .menu-sidebar a.active {
    background: var(--brand-accent, #1b6bff);
    border-color: transparent;
  }

  .product-grid,
  .menu-main .product-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  /* Lista principal: card horizontal (thumb + texto) */
  .menu-main .product-card {
    display: grid !important;
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.7rem;
  }

  .menu-main .product-media,
  .menu-main .product-card .product-media {
    width: 96px !important;
    min-height: 96px !important;
    height: 96px !important;
    max-height: 96px !important;
    aspect-ratio: 1 / 1 !important;
  }

  .menu-main .product-media-placeholder {
    min-height: 96px;
    font-size: 1.35rem;
  }

  .menu-main .product-media-placeholder-label {
    display: none;
  }

  .menu-main .product-body {
    grid-template-rows: 1fr auto;
    gap: 0.35rem;
  }

  .menu-main .product-body h3 {
    font-size: 0.98rem;
    -webkit-line-clamp: 2;
  }

  .menu-main .product-body .product-desc {
    -webkit-line-clamp: 3;
    font-size: 0.8rem;
  }

  .menu-main .add-btn {
    width: 100%;
    min-height: 44px;
  }

  /* Destaques mobile: cards verticais no trilho (não thumb 96px) */
  .menu-rail .product-card {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto 1fr;
    gap: 0.65rem;
    padding: 0.75rem;
  }

  .menu-rail .product-media,
  .menu-rail .product-card .product-media {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 4 / 3 !important;
  }

  .menu-rail .product-body h3 {
    font-size: 1rem;
    -webkit-line-clamp: 2;
  }

  .menu-rail .product-body .product-desc {
    -webkit-line-clamp: 3;
    font-size: 0.82rem;
  }

  /* Neutraliza sticky legado de company.css que sobrepõe categorias */
  body.wx-public .menu-search {
    position: relative !important;
    top: auto !important;
    margin: 0 0 0.85rem !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .cart-item-secondary-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }

  .cart-edit-button {
    border: 0;
    background: transparent;
    color: var(--brand-accent, #1b6bff);
    font-weight: 650;
    cursor: pointer;
    min-height: 40px;
    padding: 0 0.35rem;
  }

  .menu-rail .add-btn {
    width: 100%;
    min-height: 44px;
  }

  .menu-rail-track {
    grid-auto-flow: column !important;
    grid-template-columns: none !important;
    grid-auto-columns: minmax(280px, 82vw) !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
  }

  .menu-rail-track .product-card {
    scroll-snap-align: start;
  }

  body.wx-public .drawer-panel {
    width: 100vw !important;
    max-width: 100% !important;
    border-radius: 18px 18px 0 0;
  }
}

@media (max-width: 430px) {
  .menu-main .product-card {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .menu-main .product-media {
    width: 100px !important;
    min-height: 100px !important;
    height: 100px !important;
    max-height: 100px !important;
  }
}

@media (max-width: 390px) {
  .menu-hero-logo,
  .menu-hero-logo-fallback {
    width: 78px;
    height: 78px;
  }

  .menu-hero h1 {
    font-size: clamp(1.9rem, 9vw, 2.4rem);
  }
}

@media (max-width: 360px) {
  .menu-main .product-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.65rem;
  }

  .menu-main .product-media {
    width: 88px;
    min-height: 88px;
  }

  .cartbar {
    width: calc(100% - 12px);
    padding: 0.55rem 0.6rem;
  }
}

/* —— Footer (sem repetir horário/endereço do topo) —— */
body.wx-public .public-footer {
  max-width: var(--menu-max);
  margin: 0 auto;
  padding: 1.75rem var(--menu-gutter) calc(1.75rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid color-mix(in srgb, #fff 8%, transparent);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

body.wx-public .public-footer-brand {
  display: grid;
  gap: 0.45rem;
}

body.wx-public .public-footer-brand strong {
  font-size: 0.98rem;
  font-weight: 700;
  color: color-mix(in srgb, #fff 88%, transparent);
}

body.wx-public .public-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  justify-content: flex-start !important;
}

body.wx-public .public-social-link {
  color: color-mix(in srgb, #fff 68%, var(--brand-accent, #8ab4ff));
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 650;
  width: auto !important;
  height: auto !important;
  padding: 0;
  background: none !important;
  box-shadow: none !important;
  border-radius: 0;
  display: inline !important;
}

body.wx-public .public-social-link:hover {
  color: #fff;
  text-decoration: underline;
}

body.wx-public .public-footer-wevex {
  margin-left: auto;
}

body.wx-public .wevex-signature {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.7rem 0.45rem 0.45rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, #fff 10%, transparent);
  background: color-mix(in srgb, #fff 4%, transparent);
  text-decoration: none;
  color: color-mix(in srgb, #fff 70%, transparent);
  transition: border-color 0.15s ease, background 0.15s ease;
}

body.wx-public .wevex-signature:hover {
  border-color: color-mix(in srgb, #20c8ff 40%, transparent);
  background: color-mix(in srgb, #20c8ff 8%, transparent);
}

body.wx-public .wevex-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #041018;
  background: linear-gradient(145deg, #7ae7ff, #20c8ff 55%, #0ea5d8);
}

body.wx-public .wevex-signature-copy {
  display: grid;
  gap: 0.05rem;
  line-height: 1.1;
}

body.wx-public .wevex-signature-copy small {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, #fff 48%, transparent);
}

body.wx-public .wevex-signature-copy strong {
  font-size: 0.95rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  color: #7ae7ff;
}

body.wx-public .public-address-link {
  color: color-mix(in srgb, #fff 65%, transparent);
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .menu-hero,
  .product-card,
  .cartbar,
  .drawer-panel {
    transition: none !important;
  }
}
