/* =========================================================
   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;
  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;
}

/* 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;
}

/* ===== Empuje de contenido bajo el header ===== */
.page-ml .page-ml__content{ padding-top: var(--hdr); }
.page-ml .ml-tips:first-of-type{ margin-top: calc(var(--hdr) + 20px); }
.page-ml .page-ml__content > *:first-child{ margin-top: 0 !important; }

/* ===== Bloque TIPS ===== */
.ml-tips{
  position: relative;
  border-top: none;
  background: #ffffff;
  padding: clamp(28px, 6vw, 56px) 0;
  --tip-img-h: clamp(90px, 10vw, 150px);
  --tip-img-maxw: clamp(120px, 22vw, 210px);
  min-height: clamp(260px, 42vh, 420px);
  margin-top: 0;
}
.ml-tips__inner{
  max-width: 1200px; margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  display: grid; grid-template-columns: 1fr 1.15fr;
  align-items: stretch; gap: clamp(16px, 4vw, 40px);
}
.ml-tips__title{
  margin: 0 0 18px; line-height: 1.22; font-weight: 500; letter-spacing: .2px;
}
.ml-tips__title-accent{ color:#16A7D6; font-weight:800; margin-right:6px; }
.ml-tips__list{ list-style: none; margin: 0; padding: 0; max-width: 560px; }
.ml-tips__list li{ position: relative; padding-left: 18px; margin: 10px 0; }
.ml-tips__list li::before{
  content:""; position:absolute; left:0; top:.55em;
  width:7px; height:7px; border-radius:50%;
  background:#16A7D6; box-shadow:0 0 0 3px rgba(22,167,214,.18);
}

/* Galería derecha (3 imágenes) */
.ml-tips__gallery{
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; height: 100%;
  align-items: center; min-height: 0; background: #ffffff;
}
.ml-tips__card{
  margin: 0; padding: 0; height: 100%; width: 100%;
  border-radius: 16px; overflow: hidden;
}
.ml-tips__card img{
  display: block; width: 100%; height: 100%;
  object-fit: contain; background: #ffffff;
}

/* ===== 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; }

/* ===== Tablas (base) ===== */
.ml-tables{
  max-width: 1200px; margin: 26px auto 32px; padding: 0 24px;
  border-collapse: collapse;
}
.ml-table-wrap{
  background: #fff; border: 1px solid #000; border-radius: 8px;
  box-shadow: none; overflow: hidden; /* redondeado en thead */
  overflow-x: auto;
}
.ml-table{
  width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 560px;
}

/* Cabecera */
.ml-table thead th{
  background: #2bb3e0; color: #fff;
  text-transform: none; font-weight: 700; letter-spacing: .2px;
  padding: 10px 14px; text-align: center; vertical-align: middle;
  border: 1px solid #000;
}
.ml-table thead .col-code{ width: 140px; }
.ml-table thead .col-desc{ width: auto; }

/* Cuerpo */
.ml-table tbody td{
  padding: 12px 14px; border-top: 1px solid #030a13;
  vertical-align: top; font-weight: 500; border: 1px solid #000;
}
.ml-table tbody td:first-child{
  background: #d8d8d8d7 !important;
  font-weight: 400; align-items: center; justify-content: center; text-align: center;
}

/* Quitar fondo de filas si hay wrap adicional */
.ml-splecbloc-table .ml-table tbody tr,
.ml-splecbloc-table .ml-table tbody tr:nth-child(even),
.ml-splecbloc-table .ml-table tbody tr:nth-child(odd){
  background-color: transparent !important;
}

/* 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;
}

/* ====== Layout imágenes IZQUIERDA + tablas DERECHA (DESKTOP base) ====== */
.ml-specblock{
  max-width: 1200px; margin: 16px auto; padding: 0 24px;
  display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start;
}
.ml-specblock__media{ width: 100%; }
.ml-specgallery{
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 14px;
}
.ml-specgallery li{
  background: #fff; height: 120px; padding: 0; margin-right: 20px;
  display: flex; align-items: center; justify-content: center;
}
.ml-specgallery img{
  max-width: 100%; max-height: 100%;
  width: auto; height: auto; object-fit: contain;
}
.ml-specblock__table{ min-width: 0; }
.ml-specblock__table .ml-tables{ width: 100%; }

/* =========================================================
   DESKTOP (≥ 993px) — CLON DE VERTILUX
   ========================================================= */
@media (min-width: 993px){
  .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;
  }
  .page-ml .ml-topbar__inner{
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
  }

  /* =========================================================
   AJUSTE FINAL — Tarjeta SISTEMAS igual que en index.html
   ========================================================= */
@media (min-width: 993px){
  

  /* Bloque de especificaciones (grid 2 col) */
  .ml-specblock{
    padding-left: 24px !important; padding-right: 24px !important;
    grid-template-columns: 260px 1fr !important; gap: 28px !important;
  }
  .ml-specblock__media{
    max-width: 260px !important; width: 260px !important;
  }
  .ml-splecbloc-table .ml-table{
    min-width: 0 !important; table-layout: auto !important;
  }

  /* ===== Tablas con columna de imagen (idéntico a Vertilux) ===== */
  .ml-specblock--tblimg{ display:block; }

  .ml-table{ min-width: 680px; } /* igual a Vertilux */

  .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 la 2ª columna (gris), descripción blanca */
  .ml-table tbody td:nth-child(2){
    background:#d8d8d8d7 !important; font-weight:400; text-align:center;
  }
  .ml-table tbody td:first-child{ background:transparent !important; }

  /* Centrados como en Vertilux */
  .ml-table thead th,
  .ml-table tbody td{
    text-align: center !important;
    vertical-align: middle !important;
    text-align: left !important; /* mantiene tu regla original del clon */
  }
}

/* ===== Colores por tabla (columna Código) — iguales a Vertilux ===== */
.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; /* <-- igual a Vertilux */
}
.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;
  }
