/* Estilo de header alternativo: blur no scroll (configuração "Estilo do header" no admin)
   Sem scroll: cart e hamburger iguais aos dois templates (app.css).
   Só no scroll (is-header-blur) aplicam os estilos abaixo. */

body.header-style-custom .topbar{
  z-index: 65;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: box-shadow .2s ease, backdrop-filter .2s ease, background-color .2s ease;
}
body.header-style-custom.is-header-blur .topbar{
  background-color: rgba(var(--topbar-bg-rgb), .48);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
body.header-style-custom.is-header-blur .topbar::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 18px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(var(--topbar-bg-rgb), .28), rgba(var(--topbar-bg-rgb), 0));
}

/* No scroll: botões seguem settings. Ao rolar (blur): interior transparente + blur, outline branco, texto branco (mesmo estilo do hamburger) */
body.header-style-custom.is-header-blur .cart-link{
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border: 2px solid #fff;
  color: #fff;
}
body.header-style-custom.is-header-blur .cart-link .cart-icon,
body.header-style-custom.is-header-blur .cart-link .cart-text,
body.header-style-custom.is-header-blur .cart-link .cart-count{
  color: #fff;
}
body.header-style-custom.is-header-blur .cart-link .cart-count{
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
body.header-style-custom.is-header-blur .nav-toggle{
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border: 2px solid #fff;
}
body.header-style-custom.is-header-blur .nav-toggle .burger span{
  background: #fff;
}

/* Flash: afastar do header e shape quadrado no estilo 2 */
body.header-style-custom .flash-stack{
  margin-top: 16px;
  margin-bottom: 14px;
}
body.header-style-custom .flash{
  border-radius: 0;
}

/* Cards quadrados no estilo 2 (shadow leve, igual no hover) */
body.header-style-custom .card,
body.header-style-custom .card:hover{
  border-radius: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}

/* Inputs quadrados no estilo 2 */
body.header-style-custom .input,
body.header-style-custom select,
body.header-style-custom textarea{
  border-radius: 0;
}

/* Botões quadrados no estilo 2 */
body.header-style-custom .btn,
body.header-style-custom button{
  border-radius: 0;
}

/* Template 2: botão Remover do carrinho quadrado */
body.header-style-custom .btn-remove{
  border-radius: 0 !important;
}

/* Template 2: botão hamburger e botão carrinho quadrados */
body.header-style-custom .top-actions .nav-toggle,
body.header-style-custom .top-actions .cart-link{
  border-radius: 0;
}

/* Template 2: painel do menu (hamburger) e itens 100% quadrados */
body.header-style-custom .topbar .nav,
body.header-style-custom .nav-toggle-input:checked ~ .top-actions .nav,
body.header-style-custom .topbar .nav{
  border-radius: 0 !important;
}
body.header-style-custom .topbar .nav a,
body.header-style-custom .topbar .nav-dd-btn{
  border-radius: 0 !important;
}
/* Dropdown do Account no template 2: totalmente quadrado */
body.header-style-custom .topbar .nav-dd .nav-dd-menu,
body.header-style-custom .topbar .nav-dd-menu,
body.header-style-custom .nav-dd-menu{
  border-radius: 0 !important;
}
body.header-style-custom .topbar .nav-dd-menu a,
body.header-style-custom .nav-dd-menu a{
  border-radius: 0 !important;
}
body.header-style-custom .topbar .nav-dd summary.nav-dd-btn,
body.header-style-custom .nav-dd summary.nav-dd-btn{
  border-radius: 0 !important;
}

/* Template 2: dropdown "Conta" do dashboard do user (account/index) quadrado */
body.header-style-custom .account-dd-btn,
body.header-style-custom .account-dd .account-dd-btn{
  border-radius: 0 !important;
}
body.header-style-custom .account-dd-menu{
  border-radius: 0 !important;
}
body.header-style-custom .account-dd-menu a{
  border-radius: 0 !important;
}

/* Chip de preço no estilo 2: quadrado, um pouco maior, cores do site */
body.header-style-custom .price-label{
  border-radius: 0;
  background: var(--price-label-bg);
  color: var(--price-label-text);
  padding: 12px 18px;
  font-size: 18px;
  font-weight: 1000;
}

/* Template 2: linha preço + quantidade + carrinho deve ficar quadrada também */
body.header-style-custom .card .body .row .price-label,
body.header-style-custom .card form.menu-card-form .menu-card-qty,
body.header-style-custom .card form.menu-card-form .sm-btn-add-only,
body.header-style-custom .card form.menu-card-form .btn.sm-btn-add-only,
body.header-style-custom #productModal #modalProductPrice.price-label,
body.header-style-custom #productModal #modalQty,
body.header-style-custom #productModal #modalAddToCartBtn{
  border-radius: 0 !important;
}
body.header-style-custom .card form.menu-card-form .sm-btn-add-only,
body.header-style-custom .card form.menu-card-form .btn.sm-btn-add-only,
body.header-style-custom #productModal #modalAddToCartBtn{
  border-color: var(--btn-bg) !important;
}

