/* =========================================================
   CAYENASOFT - ESTILOS PROPIOS (cayena-custom.css)
   ---------------------------------------------------------
   Cargar DESPUÉS de responsive.css:
   <link rel="stylesheet" href="{{ asset('css/cayena-custom.css') }}" />

   Usa clases nuevas (prefijo cs-) para no chocar con el tema.
   - Menú de escritorio en una sola línea, bien alineado.
   - Slider con mínimo 500px de alto en computadora.
   ========================================================= */


/* =========================================================
   1. BARRA ROJA SUPERIOR (cs-topbar)
   ========================================================= */
@media (min-width: 992px) {
    body .cs-topbar {
        padding: 10px clamp(15px, 3vw, 60px) !important;
    }
}


/* =========================================================
   2. MENÚ PRINCIPAL DE ESCRITORIO (cs-nav)
   ========================================================= */
@media (min-width: 992px) {

    /* Barra blanca */
    body .cs-nav {
        padding: 0 clamp(15px, 3vw, 60px) !important;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-shadow: 0 2px 15px rgba(0, 0, 0, .06);
    }

    body .cs-nav .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow: visible;
    }

    /* Fila: logo | menú */
    body .cs-nav .cs-nav-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center;
        min-height: 90px;
        max-width: 1800px;
        margin: 0 auto !important;
    }

    /* Columna del logo: solo lo que mide el logo */
    body .cs-nav .cs-nav-logo {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
        float: none !important;
        padding: 0 25px 0 0 !important;
    }

    body .cs-nav .cs-nav-logo a {
        display: block;
        margin: 0 !important;
    }

    body .cs-nav .cs-nav-logo img {
        display: block;
        width: auto !important;
        height: auto !important;
        max-width: 170px !important;
        max-height: 58px !important;
    }

    /* Columna del menú: todo el espacio restante */
    body .cs-nav .cs-nav-menu {
        flex: 1 1 auto !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0;
        float: none !important;
        padding: 0 !important;
    }

    body .cs-nav .cs-nav-inner {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center;
        justify-content: flex-end;
        gap: 0 !important;
    }

    body .cs-nav .cs-nav-links {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center;
        justify-content: flex-end;
        flex: 1 1 auto;
        min-width: 0;
        gap: 0 !important;
    }

    /* Opciones del menú en una sola línea */
    body .cs-nav .cs-nav-list {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center;
        justify-content: flex-end;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body .cs-nav .cs-nav-list > li {
        position: relative;
        display: block;
    }

    body .cs-nav .cs-nav-list > li > a {
        display: block;
        margin: 34px clamp(7px, 0.75vw, 15px) !important;
        font-size: clamp(14px, 1vw, 17px) !important;
        line-height: 1.2;
        white-space: nowrap;
    }

    /* Submenús (Productos, Soporte) */
    body .cs-nav .cs-nav-list > li > .sub-menu {
        width: auto !important;
        min-width: 220px;
        padding: 12px 0 !important;
        border-top: 3px solid #c01120;
        text-align: left;
    }

    body .cs-nav .cs-nav-list > li:hover > .sub-menu {
        z-index: 999;
    }

    body .cs-nav .cs-nav-list > li > .sub-menu li a {
        display: block;
        margin: 0 !important;
        padding: 8px 22px;
        font-size: 15px !important;
        line-height: 1.3;
        white-space: nowrap;
        transition: .3s;
    }

    body .cs-nav .cs-nav-list > li > .sub-menu li a:hover {
        background: #f7f7f7;
        padding-left: 28px;
    }

    /* Botón de búsqueda */
    body .cs-nav .cs-nav-search {
        flex-shrink: 0;
    }

    body .cs-nav .cs-nav-search .em-quearys-menu i {
        margin-left: 6px;
    }

    /* Bloque de WhatsApp */
    body .cs-nav .cs-nav-wa {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 10px;
        margin-left: 18px;
        padding-left: 20px;
        white-space: nowrap;
    }

    body .cs-nav .cs-nav-wa::before {
        display: block !important;
        left: 0 !important;
        top: 50% !important;
        height: 50px !important;
        transform: translateY(-50%);
    }

    body .cs-nav .cs-nav-wa .main_menu_header_icon {
        margin: 0 !important;
    }

    body .cs-nav .cs-nav-wa .main_menu_header_icon i {
        font-size: 32px;
        line-height: 1;
    }

    body .cs-nav .cs-nav-wa .main_menu_header_address_text {
        line-height: 1.2;
    }

    body .cs-nav .cs-nav-wa .main_menu_header_address_text h3 {
        margin: 0 0 2px !important;
        font-size: 15px !important;
        line-height: 1.2;
        white-space: nowrap;
    }

    body .cs-nav .cs-nav-wa .main_menu_header_address_text h4,
    body .cs-nav .cs-nav-wa .main_menu_header_address_text h4 a {
        margin: 0 !important;
        font-size: 16px !important;
        line-height: 1.2;
        white-space: nowrap;
    }
}

