:root{
  --white:#fff;
  --sky:#8ED3F4;
  --sky-soft:#EAF7FD;
  --lilac:#CBB6F3;
  --lilac-soft:#F4EFFD;
  --purple:#5A2D9C;
  --purple-deep:#35185F;
  --ink:#241743;
  --muted:#6B6285;
  --line:#E6DFF3;
}
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{font-family:system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;color:var(--ink);background:var(--white);line-height:1.45;font-size:16px}
img{display:block;max-width:100%}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
a{color:inherit}
:focus-visible{outline:3px solid var(--purple);outline-offset:2px}
.wrap{width:min(1120px,100% - 32px);margin-inline:auto}

/* ---------- Cabecera ---------- */
.hero{position:relative;overflow:hidden;padding:30px 0 60px;
  background:linear-gradient(135deg,var(--sky) 0%,#B4C9F5 52%,var(--lilac) 100%)}
.hero::before,.hero::after{content:"";position:absolute;border-radius:50%;background:rgba(255,255,255,.35);pointer-events:none}
.hero::before{width:260px;height:260px;right:-70px;top:-90px}
.hero::after{width:150px;height:150px;right:90px;bottom:-80px;background:rgba(255,255,255,.28)}
.brand{display:flex;align-items:center;gap:16px;position:relative;z-index:1}
.logo{flex:0 0 auto;width:72px;height:72px;border-radius:50%;background:var(--white);display:grid;place-items:center;overflow:hidden;box-shadow:0 6px 20px rgba(53,24,95,.18)}
.logo img{width:100%;height:100%;object-fit:contain;padding:6px}
.logo span{font-family:'Bricolage Grotesque',sans-serif;font-weight:800;font-size:34px;color:var(--purple)}
h1{font-family:'Bricolage Grotesque','Figtree',sans-serif;font-weight:800;color:var(--purple-deep);font-size:clamp(30px,7.5vw,56px);line-height:1;letter-spacing:-.025em}
.tag{margin-top:8px;color:var(--purple-deep);font-weight:500;font-size:15px;max-width:34ch}

/* ---------- Búsqueda ---------- */
.search{position:relative;margin-top:-30px;z-index:2}
.search svg{position:absolute;left:20px;top:50%;transform:translateY(-50%);color:var(--purple);pointer-events:none}
.search input{width:100%;height:60px;border-radius:30px;border:2px solid var(--white);background:var(--white);padding:0 20px 0 52px;font:inherit;font-size:17px;color:var(--ink);box-shadow:0 10px 28px rgba(90,45,156,.2)}
.search input::placeholder{color:#8B82A3}
.search input:focus{outline:3px solid var(--purple);outline-offset:2px}

/* ---------- Categorías ---------- */
.chips{display:flex;gap:8px;overflow-x:auto;padding:22px 2px 6px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:0 0 auto;height:44px;padding:0 20px;border-radius:22px;border:1.5px solid var(--lilac);background:var(--white);color:var(--purple);font-weight:600}
.chip:hover{background:var(--lilac-soft)}
.chip[aria-pressed="true"]{background:var(--purple);border-color:var(--purple);color:var(--white)}

/* ---------- Secciones ---------- */
section{margin-top:26px}
h2{font-family:'Bricolage Grotesque','Figtree',sans-serif;font-weight:700;font-size:24px;letter-spacing:-.01em;color:var(--purple-deep)}
.sec-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.count{color:var(--muted);font-size:14px}
.msg{margin-top:20px;padding:16px;border-radius:14px;background:var(--lilac-soft);color:var(--purple-deep)}

.rail{display:flex;gap:12px;overflow-x:auto;margin:12px -16px 0;padding:0 16px 10px;scroll-snap-type:x proximity;scrollbar-width:none}
.rail::-webkit-scrollbar{display:none}
.rail .card{flex:0 0 156px;scroll-snap-align:start}
.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px 12px;margin-top:14px}

.card{display:block;width:100%;text-align:left}
.ph{position:relative;aspect-ratio:4/5;border-radius:14px;overflow:hidden;background:var(--lilac-soft)}
.ph img{width:100%;height:100%;object-fit:cover;transition:transform .35s}
.card:hover .ph img{transform:scale(1.03)}
.card.sold .ph img{filter:grayscale(.85) opacity(.6)}
.badge{position:absolute;left:8px;top:8px;background:var(--white);color:var(--purple);font-weight:700;font-size:13px;padding:4px 10px;border-radius:999px}
.multi{position:absolute;right:8px;top:8px;background:rgba(36,23,67,.65);color:#fff;font-size:12px;font-weight:600;padding:3px 8px;border-radius:999px}
.card h3{margin-top:10px;font-size:15px;font-weight:500;color:var(--ink);line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.card .price{margin-top:2px;font-weight:700;font-size:18px;color:var(--purple)}
.empty{margin-top:28px;text-align:center;color:var(--muted);padding:32px 0}
.foot{margin-top:56px;padding:28px 0 96px;background:var(--lilac-soft);color:var(--purple);font-family:'Bricolage Grotesque',sans-serif;font-weight:700;text-align:center}

/* ---------- Detalle ---------- */
dialog{border:0;padding:0;background:var(--white);color:var(--ink);width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;overflow:auto}
dialog::backdrop{background:rgba(36,23,67,.55)}
.x{position:absolute;right:12px;top:12px;z-index:5;width:44px;height:44px;border-radius:50%;background:var(--white);color:var(--purple-deep);display:grid;place-items:center;box-shadow:0 4px 14px rgba(36,23,67,.25)}
.gal-wrap{position:relative;background:var(--lilac-soft)}
.gal{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
.gal::-webkit-scrollbar{display:none}
.gal img{flex:0 0 100%;scroll-snap-align:center;aspect-ratio:4/5;object-fit:cover;max-height:72dvh;width:100%}
.arrow{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.92);color:var(--purple-deep);font-size:28px;line-height:1;display:none;place-items:center;box-shadow:0 4px 14px rgba(36,23,67,.2)}
.arrow.prev{left:10px}.arrow.next{right:10px}
.has-many .arrow{display:grid}
.dots{position:absolute;left:0;right:0;bottom:12px;display:flex;justify-content:center;gap:7px}
.dots i{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.7);box-shadow:0 0 0 1px rgba(36,23,67,.2)}
.dots i.on{background:var(--purple);box-shadow:none}
.info{padding:22px 20px 32px}
.pcat{color:var(--purple);font-weight:600;font-size:14px}
.info h3{font-family:'Bricolage Grotesque',sans-serif;font-weight:800;font-size:28px;line-height:1.1;letter-spacing:-.015em;margin-top:4px;color:var(--purple-deep)}
.pprice{font-size:32px;font-weight:700;color:var(--purple);margin-top:10px}
.pstate{display:inline-block;margin-top:8px;padding:4px 12px;border-radius:999px;background:var(--lilac-soft);color:var(--purple);font-weight:600;font-size:14px}
.pdesc{margin-top:14px;color:var(--muted);white-space:pre-line;max-width:60ch}
.wa{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:22px;height:58px;border-radius:29px;background:#1B8F4F;color:#fff;font-weight:700;font-size:17px;text-decoration:none}
.wa:hover{background:#157740}
.wa[hidden]{display:none}

@media (min-width:700px){
  .grid{grid-template-columns:repeat(3,1fr);gap:28px 18px}
  .rail .card{flex-basis:190px}
  .hero{padding:44px 0 72px}
  .logo{width:92px;height:92px}
  dialog{width:min(900px,calc(100% - 48px));height:auto;max-height:calc(100dvh - 48px);margin:auto;border-radius:24px}
  .pd-grid{display:grid;grid-template-columns:1fr 1fr}
  .gal img{max-height:none}
  .info{padding:48px 32px 32px;align-self:center}
}
@media (min-width:1000px){
  .grid{grid-template-columns:repeat(4,1fr)}
  .rail{margin-inline:0;padding-inline:0}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* ---------- Botón fijo de WhatsApp ---------- */
.fab{position:fixed;right:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:20;display:flex;align-items:center;gap:8px;height:56px;padding:0 20px 0 16px;border-radius:28px;background:#1B8F4F;color:#fff;font-weight:700;font-size:16px;text-decoration:none;box-shadow:0 8px 22px rgba(36,23,67,.32)}
.fab:hover{background:#157740}
.fab[hidden]{display:none}
