.btn-owner-edit {
  display: inline-block;
  margin-top: 8px;
  background: var(--theme, #ff6a00);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(95, 51, 30, 0.08);
  transition: background 0.18s;
}
.btn-owner-edit:hover,
.btn-owner-edit:focus {
  background: #c8945b;
}
.btn-owner-edit.is-hidden {
  display: none !important;
}
:root {
  --theme: #ff6a00;
  --theme2: #c8945b;
  --font: "Sora", sans-serif;
  --font-weight: 400;
  --heading-weight: 800;
  --bg: #fffaf3;
  --surface: #ffffff;
  --text: #2a211d;
  --muted: #756960;
  --border: #f0dfd1;
  --shadow: 0 14px 40px rgba(95, 51, 30, 0.14);
  --ok: #1f8f5f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --surface: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --border: #334155;
    --shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
  }
}

::selection {
  background: var(--theme);
  color: #fff;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: var(--font-weight);
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, color-mix(in srgb, var(--theme) 24%, #fff) 0%, transparent 42%),
    radial-gradient(circle at 90% 0%, color-mix(in srgb, var(--theme2) 18%, #fff) 0%, transparent 45%),
    var(--bg);
}

/* Overrides de fundo via classes (personalização por cardápio) */
body.bg-solid {
  background: var(--bg);
}

body.bg-linear {
  background: linear-gradient(
      calc(var(--bg-angle, 135) * 1deg),
      color-mix(in srgb, var(--bg1, var(--theme)) 70%, white),
      color-mix(in srgb, var(--bg2, #ffe6ce) 75%, white)
    );
}

body.bg-radial {
  background:
    radial-gradient(circle at 18% 18%, color-mix(in srgb, var(--bg1, var(--theme)) 65%, white) 0%, transparent 52%),
    radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--bg2, #ffe6ce) 70%, white) 0%, transparent 55%),
    var(--bg);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 28px 16px 16px;
  border-bottom: none;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface) 55%, transparent) 0%,
      transparent 70%
    );
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-banner, none);
  background-size: cover;
  background-position: center;
  opacity: var(--hero-banner-opacity, 0.22);
  filter: saturate(1.03) contrast(1.02);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface) 55%, transparent) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-content {
  display: grid;
  gap: 16px;
  transition: transform 140ms ease, filter 140ms ease, border-color 140ms ease;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-media {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateY(0);
  justify-content: flex-start;
  align-items: flex-start;
}

.hero-media img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid color-mix(in srgb, var(--theme) 62%, white);
  box-shadow: var(--shadow);
  background: color-mix(in srgb, var(--surface) 92%, #fff);
}

.hero h1 {
  margin: 8px 0 6px;
  font-size: clamp(1.9rem, 4.2vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: var(--heading-weight);
}

.hero p {
  line-height: 1.5;
}

#cardapio-subtitle {
  max-width: 54ch;
  font-size: 1.02rem;
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
}

.chip {
  display: inline-block;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--theme) 16%, white),
    color-mix(in srgb, var(--theme2) 14%, white)
  );
  color: color-mix(in srgb, var(--theme) 70%, black);
  border: 1px solid color-mix(in srgb, var(--theme2) 26%, white);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.78rem;
}

.cardapio-info {
  display: grid;
  gap: 6px;
  margin-top: 0;
  padding: 10px 10px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--theme2) 10%, transparent);
  width: min(340px, 100%);
}

.cardapio-info .muted {
  font-size: 0.92rem;
  line-height: 1.4;
}

#cardapio-info p.muted {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
}

#cardapio-info p.muted::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-top: 6px;
  background: color-mix(in srgb, var(--theme2) 65%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme2) 12%, transparent);
  flex: 0 0 auto;
}

.info-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  justify-content: flex-start;
  align-items: center;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.link-instagram {
  color: #e1306c;
  border: 1px solid rgba(225, 48, 108, 0.2);
  background: rgba(225, 48, 108, 0.05);
}

