
:root {

    --primary: #0F766E;

    --primary-hover: #115E59;

    --primary-active: #134E4A;

    --primary-light: #F0FDFA;

    --primary-border: #CCFBF1;

    --primary-shadow: rgba(15, 118, 110, 0.18);

    

}


input:focus,

select:focus,

textarea:focus {

    border-color: var(--primary, #0F766E) !important;

    box-shadow: 0 0 0 3px var(--primary-shadow, rgba(15, 118, 110, 0.12)) !important;

}


input:focus-visible,

select:focus-visible,

textarea:focus-visible {

    outline: none;

}

* {
    font-family: "DM Sans", sans-serif;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  letter-spacing: -0.01em;
}



/* ======================
   Componentes específicos
   ====================== */

.menu-banner {
  position: relative;
  height: 160px;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, #2a3544 0%, #141a22 55%, #0d1117 100%);
  isolation: isolate;
}
@media (min-width: 480px) {
  .menu-banner { height: 200px; }
}
@media (min-width: 768px) {
  .menu-banner { height: 240px; }
}
.menu-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 12, 18, 0.04) 0%, rgba(8, 12, 18, 0) 42%, rgba(8, 12, 18, 0.5) 100%);
}
@media (min-width: 768px) {
  .menu-banner::after {
    background:
      linear-gradient(180deg, rgba(8, 12, 18, 0.06) 0%, rgba(8, 12, 18, 0) 38%, rgba(8, 12, 18, 0.55) 100%),
      linear-gradient(90deg, rgba(8, 12, 18, 0.16) 0%, transparent 22%, transparent 78%, rgba(8, 12, 18, 0.16) 100%);
  }
}
.menu-banner-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.menu-banner-slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
  overflow: hidden;
}
.menu-banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transform: scale(1.03);
  transition: transform 6.5s ease-out;
}
.menu-banner.is-slider .menu-banner-slide.is-active img,
.menu-banner:not(.is-slider) .menu-banner-slide img {
  transform: scale(1);
}
.menu-banner-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #1a2330;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, opacity 160ms ease;
}
.menu-banner-nav:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.04);
}
.menu-banner-nav:active {
  transform: scale(0.96);
}
.menu-banner-nav--prev { left: 12px; }
.menu-banner-nav--next { right: 12px; }
@media (min-width: 768px) {
  .menu-banner.is-slider .menu-banner-nav { display: inline-flex; }
}
.menu-banner-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 3;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(10, 14, 20, 0.32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
@media (min-width: 768px) {
  .menu-banner-dots {
    bottom: 16px;
    padding: 5px 10px;
    gap: 6px;
  }
}
.menu-banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: width 220ms ease, background 220ms ease, opacity 220ms ease;
}
.menu-banner-dot.is-active {
  width: 18px;
  background: #fff;
}
.menu-banner-dot:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}
.menu-store-card {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: none !important;
}
@media (min-width: 768px) {
  .menu-store-card {
    border-radius: 24px;
  }
}
.menu-store-logo {
  height: 64px;
  width: 64px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.menu-store-logo--overlap {
  position: relative;
  z-index: 10;
  margin-top: -34px;
  border: 3px solid #fff;
  box-shadow: none !important;
}
@media (min-width: 768px) {
  .menu-store-logo {
    height: 84px;
    width: 84px;
    border-radius: 20px;
  }
  .menu-store-logo--overlap {
    margin-top: -48px;
    border-width: 3.5px;
  }
}

.store-logo,
.empresa-card-logo {
  flex-shrink: 0;
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.store-logo { width: 88px; height: 88px; }
.empresa-card-logo { width: 80px; height: 80px; }

.store-logo img,
.empresa-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.store-logo-letter,
.empresa-card-logo-letter {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  text-shadow: none;
}

.produto-thumb {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(135deg, #f3f4f6, #f9fafb);
  border: 1px solid rgba(255, 255, 255, 0.7);
  transition: border-color 150ms;
}

.group:hover .produto-thumb {
  border-color: rgba(209, 213, 219, 0.8);
}

.produto-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.produto-thumb-empty {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f9fafb 0%, #fff 50%, #f3f4f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
}

.produto-thumb-empty svg {
  width: 1.75rem;
  height: 1.75rem;
}

@media (min-width: 768px) {
  .store-logo { width: 108px; height: 108px; }
  .empresa-card-logo { width: 92px; height: 92px; }
  .produto-thumb { width: 96px; height: 96px; }
  .store-logo-letter,
  .empresa-card-logo-letter { font-size: 2.25rem; }
}

/* Category select */
.categoria-select-box {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: none;
}

.categoria-select-box label {
  display: block;
  padding: 0.75rem 1rem 0;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.categoria-select-field {
  position: relative;
}

.categoria-select-field select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: none;
  padding: 0.375rem 2.75rem 0.875rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  outline: none;
  line-height: 1.4;
}

.categoria-select-field select:focus {
  outline: none;
}

.categoria-select-field select option {
  font-weight: 500;
  color: #111827;
  background: #fff;
}

.categoria-select-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.125rem;
  height: 1.125rem;
  color: #6b7280;
  pointer-events: none;
}



/* feedback leve após adicionar produto na página de detalhes */
.carrinho-adicionado-aviso {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 28px);
  padding: 10px 16px 10px 10px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  color: #172033;
  box-shadow: 0 10px 28px -16px rgba(15, 23, 42, 0.48);
  opacity: 0;
  transform: translate(-50%, -10px) scale(.98);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.carrinho-adicionado-aviso.visivel {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
.carrinho-adicionado-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #16a34a;
  font-size: 20px;
  font-weight: 900;
}
@media (prefers-reduced-motion: reduce) {
  .carrinho-adicionado-aviso { transition: none; }
}

/* animação de pulse reutilizável */
@keyframes tab-cart-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
.tab-cart-cta.pulse {
  animation: tab-cart-pulse 0.38s ease;
}

@media (max-width: 420px) {
  .tab-cart-text { font-size: 12px; }
  .tab-cart-price { font-size: 13px; }
}


/* ======================
   Tab bar - estilos movidos para tab_bar.php
   ====================== */

.app-free-delivery-tag {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translate(-50%, -100%);
  background: #0F766E;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: none;
  letter-spacing: -0.01em;
  z-index: 21;
}

@media (min-width: 768px) {
  .app-tabbar-inner {
    min-height: 66px;
    padding: 9px 12px;
  }
}

.btn-adicionar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: #111827;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 0.5rem 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  box-shadow: none;
  transition: background 150ms, transform 150ms;
}

.btn-adicionar:hover {
  background: #1f2937;
}

.btn-adicionar:active {
  background: #000;
  transform: scale(0.98);
}

.btn-adicionar.adicionado {
  background: #059669;
}

@keyframes carrinho-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.carrinho-btn-principal.pulse {
  animation: carrinho-pulse 0.35s ease;
}

/* Drawer quantidade */
.drawer-qty {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #f9fafb;
  color: #374151;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms;
}
.drawer-qty:hover { background: #f3f4f6; color: #111827; border-color: #e5e7eb; }
.drawer-qty:active { background: #e5e7eb; }
.drawer-qty:disabled { opacity: 0.4; cursor: not-allowed; }

.drawer-qty-input {
  width: 38px;
  height: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: #111827;
  background: transparent;
  border: none;
  border-radius: 8px;
  outline: none;
  padding: 0;
  -moz-appearance: textfield;
}
.drawer-qty-input::-webkit-inner-spin-button,
.drawer-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Controle de quantidade — página detalhe */
.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  padding: 4px;
  overflow: hidden;
  width: 100%;
}
.qty-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f9fafb;
  color: #374151;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 150ms, color 150ms;
}
.qty-btn:hover { background: #eef2ff; color: #4f46e5; }
.qty-btn:active { background: #e0e7ff; }
.qty-btn:disabled { opacity: 0.4; cursor: not-allowed; background: #f9fafb; color: #9ca3af; }

.qty-input {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-weight: 800;
  font-size: 18px;
  color: #111827;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }



/* Formulários padrão */
.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 6px;
  line-height: 1.4;
}
.form-label .optional { color: #9ca3af; font-weight: 500; margin-left: 4px; }
.form-label .required { color: #ef4444; margin-left: 2px; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #111827;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14.5px;
  font-family: inherit;
  line-height: 1.5;
  outline: none;
  transition: border-color 150ms, box-shadow 150ms, background 150ms;
}
.form-input:hover,
.form-select:hover,
.form-textarea:hover { border-color: #d1d5db; }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}
.form-input::placeholder,
.form-textarea::placeholder { color: #9ca3af; }

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  background: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
}

.form-textarea { resize: vertical; min-height: 88px; }

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}

.form-error-text {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: #ef4444;
  font-weight: 500;
}

/* Timeline de status */
.timeline-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding: 4px 0;
}
.timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  padding: 14px 0;
}
.timeline-step-icon {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  color: #6b7280;
  border: 2px solid #e5e7eb;
  flex-shrink: 0;
  z-index: 2;
  position: relative;
  transition: background 200ms, border-color 200ms, color 200ms, transform 200ms;
  box-shadow: none;
}
.timeline-step.is-done .timeline-step-icon {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
  box-shadow: none;
}
.timeline-step.is-current .timeline-step-icon {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.1);
  animation: step-pulse 2s ease-in-out infinite;
}
.timeline-step-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #6b7280;
  line-height: 1.3;
  padding-top: 7px;
}
.timeline-step.is-done .timeline-step-title,
.timeline-step.is-current .timeline-step-title { color: #111827; }
.timeline-step-desc {
  font-size: 12.5px;
  color: #9ca3af;
  margin-top: 3px;
  line-height: 1.45;
}
.timeline-step.is-done .timeline-step-desc,
.timeline-step.is-current .timeline-step-desc { color: #6b7280; }
.timeline-step-date {
  font-size: 11.5px;
  color: #9ca3af;
  margin-top: 2px;
  font-weight: 500;
}

.timeline-steps::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: #e5e7eb;
  transform: translateX(-1px);
}
.timeline-step.is-done::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 54px;
  width: 2px;
  height: calc(100% - 14px);
  background: #10b981;
  transform: translateX(-1px);
  z-index: 1;
}
.timeline-step:last-child::after { display: none; }

@keyframes step-pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.1); }
  50%      { box-shadow: 0 0 0 10px rgba(79, 70, 229, 0.06); }
}

