/* ============================================================
   Congelados de la Naty — Vanilla CSS
   Sin dependencias externas. CSS puro.
   ============================================================ */

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

:root {
  --violet-900: #1e1b4b;
  --violet-800: #2e1b69;
  --violet-600: #7c3aed;
  --violet-500: #8b5cf6;
  --violet-400: #a78bfa;
  --violet-300: #c4b5fd;
  --violet-200: #ddd6fe;
  --pink-400:   #f472b6;
  --pink-500:   #ec4899;
  --emerald-400:#34d399;
  --emerald-500:#10b981;
  --emerald-600:#059669;
  --rose-400:   #fb7185;
  --rose-500:   #f43f5e;
  --slate-900:  #0f172a;
  --slate-800:  #1e293b;
  --amber-400:  #fbbf24;
  --amber-500:  #f59e0b;
  --white-10: rgba(255,255,255,.10);
  --white-20: rgba(255,255,255,.20);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background-color: var(--slate-900);
  min-height: 100vh;
  color: #fff;
  line-height: 1.5;
  position: relative;
}

/* Imagen de fondo fija que cubre toda la ventana */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(15,23,42,.92) 0%, rgba(59,31,107,.85) 50%, rgba(15,23,42,.92) 100%),
    url('../assets/bg-food.jpg') center/cover no-repeat;
  background-attachment: fixed, fixed;
}

/* ─── LAYOUT ─────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }

.grid-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 4rem;
}

@media(min-width: 1024px) {
  .grid-main { grid-template-columns: 2fr 1fr; }
}

/* ─── HEADER ─────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15,23,42,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--white-10);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}

.brand { display: flex; align-items: center; gap: 1rem; }

.brand-logo {
  width: 56px;
  height: 56px;
  border-radius: .75rem;
  object-fit: cover;
}

.brand h1 { font-size: 1.25rem; font-weight: 700; }
.brand p  { color: var(--violet-300); font-size: .875rem; }

/* Cart Button */
.cart-btn {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--white-10);
  border: 1px solid var(--white-20);
  border-radius: .75rem;
  padding: .5rem 1rem;
  color: #fff;
  font-size: .9rem;
  cursor: pointer;
  transition: background .2s;
}
.cart-btn:hover { background: var(--white-20); }
.cart-icon { font-size: 1.25rem; }
.cart-total-label { color: var(--emerald-400); font-weight: 700; }

/* Social buttons */
.social-btns { display: flex; align-items: center; gap: .5rem; }
@media(max-width: 480px) { .social-btns { display: none; } }

.btn-ig {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: .6rem;
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  color: #fff;
  text-decoration: none;
  transition: transform .2s;
}
.btn-ig:hover { transform: scale(1.1); }

.btn-wa-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .85rem;
  border-radius: .6rem;
  background: var(--emerald-500);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: .875rem;
  transition: background .2s;
}
.btn-wa-header:hover { background: var(--emerald-600); }
.btn-wa-header span { display: none; }
@media(min-width: 900px) { .btn-wa-header span { display: inline; } }

/* Floating WhatsApp (mobile only) */
.wa-float-btn {
  position: fixed;
  bottom: 5rem;
  right: 1rem;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  border-radius: 999px;
  background: var(--emerald-500);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: .875rem;
  box-shadow: 0 8px 24px rgba(16,185,129,.35);
  transition: transform .2s;
}
.wa-float-btn:hover { transform: scale(1.05); }
@media(min-width: 540px) { .wa-float-btn { display: none; } }

/* ─── HERO ────────────────────────────────────────────── */
.hero {
  padding: 2.5rem 1rem;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;          /* siempre fila */
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
}

.hero-text {
  flex: 1;
  text-align: left;
  min-width: 0;                 /* evita overflow */
}

.hero-photo {
  flex-shrink: 0;
  position: relative;
  order: 2;                     /* siempre a la derecha */
}

.hero-photo img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 4px solid rgba(167,139,250,.5);
  box-shadow: 0 0 60px rgba(139,92,246,.3);
  display: block;
}