.link-instagram:hover {
  background: rgba(225, 48, 108, 0.1);
  border-color: rgba(225, 48, 108, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(225, 48, 108, 0.15);
}

.link-maps {
  color: #ea4335;
  border: 1px solid rgba(234, 67, 53, 0.2);
  background: rgba(234, 67, 53, 0.05);
}

.link-maps:hover {
  background: rgba(234, 67, 53, 0.1);
  border-color: rgba(234, 67, 53, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(234, 67, 53, 0.15);
}

.link-pwa {
  color: var(--theme, #ff7b00);
  border: 1px solid rgba(255, 123, 0, 0.2);
  background: rgba(255, 123, 0, 0.05);
}

.link-pwa:hover {
  background: rgba(255, 123, 0, 0.1);
  border-color: rgba(255, 123, 0, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(255, 123, 0, 0.15);
}

.link-whatsapp {
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.2);
  background: rgba(37, 211, 102, 0.05);
}

.link-whatsapp:hover {
  background: rgba(37, 211, 102, 0.1);
  border-color: rgba(37, 211, 102, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.15);
}

.link:active {
  transform: translateY(0);
}

.link-icon {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--theme), var(--theme2));
  color: #fff;
  box-shadow: 0 10px 25px color-mix(in srgb, var(--theme) 25%, transparent);
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--theme) 35%, transparent);
}

.btn-primary:active {
  transform: translateY(0) scale(0.97);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.8rem;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--muted) 14%, transparent);
}

.status.is-open {
  color: color-mix(in srgb, var(--ok) 82%, black);
  border-color: color-mix(in srgb, var(--ok) 28%, white);
}

.status.is-open::before {
  background: color-mix(in srgb, var(--ok) 75%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 16%, transparent);
}

.status.is-closed {
  color: color-mix(in srgb, var(--theme) 60%, black);
  border-color: color-mix(in srgb, var(--theme) 22%, white);
}

.status.is-closed::before {
  background: color-mix(in srgb, var(--theme) 70%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme) 14%, transparent);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.content-grid {
  display: grid;
  gap: 14px;
  padding: 8px 12px 20px;
}

/* Barra de Busca */
.search-container {
  max-width: 1100px;
  margin: 28px auto 16px;
  padding: 0 12px;
  position: sticky;
  top: 10px;
  z-index: 100;
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}

.search-input {
  width: 100%;
  padding: 14px 44px 14px 44px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  font-size: 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus {
  outline: none;
  border-color: var(--theme);
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--theme) 15%, transparent),
              0 12px 40px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--muted);
  pointer-events: none;
}

.voice-search-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s ease;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-search-btn.recording {
  color: #ff3b30;
  animation: pulse-voice 1.5s infinite;
}

@keyframes pulse-voice {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); opacity: 0.8; }
  100% { transform: scale(1); }
}

.search-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  padding: 0;
  font-size: 1.25rem;
}

.action-btn:hover {
  border-color: var(--theme);
  transform: translateY(-1px);
}

.layout-icon {
  color: var(--text);
}

.layout-icon.is-hidden {
  display: none !important;
}

/* Barra de Categorias */
.categories-container {
  max-width: 1100px;
  margin: 0 auto 20px;
  padding: 0 12px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
  display: flex;
  gap: 8px;
}

.categories-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.category-pill {
  padding: 8px 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.category-pill.active {
  background: var(--theme);
  color: #fff;
  border-color: var(--theme);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--theme) 30%, transparent);
  transform: scale(1.05) translateY(-2px);
}


/* Skeleton Loaders */
.skeleton {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--surface) 90%, var(--border)) 25%,
    color-mix(in srgb, var(--surface) 80%, var(--border)) 50%,
    color-mix(in srgb, var(--surface) 90%, var(--border)) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
}


@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.produto-card.is-skeleton .produto-media {
  background: #eee;
}

