:root {
  --purple: #c99916;
  --purple-dark: #8c6205;
  --pink: #ead17a;
  --gold: #d6a727;
  --gold-metal: linear-gradient(105deg, #b48620 0%, #d5ad44 24%, #fff0b6 47%, #d7b04a 64%, #b48620 100%);
  --gold-metal-hover: linear-gradient(105deg, #a47818 0%, #c89d34 24%, #f8e29a 47%, #cba039 64%, #a47818 100%);
  --paper: #fffdf5;
  --ink: #3d2b04;
}

.storefront {
  background: linear-gradient(180deg, #fffdf6 0%, #fff7e6 34%, #ffffff 100%);
}

.storefront .store-hero .lead,
.storefront .hero-horario {
  color: var(--purple-dark) !important;
}

.storefront .btn-purple,
.storefront .btn-gold,
.storefront .category-pill.active,
.storefront .layout-btn.active,
.storefront .entrega-btn.active,
.storefront .pagamento-btn.active,
.storefront .btn-copiar {
  background: var(--gold-metal) !important;
  border-color: #a77708 !important;
  color: #4a3500 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 12px rgba(140,98,5,.24) !important;
}

.storefront .btn-purple:hover,
.storefront .btn-gold:hover,
.storefront .btn-copiar:hover {
  background: var(--gold-metal-hover) !important;
  color: #4a3500 !important;
}

.storefront .menu-toolbar,
.storefront .category-scroller {
  border-color: #ecdba8;
}

.storefront .category-section {
  margin: 30px 0;
  overflow: hidden;
  border: 1px solid #ead9a9;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 8px 24px rgba(140,98,5,.08);
}

.storefront .category-section .section-title {
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 13px 18px !important;
  border: 0;
  border-radius: 0;
  background: var(--gold-metal) !important;
  color: #4a3500;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
  text-transform: uppercase;
}

.storefront .category-section .section-title::before { display: none; }

/* Sobrescreve a regra anterior que alinha categorias em lista pela esquerda. */
.storefront .category-section:has(.product-grid.layout-lista) > .section-title {
  justify-content: center !important;
  text-align: center !important;
}

/* Mesmo acabamento do seletor de categoria ativo. */
.storefront .category-section > .section-title {
  background: var(--gold-metal) !important;
  color: #4a3500 !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.35) !important;
}

.storefront .category-section .category-subtitle {
  margin: 0;
  padding: 16px 18px;
  border-top: 1px solid rgba(107,77,0,.18);
  background: linear-gradient(118deg, #f4dd98, #fffdf7 48%, #f4dfa5);
  color: #8c6205;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.storefront .category-section .product-grid {
  padding: 12px;
}

.storefront .category-section .product-grid.layout-lista {
  gap: 9px;
}

.storefront .category-section .product-grid.layout-lista .product-card,
.storefront .category-section .product-grid.layout-lista .product-card:first-child,
.storefront .category-section .product-grid.layout-lista .product-card:last-child,
.storefront .category-section .product-grid.layout-lista .product-card:only-child {
  grid-template-columns: 104px minmax(0, 1fr) !important;
  overflow: hidden;
  border: 1px solid #ead9a9;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(140,98,5,.07);
}

.storefront .category-section .product-grid.layout-lista .product-img-wrap {
  box-sizing: border-box;
  width: 104px;
  height: 104px;
  padding: 2px;
  border: 2px solid #d8b54b !important;
  border-radius: 9px !important;
  background: #fffaf0;
  box-shadow: 0 2px 7px rgba(140,98,5,.16);
}

.storefront .product-card .product-img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
  border-radius: 5px;
  background: #fffaf0;
}

.storefront .category-section .product-grid.layout-lista .product-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 3px;
  min-width: 0;
  min-height: 104px;
  margin-left: 14px !important;
  padding: 14px 18px !important;
}

.storefront .category-section .product-grid.layout-lista .product-body > .d-flex {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.storefront .category-section .product-grid.layout-lista .product-body h3 {
  color: #765205;
  font-size: .98rem;
  font-weight: 900;
}

.storefront .category-section .product-grid.layout-lista .product-body p {
  grid-column: 1 / -1;
  color: #746b57;
  max-width: none;
}

.storefront .category-section .product-grid.layout-lista .product-body strong {
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  display: block;
  color: #8c6205;
}

.storefront .category-section .product-grid.layout-lista .product-body .btn {
  position: static;
  grid-column: 2;
  grid-row: 3;
  align-self: end;
  min-width: 74px;
  width: auto !important;
  padding: 7px 13px;
  margin: 0;
  border: 1px solid #a77708;
  background: var(--gold-metal);
  color: #4a3500;
  font-weight: 900;
}

/* A vitrine segue a escala ampla do cardápio de referência no desktop e mantém
   margens curtas e estáveis no celular. */
.storefront #cardapio {
  width: min(100% - 64px, 1110px);
  max-width: 1110px !important;
  margin-right: auto;
  margin-left: auto;
}

.storefront .hero-info .lead {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: min(100%, 760px);
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
}

.storefront .banner-strip {
  display: block !important;
  width: min(100% - 64px, 1110px) !important;
  max-width: 1110px !important;
  margin: 12px auto 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.storefront .banner-strip a {
  box-sizing: border-box;
  display: block !important;
  width: 100% !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* Exibe o próximo horário junto do selo de funcionamento. */
.storefront .hero-meta .hero-horario {
  display: inline-flex !important;
  align-items: center;
  width: auto !important;
  max-width: 100%;
  overflow: visible !important;
  color: #5a4a35 !important;
  font-size: .9rem !important;
  font-weight: 800 !important;
  white-space: nowrap;
}

/* Aviso exibido na entrada quando a loja estiver fechada. */
.storefront .closed-store-modal .modal-dialog {
  max-width: 390px;
}

.storefront .closed-store-modal {
  background: rgba(32, 24, 10, .57);
}

.storefront .closed-store-modal-dismiss-target {
  position: fixed;
  top: 0;
  left: 0;
}

.storefront:has(#closedStoreModalDismiss:target) #closedStoreModal,
.storefront:has(#cardapio:target) #closedStoreModal {
  display: none !important;
}

.storefront:has(#pickupOnlyModalDismiss:target) #pickupOnlyModal,
.storefront:has(#cardapio:target) #pickupOnlyModal {
  display: none !important;
}

.storefront .closed-store-modal .modal-content {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(181, 130, 18, .35);
  border-radius: 20px;
  background: linear-gradient(145deg, #fffefa 0%, #fff5dc 100%);
  box-shadow: 0 22px 60px rgba(50, 35, 12, .28);
}

.storefront .closed-store-modal .modal-content::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--gold-metal);
}

.storefront .closed-store-modal .modal-body {
  padding: 34px 28px 27px;
  text-align: center;
}

.storefront .closed-store-modal__close {
  position: absolute;
  z-index: 1;
  top: 16px;
  right: 16px;
}

.storefront .closed-store-modal__clock {
  position: relative;
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 17px;
  border: 2px solid #aa7607;
  border-radius: 50%;
  background: #fff8e8;
  box-shadow: 0 8px 20px rgba(171, 119, 8, .18);
}

.storefront .closed-store-modal__clock::before,
.storefront .closed-store-modal__clock::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 2px;
  border-radius: 2px;
  background: #8c6205;
  transform-origin: bottom center;
}

.storefront .closed-store-modal__clock::before {
  top: 13px;
  height: 16px;
  transform: translateX(-50%) rotate(-35deg);
}

.storefront .closed-store-modal__clock::after {
  top: 25px;
  height: 12px;
  transform: translateX(-50%) rotate(115deg);
}

.storefront .closed-store-modal__eyebrow {
  margin: 0 0 7px;
  color: #9a6a05;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .09em;
}

.storefront .closed-store-modal h2 {
  margin: 0;
  color: #3f2d08;
  font-size: 1.45rem;
  font-weight: 900;
}

.storefront .closed-store-modal__message {
  margin: 12px auto 22px;
  color: #665637;
  font-size: .98rem;
  line-height: 1.55;
}

.storefront .closed-store-modal__message strong {
  color: #6f4b00;
}

.storefront .closed-store-modal__button {
  min-height: 46px;
  border-radius: 12px;
  font-size: .95rem;
}

.storefront .pickup-only-modal__alert {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 17px;
  border: 2px solid #b77905;
  border-radius: 50%;
  background: #fff6d7;
  color: #9c6500;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(171, 119, 8, .18);
}

.storefront .pickup-only-modal__detail {
  margin: -9px auto 22px;
  color: #665637;
  font-size: .9rem;
  line-height: 1.5;
}

@media (max-width: 575.98px) {
  .storefront .closed-store-modal .modal-dialog {
    max-width: calc(100vw - 34px);
  }

  .storefront .closed-store-modal .modal-body {
    padding: 31px 23px 23px;
  }

  /* Mantem o aviso compacto e centralizado na tela. */
  .storefront .pickup-only-modal .modal-dialog.modal-dialog-centered {
    min-height: calc(100% - 1rem);
    margin: .5rem auto;
  }

  .storefront .pickup-only-modal .modal-body {
    padding: 18px 19px 17px;
  }

  .storefront .pickup-only-modal__alert {
    width: 40px;
    height: 40px;
    margin-bottom: 7px;
    font-size: 1.45rem;
  }

  .storefront .pickup-only-modal .closed-store-modal__eyebrow {
    margin-bottom: 4px;
    font-size: .62rem;
  }

  .storefront .pickup-only-modal h2 {
    font-size: 1.12rem;
    line-height: 1.18;
  }

  .storefront .pickup-only-modal .closed-store-modal__message {
    margin: 8px auto 11px;
    font-size: .84rem;
    line-height: 1.35;
  }

  .storefront .pickup-only-modal__detail {
    margin: 0 auto 13px;
    font-size: .77rem;
    line-height: 1.35;
  }

  .storefront .pickup-only-modal .closed-store-modal__button {
    min-height: 38px;
    font-size: .82rem;
  }

  .storefront .pickup-only-modal .closed-store-modal__close {
    top: 10px;
    right: 10px;
    transform: scale(.84);
  }
}

.storefront .category-section .product-grid.layout-lista .product-card,
.storefront .category-section .product-grid.layout-lista .product-card:first-child,
.storefront .category-section .product-grid.layout-lista .product-card:last-child,
.storefront .category-section .product-grid.layout-lista .product-card:only-child {
  min-height: 118px;
}

.storefront #destaques .section-title,
.storefront .section-title:not(.category-section .section-title) {
  color: var(--purple-dark);
}

@media (max-width: 640px) {
  html,
  body.storefront {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .storefront #cardapio {
    width: calc(100vw - 30px) !important;
    max-width: 560px !important;
    padding-right: 0;
    padding-left: 0;
  }

  .storefront .menu-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .storefront .menu-toolbar .layout-toggle { display: none; }

  .storefront .category-scroller {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto !important;
    overflow-y: hidden;
    width: auto;
    padding: 8px 0 10px !important;
    margin-top: 16px !important;
    margin-bottom: 18px !important;
  }

  .storefront .category-pill {
    flex: 0 0 auto;
    padding: 9px 13px !important;
    font-size: .74rem !important;
    line-height: 1.1;
    white-space: nowrap;
  }

  .storefront .category-section { margin: 18px 0 24px; }

  .storefront .hero-meta .hero-horario {
    width: 100% !important;
    font-size: .82rem !important;
  }

  .storefront .hero-info .lead {
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    line-height: 1.35;
  }

  .storefront .hero-info-inner {
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    box-sizing: border-box;
  }

  .storefront .banner-strip {
    width: calc(100vw - 30px) !important;
    max-width: 560px !important;
    margin-top: 12px !important;
  }

  .storefront .banner-strip a {
    min-height: 0;
    padding: 12px 14px !important;
    line-height: 1.3;
  }

  .storefront .category-scroller {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .storefront .category-scroller::-webkit-scrollbar { display: none; }

  .storefront .category-section .section-title {
    padding-right: 12px;
    padding-left: 12px;
    font-size: 1rem;
  }

  .storefront .category-section .category-subtitle {
    padding: 13px 12px;
    font-size: .98rem;
  }

  .storefront .category-section .product-grid { padding: 10px; }

  .storefront .category-section .product-grid.layout-lista .product-card,
  .storefront .category-section .product-grid.layout-lista .product-card:first-child,
  .storefront .category-section .product-grid.layout-lista .product-card:last-child,
  .storefront .category-section .product-grid.layout-lista .product-card:only-child {
    grid-template-columns: 84px minmax(0, 1fr) !important;
    min-height: 106px;
  }

  .storefront .category-section .product-grid.layout-lista .product-img-wrap {
    width: 80px !important;
    height: 80px !important;
  }

  .storefront .category-section .product-grid.layout-lista .product-body {
    min-height: 106px;
    column-gap: 10px;
    margin-left: 10px !important;
    padding: 11px 13px !important;
  }

  .storefront .category-section .product-grid.layout-lista .product-body h3 {
    font-size: .95rem !important;
    line-height: 1.16;
  }

  .storefront .category-section .product-grid.layout-lista .product-body p {
    margin-bottom: 6px;
    font-size: .78rem !important;
    -webkit-line-clamp: 2;
  }

    .storefront .category-section .product-grid.layout-lista .product-body .btn {
    min-width: 68px;
    padding: 7px 10px;
    font-size: .78rem;
  }

  .storefront .floating-cart-btn {
    left: auto !important;
    right: 12px !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px) !important;
    width: auto !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 7px 11px !important;
    border-radius: 999px !important;
    font-size: .78rem !important;
    z-index: 1040 !important;
  }

  .storefront .floating-cart-btn::before,
  .storefront .floating-cart-btn::after { display: none !important; }

  .storefront .floating-cart-btn .badge {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    margin-left: 4px !important;
    font-size: .72rem !important;
  }
}