/* =========================================================
   MOBILE (≤ 992px)
   ========================================================= */
@media (max-width: 992px){
  /* Centrar encabezados y celdas */
  .ml-table thead th, .ml-table tbody td{
    text-align: center !important; vertical-align: middle !important;
  }

  /* 1ª columna (Imagen): fondo blanco + imagen centrada */
  .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;
  }

  /* 2ª columna (Código): color actual (gris) */
  .ml-table tbody td:nth-child(2){
    background: #d8d8d8d7 !important; font-weight: 600;
  }

  /* 3ª columna (Descripción) */
  .ml-table tbody td:nth-child(3){ text-align: center !important; }

  /* Encabezados alineados al centro */
  .ml-table thead .col-img,
  .ml-table thead .col-code,
  .ml-table thead .col-desc{
    text-align: center !important;
  }

  
  /* 1) Contenedor que agrupa las tablas renderizadas por JS */
  .ml-specblock .ml-splecbloc-table{
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }

  /* 2) Wrapper de cada tabla (suele traer overflow-x/hidden) */
  .ml-specblock .ml-splecbloc-table .ml-table-wrap{
    overflow: visible !important;              /* sin scroll interno */
    overflow-x: visible !important;            /* anula auto del global */
    overflow-y: visible !important;
    height: auto !important;
    max-height: none !important;
    -webkit-overflow-scrolling: auto !important; /* iOS */
  }

  /* 3) Por si el scroll lo está forzando el propio <table> */
  .ml-specblock .ml-splecbloc-table .ml-table{
    height: auto !important;
    max-height: none !important;
    min-width: 0 !important;                   /* ya lo tenías, lo reforzamos */
    white-space: normal !important;
    word-break: break-word;
  }

  /* 4) Blindaje extra: evitar scroll en <tbody> si algún estilo lo aplicó */
  .ml-specblock .ml-splecbloc-table .ml-table tbody{
    display: table-row-group !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }
}
}