/* ==========================================================================
   OptiNet — Hoja de estilos general
   Paleta:
     Naranja  #ff4f1d
     Azul     #002855
     Blanco   #f0f4f8
     Gris     #bdc3c7
     Celeste  #a9cce3

   Fuentes (Google Fonts vía CDN, cargadas en header_view.php):
     Poppins — principal (textos, títulos y subtítulos)
   ========================================================================== */

:root {
    --opti-naranja:  #ff4f1d;
    --opti-azul:     #002855;
    --opti-blanco:   #f0f4f8;
    --opti-gris:     #bdc3c7;
    --opti-celeste:  #a9cce3;
    --opti-azul-oscuro: #001a33;

    --opti-font-base:    'Poppins', sans-serif;
    --opti-font-titulos: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    color: var(--opti-azul);
    background: #ffffff;
}

h1, h2, h3, h4, h5, h6,
.section-title,
.banner-slider .banner-caption h2,
.footer-main h4 {
    font-family: var(--opti-font-titulos);
    font-weight: 700;
    letter-spacing: .3px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ==========================================================================
   HEADER DESKTOP: fondo azul oscuro, logo a la IZQUIERDA, menú en el CENTRO, iconos a la DERECHA
   ========================================================================== */
.desktop-header {
    background: var(--opti-azul, #002855);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}
.desktop-header .container { max-width: 1320px; }
.desktop-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 90px;
    gap: 32px;
}
.desktop-header-right { position: relative; /* columna derecha con iconos de contacto */ }

/* Buscador desplegable del header */
.header-search-box {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 320px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 210;
}
.header-search-box.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.header-search-form {
    display: flex;
    gap: 8px;
}
.header-search-input {
    flex: 1;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-family: var(--opti-font-base);
    font-size: 14px;
    color: #2c3e50;
}
.header-search-input:focus {
    outline: none;
    border-color: var(--opti-azul, #002855);
}
.header-search-submit {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: none;
    border-radius: 6px;
    background: var(--opti-azul, #002855);
    color: #ffffff;
    cursor: pointer;
    transition: background .2s ease;
}
.header-search-submit:hover {
    background: var(--opti-naranja, #ff4f1d);
}

/* Iconos de contacto (teléfono / correo) en la esquina superior derecha */
.header-contact-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}
.header-contact-icon {
    position: relative;
    width: 38px;
    height: 38px;
    border: none;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-family: inherit;
    text-decoration: none;
    transition: background .25s ease, transform .25s ease, color .25s ease;
    cursor: pointer;
}
.header-contact-icon:hover {
    color: #ffffff;
    background: rgba(255, 79, 29, .15);
    transform: translateY(-2px);
}
/* Tooltip: aparece al lado IZQUIERDO del icono */
.header-contact-tooltip {
    position: absolute;
    top: 50%;
    right: calc(100% + 10px);
    transform: translateY(-50%) translateX(6px);
    background: #ffffff;
    color: var(--opti-azul, #002855);
    font-family: var(--opti-font-base);
    font-size: 15px;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
    z-index: 200;
}
.header-contact-tooltip::before {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #ffffff;
}
.header-contact-icon:hover .header-contact-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.desktop-header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.desktop-header-logo img {
    height: 50px;
    width: auto;
    display: block;
}
.desktop-header-nav { display: flex; justify-content: center; flex: 1; }
.desktop-header-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 36px;
    align-items: center;
}
.desktop-header-menu li a {
    color: #ffffff;
    font-family: var(--opti-font-base);
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    padding: 32px 0;
    position: relative;
    transition: color .25s ease;
    letter-spacing: .3px;
}
.desktop-header-menu li a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 28px;
    width: 0;
    height: 2px;
    background: var(--opti-naranja, #ff4f1d);
    transition: width .3s ease, left .3s ease;
}
.desktop-header-menu li a:hover { color: var(--opti-naranja, #ff4f1d); }
.desktop-header-menu li a:hover::after,
.desktop-header-menu li a.active::after {
    width: 100%;
    left: 0;
}
.desktop-header-menu li a.active { color: var(--opti-naranja, #ff4f1d); }

/* ==========================================================================
   Topbar (contacto) - legacy
   ========================================================================== */
.topbar {
    background: #ffffff;
    border-bottom: 1px solid #eee;
    padding: 6px 0;
    font-size: 13px;
}

.topbar .topbar-icons {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
}

.topbar .topbar-icons a {
    color: var(--opti-naranja);
    font-size: 18px;
    transition: transform .2s ease, color .2s ease;
}

.topbar .topbar-icons a:hover {
    color: var(--opti-azul);
    transform: translateY(-2px);
}

/* ==========================================================================
   Logo principal - legacy
   ========================================================================== */
.brand-wrap {
    text-align: center;
    padding: 18px 0 10px;
    background: #ffffff;
}

.brand-wrap img {
    max-height: 70px;
    margin: 0 auto;
}

/* ==========================================================================
   Menú principal
   ========================================================================== */
.main-menu {
    background: #ffffff;
    border-bottom: 1px solid #eee;
}

.main-menu .nav {
    justify-content: center;
    gap: 36px;
}

.main-menu .nav-link {
    color: var(--opti-naranja);
    font-weight: 500;
    padding: 14px 6px;
    position: relative;
    transition: color .2s ease;
}

.main-menu .nav-link:hover,
.main-menu .nav-link.active {
    color: var(--opti-azul);
}

.main-menu .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 0;
    height: 2px;
    background: var(--opti-azul);
    transition: width .25s ease, left .25s ease;
}

.main-menu .nav-link:hover::after,
.main-menu .nav-link.active::after {
    width: 100%;
    left: 0;
}

/* ==========================================================================
   Barra de categorías (sticky debajo del header principal)
   ========================================================================== */
.categories-bar {
    background: #ffffff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 90px; /* debajo del .desktop-header (90px de alto) */
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    overflow: visible;
}

.categories-list > li {
    position: relative;
    flex: 1 1 0;
    min-width: 110px;
    max-width: 160px;
    text-align: center;
}

.categories-list > li > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 8px 14px;
    color: var(--opti-azul);
    transition: background .25s ease, color .25s ease;
    background: #ffffff;
}

.categories-list > li > a .cat-icon {
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.categories-list > li > a .cat-icon img {
    max-height: 60px;
    max-width: 80px;
    filter: grayscale(0%);
    transition: opacity .25s ease, filter .25s ease;
}

.categories-list > li > a .cat-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--opti-naranja);
    -webkit-mask-image: var(--icon-url);
    mask-image: var(--icon-url);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    opacity: 0;
    transition: opacity .25s ease;
}

.categories-list > li > a .cat-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    min-height: 32px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* En hover/active el fondo se queda blanco, sin línea inferior */
.categories-list > li:hover > a,
.categories-list > li.active > a {
    background: #ffffff;
    color: var(--opti-naranja);
}

.categories-list > li:hover > a .cat-icon img,
.categories-list > li.active > a .cat-icon img {
    filter: none;
    opacity: 0;
}

.categories-list > li:hover > a .cat-icon::after,
.categories-list > li.active > a .cat-icon::after {
    opacity: 1;
}

/* Submenú vertical desplegable (categoría con subcategorías) — fondo blanco, texto azul */
.submenu {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 180px;
    background: #ffffff;
    color: var(--opti-azul);
    z-index: 50;
    display: none;
    box-shadow: 0 6px 14px rgba(0,40,85,.18);
    border-top: 3px solid var(--opti-azul);
}

.submenu li {
    margin: 0;
}

.submenu li a {
    display: block;
    padding: 8px 16px;
    color: var(--opti-azul);
    font-size: 14px;
    font-weight: 400;
    border-bottom: 1px solid var(--opti-celeste, #a9cce3);
    transition: background .2s ease, padding-left .2s ease, color .2s ease;
    text-align: left;
}

.submenu li:last-child a { border-bottom: none; }

.submenu li a:hover {
    background: var(--opti-blanco, #f0f4f8);
    color: var(--opti-naranja, #ff4f1d);
    padding-left: 22px;
}

.categories-list > li:hover > .submenu,
.categories-list > li:focus-within > .submenu {
    display: block;
    animation: slideDown .35s ease both;
}

/* Mantener el submenú visible mientras se interactúa con él */
.submenu:hover {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Banner slider (efecto fade)
   ========================================================================== */
.banner-slider {
    position: relative;
    width: 100%;
    background: var(--opti-celeste);
    overflow: hidden;
}

.banner-slider .banner-slide {
    position: relative;
    width: 100%;
    display: none;
    animation: fadeIn 1s ease both;
}

.banner-slider .banner-slide.active {
    display: block;
}

.banner-slider .banner-slide img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
}

.banner-slider .banner-caption {
    position: absolute;
    top: 50%;
    right: 8%;
    transform: translateY(-50%);
    color: var(--opti-azul);
    text-align: left;
}

.banner-slider .banner-caption h2 {
    font-size: 38px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--opti-azul);
}

.banner-slider .banner-caption p {
    font-size: 18px;
    margin: 0;
    color: var(--opti-azul);
}

.banner-slider .banner-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.banner-slider .banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,.6);
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background .25s ease;
}

.banner-slider .banner-dot.active {
    background: var(--opti-naranja);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ==========================================================================
   Secciones de contenido
   ========================================================================== */
.section {
    padding: 60px 0;
}

.section-title {
    color: var(--opti-azul);
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    font-family: var(--opti-font-titulos);
}

.btn-opti {
    background: var(--opti-naranja);
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 4px;
    border: none;
    font-weight: 500;
    transition: background .25s ease;
}

.btn-opti:hover {
    background: #e6420f;
    color: #ffffff;
}

.btn-opti-outline {
    background: transparent;
    color: var(--opti-naranja);
    border: 2px solid var(--opti-naranja);
    padding: 8px 22px;
    border-radius: 4px;
    font-weight: 500;
    transition: background .25s ease, color .25s ease;
}

.btn-opti-outline:hover {
    background: var(--opti-naranja);
    color: #ffffff;
}

/* ==========================================================================
   Banner de sección (Libro de Reclamaciones, etc.)
   ========================================================================== */
.section-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 360px;
    display: flex;
    align-items: center;
    color: #ffffff;
}

.section-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(0, 40, 85, .75) 0%,
        rgba(0, 40, 85, .45) 60%,
        rgba(0, 40, 85, .25) 100%);
}

.section-banner-content {
    position: relative;
    z-index: 2;
    padding: 60px 0;
}

.section-banner-content h1 {
    margin: 0 0 12px;
    color: #ffffff;
    font-family: var(--opti-font-titulos);
    font-weight: 700;
    font-size: 56px;
    letter-spacing: .5px;
    text-shadow: 0 2px 12px rgba(0,0,0,.45);
    line-height: 1.1;
}

.section-breadcrumb {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #f0f4f8;
    letter-spacing: .3px;
}

.section-breadcrumb a,
.section-breadcrumb span {
    color: #f0f4f8;
    text-decoration: none;
    opacity: .9;
}

.section-breadcrumb a:hover { opacity: 1; text-decoration: underline; }
.section-breadcrumb .separator { margin: 0 8px; opacity: .7; }
.section-breadcrumb .current  { opacity: 1; color: #ffffff; }

@media (max-width: 991px) {
    .section-banner { min-height: 300px; }
    .section-banner-content h1 { font-size: 44px; }
}

@media (max-width: 575px) {
    .section-banner { min-height: 220px; }
    .section-banner-content { padding: 40px 0; }
    .section-banner-content h1 { font-size: 30px; }
    .section-breadcrumb { font-size: 12px; }
}

/* ==========================================================================
   Cajas (cards verticales con efecto hover)
   ========================================================================== */
.cajas-section {
    background: #ffffff;
    padding: 30px 0;
}

.cajas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.caja-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 600 / 750;
    box-shadow: 0 4px 14px rgba(0, 40, 85, .08);
    transition: transform .4s cubic-bezier(.2, .8, .2, 1),
                box-shadow .4s ease;
}

.caja-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(0, 40, 85, .22);
}

.caja-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.caja-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1),
                filter .4s ease;
}

