/* =========================================================
   MAGIC LINE (solo esta página) — Header azul + tipografía
   ========================================================= */

:root{
  --ml-blue-1: #2bb3e0;
  --ml-blue-2: #00A9D6;
  --ml-white:  #fff;
  --ml-celeste: #00A9D6;
  --hdr: 86px;     /* coincide con tu altura de topbar */
  --ml-code-bg: #ECEFF1;
}

/* Tipografía para esta página */
.page-ml html, .page-ml body, .page-ml{
  font-family: "Futura", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ===== Header azul fijo arriba ===== */
.page-ml .ml-topbar{
  position: fixed; top:0; left:0; right:0; z-index: 100;
  background: var(--ml-celeste);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  height: var(--hdr);
  overflow: visible;
}
.page-ml .ml-brand{ margin-bottom: 20px; }
.page-ml .ml-topbar__inner{
  height: var(--hdr);
  color: var(--ml-white);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.page-ml .ml-logo__img.to-white{ filter: brightness(0) invert(1) contrast(115%); }
.page-ml .ml-tagline{ color: var(--ml-white); opacity:.95; }

/* ===== Menú ===== */
.page-ml .ml-menu a,
.page-ml .ml-menu .dd-toggle{
  color:#fff; text-shadow:none;
  display:flex; gap: 28px;
  list-style:none; margin:0; padding:0; align-items:center;
}
.ml-menu > li{ position:relative; }
.ml-menu > li > a{
  display:block;
  padding:10px 16px;
  border-radius:999px;          /* pastilla */
  text-decoration:none;
  color:var(--ml-white);
  line-height:1;
  transition:background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.ml-menu > li:hover > a,
.ml-menu > li:focus-within > a,
.ml-menu > li.active > a{
  background:#fff;
  color:var(--ml-celeste);
  box-shadow:0 6px 22px rgba(0,0,0,.12);
}

/* ===== Dropdown SISTEMAS ===== */
/* ---------- Dropdown SISTEMAS ---------- */
.page-ml .ml-item.ml-sys:hover .dd-toggle::after,
.page-ml .ml-item.ml-sys.is-open .dd-toggle::after{
  height: 128px;         /* antes: 164px */
  top: -6px;
  width: calc(100% + 26px);
  border-radius: 16px;
  transform: translateX(-50%);
}

/* Bajar el contenido del dropdown "SISTEMAS" sin cambiar su tamaño */
.page-ml .ml-item.ml-sys .nav-popup{
  padding-top: 26px;     /* ↑ mueve los logos hacia abajo */
  padding-bottom: 6px;   /* compacta abajo para que todo entre */
}

/* Márgenes de los logos, compactos para que no se pase de 128px */
.page-ml .ml-item.ml-sys .popup-logo img{
  margin: 6px 0 4px;     /* antes: 8–12px */
}
.page-ml .ml-item.ml-sys .popup-logo:first-of-type img {
  margin-bottom: 16px;   /* más aire entre los dos */
}
.page-ml .ml-item.ml-sys .popup-logo:last-of-type img{
  margin-bottom: 2px;
  margin-top: 0;
}

/* === Bloque base del popup (faltaba en TELAS) === */
.nav-popup{
  position:absolute; 
  top:0; 
  left:50%; 
  transform:translateX(-50%);
  width:calc(100% + 26px); 
  height:164px; 
  padding:18px 10px 4px;
  display:none; 
  z-index:3; 
  background:transparent; 
  border-radius:16px; 
  pointer-events:auto;
}
.page-ml .ml-item.ml-sys:hover .nav-popup,
.page-ml .ml-item.ml-sys.is-open .nav-popup{ 
  display:block; 
}

/* Título “SISTEMAS” (faltaba el content) */
.page-ml .nav-popup::before{
  content:"SISTEMAS";
  position:absolute; 
  left:50%; 
  top:4px;                 /* mismo offset que en altagama */
  transform:translateX(-50%);
  font-size:11px; 
  font-weight:700; 
  letter-spacing:.14em; 
  color:var(--ml-celeste);
  text-transform:uppercase; 
  line-height:1;
}

/* ===== Empuje de contenido bajo el header ===== */
.page-ml__content{ padding-top: var(--hdr); }
.ml-tips:first-of-type{ margin-top: calc(var(--hdr) + 20px); }
.page-ml__content > *:first-child{ margin-top: 0 !important; }

/* ===== Bloque TIPS ===== */
.ml-tips__title{
  margin: 20px 0 40px;
  line-height: 1.22;
  font-weight: 500;
  letter-spacing: .2px;
}
.ml-tips__title-accent{
  color: var(--ml-celeste);
  font-weight: 800;
  margin-right: 6px;
}

/* ====== Contenedor de columnas (Cadenas | Accesorios) ====== */
.ml-tips-row{
  list-style: none;
  padding: 0;
  margin: -40px 0 0;
  display: grid;
  grid-template-columns: 1fr;   /* mobile: apilado */
  gap: 32px;
}
@media (min-width: 992px){
  .ml-tips-row{
    grid-template-columns: 1fr 1fr;  /* desktop: dos columnas */
    column-gap: 60px;
    align-items: start;
  }
}

/* cada columna no debe tener bullet negro */
.ml-tips__col{ list-style:none; margin:0; padding:0; }

/* títulos de columna — sin negrita */
.ml-tips__col h3{
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ====== Bullets celestes ====== */
.ml-tips__col ul{ list-style:none; margin:0; padding:0; }
.ml-tips__col ul li{
  position: relative;
  padding-left: 24px;
  margin: 14px 0;
  font-size: 16px;
  line-height: 1.4;
}
.ml-tips__col ul li::before{
  content:"";
  position:absolute; left:0; top:6px;
  width:10px; height:10px;
  background: radial-gradient(circle at center, #00A9D6 35%, #b2ecff 80%);
  border-radius:50%;
}

/* ===== Barra de especificación ===== */
.ml-specbar{ width:100%; background:#8a8a8ae7; color:#ffffff; }
.ml-specbar__inner,
.ml-specbar__inner_3{
  max-width:1200px; margin:0 auto; padding:8px 16px;
  font-weight:500; font-size:clamp(18px, 1.6vw, 15px);
  line-height:1.3; letter-spacing:.2px; text-align:center;
}
.ml-specbar__inner{ white-space:nowrap; }
.ml-specbar__inner_3{ white-space:normal; }
.ml-specbar__inner strong{ font-weight:700; }

/* ====== NUEVAS TABLAS (.tbl) ====== */
.tbl-wrap{
  background:#fff;
  border:1px solid #000;
  border-radius:8px;
  overflow:hidden;
  margin:20px 0;
}
.tbl{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}
.tbl thead th{
  background:#00A9D6;
  color:#fff;
  font-weight:700;
  padding:10px 12px;
  text-align:center;
  border:1px solid #000;
}
.tbl tbody td{
  padding:10px 12px;
  border:1px solid #000;
  text-align:center;
  vertical-align:middle;
  font-weight:500;
}
.tbl tbody .col-img img{
  max-width:80px;
  height:auto;
  object-fit:contain;
}

/* Separador entre tablas */
.ml-table-sep{ height:18px; position:relative; margin:14px 0; }
.ml-table-sep::before{
  content:""; position:absolute; left:0; right:0; top:50%;
  height:3px; background:transparent; opacity:.8;
}

/* Nota inferior */
.ml-note{
  margin:14px 4px 0; color:#2bb3e0;
  font-weight:800; letter-spacing:.4px; text-transform:uppercase;
}

/* ====== Sistema anterior de tablas (.ml-table) ====== */
.ml-table-wrap{ overflow-x:auto; }
.ml-table{ min-width:680px; text-align:center !important; } /* última precedencia efectiva */


/* ALUMINIO */

/* Recuadro abierto (más chico y proporcional al texto) */
.page-ml .ml-item.ml-alum:hover > .dd-toggle::after,
.page-ml .ml-item.ml-alum.is-open > .dd-toggle::after {
  opacity: 1;
  width: calc(100% + 26px);
  height: 138px; /* se mantiene */
  top: -6px;
  transform: translateX(-50%);
  border-radius: 16px;
}

/* Tarjeta interior del dropdown */
.page-ml .ml-item.ml-alum .nav-popup {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;            /* se mantiene */
  height: 138px;           /* debe coincidir con ::after */
  padding: 14px 10px 10px !important;  /* ↓ sube el contenido y da un toque más abajo */
  display: none;
  z-index: 3;
  background: transparent;
  border-radius: 16px;
  pointer-events: auto;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

/* Mostrar dropdown */
.page-ml .ml-item.ml-alum:hover .nav-popup,
.page-ml .ml-item.ml-alum.is-open .nav-popup {
  display: block;
}

/* Título “ALUMINIO” — lo subimos un poco y dejamos más aire abajo */
.page-ml .ml-item.ml-alum .popup-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ml-celeste);
  text-transform: uppercase;
  text-align: center;
  margin: -12px 0 10px;   /* antes: -6px 0 8px */
  font-weight: 700;
}

/* Enlaces internos — más espacio vertical entre los tres botones */
.page-ml .ml-item.ml-alum .popup-logo {
  display: block;
  text-decoration: none;
  color: #111;
  text-align: center;
  font-weight: 500;
  padding: 8px 4px;       /* antes: 6px 4px */
  margin: 0;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hover en enlaces */
.page-ml .ml-item.ml-alum .popup-logo:hover,
.page-ml .ml-item.ml-alum .popup-logo:focus-visible {
  background: rgba(0, 0, 0, 0.06);
  outline: none;
  color: var(--ml-celeste);
}

/* Elimina el fallback “SISTEMAS” dentro del bloque ALUMINIO */
.page-ml .ml-item.ml-alum .nav-popup::before {
  content: none !important;
}



/* Contenedores principales */
.page-ml__content,
.ml-tips__inner,
.ml-specbar__inner,
.ml-specbar__inner_3,
.ml-specblock,
.ml-tables{
  max-width:1200px;
  margin-left:auto !important;
  margin-right:auto !important;
}

/* Bloque de especificaciones */
.ml-specblock{
  padding-left:24px !important; padding-right:24px !important;
  grid-template-columns:260px 1fr !important; gap:28px !important; margin:16px auto; padding:0 24px;
}
.ml-specblock__media{ max-width:260px !important; width:260px !important; }

/* La tabla (.ml-table) no debe forzar más ancho del disponible */
.ml-splecbloc-table .ml-table{ min-width:0 !important; table-layout:auto !important; }

/* ===== Tablas con columna de imagen (render por JS) ===== */
.ml-specblock--tblimg{ display:block; }
.ml-table thead .col-img{ width:120px; }
.ml-table tbody td.col-img{
  text-align:center; vertical-align:middle;
  background:transparent !important; padding:8px 10px;
}
.ml-table tbody td.col-img img{
  display:inline-block; max-width:92px; max-height:92px; width:auto; height:auto; object-fit:contain;
}

/* El código es ahora la 2ª columna (gris) */
.ml-table tbody td:nth-child(2){
  background:#d8d8d8d7 !important; font-weight:400; text-align:center;
}
/* No pintar la 1ª (imagen) */
.ml-table tbody td:first-child{ background:transparent !important; }

/* Alineaciones efectivas */
.ml-table thead th,
.ml-table tbody td{
  vertical-align: middle !important;
  text-align: left !important;
}

/* ===== Colores por tabla para la 2ª columna (Código) ===== */
.ml-splecbloc-table :nth-child(1 of .ml-table-wrap) .ml-table tbody td:nth-child(2){
  background:#ffffff !important; color:#111 !important; text-align:center !important;
}
.ml-splecbloc-table :nth-child(2 of .ml-table-wrap) .ml-table tbody td:nth-child(2){
  background:#5f5656 !important; color:#ffffff !important; text-align:center !important;
}
.ml-splecbloc-table :nth-child(3 of .ml-table-wrap) .ml-table tbody td:nth-child(2){
  background:#eeeeeea0; color:#111 !important; text-align:center !important;
}
.ml-splecbloc-table :nth-child(4 of .ml-table-wrap) .ml-table tbody td:nth-child(2){
  background:#fff4e0 !important; color:#111 !important; text-align:center !important;
}
.ml-table thead th,
.ml-table thead .col-img,
.ml-table thead .col-code,
.ml-table thead .col-desc{ text-align:center !important; }

/* ===== Bloque de tablas Vertilux-clone (.tbl) ===== */
.tbl-block{
  max-width:1200px;
  margin:16px auto;
  padding:0 24px;
  display:block;
}
/* (ya definida arriba) .tbl-wrap */

/* Tabla base (clone) */
.tbl{
  /* ya configurada arriba */
}
.tbl thead th{
  background:#2bb3e0;                 /* color de cabecera para este bloque */
  text-transform:none;
  letter-spacing:.2px;
  vertical-align:middle !important;
}
.tbl tbody td{
  border-top:1px solid #030a13;
  vertical-align:middle !important;
}

/* Columna Imagen (centrada visualmente) */
.tbl tbody td.col-img{
  background:transparent !important;
  text-align:center !important;
  vertical-align:middle !important;
  padding:8px 10px;
}
.tbl tbody td.col-img img{
  display:inline-block; max-width:92px; max-height:92px; width:auto; height:auto; object-fit:contain; margin:0 auto;
}

/* Columna Código (gris por defecto) */
.tbl tbody td:nth-child(2){
  background:#d8d8d8d7 !important;
  font-weight:400;
  text-align:center !important;
}

/* ===== Colores por tabla para la 2ª columna (Código) ===== */
.tbl-container :nth-child(1 of .tbl-wrap) .tbl tbody td:nth-child(2){
  background:#ffffff !important; color:#111 !important; text-align:center !important;
}
.tbl-container :nth-child(2 of .tbl-wrap) .tbl tbody td:nth-child(2){
  background:#5f5656 !important; color:#ffffff !important; text-align:center !important;
}
.tbl-container :nth-child(3 of .tbl-wrap) .tbl tbody td:nth-child(2){
  background:#eeeeeea0 !important; color:#111 !important; text-align:center !important;
}
.tbl-container :nth-child(4 of .tbl-wrap) .tbl tbody td:nth-child(2){
  background:#fff4e0 !important; color:#111 !important; text-align:center !important;
}

/* =========================================================
   MOBILE (≤ 992px) — Consolidado
   ========================================================= */
@media (max-width: 992px){

  /* ====== TIPS (stack + galería) ====== */
  .ml-tips{ padding:24px 0; margin-top:0; }
  .ml-tips__inner{ grid-template-columns:1fr; gap:16px; padding:0 16px; }
  .ml-tips__title{ margin:0 0 12px; line-height:1.22; font-weight:500; letter-spacing:.2px; }
  .ml-tips-row{ max-width:none; }
  .ml-tips__col:first-child h3{ margin-top:44px !important; } /* última versión efectiva */
  .ml-tips__col:last-child  h3{ margin-top:8px  !important; }

  /* ====== Barra gris (mostrar TODO el texto) ====== */
  .ml-specbar{ width:100%; }
  .ml-specbar__inner{ white-space:normal; padding:10px 12px; text-align:center; line-height:1.35; }

  /* ====== .ml-table (alineación + sin scroll) ====== */
  .ml-table thead th,
  .ml-table tbody td{ text-align:center !important; vertical-align:middle !important; white-space:normal !important; }
  .ml-table-wrap{ height:auto !important; max-height:none !important; overflow:visible !important; }
  .ml-table{
    min-width:0 !important; width:100% !important; table-layout:fixed;
    white-space:normal !important; word-break:break-word;
  }
  .ml-table tbody td.col-img{ background:#fff !important; padding:10px 8px !important; }
  .ml-table tbody td.col-img img{
    display:block !important; margin:0 auto !important; max-width:92px; max-height:92px; width:auto; height:auto; object-fit:contain;
  }
  .ml-table tbody td:nth-child(2){ background:#d8d8d8d7 !important; font-weight:600; }
  .ml-table tbody td:nth-child(3){ text-align:center !important; }
  .ml-table thead .col-img,
  .ml-table thead .col-code,
  .ml-table thead .col-desc{ text-align:center !important; }

  /* Contenedor tablas renderizadas por JS (sin scroll) */
  .ml-specblock .ml-splecbloc-table,
  .ml-specblock .ml-splecbloc-table .ml-table-wrap{
    overflow:visible !important; overflow-x:visible !important; overflow-y:visible !important;
    height:auto !important; max-height:none !important; -webkit-overflow-scrolling:auto !important;
  }
  .ml-specblock .ml-splecbloc-table .ml-table{
    height:auto !important; max-height:none !important; min-width:0 !important; white-space:normal !important; word-break:break-word;
  }
  .ml-specblock .ml-splecbloc-table .ml-table tbody{
    display:table-row-group !important; overflow:visible !important; height:auto !important; max-height:none !important;
  }

  /* ====== .tbl (sin scroll + columnas angostas + ocultar 4ª) ====== */
  .tbl-wrap{ overflow:visible !important; }                    /* quita overflow-x:auto en mobile */
  .tbl{
    min-width:0 !important; width:100% !important; table-layout:fixed !important;
    white-space:normal !important; word-break:break-word !important;
  }
  .tbl thead th, .tbl tbody td{
    padding:7px 6px !important; font-size:13.5px !important; line-height:1.2 !important;
    text-align:center !important; vertical-align:middle !important; box-sizing:border-box !important;
  }
  /* Ocultar 4ª columna (Rollo 250mts) */
  .tbl thead th:nth-child(4),
  .tbl tbody td:nth-child(4){ display:none !important; }

  /* Anchos visibles — mantienen última precedencia de tu archivo */
  /* 1) Imagen  2) Código  3) Descripción */
  .tbl thead th:first-child,
  .tbl tbody td:first-child{ width:28% !important; }   /* override efectivo */
  .tbl thead th:nth-child(2),
  .tbl tbody td:nth-child(2){ width:30% !important; white-space:nowrap !important; }
  .tbl thead th:nth-child(3),
  .tbl tbody td:nth-child(3){ width:50% !important; }

  /* Imagen más chica para favorecer el layout */
  .tbl tbody td.col-img{ padding:6px 4px !important; }
  .tbl tbody td.col-img img{
    max-width:56px !important; max-height:56px !important; width:auto !important; height:auto !important;
    object-fit:contain !important; display:inline-block !important; margin:0 auto !important;
  }
}
