:root {
  --purple: #4B1D6E;
  --purple-dark: #35134F;
  --teal: #14958C;
  --gold: #F2B705;
  --orange: #E8622C;
  --green-wa: #25D366;
  --bg: #F7F5FA;
  --card: #FFFFFF;
  --text: #241A2E;
  --text-muted: #6E6478;
  --border: #E6E0EC;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(75, 29, 110, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 96px;
}

h1, h2, h3 { margin: 0; }

.topbar {
  background: linear-gradient(120deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: #fff;
  padding: 18px 20px;
}

.brand { display: flex; align-items: center; gap: 12px; max-width: 720px; margin: 0 auto; }

.brand-badge {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--gold); color: var(--purple-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; flex-shrink: 0;
}

.brand-text h1 { font-size: 19px; font-weight: 800; }
.brand-text p { margin: 2px 0 0; font-size: 12.5px; color: #E7D9F2; }

.tabs {
  position: sticky; top: 0; z-index: 20;
  display: flex; gap: 8px; overflow-x: auto;
  background: #fff; padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}

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

.menu {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 16px 24px;
}

.category-block { margin-bottom: 28px; }

.category-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 800; margin-bottom: 12px;
  color: var(--purple-dark);
}

.category-note {
  font-size: 13px; color: var(--text-muted); margin: -6px 0 12px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 10px;
}

.product-icon {
  width: 54px; height: 54px; border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}

.product-info { flex: 1; min-width: 0; }
.product-info h3 { font-size: 15px; font-weight: 700; }
.product-info p { font-size: 12.5px; color: var(--text-muted); margin: 3px 0 6px; line-height: 1.4; }
.product-price { font-size: 14.5px; font-weight: 800; color: var(--purple-dark); }
.product-price small { font-weight: 500; color: var(--text-muted); }

.add-btn {
  border: none; background: var(--gold); color: var(--purple-dark);
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 20px; font-weight: 800; cursor: pointer; flex-shrink: 0;
}
.add-btn:active { transform: scale(0.94); }

.cart-fab {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  max-width: 680px; width: calc(100% - 32px);
  background: var(--purple); color: #fff; border: none;
  border-radius: 999px; padding: 14px 18px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow); cursor: pointer;
  font-size: 15px; font-weight: 700; z-index: 25;
}
.cart-fab.hidden { display: none; }
.cart-fab-icon { font-size: 18px; }
.cart-fab-count {
  background: var(--gold); color: var(--purple-dark);
  border-radius: 50%; min-width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; padding: 0 4px;
}
.cart-fab-subtotal { margin-left: auto; }

.overlay {
  position: fixed; inset: 0; background: rgba(20, 10, 30, 0.5); z-index: 30;
}
.overlay.hidden { display: none; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  background: #fff; z-index: 40;
  display: flex; flex-direction: column;
  box-shadow: -8px 0 24px rgba(0,0,0,0.18);
}
.drawer.hidden { display: none; }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 12px; border-bottom: 1px solid var(--border);
}

.icon-btn {
  border: none; background: var(--bg); width: 34px; height: 34px;
  border-radius: 50%; font-size: 15px; cursor: pointer;
}

.drawer-body { flex: 1; overflow-y: auto; padding: 12px 18px; }

.cart-line {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.cart-line-top { display: flex; justify-content: space-between; gap: 10px; }
.cart-line-name { font-weight: 700; font-size: 14.5px; }
.cart-line-detail { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; line-height: 1.4; }
.cart-line-price { font-weight: 700; font-size: 14px; white-space: nowrap; }

.qty-row {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
}
.qty-btn {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border);
  background: #fff; font-weight: 800; cursor: pointer;
}
.qty-value { font-weight: 700; min-width: 18px; text-align: center; }
.remove-link {
  margin-left: auto; border: none; background: none; color: var(--orange);
  font-size: 12.5px; font-weight: 700; cursor: pointer;
}

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

.drawer-footer { padding: 14px 18px 20px; border-top: 1px solid var(--border); }
.drawer-total { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 12px; }

.btn {
  border: none; border-radius: 10px; padding: 13px 16px;
  font-size: 15px; font-weight: 700; cursor: pointer;
}
.btn-block { width: 100%; }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:disabled { background: #C9BBD6; cursor: not-allowed; }
.btn-whatsapp { background: var(--green-wa); color: #fff; }
.btn-secondary { background: var(--bg); color: var(--text); }

.modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(20, 10, 30, 0.55);
}
.modal.hidden { display: none; }

.modal-card {
  background: #fff; width: 100%; max-width: 480px;
  border-radius: 20px 20px 0 0;
  max-height: 88vh; overflow-y: auto;
  padding: 20px 20px 24px;
}
@media (min-width: 560px) {
  .modal { align-items: center; }
  .modal-card { border-radius: 20px; max-height: 84vh; }
}

.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.modal-header h2 { font-size: 18px; }
.modal-desc { font-size: 13px; color: var(--text-muted); margin: 6px 0 16px; line-height: 1.4; }

.field-group { margin-bottom: 18px; }
.field-label { font-size: 13.5px; font-weight: 700; margin-bottom: 8px; display: block; color: var(--purple-dark); }
.field-hint { font-size: 12px; color: var(--text-muted); font-weight: 400; margin-left: 4px; }

.option-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 8px; cursor: pointer; font-size: 14px;
}
.option-row input { accent-color: var(--purple); width: 17px; height: 17px; }
.option-row-label { display: flex; align-items: center; gap: 10px; }
.option-row-price { font-weight: 700; color: var(--purple-dark); font-size: 13.5px; }

textarea, input[type="text"], input[type="number"] {
  width: 100%; border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 12px; font-size: 14px; font-family: inherit; color: var(--text);
}
textarea { resize: vertical; min-height: 60px; }

.modal-sticky-footer {
  position: sticky; bottom: -24px; background: #fff;
  margin: 18px -20px -24px; padding: 14px 20px 20px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}

.qty-stepper { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.qty-stepper .qty-btn { width: 28px; height: 28px; }

.error-text { color: var(--orange); font-size: 12.5px; margin-top: 6px; }

.radio-group-title { font-size: 12px; color: var(--text-muted); font-weight: 700; margin: 12px 0 6px; text-transform: uppercase; letter-spacing: .3px; }

.toggle-pair { display: flex; gap: 8px; }
.toggle-pair button {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--text);
}
.toggle-pair button.active { background: var(--purple); border-color: var(--purple); color: #fff; }

.summary-box {
  background: var(--bg); border-radius: 12px; padding: 12px 14px; font-size: 13.5px;
  margin-bottom: 16px;
}
.summary-row { display: flex; justify-content: space-between; padding: 3px 0; }
.summary-row.total { font-weight: 800; font-size: 15px; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; }
