:root{
  /* Base (igual al mockup) */
  --bg:#ffffff;
  --surface:#ffffff;
  --surface2:#f6f7fb;
  --stroke: rgba(15,23,42,.12);
  --text: rgba(15,23,42,.92);
  --muted: rgba(15,23,42,.62);

  /* Marca */
  --brand1:#1da1ff;
  --brand2:#ff2aa1;
  --warn:#ffb020;
  --ok:#1dd37a;

  --shadow: 0 18px 45px rgba(2,6,23,.10);
  --r: 18px;
  --r2: 26px;
  --max: 1200px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 700px at 10% -10%, rgba(29,161,255,.14), transparent 55%),
    radial-gradient(1000px 700px at 95% 0%, rgba(255,42,161,.12), transparent 55%),
    radial-gradient(900px 600px at 60% 120%, rgba(255,176,32,.10), transparent 55%),
    var(--bg);
  overflow-x:hidden;
}
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
button, input { font: inherit; }

.container{ width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }

/* TOPBAR (degradado como tu mockup) */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(
    90deg,
    #3b82f6 0%,
    #6366f1 25%,
    #ec4899 55%,
    #f97316 85%
  );
  border-bottom: 1px solid rgba(255,255,255,.18);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px;
  padding: 14px 0;
}

/* Brand */
.brand{ display:flex; align-items:center; gap:12px; min-width: 220px; }
.brand-text{
  font-weight: 900;
  letter-spacing: .2px;
  color:#fff;
}
.brand-text span{ opacity:.9; }

/* Search */
.search{
  flex: 1;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.9);
  border-radius: 999px;
  max-width: 680px;
  box-shadow: 0 10px 25px rgba(2,6,23,.06);
}
.search input{
  width:100%;
  background: transparent;
  border:0;
  color: var(--text);
  outline:none;
  min-width: 0; /* evita overflow en móvil */
}
.pill{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(15,23,42,.04);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

/* Actions */
.actions{ display:flex; align-items:center; gap:10px; }
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.85);
  color: var(--text);
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
  user-select:none;
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,1);
  border-color: rgba(15,23,42,.16);
  box-shadow: 0 14px 28px rgba(2,6,23,.08);
}
.btn.primary{
  border-color: rgba(29,161,255,.30);
  background: linear-gradient(135deg, rgba(29,161,255,.20), rgba(255,42,161,.16));
}
.btn .dot{
  width:10px; height:10px; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  box-shadow: 0 0 0 4px rgba(29,161,255,.14);
}
.cart-badge{
  margin-left: -6px;
  display:inline-flex; align-items:center; justify-content:center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand2), var(--warn));
  color: #111;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 10px 20px rgba(2,6,23,.10);
}

/* Subnav chips */
.subnav{
  display:flex;
  gap:10px;
  padding-bottom: 14px;
  overflow:auto;
}
.chip{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.85);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(2,6,23,.05);
}
.chip.active{
  background: rgba(29,161,255,.14);
  color: rgba(15,23,42,.92);
  border-color: rgba(29,161,255,.25);
}

/* Responsive básico */
@media (max-width: 980px){
  .brand{ min-width: 160px; }
  .pill{ display:none; }
}

/* ✅ Navbar responsive: el buscador NO desaparece, solo se reordena en móvil */
@media (max-width: 768px){

  .nav{
    flex-wrap: wrap;              /* permite varias filas */
    justify-content: flex-start;  /* evita el “space-between” raro */
    gap: 12px;
  }

  .brand{
    min-width: 0;
    flex: 1 0 100%;               /* fila 1: logo */
  }

  .search{
    flex: 1 0 100%;               /* fila 2: buscador full width */
    max-width: none;
  }

  .actions{
    flex: 1 0 100%;               /* fila 3: botones */
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  /* opcional: esconder el botón “Buscar” para ahorrar espacio */
  .pill{
    display:none;
  }
}

.gradText{
  background: linear-gradient(90deg,var(--brand1),var(--brand2),var(--warn));
  -webkit-background-clip:text;
  background-clip:text;
  color: transparent;
}

/* ===== HOME (HERO + SECCIONES + CARDS + FOOTER + DRAWER) ===== */

/* Hero */
.hero{ padding: 28px 0 18px; }
.heroGrid{
  display:grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 16px;
}
.heroCard{
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.82);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
  overflow:hidden;
  position: relative;
  min-height: 280px;
}
.heroCard::before{
  content:"";
  position:absolute; inset:-2px;
  background:
    radial-gradient(520px 240px at 25% 35%, rgba(29,161,255,.16), transparent 60%),
    radial-gradient(520px 240px at 70% 0%, rgba(255,42,161,.12), transparent 60%),
    radial-gradient(520px 240px at 70% 100%, rgba(255,176,32,.10), transparent 60%);
  pointer-events:none;
}
.heroInner{
  position:relative;
  padding: 22px 22px 18px;
  display:flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}