.caja-card:hover .caja-link img {
    transform: scale(1.08);
    filter: brightness(.92);
}

.caja-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(0, 40, 85, 0) 35%,
        rgba(0, 40, 85, .35) 70%,
        rgba(0, 40, 85, .55) 100%);
    transition: opacity .4s ease;
    pointer-events: none;
}

.caja-card:hover .caja-overlay {
    background: linear-gradient(180deg,
        rgba(0, 40, 85, .05) 20%,
        rgba(255, 79, 29, .25) 70%,
        rgba(255, 79, 29, .55) 100%);
}

.caja-logo {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #ffffff;
    color: var(--opti-azul);
    padding: 5px 14px;
    border-radius: 20px;
    font-family: var(--opti-font-titulos);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .3px;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    z-index: 2;
}

.caja-logo .opti { color: var(--opti-azul); }
.caja-logo .net  { color: var(--opti-naranja); }

.caja-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px 20px 26px;
    z-index: 2;
    transform: translateY(8px);
    opacity: 0;
    transition: transform .4s ease, opacity .4s ease;
}

.caja-card:hover .caja-content {
    transform: translateY(0);
    opacity: 1;
}

.caja-content h3 {
    margin: 0;
    color: #ffffff;
    font-family: var(--opti-font-titulos);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.2;
    text-shadow: 0 2px 6px rgba(0,0,0,.4);
}