.produto-card.is-skeleton .skeleton-title {
  height: 20px;
  width: 70%;
  margin-bottom: 10px;
}

.produto-card.is-skeleton .skeleton-price {
  height: 18px;
  width: 30%;
}

.produto-card.is-skeleton .skeleton-btn {
  height: 40px;
  width: 100%;
  margin-top: 10px;
}

/* Animação de Feedback (Flying Icon) */
.flying-item {
  position: fixed;
  z-index: 9999;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--theme);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.produtos-grid {
  display: grid;
  gap: 12px;
  min-height: 100px;
}

.galeria-wrap {
  margin-top: 14px;
  margin-bottom: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.galeria-grid {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 4px;
  scrollbar-width: none; /* Firefox */
}

.galeria-grid::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.galeria-grid img {
  flex: 0 0 100px;
  width: 100px;
  height: 75px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--theme) 10%, transparent);
  cursor: zoom-in;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.galeria-grid img:hover {
  transform: scale(1.04);
}

.produto-media {
  position: relative;
  width: 100%;
  height: clamp(156px, 26vw, 200px);
  cursor: zoom-in;
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--theme) 22%, transparent) 0%, transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--bg)), var(--surface));
}

.produto-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, color-mix(in srgb, var(--surface) 70%, transparent) 100%);
  pointer-events: none;
}

.produto-card {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface) 92%, var(--bg)),
    var(--surface)
  );
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  box-shadow:
    var(--shadow),
    0 0 0 1px color-mix(in srgb, var(--theme2) 18%, transparent),
    0 10px 34px color-mix(in srgb, var(--theme) 10%, transparent);
}

.produto-card:hover {
  transform: translateY(-6px);
  border-color: var(--theme);
  box-shadow:
    0 22px 50px color-mix(in srgb, var(--theme) 12%, rgba(0,0,0,0.25)),
    0 0 0 1px color-mix(in srgb, var(--theme) 20%, transparent);
}


.produto-card:active {
  transform: translateY(-1px);
}

.produto-card:focus-within {
  border-color: color-mix(in srgb, var(--theme2) 35%, var(--border));
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--theme2) 18%, transparent),
    0 18px 46px color-mix(in srgb, var(--theme2) 14%, transparent);
}

.produto-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  transition: transform 220ms ease, filter 220ms ease;
}

.produto-card:hover img {
  transform: scale(1.02);
  filter: saturate(1.04) contrast(1.02);
}

.produto-body {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "info price"
    "btn btn";
  gap: 10px 10px;
  align-items: start;
  min-width: 0;
}

.produto-info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0; /* allows text truncation */
}

.produto-info h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.15;
  font-weight: var(--heading-weight);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.produto-info p.muted {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.3;
}

.price {
  grid-area: price;
  justify-self: end;
  margin: 0;
  white-space: nowrap;
  font-weight: 800;
  color: color-mix(in srgb, var(--theme) 80%, black);
  font-size: 1.02rem;
}

.produto-body .btn {
  grid-area: btn;
  margin-top: 0;
  padding: 12px 13px;
  border-radius: 14px;
}

body.modo-catalogo .cart-box,
body.modo-catalogo #checkout-form,
body.modo-catalogo #tipo-pedido-wrap,
body.modo-catalogo #pagamento-wrap,
body.modo-catalogo #endereco-wrap {
  display: none !important;
}

body.modo-catalogo .produto-body {
  grid-template-areas: "title price";
}

/* Modo Marmita */
body.modo-marmita .categories-container {
  justify-content: flex-start;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 64px;
  z-index: 90;
}

body.modo-marmita .category-pill {
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  text-transform: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 16px;
}

body.modo-marmita .category-pill.active {
  color: #fff;
  background: var(--theme);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--theme) 20%, transparent);
  font-weight: 700;
  border-color: var(--theme);
}