@keyframes pulse-slow {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}
.pulse-slow { animation: pulse-slow 1.8s ease-in-out infinite; }

@keyframes success-pop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.success-icon-pop { animation: success-pop 600ms cubic-bezier(0.2, 1.1, 0.4, 1) both; }

/* Cards de informação no checkout / sucesso */
.info-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  padding: 16px;
}
.info-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.info-card-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #374151;
  padding: 4px 0;
}
.info-card-line strong { color: #111827; font-weight: 700; min-width: 0; }
.info-card-line svg { color: #9ca3af; flex-shrink: 0; margin-top: 2px; }

/* Opções de radio (entrega / pagamento) */
.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  transition: border-color 150ms, background 150ms;
}
.radio-option:hover { border-color: #c7d2fe; background: rgba(250, 251, 255, 0.9); }
.radio-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  border: 2px solid #d1d5db;
  background: #fff;
  margin-top: 2px;
  position: relative;
  flex-shrink: 0;
  transition: border-color 150ms;
}
.radio-option input[type="radio"]:checked {
  border-color: #4f46e5;
  box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 8px #4f46e5;
}
.radio-option:has(input:checked) {
  border-color: #6366f1;
  background: rgba(238, 242, 255, 0.9);
  box-shadow: none;
}
.radio-option-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}
.radio-option-sub {
  font-size: 12.5px;
  color: #6b7280;
  margin-top: 3px;
  line-height: 1.4;
}
.radio-option-right {
  margin-left: auto;
  text-align: right;
  flex-shrink: 0;
  padding-top: 2px;
}
.radio-option-tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  background: #ecfdf5;
  color: #059669;
}
.radio-option-tag.warn { background: #fef3c7; color: #b45309; }
.radio-option-tag.muted { background: #f3f4f6; color: #6b7280; }

/* Ajuste barra inferior */
@media (max-width: 420px) {
  .carrinho-flutuante-btn { right: 14px; bottom: 96px; width: 50px; height: 50px; }
  .carrinho-flutuante-badge { font-size: 10.5px; min-width: 20px; height: 20px; padding: 0 5px; }
}

/* Navegação de categorias (sticky) */
.cat-nav-track {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.cat-nav-track::-webkit-scrollbar {
  display: none;
}
.cat-sticky-wrap.is-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 45;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.cat-sticky-inner {
  width: 100%;
}

/* Header de busca expansível */
#top-header {
  opacity: 1;
  transform: translateY(0);
}
#top-header.is-open {
  z-index: 55;
}
#top-header.is-hidden {
  opacity: 0;
  transform: translateY(-12px);
}

