/* Tienda - estilos */
:root {
  --bg: #FAFAF8;
  --bg-alt: #F4F2EE;
  --paper: #FFFFFF;
  --ink: #1A1A1A;
  --ink-soft: #4A4A4A;
  --muted: #8A8A8A;
  --line: #E8E5DE;
  --accent: #2563EB;
  --accent-dark: #1D4ED8;
  --success: #16A34A;
  --danger: #DC2626;
  --max: 1200px;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(26,26,26,0.06);
  --shadow-hover: 0 10px 30px rgba(26,26,26,0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: 'Playfair Display', 'Inter', serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: var(--max); margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: var(--ink); }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.nav-links a:hover { color: var(--accent); }
.cart-btn {
  position: relative; padding: 10px 18px; background: var(--accent); color: white;
  border-radius: 999px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px;
}
.cart-btn:hover { background: var(--accent-dark); }
.cart-count {
  background: var(--paper); color: var(--accent); min-width: 20px; height: 20px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; padding: 0 6px;
}
.cart-count:empty, .cart-count[data-count="0"] { display: none; }

@media (max-width: 768px) { .nav-links { display: none; } }

/* Demo banner */
.demo-banner {
  background: #FEF3C7; color: #92400E; padding: 10px 24px;
  text-align: center; font-size: 13px; border-bottom: 1px solid #FDE68A;
}
.demo-banner strong { font-weight: 600; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; font-size: 15px; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.2s; text-align: center; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--bg-alt); color: var(--ink); }
.btn-secondary:hover { background: var(--line); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-outline:hover { border-color: var(--ink); }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Hero */
.hero { padding: 80px 0 60px; text-align: center; }
.hero-eyebrow { display: inline-block; padding: 6px 16px; background: rgba(37,99,235,0.1); color: var(--accent); border-radius: 999px; font-size: 13px; font-weight: 500; margin-bottom: 20px; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); max-width: 800px; margin: 0 auto 20px; }
.hero p { font-size: 18px; color: var(--ink-soft); max-width: 600px; margin: 0 auto 32px; }

/* Sections */
.section { padding: 60px 0; }
.section-header { display: flex; align-items: end; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.section-title { font-size: clamp(28px, 4vw, 40px); }
.section-sub { color: var(--ink-soft); font-size: 15px; margin-top: 4px; }

/* Category pills */
.cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.cat-pill { padding: 8px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; font-size: 14px; cursor: pointer; transition: all 0.2s; }
.cat-pill:hover { border-color: var(--accent); }
.cat-pill.active { background: var(--accent); color: white; border-color: var(--accent); }

/* Product grid */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.product {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: all 0.2s; display: flex; flex-direction: column;
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.product-img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--bg-alt); }
.product-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.product-name { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 8px; line-height: 1.3; }
.product-price { font-size: 18px; font-weight: 700; color: var(--ink); margin-top: auto; margin-bottom: 12px; }
.product-price small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.product-btn { width: 100%; padding: 10px; background: var(--ink); color: white; border-radius: 8px; font-size: 13px; font-weight: 500; }
.product-btn:hover { background: var(--accent); }

/* Product detail */
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 48px 0; }
@media (max-width: 768px) { .pd { grid-template-columns: 1fr; gap: 24px; } }
.pd-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--bg-alt); }
.pd-cat { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px; }
.pd-name { font-size: 36px; margin-bottom: 16px; }
.pd-price { font-size: 32px; font-weight: 700; margin-bottom: 16px; }
.pd-desc { color: var(--ink-soft); margin-bottom: 24px; line-height: 1.7; }
.pd-sku { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.pd-qty { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.qty-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty-input button { width: 36px; height: 40px; font-size: 18px; color: var(--ink-soft); }
.qty-input button:hover { background: var(--bg-alt); }
.qty-input input { width: 60px; height: 40px; border: none; text-align: center; font-size: 15px; font-weight: 600; -moz-appearance: textfield; }
.qty-input input::-webkit-outer-spin-button, .qty-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Cart */
.cart { padding: 48px 0; }
.cart-grid { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
@media (max-width: 768px) { .cart-grid { grid-template-columns: 1fr; } }
.cart-items { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.cart-empty { padding: 60px 24px; text-align: center; color: var(--muted); }
.cart-item { display: grid; grid-template-columns: 80px 1fr auto auto; gap: 16px; padding: 20px; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item:last-child { border-bottom: none; }
.cart-item img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.cart-item-name { font-weight: 500; font-size: 14px; margin-bottom: 4px; }
.cart-item-cat { font-size: 12px; color: var(--muted); }
.cart-item-price { font-weight: 600; }
.cart-item-remove { color: var(--danger); font-size: 13px; padding: 6px 12px; }
.cart-summary { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: sticky; top: 88px; }
.cart-summary h3 { font-family: 'Inter', sans-serif; font-size: 18px; font-weight: 600; margin-bottom: 20px; }
.cart-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.cart-line.total { font-size: 18px; font-weight: 700; padding-top: 16px; margin-top: 8px; border-top: 1px solid var(--line); }

/* Forms */
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 8px;
  font-size: 15px; background: var(--paper); color: var(--ink); font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--accent);
}
.form-group textarea { min-height: 100px; resize: vertical; }

/* Alerts */
.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-info { background: #DBEAFE; color: #1E40AF; border: 1px solid #93C5FD; }
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #6EE7B7; }
.alert-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }

/* Footer */
.footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 60px 0 30px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { color: white; font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; margin-bottom: 16px; letter-spacing: 1px; text-transform: uppercase; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; font-size: 14px; }
.footer a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; text-align: center; font-size: 12px; }

/* Code blocks */
pre { background: #0F172A; color: #E2E8F0; padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 13px; line-height: 1.6; margin: 12px 0; }
code { font-family: 'Monaco', 'Courier New', monospace; font-size: 13px; }
:not(pre) > code { background: var(--bg-alt); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }

/* Loading */
.loading { text-align: center; padding: 60px; color: var(--muted); }
.spinner { display: inline-block; width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
