:root{
  --bcp-blue: #0D3B66;
  --bcp-red:  #9F2724;
  --bcp-blue-strong: #0A2A4D;
  --bg:#ffffff;
  --card:#ffffff;
  --muted:#6b7280;
  --glass: rgba(255,255,255,0.72);
  --radius:12px;
  --shadow: 0 10px 30px rgba(16,24,40,0.06);
  --max-width:1200px;
  --gap:22px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* NAV full width */
.top-nav{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:60px;
  display:flex;
  align-items:center;
  z-index:1200;
  background:#fff;
  box-shadow:0 4px 20px rgba(0,0,0,0.05);
}
.top-nav .nav-inner{
  max-width:var(--max-width);
  margin:0 auto;
  width:100%;
  padding:0 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.back-home{
  display:inline-block;
  font-weight:600;
  color:var(--bcp-red);
  text-decoration:none;
}

.nav-logo{
  height:42px;
  width:auto;
  display:block;
}

/* CONTAINER (contenido centrado) */
.container{
  max-width:var(--max-width);
  margin:0 auto;
  padding:100px 20px 80px; /* top padding para dejar espacio al nav fijo */
  box-sizing:border-box;
  position:relative;
  z-index:2;
}

/* PAGE BACKGROUND: imagen SIN overlay, empieza justo debajo del navbar */
/* Usamos pseudo-elemento en body para colocar la imagen "full-bleed" comenzando en la base del navbar */
body.magneta-page{
  margin:0;
  color:#0b1220;
  -webkit-font-smoothing:antialiased;
  position:relative;
  background:transparent;
}

/* imagen de fondo real */
body.magneta-page::before{
  content:"";
  position:fixed;
  top:60px;
  left:0;
  width:100%;
  height:calc(100vh - 60px);

  background-image:url("../imgs/FONDO_MAGNETA_PROGRAM-01.png");
  background-position:center top;
  background-repeat:no-repeat;
  background-size:100% 100%;

  z-index:-1;
}

/* HERO: grid con texto a la izquierda y video a la derecha */
.hero{
  display:grid;
  grid-template-columns: 1fr 440px;
  gap:28px;
  align-items:center;
  padding:28px;
  border-radius:14px;
  background:var(--card);
  box-shadow:var(--shadow);
  border-top:4px solid var(--bcp-red);
}

/* si pantalla pequeña: single column */
@media (
  max-width:960px){
    .hero{ 
      grid-template-columns: 1fr; 
    }
  
    .hero-media{ 
      order: -1; /* poner video arriba en móvil si quieres */ 
    }
}

/* hero texto */
.hero .kicker{ 
  display:inline-block; 
  font-weight:700; 
  color:var(--bcp-red); 
  letter-spacing:0.6px; 
  margin-bottom:6px; 
}

.title{ 
  font-size:28px; 
  font-weight:700; 
  margin:6px 0; 
  color:var(--bcp-red-strong); 
}

.lead{ 
  color:var(--muted); 
  line-height:1.5; 
}

/* video y media */
.hero-media{ 
  display:flex; 
  align-items:center; 
  justify-content:center; 
}

.hero-video{
  width:100%;
  height:auto;
  object-fit:contain; /* ocupa todo el recuadro (puede deformar según ratio) */
  border-radius:12px;
  display:block;
  background:#000;
}

/* CTA y botones */
.hero-cta{ 
  margin-top:14px; 
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  gap:10px;
  padding:8px 14px;
  border-radius:999px;
  background:var(--bcp-red);
  color:white;
  border:1px solid rgba(159,39,36,0.9);
  font-weight:700;
  font-size:13px;
  line-height:1;
  letter-spacing:.01em;
  cursor:pointer;
  text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
  box-shadow:0 8px 18px rgba(159,39,36,0.14);
}

.btn:hover{
  transform:translateY(-1px);
  background:#8f211f;
  border-color:#8f211f;
}

.btn.secondary{
  background:#b43330;
  border-color:#b43330;
  box-shadow:0 8px 18px rgba(159,39,36,0.2);
}

/* ghost / datasheet style: BCP red outline */
.btn.ghost{
  background:transparent;
  border:1px solid rgba(159,39,36,0.3);
  color:var(--bcp-red);
  padding:8px 14px;
  border-radius:999px;
  text-decoration:none;
  box-shadow:none;
}

.btn.ghost:hover{
  border-color:rgba(159,39,36,0.48);
  background:rgba(159,39,36,0.06);
}

.btn.ghost-red{
  background:rgba(159,39,36,0.08);
  border-color:rgba(159,39,36,0.42);
  color:var(--bcp-red);
}

.btn.ghost-red:hover{
  border-color:rgba(159,39,36,0.6);
  background:rgba(159,39,36,0.14);
}

/* GRID productos */
.products{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:var(--gap);
  margin-top:28px;
}

/* tarjeta producto (sólida, sin transparencias) */
.card{
  background:var(--card);
  border-radius:12px;
  padding:14px;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  gap:12px;
  min-height:420px;
  position:relative;
  overflow:hidden;
}

/* imagen producto (control de ruta aquí) */
.product-model{
  width:100%;
  height:260px;
  object-fit:cover;
  border-radius:10px;
  background:#f5f5f5;
}

/* metadatos y estilos */
.meta{ 
  display:flex; 
  align-items:flex-start; 
  justify-content:space-between; 
  gap:14px; 
}

.product-name{ 
  font-weight:800; 
  color:var(--bcp-red); 
}

.product-desc{ 
  color:var(--muted); 
  font-size:14px; 
}

.specs{ 
  font-size:13px; 
  color:var(--muted); 
  margin-top:8px; 
}

.specs ul{ 
  padding-left:18px; 
  margin:6px 0; 
}

.card-actions{
  display:flex;
  flex-wrap:nowrap;
  gap:6px;
  margin-top:auto;
  padding-top:8px;
  border-top:1px solid rgba(159,39,36,0.12);
  align-items:stretch;
}

.card-actions .btn{
  flex:1 1 0;
  width:auto;
  max-width:100%;
  min-width:0;
  min-height:38px;
  padding:6px 8px;
  font-size:10px;
  letter-spacing:.01em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.card-actions .product-select{
  flex:0.95 1 0;
}

.card-actions a.btn:first-of-type{
  flex:0.9 1 0;
}

.card-actions a.btn:last-of-type{
  flex:1.15 1 0;
}

.detail-cta{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:36px;
}

.detail-copy{
  margin-top:18px;
  display:grid;
  gap:16px;
}

.detail-copy p{
  margin:0;
  color:var(--muted);
  line-height:1.78;
  font-size:15px;
}

#detailTitle{
  margin:0 0 18px;
  color:var(--bcp-red);
  font-size:40px;
  line-height:1.04;
  letter-spacing:.01em;
}

#detailDesc{
  margin:0;
  color:#1f2937;
  font-size:18px;
  line-height:1.45;
  font-weight:500;
}

.preview{
  position:sticky;
  top:88px;
}

.preview-stack{
  display:grid;
  gap:14px;
  justify-items:center;
}

.model-detail{
  width:80%;
  min-height:210px;
  height:210px;
  background:transparent;
  border:none;
  border-radius:0;
  box-shadow:none;
}

.detail-image{
  width:75%;
  max-width:88%;
  margin:0 auto;
  border-radius:14px;
  display:block;
  object-fit:cover;
  background:#f7f2f2;
  border:1px solid rgba(159,39,36,0.08);
  box-shadow:0 12px 32px rgba(159,39,36,0.08);
}

/* detalles panel */
.details{
  margin-top:32px;
  background:var(--card);
  border-radius:18px;
  padding:28px;
  display:grid;
  grid-template-columns:minmax(0, 1.35fr) minmax(320px, 0.9fr);
  gap:30px;
  align-items:start;
}

/* modal 3d (no tocar comportamiento) */
.model-modal{
  width:100%;
  height:75vh;
  background:#ffffff;
  border-radius:10px;
  display:block;
  border:3px solid var(--bcp-red);
}

.modal-video{
  display:none;
  width:100%;
  height:75vh;
  object-fit:contain;
  background:#000;
  border:3px solid var(--bcp-red);
  border-radius:10px;
}

.modal{ 
  position:fixed; 
  inset:0; display:none; 
  place-items:center; 
  background:rgba(2,6,23,0.7); 
  z-index:12000;
   padding:24px; 
}

.modal.open{ 
  display:grid; 
}

.modal.show-model #modalModel{ 
  display:block; 

}
.modal.show-model #modalVideo{ 
  display:none; 
}