@media(max-width: 560px) {
  .hero { flex-direction: column; text-align: center; }
  .hero-text { text-align: center; }
  .hero-photo { order: unset; }
  .hero-photo img { width: 140px; height: 140px; }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(139,92,246,.15);
  color: var(--violet-300);
  border: 1px solid rgba(139,92,246,.3);
  padding: .4rem 1rem;
  border-radius: 999px;
  font-size: .85rem;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-title .gradient {
  background: linear-gradient(to right, var(--violet-400), var(--pink-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub { font-size: 1.1rem; color: var(--violet-200); max-width: 500px; }



.hero-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px dashed rgba(167,139,250,.3);
  animation: spin 20s linear infinite;
}

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

/* ─── PRODUCTS COLUMN ──────────────────────────────────── */
.col-products { display: flex; flex-direction: column; gap: 1.25rem; }

/* ─── IDEAS BANNER ──────────────────────────────────────── */
.ideas-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: linear-gradient(to right, rgba(120,53,15,.35), rgba(239,68,68,.2), rgba(239,68,68,.15));
  border: 1px solid rgba(251,191,36,.3);
  text-decoration: none;
  transition: all .2s;
}
.ideas-banner:hover {
  border-color: rgba(251,191,36,.6);
  background: linear-gradient(to right, rgba(120,53,15,.5), rgba(239,68,68,.3));
}
.ideas-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: .75rem;
  background: rgba(245,158,11,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber-400);
  transition: transform .2s;
}
.ideas-banner:hover .ideas-icon { transform: scale(1.1); }
.ideas-text { flex: 1; }
.ideas-title { font-weight: 700; font-size: 1rem; color: var(--amber-400); }
.ideas-sub   { font-size: .82rem; color: rgba(251,191,36,.6); margin-top: .1rem; }
.ideas-sparkle { flex-shrink: 0; color: var(--amber-400); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* Category filters */
.cat-filter { display: flex; flex-wrap: wrap; gap: .5rem; }


.cat-btn {
  padding: .4rem 1rem;
  border-radius: .75rem;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--white-10);
  background: var(--white-10);
  color: var(--violet-200);
  transition: all .2s;
}
.cat-btn:hover  { background: var(--white-20); }
.cat-btn.active { background: var(--violet-600); border-color: var(--violet-600); color: #fff; }

/* Search */
.search-wrap { position: relative; }

.search-wrap svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  color: var(--violet-300);
}

.search-input {
  width: 100%;
  padding: .75rem 1rem .75rem 3rem;
  background: var(--white-10);
  border: 1px solid var(--white-20);
  border-radius: .75rem;
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border .2s;
}
.search-input::placeholder { color: rgba(196,181,253,.6); }
.search-input:focus { border-color: var(--violet-500); }

/* Products grid */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media(min-width: 640px) { .products-grid { grid-template-columns: 1fr 1fr; } }

/* Product card */
.product-card {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--white-10);
  border-radius: 1rem;
  overflow: hidden;
  transition: border-color .2s;
}
.product-card:hover { border-color: rgba(139,92,246,.5); }

.product-img-wrap {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(49,27,105,.5), rgba(76,29,149,.5));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.product-img-wrap:hover .product-img { transform: scale(1.05); }

.product-placeholder { font-size: 3.5rem; opacity: .3; }

.price-badge {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: var(--emerald-500);
  color: #fff;
  font-weight: 700;
  font-size: .875rem;
  padding: .2rem .75rem;
  border-radius: .5rem;
}

.stock-badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  background: var(--rose-500);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: .5rem;
}

.product-body { padding: 1rem; }
.product-cat  { font-size: .7rem; color: var(--violet-400); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .25rem; }
.product-name { font-size: 1.1rem; font-weight: 600; margin-bottom: .25rem; }
.product-desc { font-size: .875rem; color: rgba(221,214,254,.7); margin-bottom: .75rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Action buttons */
.btn-add {
  width: 100%;
  padding: .625rem;
  border-radius: .75rem;
  background: var(--violet-600);
  color: #fff;
  font-weight: 500;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  transition: background .2s;
}
.btn-add:hover { background: var(--violet-500); }

.btn-wa {
  display: flex;
  width: 100%;
  padding: .625rem;
  border-radius: .75rem;
  background: rgba(100,116,139,.3);
  color: #94a3b8;
  font-weight: 500;
  font-size: .9rem;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  text-decoration: none;
  transition: background .2s;
}
.btn-wa:hover { background: rgba(100,116,139,.5); }

.qty-ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(139,92,246,.2);
  border-radius: .75rem;
  padding: .4rem .75rem;
}
.qty-btn {
  background: none;
  border: none;
  color: var(--violet-300);
  font-size: 1.25rem;
  cursor: pointer;
  padding: .2rem .5rem;
  border-radius: .5rem;
  transition: background .2s;
}
.qty-btn:hover { background: var(--white-10); }
.qty-num { font-weight: 700; min-width: 2rem; text-align: center; }