/* Shine animado en hover */
.caja-shine {
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,.35) 50%,
        rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    pointer-events: none;
    z-index: 3;
}

.caja-card:hover .caja-shine {
    animation: cajaShine 1s ease forwards;
}

@keyframes cajaShine {
    0%   { left: -75%; }
    100% { left: 130%; }
}

@media (max-width: 991px) {
    .cajas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (max-width: 575px) {
    .cajas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .caja-content h3 { font-size: 15px; }
    .caja-content { padding: 14px 12px 16px; }
    .caja-logo { top: 8px; right: 8px; padding: 4px 10px; font-size: 12px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer-main {
    background: var(--opti-azul);
    color: #ffffff;
    padding: 50px 0 25px;
    margin-top: 40px;
}

.footer-main h4 {
    color: #ffffff;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
    font-weight: 700;
}

.footer-logo {
    margin-bottom: 18px;
}
.footer-logo-img {
    max-width: 160px;
    height: auto;
    display: block;
}

.footer-main a {
    color: var(--opti-celeste);
    transition: color .2s ease;
}

.footer-main a:hover {
    color: #ffffff;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-info p {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--opti-celeste);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: #ffffff;
    font-size: 16px;
    transition: background .25s ease, transform .25s ease;
}

.footer-social a:hover {
    background: var(--opti-naranja);
    color: #ffffff;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 18px;
    margin-top: 30px;
    text-align: center;
    font-size: 13px;
    color: var(--opti-gris);
}

/* ==========================================================================
   Header mobile
   ========================================================================== */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    background: var(--opti-azul, #002855);
    border-bottom: 1px solid rgba(0,0,0,.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    height: 64px;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.mobile-header-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 22px;
    padding: 6px 10px;
    cursor: pointer;
    line-height: 1;
}

.mobile-header-left {
    display: flex;
    align-items: center;
    gap: 2px;
}

.mobile-search-toggle {
    font-size: 19px;
}

/* Buscador desplegable del header mobile */
.mobile-search-box {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 79;
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .15);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
}
.mobile-search-box.open {
    max-height: 80px;
}
.mobile-search-form {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
}
.mobile-search-input {
    flex: 1;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-family: var(--opti-font-base);
    font-size: 14px;
    color: #2c3e50;
}
.mobile-search-input:focus {
    outline: none;
    border-color: var(--opti-azul, #002855);
}
.mobile-search-submit {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border: none;
    border-radius: 6px;
    background: var(--opti-azul, #002855);
    color: #ffffff;
    cursor: pointer;
}

.mobile-categories-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 18px;
    padding: 4px 8px;
}

.mobile-header-btn-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: uppercase;
    line-height: 1;
}

.mobile-header-logo {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-header-logo img {
    max-height: 40px;
    margin: 0 auto;
}

/* Sidebar móvil */
.mobile-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
    z-index: 90;
}

.mobile-sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    max-width: 80vw;
    background: var(--opti-azul, #002855);
    z-index: 100;
    transform: translateX(-100%);
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 14px rgba(0,0,0,.18);
    overflow-y: auto;
}

.mobile-sidebar.open {
    transform: translateX(0);
}

.mobile-sidebar-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 20px;
    padding: 12px 16px;
    cursor: pointer;
    align-self: stretch;
    display: flex;
    justify-content: flex-end;
    line-height: 1;
}

.mobile-sidebar-logo {
    display: block;
    text-align: center;
    padding: 4px 20px 22px;
    background: transparent;
    margin-bottom: 8px;
}
.mobile-sidebar-logo img {
    max-height: 36px;
    width: auto;
    display: inline-block;
}

.mobile-sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 6px;
}

.mobile-sidebar-nav li {
    width: 100%;
    text-align: center;
}

.mobile-sidebar-nav a {
    display: block;
    padding: 12px 16px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    font-family: var(--opti-font-titulos);
    transition: background .2s ease, color .2s ease;
}

.mobile-sidebar-nav a:hover,
.mobile-sidebar-nav a.active {
    background: transparent;
    color: var(--opti-naranja);
}

.mobile-sidebar-social {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 18px;
    border-top: 1px solid rgba(255,255,255,.15);
}

.mobile-sidebar-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background .2s ease, transform .2s ease;
}