body.modo-marmita .produto-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
  border-radius: 16px;
  padding-bottom: 0;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.modo-marmita .produto-card:hover {
  transform: translateY(-4px);
  border-color: var(--theme);
}


body.modo-marmita .produto-media {
  height: clamp(160px, 24vw, 220px);
  border-radius: 0;
  overflow: hidden;
  flex-shrink: 0;
}


body.modo-marmita .produto-body {
  display: block;
  padding: 10px;
}

body.modo-marmita .produto-body h3 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 800;
}


body.modo-marmita .produto-body .muted {
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--muted);
  margin-bottom: 12px;
}

body.modo-marmita #marmita-agendamento-wrap {
  margin-bottom: 16px;
  background: color-mix(in srgb, var(--theme) 5%, var(--surface));
  padding: 15px;
  border-radius: 12px;
  border: 1px solid var(--theme);
}

body.modo-marmita #marmita-agendamento-wrap select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  background: var(--surface);
  color: var(--text);
}

body.modo-marmita #marmita-agendamento-wrap .help {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  background: none;
  border: none;
}

.produto-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 14px;
}

.produto-modal.is-hidden {
  display: none;
}

.produto-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 7, 0.62);
  backdrop-filter: blur(3px);
}

.produto-modal-dialog {
  position: relative;
  width: min(680px, 96vw);
  max-height: 92vh;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.35);
}

.produto-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 90%, #fff);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.produto-modal-image {
  width: 100%;
  max-height: min(56vh, 430px);
  object-fit: cover;
  display: block;
  background: color-mix(in srgb, var(--surface) 84%, #000);
}

.produto-modal-body {
  padding: 14px 16px 18px;
  display: grid;
  gap: 8px;
}

.produto-modal-body h3 {
  margin: 0;
  font-size: 1.2rem;
}

.produto-modal-body .price {
  justify-self: start;
  margin-bottom: 8px;
}

.produto-sizes {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sizes-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.sizes-grid {
  display: grid;
  gap: 8px;
}

.size-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  cursor: pointer;
  transition: all 0.2s;
}

.size-option:hover {
  border-color: color-mix(in srgb, var(--theme) 40%, var(--border));
}

.size-option has(input:checked),
.size-option:has(input:checked) {
  border-color: var(--theme);
  background: color-mix(in srgb, var(--theme) 5%, var(--surface));
}

.size-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--theme);
  cursor: pointer;
}

.size-name {
  font-weight: 700;
  flex-grow: 1;
}

.size-price {
  font-weight: 800;
  color: var(--theme);
}

.modal-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Opções de Personalização */
.produto-options {
  margin: 12px 0;
  display: grid;
  gap: 20px;
}

.option-group {
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}

.option-group:last-child {
  border-bottom: none;
}

.option-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.option-group-title {
  font-weight: 800;
  font-size: 1rem;
}

.option-group-badge {
  font-size: 0.75rem;
  background: color-mix(in srgb, var(--theme) 10%, transparent);
  color: var(--theme);
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.option-items {
  display: grid;
  gap: 8px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.option-item:has(input:checked) {
  border-color: var(--theme);
  background: color-mix(in srgb, var(--theme) 5%, var(--surface));
}

.option-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--theme);
}

.cart-item-options {
  font-size: 0.8rem;
  line-height: 1.3;
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
}

.cart-item-options span::before {
  content: "• ";
}

body.modal-open {
  overflow: hidden;
}

.btn {
  width: 100%;
  border-radius: 12px;
  padding: 13px;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: filter 160ms ease, transform 160ms ease;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--theme) 92%, black),
    color-mix(in srgb, var(--theme2) 88%, black)
  );
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.03);
}

.btn:active {
  transform: translateY(1px);
}

.btn.flash {
  animation: pop 0.28s ease;
}

@keyframes pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

