:root {
    --mdist-blue: #0564bd;
    --mdist-blue-dark: #003c78;
    --mdist-navy: #04224a;
    --text: #071a32;
    --muted: #64748b;
    --surface: #ffffff;
    --border: #dce5ef;
    --header-height: 86px;
    color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.login-button, .primary-cta { text-decoration: none; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.97);
    border-top: 2px solid #78d5df;
    box-shadow: 0 1px 0 rgba(15,23,42,.08);
    backdrop-filter: blur(12px);
}
.header-row {
    min-height: var(--header-height);
    display: grid;
    grid-template-columns: 118px minmax(220px, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 14px clamp(20px, 4vw, 72px);
    max-width: 1920px;
    margin: 0 auto;
}
.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.brand img {
    display: block;
    width: 116px;
    height: auto;
}
.header-search {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 17px;
    border-radius: 10px;
    background: #f3f5f8;
    border: 1px solid transparent;
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.header-search:focus-within {
    background: #fff;
    border-color: #9dc7ef;
    box-shadow: 0 0 0 3px rgba(5,100,189,.10);
}
.header-search svg {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #536273;
    stroke-width: 1.8;
    stroke-linecap: round;
}
.header-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1c2b3b;
}
.header-search input::placeholder { color: #7d8794; opacity: 1; }
.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}
.login-button,
.primary-cta {
    border: 0;
    color: #fff;
    background: var(--mdist-blue);
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(2,84,166,.18);
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.login-button:hover,
.primary-cta:hover {
    background: #0455a2;
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(2,84,166,.24);
}
.login-button:focus-visible,
.primary-cta:focus-visible,
.hero-arrow:focus-visible,
.hero-dot:focus-visible,
.footer-links a:focus-visible {
    outline: 3px solid #62a9ea;
    outline-offset: 3px;
}
.login-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 18px;
    border-radius: 8px;
    white-space: nowrap;
}
.login-button svg,
.primary-cta svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hero { overflow: hidden; background: #101b27; }
.hero-slider {
    position: relative;
    height: clamp(470px, 61vw, 640px);
    min-height: 470px;
    max-height: 640px;
    isolation: isolate;
    overflow: hidden;
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.025);
    transition: opacity .7s ease, transform 6s ease;
    pointer-events: none;
}
.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}
.hero-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
}
.hero-shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.58) 29%, rgba(0,0,0,.15) 53%, rgba(0,0,0,0) 78%),
        linear-gradient(0deg, rgba(0,0,0,.18), transparent 36%);
}
.hero-copy {
    position: relative;
    z-index: 3;
    width: min(760px, calc(100% - 180px));
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin-left: clamp(72px, 7vw, 130px);
    padding: 48px 0 66px;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,.22);
}
.hero-eyebrow {
    margin: 0 0 17px;
    font-size: clamp(12px, 1.05vw, 15px);
    font-weight: 800;
    letter-spacing: .38em;
    opacity: .88;
}
.hero-copy h1 {
    margin: 0;
    font-size: clamp(46px, 4.4vw, 72px);
    line-height: .98;
    letter-spacing: -.035em;
    font-weight: 800;
}
.hero-copy h2 {
    margin: 12px 0 20px;
    font-size: clamp(42px, 4vw, 66px);
    line-height: 1;
    letter-spacing: -.035em;
    font-weight: 800;
    color: #3b9ae8;
}
.hero-description {
    max-width: 690px;
    margin: 0 0 28px;
    font-size: clamp(18px, 1.55vw, 24px);
    line-height: 1.5;
    color: rgba(255,255,255,.94);
}
.primary-cta {
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 0 26px;
    border-radius: 7px;
    font-size: 20px;
}
.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.74);
    color: #273444;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}
