:root {
  --bg: #0e0e10;
  --surface: #17171a;
  --surface-2: #1f1f23;
  --border: #2a2a2f;
  --text: #f3f2ee;
  --text-muted: #a5a3ab;
  --gold: #f2b705;
  --red: #e0332f;
  --green: #25d366;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 88px;
}

.hero {
  text-align: center;
  padding: 28px 16px 18px;
  background: radial-gradient(circle at 50% -20%, #262124, var(--bg) 70%);
}

.hero .logo {
  width: 120px;
  height: auto;
  margin-bottom: 10px;
}

.hero .status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(14, 14, 16, 0.92);
  backdrop-filter: blur(6px);
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}

.tab {
  flex: none;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

main { padding: 16px 12px 8px; max-width: 640px; margin: 0 auto; }

.cat-section { display: none; }
.cat-section.active { display: block; }

.cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}

.card p {
  margin: 0 0 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

.price-row { display: flex; gap: 16px; }
.price, .price-single { font-size: 15px; color: var(--gold); }
.price strong, .price-single strong { font-size: 18px; }
.price-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 4px;
  margin-right: 4px;
  vertical-align: 1px;
}

.add-controls {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.size-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.size-btn {
  border: none;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
  cursor: pointer;
}

.size-btn.active {
  background: var(--gold);
  color: #2b1c00;
}

.btn-add {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green);
  color: #06210f;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 12px;
  border: none;
  border-radius: 10px;
  white-space: nowrap;
  cursor: pointer;
}

.btn-add.in-cart {
  background: var(--surface-2);
  color: var(--gold);
  border: 1px solid var(--gold);
}

.empty { color: var(--text-muted); font-size: 14px; padding: 24px 4px; text-align: center; }

.footer {
  max-width: 640px;
  margin: 24px auto 0;
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  border-top: 1px solid var(--border);
}

.footer .borda { color: var(--gold); margin: 0 0 6px; }
.footer .pay { margin: 0; }

.cart-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 14px;
  max-width: 616px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--green);
  color: #06210f;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 18px;
  border-radius: 999px;
  border: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 20;
  cursor: pointer;
}

.cart-bar[hidden] { display: none; }

.cart-bar-count {
  background: #06210f;
  color: var(--green);
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.cart-bar-label { flex: 1; text-align: left; }

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 30;
}

.cart-overlay[hidden] { display: none; }

.cart-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  max-width: 640px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: 24px;
}

.cart-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cart-sheet-header h2 { margin: 0; font-size: 16px; }

.btn-icon {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
}

.cart-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }

.btn-cancel-order {
  width: 100%;
  background: transparent;
  border: 1px solid #5b2323;
  color: #f0a3a3;
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info .name { font-weight: 700; font-size: 14px; }
.cart-item-info .meta { font-size: 12px; color: var(--text-muted); }

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.cart-item-qty span { min-width: 14px; text-align: center; font-size: 13px; }

.cart-item-price { font-size: 13px; color: var(--gold); font-weight: 700; white-space: nowrap; }

.cart-empty { color: var(--text-muted); font-size: 13px; text-align: center; padding: 16px 0; }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-bottom: 14px;
}
.cart-total-row strong { color: var(--gold); font-size: 18px; }

.address-select { margin-bottom: 16px; }
.address-select p { margin: 0 0 8px; font-size: 12px; color: var(--text-muted); }
.address-row { display: flex; gap: 8px; }
.address-row input {
  flex: 1;
  min-width: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
}
.address-row input.field-error { border-color: #a33; }

.btn-location {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-location.loading { opacity: 0.6; pointer-events: none; }

.address-status {
  margin: 6px 0 0;
  font-size: 12px;
  min-height: 14px;
  color: var(--text-muted);
}
.address-status.error { color: #f0a3a3; }
.address-status.ok { color: var(--green); }

.payment-select { margin-bottom: 16px; }
.payment-select p { margin: 0 0 8px; font-size: 12px; color: var(--text-muted); }
.payment-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.payment-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 13px;
}

.btn-send-order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green);
  color: #06210f;
  font-weight: 700;
  font-size: 15px;
  padding: 13px;
  border-radius: 12px;
  text-decoration: none;
}

.btn-send-order.disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* Admin */
.admin { max-width: 900px; margin: 0 auto; padding: 16px; }
.admin-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.admin-header h1 { font-size: 16px; margin: 0; flex: 1; font-weight: 700; }
.admin-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.admin-section h2 { font-size: 14px; margin: 0 0 12px; color: var(--gold); }

.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; color: var(--text-muted); font-weight: 600; padding: 6px 4px; }
.admin-table td { padding: 6px 4px; border-top: 1px solid var(--border); }
.admin-table tr.inactive { opacity: 0.45; }
.admin-table input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
}
.admin-table .actions { display: flex; gap: 6px; white-space: nowrap; }
.admin-table form { display: contents; }

.add-form { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.add-form input {
  flex: 1;
  min-width: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 8px;
  font-size: 13px;
}

.settings-form { display: flex; flex-direction: column; gap: 10px; }
.settings-form label { font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; }
.settings-form input,
.settings-form textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.btn-primary, .btn-small, .btn-ghost, .btn-danger {
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-small { padding: 6px 10px; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-danger { background: transparent; border: 1px solid #5b2323; color: #f0a3a3; }

.admin-link { text-align: center; }
.admin-link a { color: var(--gold); text-decoration: none; font-size: 13px; }

.notice {
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.4);
  color: var(--green);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.login-card h1 { font-size: 16px; margin: 0; }
.login-card label { width: 100%; text-align: left; font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; }
.login-card input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
}
.form-error { color: #f0a3a3; font-size: 13px; margin: 0; }

@media (min-width: 480px) {
  .card { align-items: center; }
}