h1{
  margin:0;
  font-size: clamp(26px, 3.2vw, 44px);
  line-height:1.05;
  letter-spacing: -0.02em;
}
.lead{
  margin:0;
  color: var(--muted);
  font-size: 15px;
  max-width: 60ch;
}
.heroRow{
  margin-top:auto;
  display:flex;
  gap:10px;
  flex-wrap: wrap;
}
.statRow{ display:flex; gap:12px; flex-wrap:wrap; margin-top: 6px; }
.stat{
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.9);
  border-radius: 14px;
  padding: 10px 12px;
  min-width: 160px;
  box-shadow: 0 10px 22px rgba(2,6,23,.05);
}
.stat b{ display:block; font-size: 13px; }
.stat span{ color: var(--muted); font-size: 12px; }

.sideStack{ display:flex; flex-direction: column; gap: 16px; }
.miniCard{
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.85);
  border-radius: var(--r2);
  padding: 16px;
  box-shadow: var(--shadow);
}
.miniTitle{
  display:flex; align-items:center; justify-content:space-between;
  gap: 10px; margin-bottom: 8px;
}
.miniTitle b{ font-size: 14px; }
.miniTitle span{ color: var(--muted); font-size: 12px; }

.progress{
  height: 10px;
  border-radius: 999px;
  background: rgba(15,23,42,.06);
  overflow:hidden;
  border: 1px solid var(--stroke);
}
.progress > i{
  display:block;
  height: 100%;
  width: 68%;
  background: linear-gradient(90deg, var(--brand1), var(--brand2), var(--warn));
}

/* Sections */
.section{ padding: 12px 0 26px; }
.sectionHeader{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap: 14px;
  margin: 14px 0 12px;
}
.sectionHeader h2{ margin:0; font-size: 18px; letter-spacing: -0.01em; }
.sectionHeader p{ margin:0; color: var(--muted); font-size: 13px; }

.grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.card{
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.88);
  border-radius: var(--r2);
  overflow:hidden;
  box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.card:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,1);
  border-color: rgba(15,23,42,.16);
  box-shadow: 0 22px 55px rgba(2,6,23,.12);
}
.thumb{
  aspect-ratio: 4/3;
  background:
    radial-gradient(420px 160px at 25% 20%, rgba(29,161,255,.16), transparent 55%),
    radial-gradient(420px 160px at 75% 40%, rgba(255,42,161,.12), transparent 55%),
    rgba(15,23,42,.03);
  border-bottom: 1px solid var(--stroke);
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(15,23,42,.35);
  font-weight: 800;
  letter-spacing: .06em;
}
.cardBody{
  padding: 12px;
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.titleRow{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
}
.card h3{ margin:0; font-size: 14px; letter-spacing: -0.01em; }
.meta{ color: var(--muted); font-size: 12px; display:flex; gap: 8px; flex-wrap: wrap; }
.priceRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-top: 4px;
}
.price{ font-size: 15px; font-weight: 800; }
.strike{ color: rgba(15,23,42,.40); text-decoration: line-through; font-weight: 600; font-size: 12px; margin-left: 6px; }

.tag{
  font-size: 11px;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(15,23,42,.03);
  color: var(--muted);
}
.tag.ok{ border-color: rgba(29,211,122,.28); background: rgba(29,211,122,.10); color: rgba(15,23,42,.86); }
.tag.hot{ border-color: rgba(255,42,161,.28); background: rgba(255,42,161,.10); color: rgba(15,23,42,.86); }