/* Pontinhos do hero no estilo 2: centralizados, clean (quadradinhos), cores do site */
/* Template 2: indicador do hero em estilo barras (segmentos) */
body.header-style-custom .hero-dots{
  left: 50%;
  transform: translateX(-50%);
  gap: 8px;
  bottom: 20px;
}
body.header-style-custom .hero-dot{
  width: 28px;
  height: 4px;
  border-radius: 0;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.25s ease, width 0.25s ease;
}
body.header-style-custom .hero-dot:hover{
  background: rgba(255, 255, 255, 0.5);
}
body.header-style-custom .hero-dot.is-active{
  background: var(--btn-bg, var(--brand, #E31837));
  width: 40px;
}

/* Hero full width apenas no estilo 2: texto e cashback na mesma posição do layout 1, colado no banner */
/* --hero-vw: 100vw; com modal/menu aberto html.modal-open usa --bm-lock-vw (definida em app.js) para não saltar o full-bleed */
body.header-style-custom{
  --hero-vw: 100vw;
  --hero-fullwidth-gutter: calc((var(--hero-vw) - min(1120px, calc(var(--hero-vw) - 32px))) / 2);
}
html.modal-open body.header-style-custom{
  --hero-vw: var(--bm-lock-vw, 100vw);
}
body.header-style-custom .hero-slider{
  width: var(--hero-vw);
  margin-left: calc(50% - (var(--hero-vw) / 2));
  margin-right: calc(50% - (var(--hero-vw) / 2));
  margin-top: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  box-shadow: none;
}
body.header-style-custom .hero-slide-inner{
  left: var(--hero-fullwidth-gutter);
  width: min(680px, calc(min(1120px, calc(var(--hero-vw) - 32px)) - 72px));
}
body.header-style-custom .hero-slider .cashback-chip{
  right: calc(var(--hero-fullwidth-gutter) + 14px);
  /* Template 2: pill compacta — % em cima, "Cashback" embaixo; sem ícone */
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 2px;
  min-width: 58px;
  padding: 8px 10px;
  background: rgba(var(--brand-rgb), 0.42);
  backdrop-filter: saturate(1.3) blur(12px);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  border: 2px solid var(--btn-bg);
  color: var(--btn-text);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-weight: 700;
}
body.header-style-custom .hero-slider .cashback-chip .cashback-chip-legacy-icon,
body.header-style-custom .hero-slider .cashback-chip .cashback-chip-legacy-text{
  display: none !important;
}
body.header-style-custom .hero-slider .cashback-chip .cashback-chip-pct{
  display: block !important;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  text-align: right;
  width: 100%;
}
body.header-style-custom .hero-slider .cashback-chip .cashback-chip-label{
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
body.header-style-custom .hero-slider .cashback-chip:hover{
  background: rgba(var(--brand-rgb), 0.55);
  backdrop-filter: saturate(1.3) blur(12px);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  border-color: var(--btn-bg);
  color: var(--btn-text);
}

/* Template 2: botões do hero com outline na cor do tema e interior blur transparente */
body.header-style-custom .hero-slider .btn-primary{
  border: 2px solid var(--btn-bg, var(--brand, #E31837));
  background: rgba(var(--brand-rgb, 227, 24, 55), 0.22);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  color: var(--btn-text, #fff);
}
body.header-style-custom .hero-slider .btn-primary:hover{
  background: rgba(var(--brand-rgb, 227, 24, 55), 0.35);
  border-color: var(--btn-bg, var(--brand, #E31837));
  color: var(--btn-text, #fff);
}
body.header-style-custom .hero-slider .btn-outline{
  border: 2px solid var(--btn-bg, var(--brand, #E31837));
  background: rgba(var(--brand-rgb, 227, 24, 55), 0.08);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  color: var(--btn-bg, var(--brand, #E31837));
}
body.header-style-custom .hero-slider .btn-outline:hover{
  background: rgba(var(--brand-rgb, 227, 24, 55), 0.18);
  border-color: var(--btn-bg, var(--brand, #E31837));
  color: var(--btn-bg, var(--brand, #E31837));
}

/* Template 2: setas do hero com mesmo estilo dos botões — interior meio transparente + blur */
body.header-style-custom .hero-slider .hero-nav{
  border: 2px solid var(--btn-bg, var(--brand, #E31837));
  background: rgba(var(--brand-rgb, 227, 24, 55), 0.22);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  color: var(--btn-text, #fff);
}
body.header-style-custom .hero-slider .hero-nav:hover{
  background: rgba(var(--brand-rgb, 227, 24, 55), 0.35);
  border-color: var(--btn-bg, var(--brand, #E31837));
  color: var(--btn-text, #fff);
}

/* Telemóvel: mesmo problema — blur no botão do hero quebra vídeo de fundo no WebKit */
@media (max-width: 640px){
  body.header-style-custom .hero-slider .hero-nav{
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

@media (max-width: 520px){
  body.header-style-custom .hero-slider .cashback-chip{
    right: calc(var(--hero-fullwidth-gutter) + 12px);
    min-width: 52px;
    padding: 6px 8px;
    border-radius: 6px;
  }
  body.header-style-custom .hero-slider .cashback-chip .cashback-chip-pct{
    font-size: 0.95rem;
  }
  body.header-style-custom .hero-slider .cashback-chip .cashback-chip-label{
    font-size: 0.65rem;
  }
}
@media (min-width: 1024px){
  body.header-style-custom .hero-slide-inner{
    width: min(1040px, calc(min(1120px, calc(var(--hero-vw) - 32px)) - 72px)) !important;
    padding-left: 80px !important;
  }
}
body.header-style-custom .page{
  padding-top: 0 !important;
}
body.header-style-custom .page > .container{
  padding-top: 0;
}
body.header-style-custom .page .hero-slider{
  margin-top: 0 !important;
}
/* Remove qualquer espaço residual entre banner e hero (colapso de margens / subpixel) */
body.header-style-custom .page > .container > .hero-slider{
  margin-top: -2px !important;
}

/* Banner promocional: colado no hero no layout 2 (sem margem entre os dois) */
body.header-style-custom .banner-scroll-wrapper{
  z-index: 60;
  top: 0;
  margin-bottom: 0;
  padding-top: 15px;
  padding-bottom: 15px;
  transition: top .2s ease;
}
body.header-style-custom.is-header-blur .banner-scroll-wrapper{
  top: 0;
}

@media (max-width: 860px){
  body.header-style-custom .banner-scroll-wrapper{
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

/* Template 2: todos os modais do público – mesma cor do header, transparente + blur */
body.header-style-custom .modal,
body.header-style-custom .modal-overlay,
body.header-style-custom .cart-modal-overlay{
  background: rgba(var(--topbar-bg-rgb), 0.25) !important;
  backdrop-filter: saturate(1.1) blur(16px);
  -webkit-backdrop-filter: saturate(1.1) blur(16px);
}
body.header-style-custom .order-modal .order-modal-backdrop{
  background: rgba(var(--topbar-bg-rgb), 0.25) !important;
  backdrop-filter: saturate(1.1) blur(16px);
  -webkit-backdrop-filter: saturate(1.1) blur(16px);
}

/* Template 2: My reservations – shape da linha (item) da lista quadrado */
body.header-style-custom .my-reservation-item{
  border-radius: 0;
}
body.header-style-custom .my-reservations-list-wrap.has-scroll{
  border-radius: 0;
}
body.header-style-custom .my-reservation-status{
  border-radius: 0;
}
