:root {
  --primary: #C17F3D;
  --primary-dark: #8B5E2A;
  --primary-light: #F5E6CC;
  --bg: #FDF6EC;
  --card-bg: #FFFFFF;
  --text: #3D2B1F;
  --text-light: #7D6455;
  --border: #E8D5B7;
  --green: #25D366;
  --green-dark: #1DA851;
  --red: #E53935;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ══════════════════════════════
   LANDING PAGE
══════════════════════════════ */

/* Hero */
.hero {
  background: linear-gradient(145deg, #C17F3D 0%, #7A4A1E 100%);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 24px 0;
  position: relative;
  text-align: center;
}

.hero-content {
  max-width: 480px;
  width: 100%;
  padding-bottom: 60px;
}

.hero-logo { font-size: 72px; line-height: 1; margin-bottom: 16px; }

.hero-title {
  font-size: 38px;
  font-weight: 900;
  color: white;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.hero-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-tagline {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.action-btn:active { transform: scale(0.97); }

.action-btn--primary {
  background: white;
  color: var(--primary-dark);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  font-size: 18px;
  padding: 18px 20px;
}

.action-btn--primary:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.28); }

.action-btn--secondary {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(4px);
}

.action-btn--secondary:hover { background: rgba(255,255,255,0.25); }

.action-btn--whatsapp {
  background: var(--green);
  color: white;
  box-shadow: 0 4px 16px rgba(37,211,102,0.35);
}

.action-btn--whatsapp:hover { background: var(--green-dark); }

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
}

.hero-wave svg { width: 100%; height: 100%; display: block; }

/* ── How it works ── */
.how-it-works {
  background: var(--primary-dark);
  padding: 52px 24px;
}

.how-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.how-inner h2 {
  font-size: 26px;
  font-weight: 900;
  color: white;
  margin-bottom: 6px;
}

.how-sub {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  margin-bottom: 36px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.step {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 20px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
}

.step-icon { font-size: 32px; line-height: 1; flex-shrink: 0; }

.step-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.step-num {
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.step-body strong {
  font-size: 13px;
  font-weight: 800;
  color: white;
  line-height: 1.2;
}

.step-body span {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  line-height: 1.4;
}

/* Landing About */
.landing-about {
  background: var(--bg);
  padding: 56px 24px 40px;
}

.landing-about-inner {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 640px) {
  .landing-about-inner { grid-template-columns: 1fr 1fr; align-items: start; }
}

.landing-about-text h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.landing-about-text p {
  color: var(--text-light);
  line-height: 1.75;
  font-size: 15px;
  margin-bottom: 12px;
}

.landing-about-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.contact-list { display: flex; flex-direction: column; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-item:last-child { border-bottom: none; }
.contact-item:hover { color: var(--primary); }

.contact-icon { font-size: 20px; width: 24px; text-align: center; flex-shrink: 0; }

/* Landing Footer */
.landing-footer {
  background: var(--primary-dark);
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}

/* ══════════════════════════════
   ZONE SELECTOR OVERLAY
══════════════════════════════ */
.overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(145deg, #C17F3D 0%, #7A4A1E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.overlay-card {
  background: white;
  border-radius: 24px;
  padding: 32px 28px 36px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  position: relative;
}

.overlay-back {
  position: absolute;
  top: 16px;
  left: 16px;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.overlay-back:hover { color: var(--primary); background: var(--primary-light); }

.overlay-icon { font-size: 48px; margin-bottom: 12px; line-height: 1; }

.overlay-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.overlay-sub {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 28px;
}

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

.zone-btn {
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
}

.zone-btn:hover { border-color: var(--primary); background: var(--primary-light); }

.zone-btn .zone-icon { font-size: 26px; flex-shrink: 0; }
.zone-btn .zone-name { font-size: 16px; font-weight: 700; color: var(--primary-dark); }

/* ══════════════════════════════
   APP HEADER
══════════════════════════════ */
header {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.header-left { display: flex; align-items: center; }
.header-center { text-align: center; }
.header-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.btn-back {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.btn-back:hover { color: var(--primary); background: var(--primary-light); }

.brand-name {
  font-weight: 800;
  font-size: 16px;
  color: var(--primary-dark);
}

.brand-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-light);
  margin-left: 4px;
}

.btn-outline {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text-light);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.cart-btn {
  padding: 8px 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.cart-btn:hover { background: var(--primary-dark); }
.cart-btn--active { background: var(--green); }
.cart-btn--active:hover { background: var(--green-dark); }

.cart-badge {
  background: white;
  color: var(--primary);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

/* ══════════════════════════════
   NAV TABS
══════════════════════════════ */
.nav-bar { background: white; border-bottom: 1px solid var(--border); }

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
}

.tab {
  padding: 12px 20px;
  border: none;
  background: none;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ══════════════════════════════
   MAIN CONTENT
══════════════════════════════ */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 140px;
}

/* Zone banner */
.zone-banner {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--primary-dark);
  font-weight: 600;
}

/* ══════════════════════════════
   PRODUCTS GRID
══════════════════════════════ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 14px;
}

@media (min-width: 540px) {
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

@media (min-width: 768px) {
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
}

/* ── Product card ── */
.product-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* Promo badge */
.promo-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #43A047, #2E7D32);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  z-index: 1;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(46,125,50,0.4);
}

.product-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--primary-light), #EDD5A3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  overflow: hidden;
}

.product-img img { width: 100%; height: 100%; object-fit: cover; }

.product-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-top { flex: 1; }

.product-footer { margin-top: auto; }

.product-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  line-height: 1.3;
}

.product-desc {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 0;
  line-height: 1.4;
}

/* Price — normal */
.product-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
}

