:root {
  --wine: #4c0519;
  --wine-dark: #38040f;
  --wine-mid: #6d0a26;
  --gold: #eab308;
  --gold-light: #fde68a;
  --bg: #fafaf9;
  --text: #292524;
  --muted: #78716c;
  --border: #e7e5e4;
  --white: #ffffff;
}
* { 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);
}
h1, h2, h3, .serif { font-family: Georgia, "Times New Roman", serif; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Topbar */
.topbar { background: var(--wine); color: #fff; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.topbar img.logo { height: 40px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 8px 14px; font-size: 14px; border: 1px solid transparent; cursor: pointer; font-weight: 500; }
.btn-cart { background: var(--wine-mid); color: #fff; position: relative; }
.btn-outline-light { border: 1px solid rgba(255,255,255,0.35); color: #fff; background: transparent; }
.btn-outline-light:hover { background: rgba(255,255,255,0.1); }
.cart-badge { position: absolute; top: -6px; right: -6px; background: var(--gold); color: var(--wine-dark); font-size: 11px; font-weight: 700; border-radius: 999px; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }

.btn-primary { background: var(--wine); color: #fff; }
.btn-primary:hover { background: var(--wine-dark); }
.btn-secondary { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { background: #f5f5f4; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger-outline { border: 1px solid #fecaca; color: #dc2626; background: #fff; }

/* Banner */
.banner { position: relative; width: 100%; aspect-ratio: 16/7; border-radius: 12px; overflow: hidden; margin: 20px 0; background: var(--wine); }
@media (min-width: 640px) { .banner { aspect-ratio: 3/1; } }
.banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.banner-slide.active { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-slide .gradient { width: 100%; height: 100%; background: linear-gradient(to right, var(--wine-dark), var(--wine-mid), var(--gold)); }
.banner-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 20px; color: #FFD24D; }
.banner-text.with-image { background: rgba(0,0,0,0.35); }
.banner-text .subtitle { color: var(--gold-light); font-size: 13px; margin-top: 4px; }
.banner-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.banner-dots button { width: 8px; height: 8px; border-radius: 999px; border: none; background: rgba(255,255,255,0.4); cursor: pointer; padding: 0; }
.banner-dots button.active { background: #fff; }

/* Categorias */
.categories { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 20px; }
.categories a { white-space: nowrap; padding: 7px 14px; border-radius: 999px; font-size: 14px; border: 1px solid var(--border); background: #20202F; color: #FFF; }
.categories a.active { background: var(--wine); border-color: var(--wine); color: #fff; }

/* Grid de produtos */
.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 640px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .products-grid { grid-template-columns: repeat(4, 1fr); } }
.card { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.card-image { aspect-ratio: 1/1; background: #f5f5f4; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #d6d3d1; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 12px; display: flex; flex-direction: column; flex: 1; }
.card-category { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #b45309; font-weight: 600; }
.card-name { font-size: 14px; font-weight: 500; margin: 2px 0 4px; }
.card-desc { font-size: 12px; color: var(--muted); flex: 1; margin: 0 0 8px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-price { font-family: Georgia, serif; font-size: 16px; }
.out-of-stock { font-size: 12px; color: #ef4444; }
.low-stock { font-size: 11px; color: #d97706; margin-top: 4px; }

/* Carrinho / checkout */
.page-title { font-family: Georgia, serif; font-size: 22px; margin: 20px 0 16px; }
.cart-item { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #f0efed; padding: 12px 0; }
.cart-item img, .cart-item .placeholder { width: 56px; height: 56px; border-radius: 8px; background: #f5f5f4; object-fit: cover; display: flex; align-items: center; justify-content: center; color: var(--muted); flex-shrink: 0; }
.qty-form { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.qty-form button { width: 24px; height: 24px; border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer; }
.summary-box { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px; font-size: 14px; }
.summary-row { display: flex; justify-content: space-between; padding: 2px 0; }
.summary-total { font-weight: 700; font-size: 16px; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; }

form.panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; max-width: 480px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: #57534e; margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit;
}
.inline-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.msg-error { color: #dc2626; font-size: 13px; margin: 4px 0; }
.msg-success { color: #047857; font-size: 13px; margin: 4px 0; }
.msg-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; padding: 8px 10px; border-radius: 8px; font-size: 12px; }

/* Footer */
.site-footer { background: var(--wine); color: #e7e5e4; margin-top: 40px; }
.footer-grid { display: grid; gap: 20px; padding: 32px 16px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid img.logo { height: 24px; margin-bottom: 10px; }
.footer-right { text-align: left; }
@media (min-width: 640px) { .footer-right { text-align: right; } }
.footer-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #d6b98c; margin-bottom: 4px; }
.footer-bottom { border-top: 1px solid var(--wine-mid); text-align: center; font-size: 12px; color: #d6d3d1; padding: 10px; }

/* WhatsApp flutuante */
.whatsapp-float {
  position: fixed; bottom: 20px; right: 20px; width: 56px; height: 56px; border-radius: 999px;
  background: #22c55e; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25); z-index: 30; font-size: 26px;
}
.whatsapp-float:hover { background: #16a34a; }

/* Admin */
.admin-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 20px 0; }
.tabs { display: flex; gap: 4px; background: #f0efed; border-radius: 999px; padding: 4px; flex-wrap: wrap; }
.tabs a { padding: 7px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); }
.tabs a.active { background: var(--wine); color: #fff; }
.login-box { max-width: 340px; margin: 60px auto; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.order-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.order-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.status-badge { font-size: 12px; border-radius: 999px; padding: 4px 10px; border: 1px solid; text-transform: capitalize; }
.status-novo { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.status-preparando { background: #e0f2fe; color: #075985; border-color: #bae6fd; }
.status-enviado { background: #e0e7ff; color: #3730a3; border-color: #c7d2fe; }
.status-concluído { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.status-cancelado { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.list-row { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.list-row .info { flex: 1; min-width: 0; }
.list-row .name { font-size: 14px; font-weight: 500; }
.list-row .meta { font-size: 12px; color: var(--muted); }
.icon-btn { background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; }
.icon-btn:hover { color: var(--wine); }
.banner-editor { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.notice { background: #fef3c7; border: 1px solid #fde68a; color: #92400e; padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.pay-options { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); font-size: 12px; cursor: pointer; }
.pay-chip input { margin-right: 6px; }
.confirm-box { max-width: 380px; margin: 40px auto; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; text-align: center; }
.check-circle { width: 48px; height: 48px; border-radius: 999px; background: #d1fae5; color: #047857; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; font-size: 24px; }