.hero-arrow:hover { background: rgba(255,255,255,.95); transform: translateY(-50%) scale(1.05); }
.hero-arrow svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hero-arrow-prev { left: 24px; }
.hero-arrow-next { right: 24px; }
.hero-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 9px;
}
.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 50%;
    background: rgba(255,255,255,.26);
    cursor: pointer;
    transition: width .2s ease, border-radius .2s ease, background .2s ease;
}
.hero-dot.is-active { width: 28px; border-radius: 999px; background: #fff; }

.benefits { background: #fff; border-bottom: 1px solid #e5edf5; }
.benefits-grid {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 30px clamp(34px, 6vw, 110px);
}
.benefit {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 28px;
    border-right: 1px solid var(--border);
}
.benefit:first-child { padding-left: 0; }
.benefit:last-child { border-right: 0; padding-right: 0; }
.benefit-icon {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    color: var(--mdist-blue);
}
.benefit-icon svg {
    width: 48px;
    height: 48px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.benefit h3 { margin: 0 0 5px; font-size: 18px; line-height: 1.15; }
.benefit p { margin: 0; color: var(--muted); font-size: 15px; }

.site-footer { background: linear-gradient(120deg, #031d38, #052b4f); color: #e8f2fb; }
.footer-inner {
    min-height: 132px;
    max-width: 1760px;
    margin: 0 auto;
    padding: 26px clamp(38px, 6vw, 100px);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 34px;
}
.footer-brand img { width: 95px; height: auto; filter: brightness(0) invert(1); opacity: .95; }
.footer-brand p { margin: 10px 0 0; font-size: 13px; color: #b8c9d9; }
.footer-links { display: flex; align-items: center; justify-content: center; gap: 0; }
.footer-links a { color: #fff; text-decoration: none; font-size: 14px; padding: 2px 22px; border-right: 1px solid rgba(255,255,255,.22); }
.footer-links a:last-child { border-right: 0; }
.footer-links a:hover { text-decoration: underline; }
.footer-tagline { margin: 0; justify-self: end; text-align: right; color: #d3e3f1; font-size: 14px; }

.future-toast {
    position: fixed;
    z-index: 999;
    left: 50%;
    bottom: 26px;
    transform: translate(-50%, 18px);
    max-width: min(480px, calc(100vw - 30px));
    padding: 12px 18px;
    border-radius: 9px;
    background: rgba(5,35,68,.96);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,.24);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
.future-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1120px) {
    .header-row { grid-template-columns: 104px minmax(180px, 1fr) auto; gap: 14px; padding-inline: 24px; }
    .brand img { width: 102px; }
    .benefits-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 0; }
    .benefit:nth-child(2) { border-right: 0; }
    .benefit:nth-child(3), .benefit:nth-child(4) { border-top: 1px solid var(--border); padding-top: 20px; }
    .footer-inner { grid-template-columns: 1fr; text-align: center; }
    .footer-brand, .footer-tagline { justify-self: center; text-align: center; }
}

@media (max-width: 760px) {
    :root { --header-height: auto; }
    .header-row {
        grid-template-columns: 1fr auto;
        gap: 10px 12px;
        padding: 10px 14px 12px;
    }
    .brand img { width: 91px; }
    .header-actions { gap: 7px; }
    .login-button { min-height: 41px; padding: 0 12px; font-size: 13px; }
    .login-button svg { width: 18px; height: 18px; }
    .header-search {
        grid-column: 1 / -1;
        grid-row: 2;
        height: 43px;
        padding-inline: 13px;
        border-radius: 8px;
    }
    .hero-slider { height: 510px; min-height: 510px; }
    .hero-slide img { object-position: 66% center; }
    .hero-shade {
        background:
            linear-gradient(90deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.47) 55%, rgba(0,0,0,.08) 100%),
            linear-gradient(0deg, rgba(0,0,0,.28), transparent 48%);
    }
    .hero-copy {
        width: calc(100% - 64px);
        margin-left: 32px;
        padding: 48px 0 72px;
        justify-content: flex-end;
    }
    .hero-eyebrow { margin-bottom: 12px; font-size: 11px; }
    .hero-copy h1 { font-size: clamp(36px, 10vw, 50px); }
    .hero-copy h2 { margin: 8px 0 14px; font-size: clamp(33px, 9.3vw, 46px); }
    .hero-description { max-width: 520px; margin-bottom: 22px; font-size: 16px; line-height: 1.42; }
    .primary-cta { min-height: 52px; padding: 0 21px; font-size: 17px; }
    .hero-arrow { width: 39px; height: 39px; }
    .hero-arrow-prev { left: 10px; }
    .hero-arrow-next { right: 10px; }
    .hero-arrow svg { width: 23px; height: 23px; }
    .benefits-grid { grid-template-columns: 1fr; padding: 14px 20px 18px; }
    .benefit, .benefit:first-child, .benefit:last-child {
        min-height: 74px;
        padding: 12px 0;
        border-right: 0;
        border-top: 1px solid var(--border);
    }
    .benefit:first-child { border-top: 0; }
    .benefit-icon { flex-basis: 48px; width: 48px; height: 48px; }
    .benefit-icon svg { width: 40px; height: 40px; }
    .benefit h3 { font-size: 16px; }
    .benefit p { font-size: 14px; }
    .footer-inner { min-height: 0; padding: 28px 22px 32px; gap: 22px; }
    .footer-links { flex-wrap: wrap; row-gap: 10px; }
    .footer-links a { padding-inline: 14px; }
}

@media (max-width: 410px) {
    .login-button span { display: none; }
    .login-button { width: 41px; padding: 0; justify-content: center; border-radius: 50%; }
    .hero-copy { width: calc(100% - 48px); margin-left: 24px; }
    .hero-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Catálogo de búsqueda pública: se mantiene separado del carrito del portal. */
.header-search {position:relative;}
.home-search-suggestions {position:absolute;z-index:250;top:calc(100% + 7px);left:0;right:0;max-height:min(64vh,560px);overflow:auto;background:#fff;border:1px solid #dae3ee;border-radius:11px;box-shadow:0 17px 40px rgba(1,24,58,.16);padding:5px;}
.home-search-suggestions[hidden],.public-catalog[hidden],.public-catalog-pages[hidden]{display:none!important;}
.home-suggestion{width:100%;display:flex;align-items:center;gap:12px;text-align:left;padding:9px 12px;border:0;border-radius:8px;background:#fff;color:#12233d;cursor:pointer;}
.home-suggestion:hover,.home-suggestion:focus-visible{background:#edf4fb;}
.home-suggestion img{height:42px;width:42px;object-fit:contain;flex-shrink:0;}
.home-suggestion span{min-width:0;display:grid;gap:4px;}.home-suggestion strong{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.home-suggestion small{color:#667891;font-size:12px;}
.home-suggestion-all{font-weight:700;color:#044d9c;}
.public-catalog{max-width:1640px;margin:0 auto;padding:30px clamp(16px,4vw,60px) 42px;scroll-margin-top:95px;}
.public-catalog-heading{display:flex;justify-content:space-between;align-items:start;gap:12px;}.public-catalog-heading h2{font-size:clamp(21px,3vw,30px);margin:4px 0 5px;}.public-catalog-heading p{margin:0;color:#64748b;}.public-catalog-eyebrow{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.09em;}
.public-catalog-close,.public-catalog-pages button{cursor:pointer;background:#fff;border:1px solid #aac5e3;border-radius:8px;color:#042093;padding:9px 14px;font-weight:700;}
.public-catalog-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:20px 0;padding:12px 0;border-top:1px solid #ebf0f6;border-bottom:1px solid #ebf0f6;}.public-catalog-filters label{font-size:12px;font-weight:700;color:#40516d;display:grid;gap:5px;}.public-catalog-filters select{min-width:160px;max-width:300px;padding:9px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;}.public-catalog-filters .public-low-filter{display:flex;align-items:center;gap:7px;padding-bottom:8px;}
.public-catalog-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;}.public-product{min-width:0;display:flex;flex-direction:column;gap:8px;padding:10px;border-radius:10px;}.public-product.is-chosen{outline:2px solid #9ac3ee;background:#f6faff;}.public-product>img{width:100%;height:150px;object-fit:contain;}.public-product-info strong{font-size:13px;}.public-product-info p{font-size:13px;margin:5px 0 7px;line-height:1.35;}.public-product-info small{font-size:11px;color:#667891;}.public-product>a{font-size:12px;font-weight:700;color:#042093;text-decoration:none;}.public-product>a:hover{text-decoration:underline;}
.public-catalog-message{grid-column:1/-1;color:#64748b;padding:35px 4px;}.public-catalog-pages{display:flex;align-items:center;justify-content:center;gap:18px;margin:25px 0;}.public-catalog-pages button:disabled{opacity:.4;cursor:default;}.public-catalog-footnote{margin-top:22px;color:#64748b;font-size:13px;}.public-catalog-footnote a{color:#042093;font-weight:700;}
body.is-searching .hero,body.is-searching .benefits{display:none;}
@media(max-width:1080px){.public-catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:690px){.public-catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}.public-product{padding:6px;}.public-product>img{height:125px;}.public-catalog-heading{align-items:start;}.public-catalog-close{font-size:12px;padding:8px;}.public-catalog-filters select{min-width:125px;max-width:170px;}.home-search-suggestions{position:absolute;max-height:55vh;}}

/* Consulta pública: mismo modal de detalle que utiliza el catálogo del cliente. */
.public-product-open{display:flex;flex-direction:column;flex:1 1 auto;gap:8px;min-width:0;width:100%;padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer;}
.public-product-open>img{display:block;width:100%;height:150px;object-fit:contain;}
.public-product-open .public-product-info{display:block;min-width:0;}
.public-product-name{display:block;font-size:13px;margin:5px 0 7px;line-height:1.35;}
.public-product-open:hover .public-product-name,.public-product-open:focus-visible .public-product-name{color:#042093;text-decoration:underline;}
.public-product-open:focus-visible{outline:2px solid #042093;outline-offset:3px;border-radius:5px;}
.public-product>a{display:block;margin-top:auto;align-self:flex-start;line-height:1.4;}
@media(max-width:690px){.public-product-open>img{height:125px;}}