.cart-box {
  position: sticky;
  bottom: 0;
  align-self: end;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface) 92%, var(--bg)),
    var(--surface)
  );
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow:
    var(--shadow),
    0 0 0 1px color-mix(in srgb, var(--theme2) 18%, transparent),
    0 10px 34px color-mix(in srgb, var(--theme) 10%, transparent);
}

.cart-box h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  padding-bottom: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  font-weight: var(--heading-weight);
}

.cart-box {
  box-shadow:
    var(--shadow),
    0 0 0 1px color-mix(in srgb, var(--theme) 18%, transparent),
    0 16px 46px color-mix(in srgb, var(--theme2) 12%, transparent);
}

.cart-items {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 8px;
  padding-right: 2px;
}

.cart-items::-webkit-scrollbar {
  width: 10px;
}

.cart-items::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  font-size: 0.9rem;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  align-items: center;
}

.cart-item-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.cart-item-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.cart-qty {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.78rem;
  border: 1px solid color-mix(in srgb, var(--theme2) 22%, var(--border));
  background: color-mix(in srgb, var(--theme2) 12%, white);
  color: color-mix(in srgb, var(--theme2) 70%, black);
}

.cart-name {
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-sub {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cart-price {
  font-weight: 800;
  color: color-mix(in srgb, var(--text) 92%, black);
}

.btn-ghost {
  width: auto;
  padding: 9px 10px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  color: color-mix(in srgb, var(--muted) 80%, black);
}

.btn-ghost:hover {
  filter: none;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border-color: color-mix(in srgb, var(--theme2) 18%, var(--border));
}

.btn-ghost.remove-item:hover {
  border-color: color-mix(in srgb, var(--theme) 22%, var(--border));
  color: color-mix(in srgb, var(--theme) 65%, black);
}

.btn-ghost.remove-item:active {
  transform: translateY(0);
}

.cart-box.cart-pulse {
  animation: cartPulse 320ms ease-out;
}

@keyframes cartPulse {
  0% {
    transform: translateY(0);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--theme2) 0%, transparent);
  }
  40% {
    transform: translateY(-1px);
    box-shadow: 0 14px 38px color-mix(in srgb, var(--theme2) 12%, transparent);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--theme2) 10%, transparent);
  }
}

.cart-total {
  font-size: 1.15rem;
  font-weight: 800;
}

.totals {
  display: grid;
  gap: 6px;
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--surface) 82%, var(--bg)),
    color-mix(in srgb, var(--surface) 94%, var(--bg))
  );
}

.total-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.total-value {
  font-weight: 900;
  letter-spacing: -0.01em;
}

.cart-total {
  margin: 6px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--theme) 28%, var(--border));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--theme) 18%, var(--surface)),
    color-mix(in srgb, var(--theme2) 16%, var(--surface))
  );
  color: var(--text);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--theme2) 12%, transparent);
}

.checkout-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}

.form-row {
  display: grid;
  gap: 10px;
}

.form-row > * {
  min-width: 0;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 700;
}

.checkout-form label {
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
}

.cart-box .btn-primary {
  border-radius: 14px;
  padding: 14px;
  font-weight: 900;
  letter-spacing: 0.01em;
  box-shadow:
    0 16px 40px color-mix(in srgb, var(--theme) 18%, transparent),
    0 0 0 1px color-mix(in srgb, var(--theme2) 16%, transparent);
}

.cart-box .btn-primary:hover {
  filter: brightness(1.05);
}

input,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 11px;
  font: inherit;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  color: var(--text);
}

select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 11px;
  font: inherit;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 85%, transparent);
}

input:focus,
textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--theme) 45%, white);
  border-color: var(--theme);
}

input:disabled,
textarea:disabled,
select:disabled,
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.checkout-message {
  min-height: 1.25rem;
  margin: 8px 0 0;
  font-weight: 700;
  color: var(--ok);
}

.muted {
  color: var(--muted);
}

.is-hidden {
  display: none !important;
}