.modal.show-video #modalModel{ 
  display:none; 
}

.modal.show-video #modalVideo{ 
  display:block; 
}

.modal-card{
  width:min(1200px,96%);
  height:90vh;
  display:flex;
  flex-direction:column;
}
.modal-header{ 
  display:flex; 
  align-items:center; 
  justify-content:space-between; 
  gap:12px; 
}

.viewer-close{
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.2);
  border-radius:999px;
  color:#fff;
  cursor:pointer;
}

/* botón overlay de video */
.card .card-view3d{
  position:absolute;
  right:14px;
  top:14px;
  z-index:30;
  box-shadow:0 12px 26px rgba(159,39,36,0.2);
}

/* responsive */
@media (max-width:1000px){
  .products{ 
    grid-template-columns: repeat(2, 1fr); 
  }

  .details{ 
    grid-template-columns: 1fr; 
  }

  .preview{
    position:static;
  }
  
  .model-detail{
    width:100%;
    height:230px;
  }

  .detail-image{
    width:100%;
    max-width:100%;
  }

  #detailTitle{
    font-size:34px;
  }
}

@media (max-width:640px){
  .products{ 
     grid-template-columns: 1fr; 
  }
    
  .hero{ 
    padding:18px; 
  }

  .hero-video{ 
    height:200px;
  }

  #detailTitle{
    font-size:28px;
  }

  #detailDesc{
    font-size:17px;
  }

  .detail-copy p{
    font-size:14px;
  }

}

.view-3d-btn{
  background:linear-gradient(180deg,#b43330,#9F2724);
  color:#fff;
  padding:7px 12px;
  font-size:12px;
  font-weight:700;
  border:1px solid rgba(255,255,255,0.2);
  border-radius:999px;
  cursor:pointer;
  letter-spacing:.03em;
  box-shadow:0 10px 24px rgba(159,39,36,0.22);
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
}

.view-3d-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 30px rgba(159,39,36,0.26);
  background:linear-gradient(180deg,#c33f3b,#a82a27);
}

@media (max-width:640px){
  
  .card-actions .btn,
  .detail-cta .btn{
    width:100%;
  }

  .card-actions{
    gap:5px;
  }

  .card-actions .btn{
    min-height:36px;
    padding:6px 6px;
    font-size:10px;
  }
}
