* { box-sizing: border-box; }
:root { --bg:#f6f8fb; --surface:#ffffff; --text:#0f172a; --muted:#64748b; --primary:#2563eb; --accent:#10b981; --danger:#ef4444; --warning:#f59e0b; --ring:#cbd5e1; --shadow:0 10px 24px rgba(2,6,23,0.08);
  /* Paleta gastronómica */
  --food-cream:#fff7ed; --food-yellow:#fde68a; --food-red:#ef4444; --food-green:#16a34a; --food-brown:#78350f;
}
html, body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial; color:var(--text);
  /* Fondo profesional: gradiente + patrón de emojis de cocina (baja opacidad) + watermark */
  background-image:
    linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%),
    url('assets/img/pattern-kitchen.svg'),
    url('assets/img/watermark.svg');
  background-color:#f8fafc;
  background-repeat: no-repeat, repeat, no-repeat;
  background-position: center, center, right 3% bottom 3%;
  background-size: cover, 240px 240px, 180px;
}
.brand { display:flex; align-items:center; gap:10px; }
.brand .logo { width:28px; height:28px; border-radius:6px; background:linear-gradient(135deg, #f59e0b, #ef4444); box-shadow:0 2px 8px rgba(239,68,68,0.35); }
.logo-placeholder { display:inline-block; margin-left:6px; padding:4px 8px; border:2px dashed #10b981; border-radius:8px; color:#0f172a; font-size:12px; background:#f0fdf4; }
.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.site { display:flex; align-items:center; justify-content:space-between; padding:12px 20px; background:rgba(255,255,255,0.86); backdrop-filter:saturate(180%) blur(10px); border-bottom:1px solid #e5e7eb; box-shadow:0 8px 20px rgba(2,6,23,0.06); position:sticky; top:0; z-index:20; }
.site nav { display:flex; align-items:center; gap:10px; }
.site nav a { text-decoration:none; color:#334155; padding:8px 12px; border-radius:10px; transition:background .15s ease, color .15s ease; }
.site nav a:hover { background:#f1f5f9; color:#0f172a; }
.site .user { color:#555; }
.cart-icon { position:relative; display:inline-flex; align-items:center; gap:8px; color:#1f2937; padding:6px 12px; border:1px solid #e2e8f0; border-radius:999px; background:#f8fafc; transition:box-shadow .15s ease, transform .15s ease; }
.cart-icon:hover { box-shadow:0 6px 14px rgba(2,6,23,0.08); transform:translateY(-1px); }
.cart-icon svg { width:24px; height:24px; }
.cart-badge { position:absolute; right:-8px; top:-8px; background:#ef4444; color:#fff; font-size:12px; padding:2px 6px; border-radius:999px; min-width:20px; text-align:center; box-shadow:0 2px 6px rgba(0,0,0,0.15); }
.form, .preview { background:var(--surface); padding:16px; border:1px solid #e5e5ea; border-radius:12px; box-shadow: var(--shadow); }
.hero { background:linear-gradient(135deg, var(--food-cream), var(--food-yellow)); padding:24px; border:1px solid #fcd34d; border-radius:16px; box-shadow:0 10px 24px rgba(245, 158, 11, 0.25); text-align:center; }
.hero h2 { margin:0 0 8px; color:#b45309; }
.hero p { margin:0 0 12px; color:#92400e; }
.hero .icons { font-size:22px; }
.form { margin-bottom:16px; }
.form h1 { margin:0 0 12px; }
.alert { background:#ffecec; color:#a33; padding:8px 12px; border-radius:6px; margin-bottom:10px; }
.field { margin-bottom:10px; display:flex; flex-direction:column; }
.field.error input { border-color:#e55353; }
label { font-weight:600; margin-bottom:4px; }
input { padding:10px; border:1px solid #c9ced6; border-radius:6px; }
button { cursor:pointer; padding:10px 14px; border-radius:6px; border:1px solid #c9ced6; background:#0366d6; color:#fff; }
.help { color:#555; font-size:0.9em; }
.grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap:16px; }
.detail { background:var(--surface); padding:16px; border:1px solid #e5e5ea; border-radius:16px; box-shadow: var(--shadow); margin-bottom:16px; }
.detail-grid { display:grid; grid-template-columns: 1fr 1fr; gap:20px; align-items:start; }
.detail-gallery { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:12px; }
.detail-gallery #detail-main { width:100%; height:320px; object-fit:cover; border-radius:8px; background:#f3f4f6; }
.detail-gallery .thumbs { display:grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap:8px; margin-top:10px; }
.detail-gallery .thumbs img { width:100%; height:64px; object-fit:cover; border-radius:8px; border:2px solid transparent; cursor:pointer; background:#f3f4f6; }
.detail-gallery .thumbs img.active { border-color:#22c55e; }
.detail-info h2 { margin:0 0 8px; }
.detail-info .desc { color:var(--muted); }
.detail-info .specs { padding-left:18px; }
.detail-info .options { display:grid; grid-template-columns: 1fr 1fr; gap:12px; margin:12px 0; }
.price-row { display:flex; align-items:center; gap:12px; }
.price-strong { font-size:1.2em; }
.card { background:#fff; border:1px solid #e5e5ea; border-radius:12px; overflow:hidden; box-shadow:0 6px 14px rgba(59,130,246,0.08); transition:transform .15s ease, box-shadow .15s ease; }
.card:hover { transform:translateY(-2px); box-shadow:0 10px 24px rgba(239,68,68,0.18); }
.card img { width:100%; height:180px; object-fit:cover; background:#eee; }
.card .content { padding:12px; }
.price { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.qty { display:flex; align-items:center; gap:8px; }
.qty button { width:28px; height:28px; border-radius:6px; border:1px solid #c9ced6; font-weight:700; cursor:pointer; }
.qty .btn-dec { background:#fef3c7; color:#92400e; border-color:#f59e0b; }
.qty .btn-inc { background:#dcfce7; color:#166534; border-color:#10b981; }
.qty .qty-val { min-width:24px; text-align:center; font-weight:600; }
.badge { display:inline-block; padding:4px 8px; background:#999; color:#fff; border-radius:6px; font-size:0.85em; }
.order { background:var(--surface); padding:16px; border:1px solid #e5e5ea; border-radius:12px; box-shadow: var(--shadow); }
.row { display:flex; gap:16px; }
.row > * { flex: 1; }
/* CTA */
.cta { margin-top:24px; }
.cta-box { background:var(--surface); padding:24px; border:1px solid #e5e5ea; border-radius:16px; text-align:center; box-shadow: var(--shadow); }
.cta-btn { display:inline-block; padding:10px 14px; border-radius:6px; border:1px solid #10b981; background:#10b981; color:#fff; text-decoration:none; box-shadow:0 4px 12px rgba(16,185,129,0.3); }
.ghost { padding:8px 12px; border-radius:6px; border:1px solid #c9ced6; background:#fff; color:#1f2937; cursor:pointer; }
.btn-add { padding:8px 14px; border-radius:6px; border:1px solid var(--food-green); background:var(--food-green); color:#fff; box-shadow:0 4px 12px rgba(22,163,74,0.3); cursor:pointer; }
.btn-detail { padding:8px 14px; border-radius:6px; border:1px solid #3b82f6; background:#3b82f6; color:#fff; box-shadow:0 4px 12px rgba(59,130,246,0.3); cursor:pointer; }
/* Toast */
.toast { position:fixed; inset:0; background:rgba(0,0,0,0.45); display:flex; align-items:center; justify-content:center; }
.toast .toast-body { background:var(--surface); width:min(540px, 92vw); border-radius:16px; padding:24px; box-shadow: var(--shadow); text-align:center; position:relative; }
/* Checkout */
.checkout-grid { display:grid; grid-template-columns: 1.3fr 0.7fr; gap:20px; align-items:start; }
.summary { background:var(--surface); padding:16px; border:1px solid #e5e5ea; border-radius:12px; box-shadow: var(--shadow); }
.summary .row { display:flex; justify-content:space-between; margin:6px 0; color:var(--muted); }
.summary .row strong { color:var(--text); }
.summary .total { font-size:1.1em; }
input, select { padding:10px; border:1px solid var(--ring); border-radius:8px; width:100%; }
label { font-weight:600; margin-bottom:6px; display:block; color:var(--muted); }
.toast .toast-body h3 { color:#10b981; }
.toast .close-x { position:absolute; right:12px; top:10px; background:#ef4444; color:#fff; border:none; border-radius:999px; width:28px; height:28px; cursor:pointer; }

/* Animación agregar al carrito */
@keyframes fly {
  0% { transform: translate(0,0) scale(1); opacity:1; }
  80% { transform: translate(var(--dx), var(--dy)) scale(0.4); opacity:0.8; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity:0; }
}
.fly-item { position:fixed; width:60px; height:60px; border-radius:999px; background:#fff; border:2px solid #e5e7eb; overflow:hidden; pointer-events:none; animation: fly .7s ease-out forwards; z-index:1000; }
.fly-item img { width:100%; height:100%; object-fit:cover; }
.brand h1 { margin:0; font-size:18px; font-weight:700; letter-spacing:0.2px; color:#0f172a; }

/* Selector tipo de pedido (domicilio/local) */
.segmented { display:inline-flex; border:1px solid rgba(15,23,42,0.1); border-radius:999px; overflow:hidden; background:rgba(255,255,255,0.8); backdrop-filter:saturate(1.2); box-shadow: inset 0 1px 0 rgba(2,6,23,0.06); }
.segmented label { padding:6px 12px; cursor:pointer; color:#334155; font-size:0.9rem; user-select:none; }
.segmented input { display:none; }
.segmented label.active { background:rgba(2,6,23,0.06); color:#0f172a; }