    /* Tipografía del sistema para evitar solicitudes externas y mejorar el rendimiento. */
    * { box-sizing:border-box; }
    html { scroll-behavior:smooth; }
    body { margin:0; background:#f3f6f9; color:#20334b; font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif; }
    /* Cristal translúcido inspirado en las barras de navegación de Apple. */
    .glass-header {
      background:rgba(255,255,255,.68);
      -webkit-backdrop-filter:blur(22px) saturate(180%);
      backdrop-filter:blur(22px) saturate(180%);
      border-bottom:1px solid rgba(255,255,255,.48);
      box-shadow:0 8px 28px rgba(20,38,62,.10), inset 0 1px rgba(255,255,255,.55);
      isolation:isolate;
    }
    @supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
      .glass-header { background:rgba(255,255,255,.94); }
    }
    .view-section { display:none; }
    .view-section.active { display:block; animation:appear .25s ease-out; }
    @keyframes appear { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
    .nav-btn { border-radius:9px; padding:14px 25px; font-size:16px; font-weight:700; color:#30465f; transition:background .2s,color .2s; }
    .nav-btn:hover { background:#edf2f7; }
    .nav-btn.active { background:#df4a3c; color:white; box-shadow:0 4px 12px #df4a3c30; }
    .nav-btn.active:hover { background:#c83c30; }
    .action-btn { transition:transform .2s,background .2s; }
    .action-btn:hover { transform:translateY(-2px); }
    .product-card { transition:transform .2s,box-shadow .2s; }
    .product-card:hover { transform:translateY(-4px); box-shadow:0 16px 35px #14263e15; }
    .logo { width:min(100%,420px); height:auto; max-height:124px; object-fit:contain; object-position:left center; display:block; }
    .section-mark { width:48px; height:4px; border-radius:8px; background:#df4a3c; }
    dialog::backdrop { background:rgba(10,22,37,.72); }
    dialog { max-height:90vh; overflow-y:auto; }
    @media(max-width:640px) { .logo { width:min(100%,290px); } .nav-btn {padding:11px 15px;font-size:14px;} }

    /* Movimiento suave en el encabezado. */
    :root { --ease-premium:cubic-bezier(.22,1,.36,1); }
    .glass-header { transition:background-color .45s ease,box-shadow .45s ease; }
    .glass-header.is-scrolled { background:rgba(255,255,255,.78); box-shadow:0 12px 34px rgba(20,38,62,.14),inset 0 1px rgba(255,255,255,.55); }
    .view-section.active { animation:section-enter .62s var(--ease-premium) both; }
    @keyframes section-enter { from {opacity:0;transform:translateY(18px)} to {opacity:1;transform:translateY(0)} }
    .nav-btn { position:relative; transition:background .28s ease,color .28s ease,transform .35s var(--ease-premium),box-shadow .35s ease; }
    .nav-btn:hover { transform:translateY(-2px); }
    .nav-btn:active,.action-btn:active { transform:scale(.97); }
    .nav-btn:focus-visible,.action-btn:focus-visible { outline:3px solid #3478e5;outline-offset:3px; }
    .action-btn { transition:transform .38s var(--ease-premium),background .28s ease,box-shadow .38s ease; }
    .action-btn:hover { transform:translateY(-3px);box-shadow:0 10px 22px rgba(20,38,62,.15); }
    .product-card { animation:card-enter .7s var(--ease-premium) both; animation-delay:calc(var(--card-index,0) * 85ms); transition:transform .45s var(--ease-premium),box-shadow .45s ease,border-color .3s ease; }
    .product-card:hover { transform:translateY(-7px);box-shadow:0 20px 42px rgba(20,38,62,.13);border-color:#cbd7e4; }
    @keyframes card-enter { from {opacity:0;transform:translateY(25px) scale(.985)} to {opacity:1;transform:translateY(0) scale(1)} }
    .feature-card { animation:card-enter .7s var(--ease-premium) both; animation-delay:calc(var(--card-index,0) * 110ms);transition:transform .4s var(--ease-premium),box-shadow .4s ease; }
    .feature-card:hover {transform:translateY(-5px);box-shadow:0 15px 32px rgba(20,38,62,.09);}
    .hero-tag,.hero-title,.hero-description,.hero-actions {animation:hero-enter .8s var(--ease-premium) both;}
    .hero-title {animation-delay:90ms}.hero-description {animation-delay:180ms}.hero-actions {animation-delay:270ms}
    @keyframes hero-enter {from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}
    #detalle-modal[open] {animation:modal-in .38s var(--ease-premium) both;}
    #detalle-modal[open]::backdrop {animation:backdrop-in .35s ease both;}
    @keyframes modal-in {from{opacity:0;transform:translateY(20px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}
    @keyframes backdrop-in {from{background:rgba(10,22,37,0)}to{background:rgba(10,22,37,.72)}}
    @media (prefers-reduced-motion:reduce) {
      *,*::before,*::after {animation-duration:.01ms!important;animation-delay:0ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important;}
    }

    /* Encabezado compacto de cristal, adaptado a móviles */
    .header-inner { min-height:120px; padding-top:7px; padding-bottom:7px; }
    .logo-button { flex:0 1 420px; }
    .logo { width:420px; max-width:100%; max-height:120px; height:auto; }
    .glass-header { background:rgba(255,255,255,.77); backdrop-filter:blur(24px) saturate(170%); -webkit-backdrop-filter:blur(24px) saturate(170%); }
    .glass-header.is-scrolled { background:rgba(255,255,255,.82); }
    .site-nav { flex-shrink:0; }
    .nav-btn { padding:12px 21px; }
    .product-card img { transition:transform .65s cubic-bezier(.22,1,.36,1); }
    .product-card:hover img { transform:scale(1.045); }
    .action-btn,.nav-btn { -webkit-tap-highlight-color:transparent; }
    .product-card { content-visibility:auto; contain-intrinsic-size:auto 550px; }
    #detalle-modal { overscroll-behavior:contain; }
    @media (max-width:767px) {
      .header-inner { min-height:84px; }
      .logo-button { flex:1 1 0; }
      .logo { width:clamp(160px,42vw,285px); max-height:82px; }
      .site-nav { gap:0; }
      .nav-btn { font-size:12px; padding:10px 9px; }
      .glass-header { background:rgba(255,255,255,.83); }
    }
    @media (max-width:390px) {
      .logo { width:clamp(140px,39vw,170px); }
      .nav-btn { font-size:11px; padding:9px 6px; }
    }
    @media (prefers-reduced-motion:reduce) { .product-card { content-visibility:visible; } }

    /* Premium mobile, quotation and photo zoom */
    .quote-fab{position:fixed;right:20px;bottom:20px;z-index:45;background:#df4a3c;color:white;border-radius:999px;padding:14px 19px;font-weight:800;box-shadow:0 12px 35px #14263e55;display:flex;align-items:center;gap:9px;transition:transform .3s var(--ease-premium),box-shadow .3s ease}
    .quote-fab:hover{transform:translateY(-4px);box-shadow:0 16px 40px #14263e66}.quote-count{background:#fff;color:#14263e;border-radius:99px;padding:2px 8px;min-width:26px;text-align:center}
    .quote-dialog,.zoom-dialog{border:0;border-radius:20px;box-shadow:0 25px 85px #0c1b2e55;max-height:90dvh;overflow:auto}.quote-dialog{width:min(94vw,610px);padding:25px;color:#20334b}.quote-head{display:flex;align-items:start;justify-content:space-between;gap:16px}
    .quote-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px;border:1px solid #e2e8f0;border-radius:12px}.qty-btn{width:31px;height:31px;background:#edf2f7;border-radius:8px;font-weight:800}
    .zoom-dialog{width:min(96vw,1100px);padding:20px;background:white;text-align:center}.zoom-dialog img{margin:auto}.zoom-close{position:sticky;top:0;float:right;font-size:30px;line-height:1;background:white;border-radius:50%;padding:5px 12px;z-index:1}
    .quote-dialog::backdrop,.zoom-dialog::backdrop{background:rgba(8,20,37,.78);backdrop-filter:blur(5px)}.disabled-link{opacity:.5;cursor:not-allowed}
    #productos-grid{align-items:stretch}.product-card img{transition:transform .55s var(--ease-premium)}.product-card:hover img{transform:scale(1.035)}
    .catalog-tools select:focus-visible,.catalog-tools button:focus-visible,.quote-fab:focus-visible{outline:3px solid #3478e5;outline-offset:2px}
    @media(max-width:640px){.header-inner{min-height:80px;padding-top:6px;padding-bottom:6px}.logo{max-height:82px}.site-nav{gap:1px}.nav-btn{padding:10px 8px;font-size:12px}.quote-fab{right:13px;bottom:13px;padding:12px 14px}.quote-dialog{padding:18px}.quote-item{flex-wrap:wrap}}
/* Centrar los cuadros de detalles como en la versión anterior. */
#detalle-modal { margin: auto; width: calc(100% - 24px); max-width: 48rem; }
#cotizacion-modal, #zoom-modal { margin: auto; }

/* Fotografías técnicas: sin recortes, proporción original y fondo blanco. */
.product-card img, .product-image img, .catalogo-card img, .modal img { object-fit: contain; }
.product-card .product-image, .product-image, .catalogo-card .image-wrap { background:#fff; }
img[src*="/catalogo_viejo/"] { object-fit: contain !important; background: #fff; }

/* Carrusel de productos destacados y fichas de tamaños variables */
.featured-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:22px;color:#64748b;font-size:.85rem}
.featured-actions{display:flex;gap:8px}.featured-actions button{border:1px solid #cbd5e1;background:white;border-radius:10px;width:43px;height:43px;font-size:22px;font-weight:700;color:#14263f;transition:background .2s}.featured-actions button:hover{background:#e9eef5}
.featured-carousel{display:flex;gap:24px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;overscroll-behavior-x:contain;padding:12px 2px 24px;scrollbar-width:thin;scrollbar-color:#94a3b8 #e2e8f0}
.featured-carousel>.product-card{flex:0 0 calc((100% - 48px)/3);min-width:0;scroll-snap-align:start}
.product-image{object-fit:contain!important;object-position:center;max-width:100%;max-height:100%}
@media(max-width:1023px){.featured-carousel>.product-card{flex-basis:calc((100% - 24px)/2)}}
@media(max-width:639px){.featured-carousel>.product-card{flex-basis:86%}.featured-navigation{align-items:flex-start}}

/* Servicios interactivos, formulario de fabricación y contacto */
.feature-link{display:flex;flex-direction:column;align-items:flex-start;cursor:pointer;min-height:235px;transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}
.feature-link:hover{transform:translateY(-4px);box-shadow:0 15px 30px rgba(20,38,62,.11);border-color:#e6a59e}
.feature-link:focus-visible,.contact-map-link:focus-visible{outline:3px solid #3478e5;outline-offset:3px}
.feature-cta{display:inline-flex;gap:8px;align-items:center;margin-top:auto;padding-top:18px;color:#d7483b;font-size:.9rem;font-weight:800}
.fabric-icon{width:64px;height:64px;display:grid;place-items:center;border-radius:16px;background:#fff0ed;color:#dc4a3b;font-size:32px}
.fabric-label{display:flex;flex-direction:column;gap:7px;color:#24364e;font-weight:750;font-size:.9rem}
.fabric-input{width:100%;padding:13px 14px;border:1px solid #cbd5e1;border-radius:10px;background:white;color:#172b43;font-weight:400;font-size:1rem}
.fabric-input:focus{outline:3px solid #b9d2fa;border-color:#427ad0}
.contact-map-link{display:inline-block;color:#1d5eaf;font-weight:700;text-decoration:underline;text-underline-offset:3px}
@media(max-width:767px){.feature-link{min-height:unset}.feature-cta{padding-top:16px}}

/* Fichas con orientación variable: la imagen determina la altura del marco.
   No se recorta ni se estira el contenido técnico. */
.product-card .product-media-adaptive {
  width:100%; height:auto; min-height:0; padding:0;
  background:#fff; border-bottom:1px solid #e9edf3;
  display:block; overflow:hidden; line-height:0;
}
.product-card .product-media-adaptive .product-image {
  display:block; width:100%; height:auto; max-width:none; max-height:none;
  object-fit:unset!important; object-position:center; background:#fff;
}
.product-card:hover .product-media-adaptive .product-image { transform:none; }
/* Los productos de una misma fila mantienen tarjetas legibles aunque sus imágenes tengan proporciones distintas. */
#productos-grid { align-items:start; }
.featured-carousel { align-items:flex-start; }
@media(max-width:639px){.product-card .product-media-adaptive .product-image{width:100%;height:auto}}

/* Ajuste final: tarjetas equilibradas sin recortar información técnica.
   Un marco de altura uniforme contiene las imágenes verticales y horizontales completas. */
#productos-grid { align-items:stretch; gap:24px; }
.featured-carousel { align-items:stretch; }
.product-card { height:100%; min-width:0; }
.product-card .product-media-adaptive {
  height:248px; min-height:248px; max-height:248px;
  display:flex; align-items:center; justify-content:center;
  padding:12px; box-sizing:border-box; overflow:hidden;
  background:#f8fafc; border-bottom:1px solid #e9edf3;
}
.product-card .product-media-adaptive .product-image {
  display:block; width:100%; height:100%;
  max-width:100%; max-height:100%;
  object-fit:contain!important; object-position:center;
  background:transparent; transform:none!important;
}
.product-card > .p-5 { flex:1; }
@media (max-width:767px) {
  #productos-grid { gap:16px; }
  .product-card .product-media-adaptive { height:218px; min-height:218px; max-height:218px; padding:10px; }
}
@media (min-width:1280px) {
  .product-card .product-media-adaptive { height:260px; min-height:260px; max-height:260px; padding:14px; }
}


/* Tarjetas rectangulares uniformes: fichas técnicas completas, sin recorte. */
#productos-grid { align-items:stretch; gap:24px; }
.product-card { border-radius:13px; overflow:hidden; height:100%; }
.product-card .product-media-adaptive { height:350px; min-height:350px; max-height:350px; padding:12px; background:#f7f9fc; }
.product-card .product-media-adaptive .product-image { object-fit:contain!important; object-position:center; width:100%; height:100%; }
@media(max-width:767px){.product-card .product-media-adaptive{height:290px;min-height:290px;max-height:290px;padding:10px}}
@media(min-width:1280px){.product-card .product-media-adaptive{height:370px;min-height:370px;max-height:370px}}

/* Catálogo organizado por secciones y referencias del Excel oficial. */
#productos-grid.catalog-secciones{display:flex;flex-direction:column;gap:36px;align-items:stretch}
.catalog-seccion{min-width:0}
.catalog-seccion-cabecera{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin:0 0 18px;border-bottom:2px solid #e2e8f0;padding-bottom:12px}
.catalog-seccion-titulo{font-size:clamp(1.1rem,2vw,1.42rem);font-weight:850;line-height:1.3;color:#14263e;letter-spacing:-.015em}
.catalog-seccion-cantidad{font-size:.8rem;font-weight:700;color:#64748b;white-space:nowrap}
.catalog-seccion-grilla{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));gap:24px;align-items:stretch}
@media(min-width:640px){.catalog-seccion-grilla{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1024px){.catalog-seccion-grilla{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:767px){#productos-grid.catalog-secciones{gap:26px}.catalog-seccion-grilla{gap:16px}}

/* Ajustes solicitados: referencia visible en esquina superior izquierda de la fotografía. */
.product-card .product-media-adaptive { position:relative; }
.product-card .product-media-adaptive .product-ref-badge {
  position:absolute; z-index:2; top:15px; left:17px;
  display:inline-flex; align-items:center; max-width:calc(100% - 34px);
  padding:7px 11px; border-radius:8px;
  background:#f1f5f9; color:#14263e;
  font-size:15px; line-height:1.2; font-weight:900;
  overflow-wrap:anywhere;
}
@media(max-width:767px){
  .product-card .product-media-adaptive .product-ref-badge { top:12px; left:13px; max-width:calc(100% - 26px); font-size:14px; }
}
/* Mantener legibles el logo y el selector también en pantallas muy estrechas. */
@media(max-width:390px){
  #orden{width:100%;max-width:100%;}
}
@media(max-width:350px){
  .header-inner{flex-wrap:wrap;justify-content:center;row-gap:2px;}
  .logo-button{flex:0 0 auto;justify-content:center;}
  .logo{width:200px;max-width:100%;height:auto;}
  .site-nav{width:100%;justify-content:center;}
}


/* Dos catálogos: su orden interno conserva las secciones oficiales y sus referencias. */
.catalogo-grupo-titulo {color:#14263e; font-size:clamp(1.35rem,2.5vw,1.9rem);
  line-height:1.25; font-weight:900; padding-bottom:12px; border-bottom:3px solid #df4a3c;
  margin:0 0 2px; letter-spacing:-.02em;}
/* Solo catálogo nuevo: referencia arriba a la derecha del área de descripción. */
.product-card .product-info-top {display:flex;align-items:center;justify-content:space-between;
  gap:8px; flex-wrap:wrap;min-height:31px;}
.product-card .product-ref-badge-nuevo {display:inline-flex;align-items:center;
  background:#f1f5f9;color:#14263e;font-size:16px;line-height:1.25;
  font-weight:900;border-radius:8px;padding:6px 10px;max-width:100%;
  overflow-wrap:anywhere;margin-left:auto;}
@media(max-width:767px){.product-card .product-ref-badge-nuevo{font-size:15px;padding:6px 9px;}}

/* Enlaces de contacto al pie de pagina */
.footer-contact-link:hover,.footer-contact-link:focus-visible{text-decoration:underline;text-underline-offset:3px}


/* Pantalla inicial: animación en capas a partir del logo original, sin alterar el catálogo. */
.brand-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  place-items: center;
  background: #fff;
  opacity: 1;
  visibility: visible;
  transition: opacity .36s ease, visibility .36s ease;
}
.js-brand-loader .brand-loader { display: grid; }
.brand-loader.is-complete { display: grid; opacity: 0; visibility: hidden; pointer-events: none; }
.js-brand-loader body { overflow: hidden; }
.brand-loader-content {
  width: min(830px, 94vw);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.brand-loader-mark {
  width: 100%;
  position: relative;
  aspect-ratio: 2048 / 684;
}
.brand-loader-mark img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.js-brand-loader .brand-loader-symbol { animation: brand-symbol-enter .56s cubic-bezier(.17,.7,.25,1) both; }
.js-brand-loader .brand-loader-name { animation: brand-name-reveal 1.17s .32s ease-out both; }
.js-brand-loader .brand-loader-tagline { animation: brand-tagline-reveal .72s 1.03s ease-out both; }
.brand-loader-line {
  width: min(190px, 38%);
  height: 3px;
  border-radius: 999px;
  overflow: hidden;
  background: #e9edf6;
  margin-top: -3%;
}
.brand-loader-line span {
  display: block;
  height: 100%;
  width: 100%;
  background: #d45343;
  transform-origin: left;
  animation: brand-loader-line-progress 1.65s linear both;
}
@keyframes brand-symbol-enter {
  from { opacity: 0; transform: translateY(9px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes brand-name-reveal {
  from { clip-path: inset(0 100% 0 0); opacity: .55; }
  12% { opacity: 1; }
  to { clip-path: inset(0 0 0 0); opacity: 1; }
}
@keyframes brand-tagline-reveal {
  from { clip-path: inset(0 100% 0 0); opacity: .3; }
  to { clip-path: inset(0 0 0 0); opacity: 1; }
}
@keyframes brand-loader-line-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-loader *, .brand-loader *::before, .brand-loader *::after {
    animation: none !important;
    transition: none !important;
  }
}