/* Laptops (1200 - 1279px): un poco más compacto */
@media (min-width: 1200px) and (max-width: 1279px) {
    body .cs-nav .cs-nav-list > li > a {
        margin-left: 6px !important;
        margin-right: 6px !important;
        font-size: 14px !important;
    }
}

/* Laptops pequeñas (992 - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    body .cs-topbar,
    body .cs-nav {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    body .cs-nav .cs-nav-logo {
        padding-right: 12px !important;
    }

    body .cs-nav .cs-nav-logo img {
        max-width: 120px !important;
        max-height: 45px !important;
    }

    /* Si aun así no cabe, pasa ordenado a 2 líneas (nunca se encima) */
    body .cs-nav .cs-nav-list {
        flex-wrap: wrap !important;
        justify-content: center;
    }

    body .cs-nav .cs-nav-list > li > a {
        margin: 14px 5px !important;
        font-size: 13px !important;
    }

    body .cs-nav .cs-nav-wa {
        margin-left: 10px;
        padding-left: 12px;
    }

    body .cs-nav .cs-nav-wa .main_menu_header_icon,
    body .cs-nav .cs-nav-wa .main_menu_header_address_text h3 {
        display: none !important;
    }

    body .cs-nav .cs-nav-wa .main_menu_header_address_text h4,
    body .cs-nav .cs-nav-wa .main_menu_header_address_text h4 a {
        font-size: 14px !important;
    }
}


/* =========================================================
   3. SLIDER PRINCIPAL (cs-slider)
   Computadora: mínimo 500px de alto.
   Celular/tablet: altura proporcional.
   La imagen se recorta (cover), nunca se estira.
   ========================================================= */
body .cs-slider {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 10px !important;
    overflow: visible !important;
}

body .cs-slider .cs-slider-box {
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    height: clamp(170px, 42vw, 380px) !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

@media (min-width: 992px) {
    body .cs-slider .cs-slider-box {
        height: clamp(500px, 32vw, 640px) !important;
    }
}

body .cs-slider .swiper-wrapper,
body .cs-slider .swiper-slide {
    height: 100% !important;
    min-height: 0 !important;
}

body .cs-slider .swiper-slide > a,
body .cs-slider .swiper-slide > div,
body .cs-slider .sld_pub_wrap {
    display: block;
    width: 100%;
    height: 100%;
}

body .cs-slider .cs-slider-img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    object-fit: cover !important;
    object-position: center center;
}

/* Flechas siempre visibles */
body .cs-slider .swiper-button-prev,
body .cs-slider .swiper-button-next {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: clamp(32px, 3.4vw, 42px) !important;
    height: clamp(32px, 3.4vw, 42px) !important;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(0, 0, 0, .45) !important;
    border-radius: 50% !important;
    color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 20 !important;
}

body .cs-slider .swiper-button-prev {
    left: 10px !important;
}

body .cs-slider .swiper-button-next {
    right: 10px !important;
}

body .cs-slider .swiper-button-prev::after,
body .cs-slider .swiper-button-next::after {
    font-size: clamp(13px, 1.6vw, 18px) !important;
    color: #fff !important;
}

body .cs-slider .swiper-scrollbar {
    height: 3px !important;
    bottom: 6px !important;
}