.whatsapp-fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  text-decoration: none;
  font-weight: 900;
  padding: 12px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme) 92%, black);
  color: #fff;
  border: 1px solid color-mix(in srgb, var(--theme) 40%, white);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, filter 160ms ease;
}

@media (min-width: 860px) {
  .whatsapp-fab {
    right: auto;
    left: 16px;
  }
}

.whatsapp-fab:hover {
  filter: brightness(1.03);
}

.whatsapp-fab:active {
  transform: translateY(1px);
}

@media (max-width: 859px) {
  .content-grid {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    padding: 0 16px 120px;
  }

  section {
    width: 100%;
  }

  .produtos-grid {
    grid-template-columns: 1fr;
    width: 100%;
    min-height: 180px;
  }

  .cart-box {
    position: static;
    bottom: auto;
    width: 100%;
    margin: 0;
    border-radius: 18px;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .cart-box h2 {
    font-size: 1.25rem;
  }

  .cart-items {
    max-height: 260px;
  }

  .checkout-form {
    gap: 12px;
  }

  .checkout-form label {
    font-size: 0.95rem;
  }

  .checkout-form input,
  .checkout-form textarea,
  .checkout-form select {
    font-size: 1rem;
    min-height: 46px;
  }

  .cart-box .btn-primary {
    width: 100%;
  }

  body.modo-marmita .produto-card {
    border-radius: 16px;
  }

  body.modo-marmita .produto-body {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "info"
      "price"
      "btn";
    gap: 10px;
    padding: 14px;
  }

  body.modo-marmita .produto-body .price {
    justify-self: start;
  }

  body.modo-marmita .produto-body .btn {
    width: 100%;
  }
}

.theme-dark .produto-card,
.theme-dark .cart-box {
  border-color: color-mix(in srgb, var(--border) 55%, white);
  box-shadow:
    0 18px 54px color-mix(in srgb, black 60%, transparent),
    0 0 0 1px color-mix(in srgb, var(--theme2) 20%, transparent);
}

.theme-dark input,
.theme-dark textarea,
.theme-dark select {
  border-color: color-mix(in srgb, var(--border) 55%, white);
}

.theme-dark .totals {
  border-color: color-mix(in srgb, var(--border) 55%, white);
}

.layout-lista .produtos-grid {
  grid-template-columns: 1fr !important;
}

@media (min-width: 860px) {
  .layout-lista .produto-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: stretch;
  }

  .layout-lista .produto-media {
    height: 100%;
    min-height: 140px;
  }

  .layout-lista .produto-media img {
    height: 100%;
  }
}

.densidade-compacta .content-grid {
  gap: 10px;
}

.densidade-compacta .produtos-grid {
  gap: 10px;
}

.densidade-compacta .produto-body {
  padding: 12px;
}

.densidade-compacta .cart-items {
  max-height: 150px;
}

@media (min-width: 860px) {
  .hero-content {
    grid-template-columns: 1fr auto;
  }

  .hero-media {
    justify-content: flex-end;
    align-items: flex-end;
  }

  .cardapio-info {
    padding: 14px 14px;
    gap: 8px;
  }

  .hero-media img {
    width: 132px;
    height: 132px;
  }
  .content-grid {
    grid-template-columns: 2fr minmax(320px, 1fr);
    align-items: start;
    padding: 10px 24px 24px;
  }

  .produtos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .produto-media {
    height: 186px;
  }

  .produto-card .btn {
    width: fit-content;
    justify-self: end;
    padding: 11px 14px;
  }

  .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }
}

.sold-out-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 2;
}

.btn-disabled {
  background: var(--border) !important;
  color: var(--muted) !important;
  cursor: not-allowed !important;
}

.is-sold-out {
  opacity: 0.8;
}

.flying-icon {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  font-size: 1.5rem;
  transition: none;
}

/* ============================================
   WIZARD – Questionário passo a passo
   ============================================ */
.produto-wizard {
  margin-top: 8px;
  display: grid;
  gap: 14px;
}