.mobile-sidebar-social a:hover {
    background: var(--opti-naranja);
    transform: translateY(-2px);
}

/* Panel de categorías móvil (desliza desde la derecha) */
.mobile-categories-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 300px;
    max-width: 85vw;
    background: #ffffff;
    z-index: 100;
    transform: translateX(100%);
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 14px rgba(0,0,0,.18);
    overflow-y: auto;
}

.mobile-categories-panel.open {
    transform: translateX(0);
}

.mobile-categories-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--opti-azul, #002855);
    color: #ffffff;
    padding: 16px 18px;
    font-family: var(--opti-font-titulos);
    font-weight: 700;
    font-size: 18px;
}

.mobile-categories-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.mobile-categories-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.mobile-cat-item {
    border-bottom: 1px solid var(--opti-blanco, #f0f4f8);
}

.mobile-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    color: var(--opti-azul, #002855);
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.mobile-cat-row:hover,
.mobile-cat-row:active {
    background: var(--opti-blanco, #f0f4f8);
    color: var(--opti-naranja, #ff4f1d);
}

.mobile-cat-caret {
    font-size: 12px;
    color: var(--opti-naranja, #ff4f1d);
    transition: transform .3s ease;
}

.mobile-cat-item.open .mobile-cat-row {
    background: var(--opti-blanco, #f0f4f8);
    color: var(--opti-naranja, #ff4f1d);
}

.mobile-cat-item.open .mobile-cat-caret {
    transform: rotate(180deg);
}

.mobile-subcat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--opti-blanco, #f0f4f8);
    transition: max-height .35s ease;
}

.mobile-cat-item.open .mobile-subcat-list {
    max-height: 800px;
}

.mobile-subcat-list a {
    display: block;
    padding: 10px 18px 10px 30px;
    color: var(--opti-azul, #002855);
    font-size: 13.5px;
    text-decoration: none;
    border-top: 1px solid #ffffff;
    transition: background .2s ease, color .2s ease, padding-left .2s ease;
}

.mobile-subcat-list a:hover {
    background: var(--opti-blanco, #f0f4f8);
    color: var(--opti-naranja, #ff4f1d);
    padding-left: 34px;
}

/* ==========================================================================
   Banner: link de imagen completa
   ========================================================================== */
.banner-slider .banner-link {
    display: block;
    width: 100%;
}

.banner-slider .banner-link img {
    cursor: pointer;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991px) {
    /* La barra de categorías con iconos es solo de escritorio;
       en mobile se usa el panel deslizable de categorías (ver más abajo) */
    .categories-bar { display: none; }

    /* La cabecera mobile es fixed (flota encima de todo); se compensa
       su altura con padding-top en el body para que no tape el contenido */
    body { padding-top: 64px; }

    .banner-slider .banner-caption h2 { font-size: 24px; }
    .banner-slider .banner-caption p  { font-size: 14px; }
    .main-menu .nav { gap: 18px; flex-wrap: wrap; }
}

@media (max-width: 575px) {
    .brand-wrap img { max-height: 50px; }
    .section { padding: 40px 0; }
    .footer-main { padding: 35px 0 20px; }
    .mobile-header { height: 56px; padding: 8px 12px; }
    .mobile-header-logo img { max-height: 32px; }
    .mobile-search-box { top: 56px; }
    body { padding-top: 56px; }
}