/* Cart Drawer */
.drawer{
  position: fixed;
  top:0; right:0;
  height: 100%;
  width: min(420px, 92vw);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(18px);
  border-left: 1px solid var(--stroke);
  box-shadow: -16px 0 70px rgba(2,6,23,.18);
  transform: translateX(102%);
  transition: transform .18s ease;
  z-index: 80;
  display:flex;
  flex-direction: column;
}
.drawer.open{ transform: translateX(0); }
.drawerHeader{
  padding: 16px;
  border-bottom: 1px solid var(--stroke);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
.drawerHeader b{ font-size: 14px; }
.drawerBody{
  padding: 14px 16px;
  overflow:auto;
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.item{
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.92);
  border-radius: 16px;
  padding: 10px;
  display:flex;
  gap: 10px;
  align-items:center;
  box-shadow: 0 10px 25px rgba(2,6,23,.08);
}
.itemThumb{
  width: 54px; height: 54px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(15,23,42,.03);
  display:flex; align-items:center; justify-content:center;
  color: rgba(15,23,42,.35);
  font-weight: 900;
  flex: 0 0 auto;
}
.itemInfo{ flex:1; }
.itemInfo b{ display:block; font-size: 13px; }
.itemInfo span{ display:block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.qty{
  display:flex; align-items:center; gap: 8px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 6px 8px;
  background: rgba(15,23,42,.03);
}
.qty button{
  border:0;
  background: transparent;
  color: var(--text);
  cursor:pointer;
  padding: 2px 6px;
  border-radius: 8px;
}
.drawerFooter{
  margin-top:auto;
  padding: 14px 16px;
  border-top: 1px solid var(--stroke);
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.totals{
  display:flex;
  justify-content:space-between;
  color: var(--muted);
  font-size: 13px;
}
.totals b{ color: var(--text); }

.overlay{
  position: fixed; inset:0;
  background: rgba(2,6,23,.35);
  opacity:0;
  pointer-events:none;
  transition: opacity .18s ease;
  z-index: 70;
}
.overlay.show{
  opacity: 1;
  pointer-events:auto;
}

/* Footer */
footer{
  border-top: 1px solid var(--stroke);
  background: rgba(15,23,42,.02);
  padding: 22px 0;
  margin-top: 18px;
}
.footerGrid{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 14px;
}
.footerBrand{ display:flex; flex-direction:column; gap: 10px; }
.footerLogo{ width: 150px; opacity:.95; }
.footerTitle{ font-weight: 800; letter-spacing: -0.01em; margin: 0; }
.footerText{ color: var(--muted); margin: 0; font-size: 13px; }
.links{ display:flex; flex-direction:column; gap: 8px; }
.links a{ color: var(--muted); font-size: 13px; }
.links a:hover{ color: rgba(15,23,42,.92); }

/* Responsive */
@media (max-width: 980px){
  .heroGrid{ grid-template-columns: 1fr; }
  .grid{ grid-template-columns: repeat(2, 1fr); }
  .footerGrid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px){
  .grid{ grid-template-columns: 1fr; }
  .footerGrid{ grid-template-columns: 1fr; }
}

/* Auth */
.authWrap{ padding: 26px 0; }
.authCard{
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.86);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.authInner{ padding: 18px; }
.authTitle{ margin:0; font-size: 28px; letter-spacing: -0.02em; }
.authText{ margin:8px 0 0; color: var(--muted); font-size: 13px; }

.field{ display:flex; flex-direction:column; gap:6px; }
.label{ color: var(--muted); font-size: 13px; font-weight: 700; }
.input{
  width:100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.9);
  outline:none;
}
.input:focus{
  border-color: rgba(29,161,255,.35);
  box-shadow: 0 0 0 4px rgba(29,161,255,.12);
}
.error{
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
}
.authLinks{
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}
.authLinks a{ text-decoration: underline; }

/* WhatsApp float */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 26px;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}

/* Spinner pequeño dentro del botón */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
}

.btn.loading .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top: 2px solid #fff;
  border-radius: 50%;
  display: inline-block;
  margin-left: 8px;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ✅ Si todavía tienes el form.mobileSearch en el Blade, lo ocultamos siempre
   (ya no hace falta si el buscador del navbar funciona en móvil) */
.mobileSearch { display: none !important; }