/* ─── CART + FORM COLUMN ──────────────────────────────── */
.col-sidebar { display: flex; flex-direction: column; gap: 1rem; }

.sidebar-sticky {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.card {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--white-10);
  border-radius: 1rem;
  padding: 1.25rem;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Cart items */
.cart-empty { text-align: center; padding: 2rem; color: rgba(196,181,253,.5); font-size: .9rem; }

.cart-item {
  background: var(--white-10);
  border-radius: .75rem;
  padding: .75rem;
  margin-bottom: .5rem;
}
.cart-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.cart-item-name { font-weight: 500; flex: 1; margin-right: .5rem; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-remove { background: none; border: none; color: var(--rose-400); cursor: pointer; font-size: 1.1rem; padding: .2rem; border-radius: .4rem; transition: background .2s; }
.btn-remove:hover { background: rgba(244,63,94,.15); }

.cart-item-bottom { display: flex; justify-content: space-between; align-items: center; }
.cart-item-prices { text-align: right; }
.unit-price { font-size: .75rem; color: var(--violet-300); }
.sub-price { color: var(--emerald-400); font-weight: 700; }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  padding-top: .75rem;
  margin-top: .75rem;
  border-top: 1px solid var(--white-10);
}
.cart-total-row span:last-child { font-weight: 700; }

/* Form */
.form-group { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .75rem; }

.form-group label { font-size: .875rem; color: var(--violet-200); }

.form-input, .form-textarea {
  width: 100%;
  padding: .75rem 1rem;
  background: var(--white-10);
  border: 1px solid var(--white-20);
  border-radius: .75rem;
  color: #fff;
  font-size: .95rem;
  outline: none;
  transition: border .2s;
  font-family: var(--font);
}
.form-input:focus, .form-textarea:focus { border-color: var(--violet-500); }
.form-textarea { resize: none; rows: 2; }

.btn-submit {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: .75rem;
  background: linear-gradient(to right, var(--violet-600), var(--pink-500));
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: opacity .2s, transform .15s;
  margin-top: .5rem;
}
.btn-submit:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.btn-submit:disabled { opacity: .4; cursor: not-allowed; }

/* ─── FOOTER ─────────────────────────────────────────── */
footer {
  background: rgba(15,23,42,.8);
  border-top: 1px solid var(--white-10);
  padding: 2rem 1rem;
  text-align: center;
  color: rgba(196,181,253,.5);
  font-size: .875rem;
}

/* ─── LIGHTBOX ────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.95);
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox-media img,
.lightbox-media video {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: .75rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--white-10);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { background: var(--white-20); }

/* ─── TOAST ───────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.25rem;
  border-radius: .75rem;
  font-weight: 500;
  font-size: .9rem;
  animation: slideIn .3s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  min-width: 220px;
}
.toast-success { background: var(--emerald-600); color: #fff; }
.toast-error   { background: var(--rose-500);    color: #fff; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

/* ─── SUCCESS SCREEN ──────────────────────────────────── */
.success-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: linear-gradient(135deg, var(--slate-900), #3b1f6b, var(--slate-900));
  align-items: center;
  justify-content: center;
}
.success-screen.open { display: flex; }

.success-card {
  background: var(--white-10);
  border: 1px solid var(--white-20);
  border-radius: 1.5rem;
  padding: 2.5rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
}
.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--emerald-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
}
.success-card h2 { font-size: 2rem; margin-bottom: 1rem; }
.success-card p  { color: var(--violet-200); margin-bottom: 1.5rem; }

.btn-secondary {
  padding: .75rem 2rem;
  border-radius: .75rem;
  background: var(--violet-600);
  color: #fff;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
}
.btn-secondary:hover { background: var(--violet-500); }

/* ─── LOADING ─────────────────────────────────────────── */
.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(167,139,250,.3);
  border-top-color: var(--violet-400);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 4rem auto;
}

/* ─── SCROLL BAR ──────────────────────────────────────── */
.sidebar-sticky::-webkit-scrollbar { width: 4px; }
.sidebar-sticky::-webkit-scrollbar-track { background: transparent; }
.sidebar-sticky::-webkit-scrollbar-thumb { background: rgba(139,92,246,.4); border-radius: 99px; }

/* ─── UTILITIES ───────────────────────────────────────── */
.hidden  { display: none !important; }
.flex    { display: flex; }
.dimmed  { opacity: .5; }

/* ─── SVG ICON HELPERS ────────────────────────────────── */
svg.icon { width: 1.25em; height: 1.25em; vertical-align: middle; fill: currentColor; }