/* Price — with promo */
.product-price-promo {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.price-original {
  font-size: 13px;
  color: var(--text-light);
  text-decoration: line-through;
  font-weight: 500;
}

.price-sale {
  font-size: 17px;
  font-weight: 800;
  color: #2E7D32;
}

.add-btn {
  width: 100%;
  padding: 8px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.add-btn:hover { background: var(--primary-dark); }

.qty-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: white;
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
  line-height: 1;
}

.qty-btn:hover { background: var(--primary); color: white; }

.qty-display {
  font-size: 16px;
  font-weight: 800;
  min-width: 24px;
  text-align: center;
  color: var(--text);
}

/* ══════════════════════════════
   CART
══════════════════════════════ */
.cart-overlay-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.cart-overlay-bg.open { opacity: 1; pointer-events: all; }

.cart-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -6px 32px rgba(0,0,0,0.15);
  z-index: 201;
  max-height: 85svh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.cart-panel.open { transform: translateY(0); }

.cart-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 0;
  flex-shrink: 0;
}

.cart-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cart-header h2 { font-size: 18px; font-weight: 800; }

.close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: background 0.15s;
}

.close-btn:hover { background: #d0b99a; }

.cart-scroll-area { flex: 1; overflow-y: auto; padding: 8px 20px 0; }
.cart-items { }

.empty-cart {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-light);
  font-size: 15px;
}

.empty-cart-icon { font-size: 48px; display: block; margin-bottom: 12px; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child { border-bottom: none; }

.cart-item-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.cart-item-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.cart-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  min-width: 75px;
  text-align: right;
  flex-shrink: 0;
}

.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: white;
  flex-shrink: 0;
}

/* Shipping notice inside cart */
.shipping-notice {
  background: var(--primary-light);
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 13px;
  color: var(--primary-dark);
  font-weight: 600;
  margin-bottom: 14px;
  text-align: center;
}

.shipping-notice--warn {
  background: #FFF3E0;
  color: #E65100;
}

.transfer-copy-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.copy-btn {
  padding: 3px 10px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.copy-btn:hover { background: var(--primary-dark); }

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 14px;
  color: var(--text-light);
}

.summary-row.total {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
}

.whatsapp-btn {
  width: 100%;
  margin-top: 14px;
  padding: 15px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}

.whatsapp-btn:hover { background: var(--green-dark); }
.whatsapp-btn:disabled { background: #ccc; cursor: not-allowed; }

/* ══════════════════════════════
   ABOUT (in-app tab)
══════════════════════════════ */
.about-section { max-width: 640px; }

.about-hero {
  background: linear-gradient(135deg, var(--primary-light), white);
  border-radius: 16px;
  padding: 32px 28px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.about-hero-icon { font-size: 56px; margin-bottom: 16px; }
.about-hero h2 { font-size: 24px; font-weight: 800; color: var(--primary-dark); margin-bottom: 12px; }

.about-hero p {
  color: var(--text-light);
  line-height: 1.7;
  font-size: 15px;
  margin-bottom: 12px;
}

.about-hero p:last-child { margin-bottom: 0; }

.about-contact {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.about-contact h3 { font-size: 17px; font-weight: 800; margin-bottom: 16px; color: var(--text); }

/* ══════════════════════════════
   FLOATING CART
══════════════════════════════ */
.floating-cart {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 150;
  pointer-events: none;
  animation: floatIn 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.floating-cart.hidden { display: none; }

@keyframes floatIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.floating-cart button {
  pointer-events: all;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
  white-space: nowrap;
  transition: background 0.2s, box-shadow 0.2s;
}

.floating-cart button:hover {
  background: var(--green-dark);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}

/* ══════════════════════════════
   PAYMENT SECTION
══════════════════════════════ */
.payment-section {
  margin-top: 16px;
  padding-top: 16px;
  padding-bottom: 0;
  border-top: 1px solid var(--border);
}

.payment-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.payment-btn {
  padding: 11px 8px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

.payment-btn:hover { border-color: var(--primary); }

.payment-btn.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.transfer-details {
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  margin-top: 4px;
}

.transfer-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.transfer-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.transfer-row:last-child { border-bottom: none; }

.transfer-row span:first-child { color: var(--text-light); }
.transfer-row span:last-child  { font-weight: 700; color: var(--text); text-align: right; word-break: break-all; }

/* ── Client section ── */
.client-section {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  padding-bottom: 8px;
}

.new-client-form { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }

.form-group { display: flex; flex-direction: column; gap: 4px; }

.form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-input {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.form-input:focus { border-color: var(--primary); }

/* ══════════════════════════════
   LOADING
══════════════════════════════ */
.loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }
