/* ── GRID ── */
.main { padding: clamp(24px, 4vw, 40px) clamp(16px, 4vw, 48px); }

.status-bar {
  font-size: 0.82rem;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-bottom: 20px;
}
.status-bar strong { color: var(--text); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

/* ── CARD ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
  animation: fadeUp 0.4s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card:hover { border-color: var(--orange); transform: translateY(-2px); }

.card-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface2);
  position: relative;
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.card:hover .card-img img { transform: scale(1.05); }

.badge {
  position: absolute;
  top: 10px; left: 10px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
}
.badge-offer { background: var(--orange); color: #fff; }
.badge-out   { background: #333; color: var(--muted); }

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card-cat {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.card-name {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}
.card-variations {
  font-size: 0.78rem;
  color: var(--muted);
}
.card-price {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.price-current {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--yellow);
  letter-spacing: 0.03em;
}
.price-original {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: line-through;
}
.card-footer { padding: 0 14px 14px; }
.add-btn {
  width: 100%;
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
}
.add-btn:hover { background: var(--orange-dim); }
.add-btn:active { transform: scale(0.97); }
.add-btn:disabled { background: var(--surface2); color: var(--muted); cursor: not-allowed; }

/* ── LOADING / EMPTY ── */
.state-msg {
  grid-column: 1 / -1;
  padding: 60px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── CART DRAWER ── */
.overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  backdrop-filter: blur(4px);
}
.overlay.open { display: block; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.drawer.open { transform: translateX(0); }

.drawer-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
}
.close-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s;
}
.close-btn:hover { border-color: var(--orange); color: var(--orange); }

.drawer-items { flex: 1; overflow-y: auto; padding: 16px 20px; }

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  animation: fadeUp 0.2s ease both;
}
.cart-item-img {
  width: 56px; height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface2);
  flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 0.88rem; font-weight: 500; line-height: 1.3; }
.cart-item-var { font-size: 0.76rem; color: var(--muted); margin-top: 2px; }
.cart-item-price {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--yellow);
  margin-top: 4px;
}
.qty-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 28px; height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s;
}
.qty-btn:hover { border-color: var(--orange); color: var(--orange); }
.qty-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  min-width: 20px;
  text-align: center;
}
.remove-btn {
  background: none; border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  transition: color 0.15s;
  margin-left: auto;
}
.remove-btn:hover { color: #e74c3c; }

.cart-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--muted);
}
.cart-empty-icon { font-size: 2.5rem; margin-bottom: 12px; }

.drawer-footer {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.total-label { font-size: 0.85rem; color: var(--muted); }
.total-amount {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--yellow);
  letter-spacing: 0.03em;
}
.wsp-order-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.18s;
  text-decoration: none;
}
.wsp-order-btn:hover { opacity: 0.88; }
.wsp-order-btn:disabled { background: var(--surface2); color: var(--muted); cursor: not-allowed; opacity: 1; }

.payment-note {
  font-size: 0.76rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

/* ── MODAL PRODUCTO ── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 300;
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeUp 0.25s ease;
}
.modal-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 16px 16px 0 0;
  background: var(--surface2);
}
.modal-body { padding: 24px; }
.modal-cat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.modal-name {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.03em;
  margin: 6px 0;
  line-height: 1.05;
}
.modal-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.modal-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}
.modal-var-section { margin-bottom: 20px; }
.modal-var-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  color: var(--muted);
}
.var-options { display: flex; flex-wrap: wrap; gap: 8px; }
.var-opt {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}
.var-opt.selected { border-color: var(--orange); color: var(--orange); background: rgba(255,107,26,0.1); }
.modal-actions { display: flex; gap: 12px; }
.modal-add-btn {
  flex: 1;
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 13px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.18s;
}
.modal-add-btn:hover { background: var(--orange-dim); }
.modal-close-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  transition: border-color 0.15s;
}
.modal-close-btn:hover { border-color: var(--orange); }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface2);
  border: 1px solid var(--orange);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 500;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── FOOTER ── */
footer {
  margin-top: 60px;
  padding: 28px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
}
.footer-logo span { color: var(--orange); }
footer p { font-size: 0.78rem; color: var(--muted); }

/* ── RESPONSIVE ── */
@media (max-width: 500px) {
  .hero h1 { font-size: 3.5rem; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-name { font-size: 0.85rem; }
  .price-current { font-size: 1.25rem; }
}

/* ── SKELETON LOADER (evita CLS) ── */
.skeleton {
  pointer-events: none;
}
.skeleton-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--surface2) 25%, #2a2a2a 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
.skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--surface2) 25%, #2a2a2a 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  margin-bottom: 8px;
}
.skeleton-line.short { width: 40%; }
.skeleton-line.price { width: 30%; height: 18px; margin-top: auto; }
.skeleton-btn {
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface2) 25%, #2a2a2a 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