.produto-wizard.is-hidden {
  display: none;
}

/* Barra de progresso */
.wizard-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wizard-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 80%, transparent);
  overflow: hidden;
}

.wizard-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--theme), var(--theme2));
  transition: width 0.3s ease;
}

.wizard-step-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

/* Título e badge da pergunta */
.wizard-question-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

.wizard-question-badge {
  margin: 0;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

.wizard-question-badge.is-required {
  background: color-mix(in srgb, var(--theme) 12%, transparent);
  color: color-mix(in srgb, var(--theme) 80%, black);
  border: 1px solid color-mix(in srgb, var(--theme) 22%, transparent);
}

.wizard-question-badge.is-optional {
  background: color-mix(in srgb, var(--muted) 10%, transparent);
  color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

/* Lista de itens */
.wizard-items {
  display: grid;
  gap: 8px;
}

.wizard-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(5px);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.05rem;
  font-weight: 700;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.wizard-item:hover {
  border-color: color-mix(in srgb, var(--theme) 40%, var(--border));
  background: rgba(255, 255, 255, 0.05);
  transform: scale(1.01);
}

.wizard-item.is-selected {
  border-color: var(--theme);
  background: rgba(var(--theme-rgb, 255, 106, 0), 0.08);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--theme) 18%, transparent);
}

.wizard-item-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.wizard-item.is-selected .wizard-item-check {
  background: var(--theme);
  border-color: var(--theme);
  color: #fff;
  opacity: 1;
  transform: scale(1);
}

/* Navegação */
.wizard-nav {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  align-items: center;
}

.wizard-btn-prev {
  width: auto;
  flex-shrink: 0;
}

.wizard-btn-next {
  flex: 1;
  font-weight: 800;
  letter-spacing: 0.01em;
}

/* Botão de sucesso (último passo) */
.btn-success {
  background: linear-gradient(135deg, #16a34a, #15803d) !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.28);
  animation: successPulse 0.4s ease;
}

@keyframes successPulse {
  0% { transform: scale(0.97); }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Modo Escuro (Dark Mode) da Loja */
body.theme-dark {
  --bg: #0d0c0a !important;
  --surface: #171512 !important;
  --text: #f3edd8 !important;
  --muted: #9c9380 !important;
  --border: #2c2720 !important;
  --shadow: 0 8px 30px rgba(0,0,0,0.5) !important;
  background-color: var(--bg) !important;
  color: var(--text) !important;
}

body.theme-dark .hero {
  background: linear-gradient(135deg, #1d1a15, #0d0c0a) !important;
  border-bottom: 1px solid var(--border);
}

body.theme-dark .hero-media img {
  border-color: var(--border) !important;
}

body.theme-dark .produto-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4) !important;
}

body.theme-dark .produto-card:hover {
  border-color: var(--theme) !important;
  box-shadow: 0 18px 40px rgba(0,0,0,0.6), 0 0 0 1px var(--theme) !important;
}

body.theme-dark .cart-box,
body.theme-dark .category-pill,
body.theme-dark .action-btn {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

body.theme-dark .category-pill.active {
  background: var(--theme) !important;
  color: #fff !important;
}

body.theme-dark .totals {
  border-top: 1px solid var(--border) !important;
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select {
  background: var(--bg) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

body.theme-dark .lightbox {
  background: rgba(0, 0, 0, 0.95) !important;
}

body.theme-dark .lightbox-content {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

body.theme-dark .wizard-question-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

body.theme-dark .wizard-item {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: var(--border) !important;
}

body.theme-dark .wizard-item:hover {
  border-color: var(--theme) !important;
}

body.theme-dark .wizard-item.is-selected {
  border-color: var(--theme) !important;
  background: rgba(var(--theme-rgb, 255, 106, 0), 0.08) !important;
}

body.theme-dark .cart-item {
  border-bottom: 1px solid var(--border) !important;
}
