: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}

.wrap {
  max-width: 1180px;    /* El mismo en todo el sitio */
  margin: 0 auto;
  width: 100%;
  padding: 0 18px;
}

/* HERO */
.hero {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 18px 0 18px 0;  /* <--- Antes 38px 0 32px 0 */
  width: 100%;
}

.hero-card {
  background: var(--panel);
  border: 1px solid #1c1f25;
  padding: 18px 24px 18px 24px;  /* <--- Antes 44px 42px 38px 42px */
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  min-width: 290px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: box-shadow .2s, padding .25s;
  overflow: hidden;
}

@media (max-width: 700px) {
  .wrap {
    padding: 0 4vw;
  }
  .hero {
    padding: 8px 0 12px 0;
  }
  .hero-card {
    padding: 12px 2vw 12px 2vw;
    border-radius: 14px;
    min-width: 0;
  }
}



/* Botones y badges mantienen su layout en desktop */
.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}



.badges {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}





/* 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}
}
/* Mercado Libre */
.social-link.ml {
  transition: color 0.3s;  /* transición suave */
}

.social-link.ml:hover {
  color: #ffe600;          /* amarillo Mercado Libre al pasar el mouse */
}

/* ===========================
   CALCULADORA MERCADO PAGO
   =========================== */
.mp-calc-card {
  background: linear-gradient(90deg,#1e293b 60%,#2563eb 100%);
   margin-top: 18px;  /* Ajusta este valor según lo que te guste */
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(30,41,59,.14);
  padding: 22px 20px 18px 20px;
  color: #f3f7fa;
  margin-bottom: 18px;
  max-width: 430px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}
@media (max-width: 600px) {
  .mp-calc-card {
    margin-top: 16px !important;
  }
}

.mp-calc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  justify-content: center;
}

.mp-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  padding: 3px;
}

.mp-calc-head span {
  font-weight: 700;
  font-size: 1.20rem;
  letter-spacing: 0.1px;
}

.mp-calc-form {
  display: flex;
  gap: 0;
  align-items: center;
  margin-top: 8px;
  width: 100%;
}

.mp-input {
  flex: 1 1 0;
  height: 44px;
  background: #0f172a;
  color: #fff;
  border: 1.5px solid #353e57;
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 0 16px;
  font-size: 1.10rem;
  box-sizing: border-box;
  outline: none;
  margin: 0;
  text-align: center;
  transition: border 0.14s;
}
.mp-input:focus { border-color: #06a9f6; }

.mp-btn {
  flex: 1 1 0;
  height: 44px;
  background: linear-gradient(90deg,#06a9f6 60%,#0a59a7 100%);
  color: #fff;
  border: 1.5px solid #353e57;
  border-left: none;
  border-radius: 0 8px 8px 0;
  font-weight: 700;
  font-size: 1.10rem;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.mp-btn:hover {
  background: linear-gradient(90deg,#0aaef7 70%,#085397 100%);
}

/* Resultado */
.mp-result {
  margin-top: 15px;
  font-size: 1.18rem;
  background: #21314d;
  padding: 12px 18px;
  border-radius: 9px;
  box-shadow: 0 1px 6px rgba(0,0,0,.10);
  color: #e0fffb;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.5px;
}

/* Mobile: input y botón apilados */
@media (max-width: 600px) {
  .mp-calc-card {
    padding: 13px 6px 10px 6px !important;
    border-radius: 14px !important;
    max-width: 98vw !important;
    font-size: 1em;
  }
  .mp-calc-head {
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
  }
  .mp-calc-head span {
    font-size: 1.08em;
    margin-left: 0 !important;
    margin-top: 3px;
  }
  .mp-calc-form {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 7px !important;
    margin-top: 7px !important;
    width: 100% !important;
  }
  .mp-input,
  .mp-btn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: 1.02em;
    border-radius: 8px !important;
    border: 1.5px solid #353e57;
    margin: 0 !important;
    height: 42px;
  }
  .mp-input {
    border-bottom-left-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    border-right: 1.5px solid #353e57 !important;
  }
  .mp-btn {
    margin-top: 0 !important;
    border-radius: 8px !important;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
    border-left: 1.5px solid #353e57 !important;
    border-right: 1.5px solid #353e57 !important;
  }
}
