@import url("themes.css?v=1");

:root {
  --whatsapp: #25d366;
  --whatsapp-text: #052e16;
  --bg-elevated: var(--bg-hover);
  --radius: 16px;
  --menu-sticky-offset: 8.75rem;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--menu-sticky-offset) + 0.75rem);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1200px 400px at 50% -80px, var(--accent-soft), transparent),
    var(--bg);
  color: var(--text);
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

.menu-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
}

.menu-header {
  padding: calc(1rem + env(safe-area-inset-top)) 0 0.5rem;
}

.menu-kicker {
  margin: 0 auto;
  max-width: 720px;
  width: calc(100% - 2.2rem);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.menu-header h1 {
  margin: 0.2rem auto 0;
  max-width: 720px;
  width: calc(100% - 2.2rem);
  font-size: 1.45rem;
  font-weight: 750;
}

.category-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 0.55rem 1.1rem 0.75rem;
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-nav::-webkit-scrollbar { display: none; }

.category-chip {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-weight: 650;
  font-size: 0.9rem;
  cursor: pointer;
}

.category-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.menu-root {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.75rem 1.1rem 1.5rem;
}

.menu-status,
.menu-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 2.5rem 1rem;
}

.menu-section {
  margin: 0 0 1.75rem;
  scroll-margin-top: calc(var(--menu-sticky-offset) + 0.75rem);
}

.menu-section h2 {
  margin: 0 0 0.85rem;
  padding-top: 0.35rem;
  font-size: 1.15rem;
}

.product-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  padding: 0;
}

.product-card:hover {
  border-color: var(--accent);
}

.product-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.product-photo,
.product-photo-fallback {
  width: 108px;
  height: 108px;
  object-fit: cover;
  background: var(--bg-elevated);
}

.product-photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.6rem;
  font-weight: 800;
}

.product-body {
  padding: 0.7rem 0.8rem 0.75rem 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.product-body h3 {
  margin: 0;
  font-size: 1rem;
}

.product-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.product-mods {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.product-price {
  color: var(--accent);
  font-weight: 800;
}

.product-order {
  border: 0;
  background: var(--whatsapp);
  color: var(--whatsapp-text);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.whatsapp-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 0.75rem 1.1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--bg) 28%);
}

.whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  background: var(--whatsapp);
  color: var(--whatsapp-text);
  text-decoration: none;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.9rem 1rem;
}

body.detail-open {
  overflow: hidden;
}

body.detail-open .whatsapp-bar {
  visibility: hidden;
}

.product-detail {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.product-detail[hidden] {
  display: none;
}

.product-detail-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
}

.product-detail-sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: min(92vh, 860px);
  overflow: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow);
}

.product-detail-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--overlay);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.product-detail-media img,
.product-detail-fallback {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-elevated);
}

.product-detail-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 3rem;
  font-weight: 800;
}

.product-detail-content {
  padding: 1rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom));
}

.product-detail-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.product-detail-content h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.product-detail-desc {
  margin: 0 0 1rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.product-detail-mods {
  margin: 0 0 1.1rem;
}

.product-detail-mods h3 {
  margin: 0 0 0.45rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
}

.product-detail-mods ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-detail-mods li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}

.product-detail-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-detail-footer .product-price {
  font-size: 1.25rem;
}

.product-detail-footer .whatsapp-btn {
  max-width: none;
}

@media (min-width: 720px) {
  .product-detail {
    align-items: center;
    padding: 1.5rem;
  }

  .product-detail-sheet {
    border-radius: var(--radius);
    border-bottom: 1px solid var(--border);
  }
}

@media (min-width: 720px) {
  .product-card {
    grid-template-columns: 140px 1fr;
  }

  .product-photo,
  .product-photo-fallback {
    width: 140px;
    height: 140px;
  }
}
