:root{
  --bg:#0b1020;
  --panel:rgba(255,255,255,.06);
  --panel2:rgba(255,255,255,.09);
  --stroke:rgba(255,255,255,.12);
  --text:#eaf0ff;
  --muted:rgba(234,240,255,.72);
  --shadow:0 20px 60px rgba(0,0,0,.45);
  --radius:18px;
  --radius2:22px;
  --max:1120px;
  --brand1:#6d28d9;
  --brand2:#0ea5e9;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,"Apple Color Emoji","Segoe UI Emoji";
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(109,40,217,.55), transparent 55%),
    radial-gradient(900px 600px at 90% 0%, rgba(14,165,233,.45), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(16,185,129,.22), transparent 60%),
    var(--bg);
  color:var(--text);
  line-height:1.5;
}

a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}

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

/* =========================
   TOPBAR
========================= */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:blur(14px);
  background:rgba(11,16,32,.55);
  border-bottom:1px solid var(--stroke);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
  flex-wrap:wrap;              /* ✅ permite wrap real */
}
.brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:240px;             /* ✅ evita que se aplaste */
}
.brand img{
  width:150px;
  height:60px;
  object-fit:contain;
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}
.nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;              /* ✅ nav se adapta */
}
.nav a{
  padding:8px 10px;
  border-radius:12px;
  color:var(--muted);
  white-space:nowrap;
}
.nav a:hover{background:var(--panel2);color:var(--text)}

.actions{
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto;
  flex-wrap:wrap;              /* ✅ acciones wrap */
}
.actions input[type="search"],
.actions select{
  height:40px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.06);
  color:var(--text);
  padding:0 12px;
  outline:none;
}
.actions input[type="search"]{width:min(360px,44vw)}
.actions select{min-width:110px;cursor:pointer}
.actions input::placeholder{color:rgba(234,240,255,.45)}

/* =========================
   HERO
========================= */
.hero{padding:48px 0 26px}
.hero-grid{
  display:grid;
  grid-template-columns:1.35fr .65fr;
  gap:22px;
  align-items:stretch;
}
.hero h1{
  font-size:clamp(30px,4.2vw,54px);
  line-height:1.06;
  margin:0 0 12px;
  letter-spacing:-.02em;
}
.hero p{
  margin:0;
  color:var(--muted);
  font-size:clamp(14px,1.55vw,18px);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:44px;
  padding:0 16px;
  border-radius:14px;
  background:linear-gradient(135deg,var(--brand1),var(--brand2));
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 14px 34px rgba(0,0,0,.28);
  font-weight:700;
  transition:transform .12s ease;
}
.btn.ghost{background:rgba(255,255,255,.06);box-shadow:none}
.btn:hover{transform:translateY(-1px)}
.btn:active{transform:translateY(0)}

.pills{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.pill{
  font-size:12px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.04);
  color:rgba(234,240,255,.78);
}

/* HERO CARD */
.hero-card{
  border-radius:var(--radius2);
  border:1px solid var(--stroke);
  background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.05));
  box-shadow:var(--shadow);
  overflow:hidden;
  min-height:100%;
}
.hero-card-top{
  display:flex;
  gap:8px;
  padding:14px 16px;
  border-bottom:1px solid var(--stroke);
}
.dot{width:10px;height:10px;border-radius:999px;background:rgba(255,255,255,.35)}
.hero-card-body{padding:18px;display:grid;gap:12px}
.metric{display:flex;align-items:baseline;justify-content:space-between;gap:14px}
.metric strong{font-size:22px}
.metric span{color:rgba(234,240,255,.7);font-size:13px}

/* =========================
   SECTIONS + TOOLBAR
========================= */
.section{padding:26px 0}
.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
  flex-wrap:wrap; /* ✅ */
}
.section-head h2{margin:0;font-size:24px}
.mini{color:rgba(234,240,255,.62);font-size:13px}
code{
  background:rgba(255,255,255,.08);
  padding:2px 6px;
  border-radius:8px;
  border:1px solid var(--stroke);
}

.toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.04);
  border-radius:var(--radius2);
  padding:12px;
  margin:12px 0 16px;
  flex-wrap:wrap; /* ✅ */
}
.filters{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.filters select{
  height:40px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.06);
  color:var(--text);
  padding:0 12px;
  outline:none;
}

/* =========================
   GRID
========================= */
.grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
}

/* Breakpoints */
@media (max-width:1100px){
  .grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .hero-grid{grid-template-columns:1fr} /* ✅ hero stack */
  .hero-card{min-height:auto}
}
@media (max-width:860px){
  .grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:620px){
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .topbar-inner{flex-direction:column;align-items:stretch}
  .brand{min-width:unset;justify-content:space-between}
  .actions{width:100%;margin-left:0}
  .actions input[type="search"]{width:100%}
  .actions select{width:100%}
  .nav{width:100%}
}
@media (max-width:420px){
  .grid{grid-template-columns:1fr} /* ✅ 1 columna real */
  .container{padding:0 14px}
  .hero{padding:34px 0 18px}
  .btn{width:100%} /* ✅ CTAs full width */
}

/* =========================
   CARDS
========================= */
.card{
  border-radius:var(--radius);
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.04);
  overflow:hidden;
  transition:transform .15s ease,background .15s ease;
  display:flex;
  flex-direction:column; /* ✅ mejor comportamiento */
}
.card:hover{transform:translateY(-2px);background:rgba(255,255,255,.06)}
.media{position:relative}
.media img{
  width:100%;
  aspect-ratio:16/10;
  object-fit:cover;
  background:rgba(0,0,0,.2);
}
.badge{
  position:absolute;
  top:10px;
  left:10px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.9);
  color:#111827;
  font-weight:800;
  font-size:11px;
}
.meta{padding:12px 12px 0}
.title{margin:0 0 6px;font-size:15px;letter-spacing:-.01em}
.desc{margin:0;color:rgba(234,240,255,.65);font-size:12.5px;min-height:36px}
.row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px}
.price{font-weight:900}
.rating{color:rgba(234,240,255,.75);font-size:12px}
.actions-row{padding:0 12px 12px;margin-top:auto}
.buybtn{
  display:flex;
  align-items:center;
  justify-content:center;
  height:40px;
  border-radius:14px;
  background:rgba(255,255,255,.08);
  border:1px solid var(--stroke);
  font-weight:800;
}
.buybtn:hover{background:rgba(255,255,255,.12)}

/* =========================
   EMPTY + FOOTER
========================= */
.empty{
  border:1px dashed rgba(255,255,255,.22);
  background:rgba(255,255,255,.03);
  border-radius:var(--radius2);
  padding:16px;
}

.footer{
  border-top:1px solid var(--stroke);
  margin-top:22px;
  background:rgba(0,0,0,.08);
}
.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 0;
  flex-wrap:wrap; /* ✅ */
}
@media (max-width:620px){
  .footer-inner{flex-direction:column;align-items:flex-start}
}


/* ================================
   TOPBAR – MOBILE FIX
================================ */

/* Desktop (default) */
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ================================
   MOBILE
================================ */
@media (max-width: 768px) {

  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .brand img {
    width: 120px;
    height: auto;
  }

  .nav {
    gap: 10px;
  }

  .actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .actions input[type="search"],
  .actions select {
    width: 100%;
    height: 44px;
    font-size: 16px; /* evita zoom iOS */
  }
}

/* ================================
   FLOATING WHATSAPP BUTTON
================================ */
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #25D366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  box-shadow: 0 14px 34px rgba(0,0,0,.35);
  transition: transform .2s ease, box-shadow .2s ease;
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
}

.whatsapp-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}

/* Mobile safe area (iOS) */
@media (max-width: 768px) {
  .whatsapp-float {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
  }
}