/* Skeleton loading nos itens do cardápio */
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.produto-item.skeleton {
  position: relative;
  overflow: hidden;
  pointer-events: none;
}

.produto-item.skeleton > * {
  visibility: hidden;
}

.produto-item.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 40%, #f3f4f6 80%);
  background-size: 300% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  z-index: 2;
  border-radius: inherit;
}

/* Skeleton loading na tab bar */
.app-tab.skeleton,
.tab-item.skeleton {
  position: relative;
  pointer-events: none;
}

.app-tab.skeleton > *,
.tab-item.skeleton > * {
  visibility: hidden;
}

.app-tab.skeleton::after,
.tab-item.skeleton::after {
  content: '';
  position: absolute;
  inset: 4px 2px;
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 40%, #f3f4f6 80%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  border-radius: 12px;
  z-index: 2;
}

/* ======================
   Tela de filiais
   ====================== */

/* ── HEADER ──────────────────────────────── */
.filiais-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: #fff;
  border-bottom: 1.5px solid #e2e8f0;
}
.filiais-topbar-inner {
  max-width: 760px;
  margin: 0 auto;
  min-height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.filiais-back {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #64748b;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  flex-shrink: 0;
  transition: all 150ms ease;
  text-decoration: none;
}
.filiais-back:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.filiais-back svg { width: 17px; height: 17px; stroke-width: 2.2; }

.filiais-topbar-title {
  min-width: 0; flex: 1;
  display: flex; flex-direction: column; gap: 1px;
}
.filiais-topbar-name {
  font-size: 14px; font-weight: 800;
  letter-spacing: -0.02em; color: #0f172a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.filiais-topbar-sub {
  font-size: 11px; font-weight: 600; color: #94a3b8;
}
.filiais-topbar-logo {
  width: 36px; height: 36px;
  border-radius: 9px; object-fit: cover;
  flex-shrink: 0; border: 1.5px solid #e2e8f0;
}
.filiais-topbar-logo--fallback {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary);
  font-size: 13px; font-weight: 900; border: 1.5px solid var(--primary-border);
}

