:root{
  --brand:#e11d2f; --accent:#0078ff;
  --ink:#e5e7eb; --muted:#9aa5b1; --bg:#0a0a0b;
  --panel:#101114; --card:#111318;
  --radius:16px; --shadow:0 10px 30px rgba(0,0,0,.28);
  --shadow-lg:0 18px 50px rgba(0,0,0,.35);
  --gap:16px; --gap-m:12px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--ink); background:linear-gradient(180deg,var(--bg),#0b0b0e)
}
a{color:inherit; text-decoration:none}
img{max-width:100%; display:block}

/* Banner */
.cotizacion-banner{
  position:sticky; top:0; z-index:1000;
  background:linear-gradient(90deg,#b50f22,#e11d2f,#b50f22);
  background-size:220% 100%; color:#fff; text-align:center;
  padding:6px 12px; min-height:30px; font-weight:800; font-size:.86rem; letter-spacing:.3px;
  display:flex; justify-content:center; gap:10px; align-items:center;
  box-shadow:0 2px 6px rgba(0,0,0,.25); cursor:pointer;
}
@media (prefers-reduced-motion:no-preference){
  .cotizacion-banner{animation:bannerflow 7s linear infinite}
  @keyframes bannerflow{0%{background-position:0 0}100%{background-position:220% 0}}
}

/* Header */
header{background:linear-gradient(180deg,#0b0b0e,#0a0a0b); color:#fff; box-shadow:var(--shadow)}
.wrap{max-width:1200px; margin:0 auto; padding:0 var(--gap)}
.head{display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:16px; padding:22px 0}
.logo{display:flex; align-items:center; gap:12px}
.logo img{width:60px; height:60px; border-radius:50%; border:3px solid #e5e7eb; background:#111}
.brand h1{font-size:clamp(18px,2.2vw,26px); margin:0; font-weight:800; letter-spacing:.2px}
.brand p{margin:2px 0 0; color:#c9d2dc; font-size:.92rem}

.social{display:flex; gap:12px; align-items:center}
.social .social-link{font-size:18px; color:#cbd5e1; opacity:.9}
.social .social-link:hover{color:#fff; opacity:1}
.social .wa:hover{color:#25D366}
.social .fb:hover{color:#1877F2}
.social .ms:hover{color:#0099FF}
.social .ig:hover{color:#E1306C}
.admin-link{font-size:.85rem; color:#d1d5db; border:1px dashed #2a2f36; padding:4px 8px; border-radius:999px}
.admin-link:hover{color:#fff; border-style:solid}

/* Hero */
.hero{display:block; padding:14px 0 24px}
.hero-card{background:var(--panel); border:1px solid #1c1f25; padding:20px; border-radius:var(--radius); box-shadow:var(--shadow-lg)}
.hero h2{font-size:clamp(20px,3vw,32px); margin:0 0 8px; color:#fff}
.hero p{margin:0 0 14px; color:#cbd5e1}

/* Botones */
.cta-row{display:grid; grid-template-columns:auto auto; gap:10px; justify-content:flex-start}
.btn{display:inline-flex; align-items:center; justify-content:center; padding:6px 10px; border-radius:10px; border:0; font-weight:800; cursor:pointer; min-height:28px; font-size:.86rem; line-height:1; transition:transform .12s ease, box-shadow .2s ease}
.btn.whatsapp{background:var(--brand); color:#fff}
.btn.messenger{background:var(--accent); color:#001429}
.badges{display:flex; gap:10px; margin-top:12px; flex-wrap:wrap}
.badge{background:#1a0f12; color:#fecaca; border:1px solid #3b0f16; padding:6px 10px; border-radius:999px; font-size:.82rem; font-weight:700}

/* Tools */
.tools{display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin:22px 0}
.search{position:relative; flex:1 1 260px}
.search input{width:100%; padding:12px 14px; border-radius:12px; border:1px solid #262a31; background:#0f1116; color:#e5e7eb; font-size:1rem; box-shadow:var(--shadow)}
.chips{display:flex; gap:10px; flex-wrap:wrap}
.chip{padding:9px 12px; border-radius:999px; background:#0f1116; color:#cbd5e1; border:1px solid #262a31; cursor:pointer; font-weight:700; font-size:.95rem; transition:all .15s}
.chip.active,.chip:hover{background:var(--brand); color:#fff; border-color:transparent}

/* Grid / Cards */
.grid{display:grid; grid-template-columns:repeat(12,1fr); gap:var(--gap)}
.card{grid-column:span 6; background:var(--card); border:1px solid #1c1f25; border-radius:16px; overflow:hidden; box-shadow:var(--shadow); position:relative; isolation:isolate; transition:transform .2s ease, box-shadow .25s ease}
.card:hover{transform:translateY(-2px); box-shadow:var(--shadow-lg)}
.card-media{background:#0b0c0e; position:relative; width:100%; aspect-ratio:auto}
.card-media img{width:100%; height:auto; object-fit:cover; display:block; border-bottom:1px solid #1c1f25}
.skeleton{position:absolute; inset:0; background:linear-gradient(90deg,#0e1014 25%,#0b0c10 37%,#0e1014 63%); background-size:400% 100%; animation:shimmer 1.4s infinite}
@keyframes shimmer{0%{background-position:100% 0}100%{background-position:0 0}}
.card-body{padding:10px}
@media (min-width:1200px){ .card{grid-column:span 4} } /* 3 columnas escritorio */

.num{position:absolute;top:10px;right:10px;background:rgba(225,29,47,.92);color:#fff;font-weight:800;padding:6px 9px;border-radius:999px;font-size:.9rem;z-index:3}
.edit-btn{position:absolute;left:10px;top:10px;background:#14161b;color:#fff;border:1px solid #2a2d34;width:28px;height:28px;border-radius:8px;display:none;align-items:center;justify-content:center;z-index:5;cursor:pointer;opacity:.95}
body.admin .edit-btn{display:flex}
.actions{display:flex; gap:8px; margin-top:8px}
.action{flex:1; display:inline-flex; align-items:center; justify-content:center; padding:4px 8px; min-height:26px; border-radius:10px; border:1px solid #262a31; background:#0f1116; color:#e5e7eb; font-weight:800; cursor:pointer; font-size:.84rem; line-height:1}
.action.primary{background:var(--brand); color:#fff; border-color:transparent}
.row-note{grid-column:1 / -1; background:#0f1116; border:1px dashed #2a2d34; color:#cbd5e1; padding:8px 12px; border-radius:12px; display:flex; align-items:center; gap:10px; box-shadow:var(--shadow); font-size:.86rem; line-height:1.35; flex-wrap:wrap}

/* Lightbox */
.lightbox{position:fixed; inset:0; background:rgba(0,0,0,.75); display:none; align-items:center; justify-content:center; z-index:1002; padding:20px}
.lightbox.open{display:flex}
.lightbox-inner{background:#0b0b0e; color:#fff; width:min(1080px,96vw); border-radius:18px; overflow:hidden; box-shadow:var(--shadow-lg)}
.lightbox-media{background:#111318; display:grid; place-items:center}
.lightbox-media img{max-height:70vh; width:100%; object-fit:contain}
.lightbox-body{padding:16px; display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between}
.lightbox-actions{display:flex; gap:10px; flex-wrap:wrap}

/* Carousel */
.carousel{overflow:hidden; background:#0f1116; border:1px solid #1c1f25; border-left:0; border-right:0; margin:20px 0; padding:10px 0}
.carousel-track{display:flex; gap:10px; animation:scroll 30s linear infinite; will-change:transform}
.carousel-track img{height:84px; width:auto; border-radius:8px; box-shadow:0 4px 12px rgba(0,0,0,.2)}
@keyframes scroll{0%{transform:translateX(0)}100%{transform:translateX(-50%)}}
@media (prefers-reduced-motion:reduce){.carousel-track{animation:none; justify-content:center; flex-wrap:wrap}}

/* Floating */
.floating-cta{position:fixed; right:18px; bottom:8px; display:flex; flex-direction:column; gap:12px; z-index:1001}
.fab{width:44px; height:44px; border-radius:50%; display:grid; place-items:center; box-shadow:var(--shadow-lg); border:0; cursor:pointer; font-weight:800; font-size:.8rem}
.fab.whatsapp{background:var(--brand); color:#fff}
.fab.top{background:#0f1116; color:#fff}

/* Form / Mapa */
#contactForm{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; max-width:820px}
#contactForm input,#contactForm textarea{width:100%; padding:12px 14px; border-radius:12px; border:1px solid #262a31; background:#0f1116; color:#e5e7eb; font-size:1rem}
#contactForm textarea{min-height:120px; grid-column:1 / -1}
#contactForm button{width:auto; justify-self:start}
#contactForm input:focus,#contactForm textarea:focus{outline:none; border-color:#e11d2f; box-shadow:0 0 0 3px rgba(225,29,47,.25)}
@media(max-width:560px){ #contactForm{grid-template-columns:1fr} #contactForm button{width:100%; justify-self:stretch} }

.contact-rows{display:flex; flex-wrap:wrap; gap:14px; align-items:center; margin-bottom:8px}
.mapbox{border-radius:12px; overflow:hidden; border:1px solid #1c1f25}

footer{margin-top:40px; background:#0b0b0e; color:#b8c0cc; text-align:center; padding:20px}

/* Admin popover */
.popover{position:absolute; z-index:1200; background:#0f1116; border:1px solid #262a31; border-radius:12px; padding:10px; box-shadow:var(--shadow)}

/* ===== Ofertas ===== */
.offers{display:none; margin-top:16px}
.offers.show{display:block}

.offers-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin-bottom:12px;
}
.offers-head h2{
  margin:0;
  font-size:clamp(20px,3vw,28px);
  background:linear-gradient(90deg,#fff 0%, #ffd166 40%, #ff6b6b 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  letter-spacing:.3px; font-weight:900;
  text-shadow:0 0 20px rgba(255,107,107,.15);
}

.offers-actions .btn{
  padding:8px 12px; border-radius:12px; font-weight:800; border:0; cursor:pointer;
  background:linear-gradient(90deg,#22c55e,#16a34a); color:#05170a;
  box-shadow:0 8px 24px rgba(34,197,94,.25);
}

.offers-grid{
  display:grid; gap:12px;
  grid-template-columns:repeat(12,1fr);
}
.offer-card{
  grid-column:span 12;
  position:relative; overflow:hidden; border-radius:16px;
  background:radial-gradient(1200px 400px at -10% -10%, #3b82f6 10%, transparent 40%) no-repeat,
             radial-gradient(900px 300px at 120% 120%, #ef4444 10%, transparent 40%) no-repeat,
             #111318;
  border:1px solid #1c1f25;
  box-shadow:0 12px 30px rgba(0,0,0,.35);
  padding:16px; display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.offer-left{display:flex; align-items:center; gap:12px}
.offer-badge{
  background:linear-gradient(90deg,#f59e0b,#ef4444);
  color:#1b090a; font-weight:900; padding:6px 10px; border-radius:999px; font-size:.85rem;
  box-shadow:0 6px 18px rgba(239,68,68,.35);
}
.offer-model{font-size:1.05rem; font-weight:800}
.offer-price{
  font-variant-numeric:tabular-nums;
  font-size:clamp(22px,4.2vw,34px); font-weight:900; color:#ffffff;
  text-shadow:0 8px 28px rgba(0,0,0,.35);
}
.offer-sub{color:#cbd5e1; font-size:.85rem; margin-top:2px}

.offer-actions{display:flex; gap:8px}
.offer-actions .btn{
  padding:6px 10px; border-radius:10px; border:1px solid #2a2f36;
  background:#0f1116; color:#e5e7eb; font-weight:800; cursor:pointer; font-size:.85rem;
}
.offer-actions .btn.danger{background:#ef4444; border-color:#ef4444; color:#fff}

@media (min-width:700px){
  .offer-card{grid-column:span 6}
}
@media (min-width:1200px){
  .offer-card{grid-column:span 4}
}
