/* Customer experience. Loaded after the legacy stylesheet; preserves admin layouts. */
:root {
  --store-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --store-radius: 18px;
  --store-border: rgba(255, 255, 255, .12);
  --store-soft: rgba(255, 255, 255, .045);
  --store-nav-height: 76px;
  --on-primary: #211507;
}

html { scroll-padding-bottom: calc(var(--store-nav-height) + env(safe-area-inset-bottom, 0px) + 20px); }
body { font-family: var(--store-font); -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font-family: inherit; }
button, a, [role="button"] { touch-action: manipulation; }
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}
body:not(.admin-active) { line-height: 1.55; }
body:not(.admin-active) #app {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding: 24px 24px calc(var(--store-nav-height) + env(safe-area-inset-bottom, 0px) + 28px);
}
body:not(.admin-active) :where(.btn) {
  min-height: 46px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.3;
  padding: 12px 18px;
  transition: background-color .16s ease, box-shadow .16s ease;
}
body:not(.admin-active) :where(.btn-primary) { color: var(--on-primary); }
body:not(.admin-active) :where(.btn-success) { color: #072b18; }
body:not(.admin-active) :where(button:disabled, .btn:disabled) {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
body:not(.admin-active) :where(.form-group input, .form-group select, .form-group textarea, .checkout-details input, .checkout-details select) {
  font-size: 16px;
  line-height: 1.5;
  border-radius: 12px;
}
body:not(.admin-active) :where(.form-group label) { font-size: 14px; line-height: 1.5; }
body:not(.admin-active) :where(.login-container, .perfil-container, .pedido-card, .checkout-section) {
  border-radius: var(--store-radius);
}
body:not(.admin-active) .login-container { width: min(100%, 460px); padding: clamp(22px, 5vw, 40px); }
body:not(.admin-active) .login-container h1 { font-size: clamp(26px, 6vw, 34px); line-height: 1.2; }
body:not(.admin-active) .login-container .subtitle { line-height: 1.6; }
body:not(.admin-active) .login-page { min-height: calc(100svh - 150px); padding: 20px 0; }
body:not(.admin-active) .login-card { border-radius: 20px; box-shadow: 0 16px 50px #0002; }
body:not(.admin-active) .login-form .form-group input { font-size: 16px; }
body:not(.admin-active) .login-form .form-group input::placeholder { color: var(--lighter); opacity: 1; }
body:not(.admin-active) .login-form .btn-login { color: #072b18; min-height: 48px; }
body:not(.admin-active) .perfil-card { padding: 20px; border-radius: var(--store-radius); border-color: var(--store-border); }
body:not(.admin-active) .perfil-card h3 { font-size: 20px; line-height: 1.35; margin-bottom: 12px; letter-spacing: -.02em; }
body:not(.admin-active) .perfil-card p { overflow-wrap: anywhere; }
body:not(.admin-active) .perfil-card .btn:not(.btn-primary):not(.btn-danger):not(.btn-success) { background: var(--store-soft); color: var(--white); border: 1px solid var(--store-border); }
body:not(.admin-active) .checkout-page :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { font-size: 16px !important; }
body:not(.admin-active) .checkout-page textarea::placeholder { color: var(--lighter); opacity: 1; }
/* These actions retain their existing green backgrounds and payment handlers. */
body:not(.admin-active) :is(#btnStep1Next, #btnStep2Next, #btnFinalizar, #btnProceed),
body:not(.admin-active) .cardapio-btn-order { color: #fff !important; }
body:not(.admin-active) .aq-modal-content { font-size: 15px; line-height: 1.55; }
body:not(.admin-active) :where(.aq-modal-close, .aq-modal-back) { min-width: 44px; min-height: 44px; }

/* Navigation stays attached to the viewport, independently of #app animations.
   Only the page scrolls; no scroll-direction listener or viewport-height math. */
.aq-bottom-nav-portal {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  height: auto;
  z-index: 9900;
  transform: none;
  contain: none;
}
.aq-bottom-nav-portal > .bottom-nav {
  position: static;
  min-height: var(--store-nav-height);
  margin: 0;
  padding: 8px max(8px, env(safe-area-inset-right, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  gap: 4px;
  border-top: 1px solid var(--store-border);
  background: var(--bg-card);
  box-shadow: 0 -6px 24px #0003;
  opacity: 1;
}
.bottom-nav .bottom-nav-btn {
  min-height: 56px;
  max-width: 180px;
  justify-content: center;
  padding: 7px 4px;
  gap: 5px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--lighter);
  font: 650 12px/1.25 var(--store-font);
}
.bottom-nav .bottom-nav-btn i { font-size: 20px; }
.bottom-nav .bottom-nav-btn.active { background: var(--primary-glow-strong); }
.bottom-nav .bn-label { max-width: 100%; overflow-wrap: anywhere; }
.bottom-nav #bn-cart .bn-label { font-size: 12px; white-space: normal; }
.bottom-nav #bn-cart.has-items { background: var(--primary); color: var(--on-primary); }
.bottom-nav #bn-cart.has-items i { color: var(--on-primary) !important; }
.bottom-nav #bn-cart.has-items .badge-cart { background: #17120c !important; color: #fff !important; }

/* Burger photography, short copy and one clear route into the menu. */
.header.header-store.store-hero {
  min-height: 370px;
  margin: 0 0 18px;
  border-radius: 24px;
  box-shadow: none;
  border: 1px solid var(--store-border);
}
.store-hero-content { width: 58%; max-width: 650px; padding: 30px 32px; }
.header.header-store.store-hero.has-store-banner::before { top: 0; left: 40%; background-position: center; }
.header.header-store.store-hero::after { background: linear-gradient(90deg, #090a0bf5 0%, #090a0be8 36%, #090a0b70 64%, #090a0b12 100%); }
.header.header-store.store-hero .store-top { justify-content: flex-start; margin-bottom: 14px !important; }
.header.header-store.store-hero .store-logo-large { width: auto; max-width: 180px; max-height: 64px !important; }
.header.header-store.store-hero .store-greeting-text { font-size: 15px; line-height: 1.5; color: #e1d9cc; }
.store-headline { margin: 10px 0 12px; color: #fff7ed; font-size: clamp(32px, 4.6vw, 54px); font-weight: 850; line-height: 1.06; letter-spacing: -.045em; text-wrap: balance; }
.store-hero-description { max-width: 410px; font-size: 15px; line-height: 1.6; color: #e1d9cc; margin: 0 0 18px; }
.store-order-cta { display: inline-flex; width: fit-content; max-width: 100%; align-items: center; justify-content: center; gap: 16px; box-shadow: none; }
.header.header-store.store-hero .store-meta { margin-top: 18px; gap: 10px; }
.store-actions-panel { background: var(--bg-card); border-color: var(--store-border); box-shadow: none; border-radius: var(--store-radius); padding: 16px; }
.store-actions-panel .store-meta-line3 { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.store-action-item { color: var(--lighter); line-height: 1.4; font-size: 12px; }
.store-action-item span { white-space: normal; overflow: visible; }
.store-actions-panel .store-action-btn.store-btn.store-btn-icon { min-height: 44px !important; border-radius: 12px !important; box-shadow: none; }
.store-menu-heading { margin: 30px 0 18px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.store-eyebrow { color: var(--primary); font-size: 11px; letter-spacing: .12em; font-weight: 800; }
.store-menu-heading h2 { font-size: clamp(25px, 3vw, 32px); letter-spacing: -.035em; line-height: 1.2; margin: 6px 0 0; }
.store-menu-heading p { color: var(--lighter); font-size: 14px; margin: 0; }
.cardapio-view-control { gap: 10px; margin-bottom: 18px; scroll-margin-top: 18px; }
.cardapio-search { order: -1; max-width: none; flex: 1 1 300px; position: relative; }
.cardapio-search-input { min-height: 48px; padding: 12px 42px 12px 14px; font-size: 16px; background: var(--bg-card); border-color: var(--store-border); border-radius: 12px; }
.cardapio-search-icon { position: absolute; right: 12px; margin: 0; color: var(--lighter); }
.cardapio-search-input::placeholder { opacity: 1; }
.cardapio-view-button { background: var(--bg-card); border-color: var(--store-border); }
.cardapio-view-button i { color: var(--primary); }
.categorias.show-nav { top: max(8px, env(safe-area-inset-top, 0px)); background: var(--bg-card); border-color: var(--store-border); box-shadow: 0 4px 16px #0002; }
.category-select { min-height: 44px; font-size: 16px; }
.category-select option { color: var(--white); background: var(--bg-card); }
.category-header { min-height: 64px; }
.category-title { font-size: clamp(19px, 2vw, 23px); line-height: 1.3; letter-spacing: -.025em; }
.cardapio-highlight-card { border-radius: var(--store-radius); border-color: var(--store-border); box-shadow: none; }
@media (min-width: 701px) {
  .cardapio-highlight-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 24px; padding: 18px; }
  .cardapio-highlight-card .cardapio-highlight-title { grid-column: 1; }
  .cardapio-highlight-card .cardapio-highlight-main { grid-column: 1; margin-bottom: 0; }
  .cardapio-highlight-card .btn { grid-column: 2; grid-row: 1 / 3; margin: 0; width: auto; }
  .bottom-nav { justify-content: center; }
}

/* Keep both existing product views and the complete options modal. */
body:not(.admin-active) .produto-card { border: 1px solid var(--store-border); box-shadow: none; border-radius: var(--store-radius); transition: border-color .16s ease, background-color .16s ease; }
body:not(.admin-active) .produto-info { min-width: 0; display: flex; flex-direction: column; }
body:not(.admin-active) .produto-info h3 { font-size: 18px; line-height: 1.3; letter-spacing: -.02em; overflow-wrap: break-word; }
body:not(.admin-active) .produto-info .descricao { font-size: 14px; line-height: 1.55; color: var(--lighter); margin: 6px 0 12px; -webkit-line-clamp: 3; line-clamp: 3; }
body:not(.admin-active) .produto-info .preco { display: block; color: var(--success); font-size: 20px; font-weight: 800; line-height: 1.3; margin: 0; font-variant-numeric: tabular-nums; }
body:not(.admin-active) .preco-container { margin-top: auto; }
.produto-choose { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--primary-glow-strong); color: var(--primary); font-size: 14px; font-weight: 750; }
#produtos[data-view-mode="grid"] .category-products { gap: 16px; }
body:not(.admin-active) .category-products { margin-left: 0; }
#produtos[data-view-mode="grid"] .produto-card,
#produtos[data-view-mode="horizontal"] .produto-card { padding: 12px; gap: 14px; }
#produtos[data-view-mode="grid"] .produto-img,
#produtos[data-view-mode="horizontal"] .produto-img { height: auto; aspect-ratio: 4 / 3; border-radius: 12px; object-fit: cover; }
.produto-badge-mais-pedido { background: #ffcd70; color: #372409; border-radius: 5px; letter-spacing: .025em; }

body.theme-light { --store-border: rgba(35, 28, 17, .16); --store-soft: rgba(35, 28, 17, .04); }
body.theme-light .store-eyebrow,
body.theme-light .produto-choose { color: #7a4800; }
body.theme-light .bottom-nav .bottom-nav-btn.active:not(.has-items) :where(i, .bn-label) { color: #784800 !important; }
body.theme-light .store-actions-panel .store-action-btn.store-btn.store-btn-icon { background: var(--store-soft) !important; border-color: var(--store-border) !important; }

/* O conteúdo é duplicado no HTML. Somar metade do gap evita o salto entre ciclos. */
.marcas-carousel-track {
  --marcas-carousel-gap: 20px;
  gap: var(--marcas-carousel-gap);
  animation: marcasScrollContinuo 30s linear infinite;
  animation-play-state: running;
  will-change: transform;
}
.marcas-carousel-track:hover { animation-play-state: running; }
@keyframes marcasScrollContinuo {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-50% - (var(--marcas-carousel-gap) / 2)), 0, 0); }
}

@media (hover: hover) {
  .bottom-nav .bottom-nav-btn:hover { background: var(--store-soft); }
  .bottom-nav #bn-cart.has-items:hover { background: var(--primary); filter: brightness(1.06); }
  body:not(.admin-active) .produto-card:hover { border-color: var(--primary); transform: none; box-shadow: none; }
  body:not(.admin-active) .produto-card:hover .produto-img { transform: none; }
}
@media (max-width: 700px) {
  body:not(.admin-active) #app { padding: 12px 12px calc(var(--store-nav-height) + env(safe-area-inset-bottom, 0px) + 24px); }
  .header.header-store.store-hero { min-height: 350px; border-radius: 20px; }
  .store-hero-content { width: 80%; padding: 22px 18px; }
  .header.header-store.store-hero.has-store-banner::before { left: 26%; }
  .header.header-store.store-hero::after { background: linear-gradient(90deg, #090a0bf5, #090a0bc9 48%, #090a0b40); }
  .header.header-store.store-hero .store-logo-large { max-width: 140px; max-height: 50px !important; }
  .store-headline { font-size: clamp(32px, 7.5vw, 46px); }
  .store-hero-description { font-size: 14px; }
  .store-menu-heading { display: block; margin-top: 24px; }
  .store-menu-heading p { margin-top: 8px; }
  .cardapio-search { flex-basis: 100%; min-width: 0; }
  .cardapio-view-button { flex: 1; justify-content: center; }
  .store-actions-panel { padding: 12px 8px; }
  .store-action-item { font-size: 11px; }
  #produtos[data-view-mode="grid"] .category-products { gap: 10px; }
  #produtos[data-view-mode="grid"] .produto-card { padding: 10px; gap: 10px; }
  #produtos[data-view-mode="grid"] .produto-info h3 { font-size: 16px; }
  .produto-choose { font-size: 13px; padding: 10px; }
  .bottom-nav .bottom-nav-btn { font-size: 11px; }
  .bottom-nav #bn-cart .bn-label { font-size: 11px; }
}
@media (max-width: 359px) {
  #produtos[data-view-mode="grid"] .category-products,
  .cardapio-search-suggestions-grid { grid-template-columns: minmax(0, 1fr); }
  .store-hero-content { width: 94%; }
  .bottom-nav .bottom-nav-btn { font-size: 10px; }
  .bottom-nav #bn-cart .bn-label { font-size: 10px; }
}
/* Checkout: compact panels; the scroll container reserves the measured footer. */
body .checkout-page .step-panel.active-step { padding-bottom: 0 !important; }
body .checkout-page .checkout-card.card { padding-bottom: 12px !important; }
body .checkout-page .step-panel > :last-child { margin-bottom: 0; }
body .checkout-page #totalFinal { color: var(--success) !important; font-size: 24px !important; font-weight: 800; }
body .checkout-page #totalFinal .total-value { color: inherit; }
body .checkout-page #mpOnlinePaymentSection { margin-top: 8px; }
body .checkout-page .checkout-pickup-map { height: 126px; }
body .checkout-page .checkout-address-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
body .checkout-page .checkout-address-action { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 10px; }
body .checkout-page #btnDividirPagamento { min-height: 40px; padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--lighter); background: #171c1d; border: 1px solid #303a37; box-shadow: none; }
body .checkout-page #btnDividirPagamento[hidden] { display: none !important; }
body .checkout-page #checkoutCoupon summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 12px; cursor: pointer; list-style: none; color: var(--lighter); font-size: 14px; font-weight: 600; }
body .checkout-page #checkoutCoupon summary::-webkit-details-marker { display: none; }
body .checkout-page #checkoutCoupon summary i { font-size: 12px; transition: transform .18s ease; }
body .checkout-page #checkoutCoupon[open] summary i { transform: rotate(180deg); }
body .checkout-page .checkout-coupon-content { padding-top: 6px; }
body .checkout-page #checkoutCoupon[open] .checkout-coupon-content { animation: checkoutCouponReveal .18s ease-out; }
body .checkout-page .cupom-row #btnCupom { min-width: 84px !important; }
@keyframes checkoutCouponReveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
body .mobile-sticky-cta { grid-template-columns: 42px minmax(0, 280px) 42px; }
body :is(#btnStep1Next, #btnStep2Next) { height: 50px !important; min-height: 50px !important; padding: 10px 12px !important; font-size: 15px !important; border-radius: 10px !important; margin: 0 !important; }
body #btnFinalizar { min-height: 64px !important; padding: 10px 12px !important; font-size: 14px !important; line-height: 1.4; white-space: normal; }
body #btnFinalizar .checkout-cta-main { display: block; }
body #btnFinalizar .checkout-cta-note { font-size: 12px; line-height: 1.4; opacity: 1; }
@media (max-width: 900px) {
  body .checkout-page { padding-bottom: var(--checkout-footer-space, calc(116px + env(safe-area-inset-bottom, 0px))) !important; scroll-padding-bottom: var(--checkout-footer-space, 116px); }
  body .aq-checkout-actions-portal [data-checkout-action-step="2"] { grid-template-columns: 42px minmax(0, 340px); }
  body .aq-checkout-actions-portal #btnFinalizar { max-width: 340px !important; }
  body .checkout-page .checkout-steps .step { min-width: 0 !important; flex: 1; font-size: 12px !important; gap: 5px; }
  body .checkout-page .checkout-steps .step-left { gap: 5px; }
  body .checkout-page .checkout-steps { gap: 6px !important; overflow: visible; }
}
@media (max-width: 359px) {
  body .checkout-page .checkout-address-card { flex-wrap: wrap; }
  body .checkout-page .checkout-address-actions { margin-left: auto; }
  body .checkout-page .checkout-address-card > label { flex-basis: 100% !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  /* Mantém este conteúdo em movimento lento; é a própria função do componente. */
  .marcas-carousel-track {
    animation-duration: 60s !important;
    animation-iteration-count: infinite !important;
  }
}