/* ── PAGE ────────────────────────────────── */
.filiais-page {
  min-height: 100vh;
  background: #f1f3f5;
  padding: 24px 0 60px;
}
.filiais-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── HERO ────────────────────────────────── */
.filiais-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 4px 2px;
}
.filiais-hero-copy { flex: 1; min-width: 0; }
.filiais-kicker {
  margin: 0 0 5px;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--primary);
}
.filiais-hero-title {
  margin: 0;
  font-size: 24px; line-height: 1.15;
  font-weight: 900; letter-spacing: -0.03em; color: #0f172a;
}
.filiais-hero-text {
  margin: 6px 0 0;
  font-size: 13px; line-height: 1.55; color: #64748b; font-weight: 500;
}
.filiais-hero-stat {
  flex-shrink: 0;
  width: 68px; padding: 10px 0;
  border-radius: 12px;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  text-align: center;
}
.filiais-hero-stat strong {
  display: block;
  font-size: 24px; line-height: 1; font-weight: 900;
  letter-spacing: -0.04em; color: var(--primary);
}
.filiais-hero-stat span {
  display: block; margin-top: 3px;
  font-size: 10.5px; font-weight: 700; color: var(--primary); opacity: .7;
}

/* ── LISTA ───────────────────────────────── */
.filiais-list {
  display: flex; flex-direction: column; gap: 10px;
}

/* ── CARD ────────────────────────────────── */
.filial-card {
  display: flex; gap: 14px; align-items: stretch;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  text-decoration: none; color: inherit;
  transition: border-color 150ms ease, background 150ms ease;
}
.filial-card:hover {
  border-color: var(--primary-border);
  background: var(--primary-light);
}
.filial-card:active { transform: scale(0.997); }
.filial-card.is-current {
  border-color: var(--primary-border);
  background: var(--primary-light);
}

/* ── MEDIA (logo) ────────────────────────── */
.filial-card-media {
  width: 80px; height: 80px; flex-shrink: 0;
  border-radius: 12px; overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center;
}
.filial-card-media img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.filial-card-letter {
  font-size: 28px; font-weight: 900;
  color: var(--primary); opacity: .5;
  letter-spacing: -0.04em;
}

/* ── CORPO ───────────────────────────────── */
.filial-card-body {
  min-width: 0; flex: 1;
  display: flex; flex-direction: column; gap: 5px;
  justify-content: center;
}
.filial-card-head {
  display: flex; align-items: center; gap: 8px;
}
.filial-card-name {
  margin: 0; min-width: 0;
  font-size: 15px; line-height: 1.25; font-weight: 800;
  letter-spacing: -0.02em; color: #0f172a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.filial-chip {
  flex-shrink: 0;
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.filial-chip--current {
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
}

.filial-card-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.filial-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700;
  padding: 2px 8px; border-radius: 4px; border: 1px solid;
}
.filial-status-dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.filial-status.is-open  { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.filial-status.is-closed{ color: #dc2626; background: #fef2f2; border-color: #fecaca; }
.filial-city {
  font-size: 11.5px; font-weight: 600; color: #94a3b8;
}

.filial-card-address,
.filial-card-phone {
  margin: 0; font-size: 12px; line-height: 1.4; color: #64748b; font-weight: 500;
}
.filial-card-phone { font-weight: 600; }

.filial-card-cta {
  margin-top: 5px;
  display: inline-flex; align-items: center; gap: 4px;
  width: fit-content;
  font-size: 12px; font-weight: 700;
  color: var(--primary);
}
.filial-card-cta svg { width: 13px; height: 13px; transition: transform 150ms ease; }
.filial-card:hover .filial-card-cta svg { transform: translateX(3px); }

/* ── ARROW DIREITA ───────────────────────── */
.filial-card-arrow {
  flex-shrink: 0;
  display: flex; align-items: center;
  color: #cbd5e1;
  transition: color 150ms ease;
}
.filial-card-arrow svg { width: 16px; height: 16px; stroke-width: 2; }
.filial-card:hover .filial-card-arrow { color: var(--primary); }

/* ── EMPTY ───────────────────────────────── */
.filiais-empty {
  text-align: center; padding: 40px 16px;
  border-radius: 14px; background: #fff;
  border: 1.5px dashed #e2e8f0; color: #64748b;
}
.filiais-empty a {
  display: inline-block; margin-top: 10px;
  color: var(--primary); font-weight: 700; text-decoration: none;
}

/* ── FOOTER ──────────────────────────────── */
.filiais-footer {
  margin-top: 28px; text-align: center;
  font-size: 11.5px; color: #94a3b8; font-weight: 500;
}

@media (min-width: 640px) {
  .filiais-hero-title { font-size: 28px; }
  .filial-card { padding: 16px; gap: 16px; }
  .filial-card-media { width: 88px; height: 88px; border-radius: 14px; }
  .filial-card-name { font-size: 16px; }
}

/* ======================================
   NOVO LAYOUT MOBILE (banner full + logo sobreposto + card largo)
   ====================================== */
@media (max-width: 1023px) {
  .menu-banner--mobile {
    height: 240px;
    border-radius: 0 !important;
  }
  .menu-banner--mobile::after {
    background:
      linear-gradient(180deg, rgba(8, 12, 18, 0.06) 0%, rgba(8, 12, 18, 0) 30%, rgba(8, 12, 18, 0.6) 100%) !important;
  }
  @media (min-width: 400px) {
    .menu-banner--mobile { height: 260px; }
  }
  @media (min-width: 480px) {
    .menu-banner--mobile { height: 300px; }
  }
  @media (min-width: 600px) {
    .menu-banner--mobile { height: 340px; }
  }

  .menu-store-logo-float {
    top: 188px;
  }
  @media (min-width: 400px) {
    .menu-store-logo-float { top: 204px; }
  }
  @media (min-width: 480px) {
    .menu-store-logo-float { top: 244px; }
  }
  @media (min-width: 600px) {
    .menu-store-logo-float { top: 280px; }
  }

  .menu-store-card--mobile {
    border-radius: 28px 28px 0 0 !important;
    box-shadow: none !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5) !important;
  }

  .menu-store-logo--mobile {
    width: 92px;
    height: 92px;
    border-radius: 24px;
    border: 4px solid #fff;
    background: #fff;
    box-shadow: none !important;
    position: relative;
  }
  @media (min-width: 400px) {
    .menu-store-logo--mobile {
      width: 104px;
      height: 104px;
      border-radius: 26px;
    }
  }
  @media (min-width: 480px) {
    .menu-store-logo--mobile {
      width: 112px;
      height: 112px;
      border-radius: 28px;
    }
  }
}

/* ======================================
   Header hero da loja
   Banner mais limpo + card branco sobreposto
   ====================================== */
.menu-banner--full {
  height: clamp(200px, 52vw, 320px);
  border-radius: 0 !important;
}
.menu-banner--full::after {
  background:
    linear-gradient(180deg, rgba(8, 12, 18, 0.05) 0%, rgba(8, 12, 18, 0) 40%, rgba(8, 12, 18, 0.12) 100%) !important;
}
.menu-banner--full .menu-banner-slide img {
  object-fit: cover;
  object-position: center center;
  transform: none !important;
  transition: none !important;
  width: 100%;
  height: 100%;
}
@media (min-width: 1024px) {
  .menu-hero-bleed-desktop {
    width: 100dvw;
    max-width: none;
    margin-left: calc(50% - 50dvw) !important;
    margin-right: calc(50% - 50dvw) !important;
  }

  .menu-banner--full {
    height: clamp(280px, 36vw, 380px);
    border-radius: 0 !important;
  }
}

@media (min-width: 1440px) {
  .menu-banner--full {
    height: clamp(320px, 32vw, 440px);
  }
}

/* Logo desktop */
.menu-store-logo--hero-desktop {
  width: 108px;
  height: 108px;
  border-radius: 26px;
  border: 5px solid #fff;
  background: #fff;
  overflow: hidden;
  margin-top: -58px;
  position: relative;
  flex-shrink: 0;
  box-shadow: none !important;
}
@media (min-width: 1280px) {
  .menu-store-logo--hero-desktop {
    width: 122px;
    height: 122px;
    border-radius: 30px;
    margin-top: -66px;
    border-width: 6px;
  }
}
@media (min-width: 1536px) {
  .menu-store-logo--hero-desktop {
    width: 136px;
    height: 136px;
    border-radius: 34px;
    margin-top: -76px;
  }
}

.menu-store-card-full {
  position: relative;
  overflow: visible;
  border-radius: 26px 26px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: none !important;
}
@media (min-width: 640px) {
  .menu-store-card-full {
    border-radius: 28px 28px 24px 24px;
  }
}
@media (min-width: 1024px) {
  .menu-store-card-full {
    border-radius: 34px 34px 28px 28px;
    border-left: 0;
    border-right: 0;
  }
}

/* Logo mobile sobreposto */
.menu-store-logo--hero {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  border: 4px solid #fff;
  background: #fff;
  box-shadow: none !important;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
@media (min-width: 400px) {
  .menu-store-logo--hero {
    width: 88px;
    height: 88px;
  }
}
@media (min-width: 480px) {
  .menu-store-logo--hero {
    width: 94px;
    height: 94px;
  }
}
@media (min-width: 768px) {
  .menu-store-logo--hero {
    width: 102px;
    height: 102px;
    border-width: 5px;
  }
}
@media (min-width: 1024px) {
  .menu-store-logo--hero {
    width: 120px;
    height: 120px;
    border-width: 6px;
  }
}
@media (min-width: 1280px) {
  .menu-store-logo--hero {
    width: 132px;
    height: 132px;
  }
}

/* ======================================
   Layout desktop cardápio (sidebar + grid)
   ====================================== */
@media (min-width: 1024px) {
  .menu-store-card {
    border-radius: 26px;
  }
  .menu-banner {
    height: 220px;
  }
  .menu-store-logo--overlap {
    margin-top: -52px;
  }
}
@media (min-width: 1280px) {
  .menu-banner {
    height: 260px;
  }
  .menu-store-logo--overlap {
    margin-top: -58px;
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  .produto-thumb {
    width: 88px;
    height: 88px;
  }
}

@media (min-width: 1280px) {
  .produto-item {
    padding: 1.25rem;
    gap: 1.25rem;
  }
  .produto-thumb {
    width: 104px;
    height: 104px;
    border-radius: 18px;
  }
}

/* ======================================
   NOVO: Categorias com ícones circulares
   ====================================== */
.cat-icons-track {
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.cat-icons-track::-webkit-scrollbar {
  display: none;
}
.cat-icon-circle {
  box-shadow: none;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}
.cat-icon-chip:hover .cat-icon-circle {
  transform: translateY(-1px);
}
.cat-icon-chip.is-active .cat-icon-circle {
  border-color: var(--primary, #0F766E) !important;
  background: #fff !important;
  box-shadow: none;
}
.cat-icon-chip.is-active span {
  color: var(--primary, #0F766E);
}
@media (min-width: 768px) {
  .cat-icons-track {
    justify-content: center;
    gap: 28px;
  }
  .cat-icon-chip {
    width: 92px;
  }
  .cat-icon-circle {
    height: 76px;
    width: 76px;
  }
}

/* ======================================
   NOVO: Cards de produtos — Mobile (lista horizontal)
   ====================================== */
@media (max-width: 767px) {
  .produto-card {
    flex-direction: row !important;
    min-height: 116px;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    border-radius: 18px !important;
  }
  .produto-card-media {
    width: 108px !important;
    min-width: 108px !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    flex-shrink: 0 !important;
    border-radius: 0 !important;
    overflow: hidden;
  }
  .produto-card > div:last-child {
    flex: 1 !important;
    min-width: 0;
    padding: 12px 12px 12px 14px !important;
    justify-content: center;
    gap: 6px !important;
  }
  .produto-card h3 {
    font-size: 14px !important;
    line-height: 1.25 !important;
    min-height: auto !important;
  }
  .produto-card p {
    font-size: 12px !important;
    line-height: 1.4 !important;
    min-height: auto !important;
  }
}

/* ======================================
   NOVO: Cards de produtos — Desktop (grid vertical)
   ====================================== */
@media (min-width: 768px) {
  .produto-card {
    overflow: hidden;
  }
  .produto-card-media img {
    transition: transform 300ms ease;
  }
  .produto-card:hover .produto-card-media img {
    transform: scale(1.04);
  }
}

/* ======================================
   NOVO: Grid responsivo de produtos
   ====================================== */
@media (max-width: 767px) {
  .grid.grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
}

/* Skeleton loading nos itens do cardápio NOVOS */
.produto-card.skeleton {
  position: relative;
  overflow: hidden;
  pointer-events: none;
}
.produto-card.skeleton > * {
  visibility: hidden;
}
.produto-card.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 40%, #f3f4f6 80%);
  background-size: 300% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  z-index: 2;
  border-radius: inherit;
}

/* Ajuste fino skeleton no grid */
.grid .produto-item.skeleton::after,
.grid .produto-card.skeleton::after {
  border-radius: inherit;
}

/* ======================
   Z-index drawer do carrinho e principais overlays:
   FICA acima do tabbar (z-index:20). Regras SUPER ESPECÍFICAS,
   sem wildcards exagerados para não conflitar.
   ====================== */
#carrinho-overlay { z-index: 40 !important; }
#carrinho-drawer  { z-index: 45 !important; }
#modal-cliente-overlay { z-index: 50 !important; }
#modal-cliente-panel   { z-index: 55 !important; }
#modal-info-overlay    { z-index: 50 !important; }
#modal-info-panel    { z-index: 55 !important; }

/* SweetAlert2 fica no topo de tudo */
.swal2-container,
.swal2-popup { z-index: 1090 !important; }
.swal2-backdrop,
body.swal2-toast-shown .swal2-container { z-index: 1080 !important; }
