/*
 * Custom code goes here.
 * A template should always ship with an empty custom.css
 */

/* ===================================
   HEADER LAYOUT FIX - v4
   =================================== */

/* 1. header-nav fixed en la parte superior de la pantalla
      mientras se navega por toda la web. */
#header .header-nav {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1001;
    background: #111 !important;
    height: 50px;
    margin-bottom: 0 !important;
}

/* 2. Evitar que Bootstrap flex rompa el layout flotante
      de col-head1 y col-head2 dentro del header-nav */
#header .header-nav > .container > .row {
    display: block !important;
    overflow: hidden;
}

/* Ocultar el col-head1 (displayNav1) que mostraba "Contacte con nosotros" extra */
#header .header-nav .col-head1 {
    display: none !important;
}

/* col-head2 ocupa todo el ancho, manteniendo el contenido alineado a la derecha */
#header .header-nav .col-head2 {
    float: none !important;
    width: 100% !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    height: 50px;
}

#header .header-nav .right-nav {
    justify-content: flex-end !important;
    width: 100%;
    height: 100%;
    align-items: center;
}


/* Quitar el bloque redondeado de _desktop_user_info */
div#_desktop_user_info,
#_desktop_user_info,
#_desktop_user_info a {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Icono de "Iniciar sesión" en línea (a la izquierda del texto) */
#header .header-nav .user-info a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px;
}

#header .header-nav .user-info a i {
    margin-bottom: 0 !important;
    line-height: 1 !important;
}

/* 3. Empujar el header-top 50px hacia abajo para que
      no quede oculto detrás del header-nav fijo */
#header .header-top {
    margin-top: 0px;
}

/* Colapsar header-banner por si tiene altura residual */
#header .header-banner {
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Buscador estilo oscuro redondeado */
#header .header-top .search-widget {
    display: inline-block !important;
    overflow: visible !important;
}

/* form inline-block para que su ancho = ancho del input,
   así el botón absolute queda DENTRO del input */
#header .header-top .search-widget form {
    position: relative !important;
    display: inline-block !important;
    overflow: visible !important;
}

#header .header-top .search-widget form input[type=text] {
    background: #2a2a2a !important;
    border: 1px solid #444 !important;
    border-radius: 25px !important;
    color: #ccc !important;
    padding: 8px 42px 8px 18px !important;
    width: 230px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
}

#header .header-top .search-widget form input[type=text]::placeholder {
    color: #aaa !important;
}

#header .header-top .search-widget form input[type=text]:focus {
    outline: none !important;
    border-color: #666 !important;
    background: #2a2a2a !important;
    color: #eee !important;
}

#header .header-top .search-widget form button[type=submit] {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    bottom: auto !important;
    left: auto !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    color: #aaa !important;
    cursor: pointer;
}
/*
#header .header-top .search-widget form button[type=submit] i {
    color: #aaa !important;
    font-size: 18px !important;
    line-height: 1 !important;
    float: none !important;
    display: block !important;
    margin: 0 !important;
}
*/
/* ===================================
   FOOTER
   =================================== */

/* Fondo blanco y texto oscuro */
.footer-container,
#footer {
    background: #fff !important;
    color: #232323 !important;
    box-shadow: none !important;
    border-top: 1px solid #e5e5e5;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

/* Columnas del footer: alineadas horizontalmente con separadores */
@media (min-width: 768px) {
    .footer-container .miFooter {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
    }

    /* Separador vertical entre columnas */
    .footer-container .miFooter > *:not(:last-child) {
        border-right: 1px solid #e0e0e0;
        padding-right: 2rem;
    }

    .footer-container .miFooter > *:not(:first-child) {
        padding-left: 2rem;
    }
}

/* Títulos de columna */
.footer-container .links .h3,
.footer-container .h3 {
    font-size: .875rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #232323 !important;
    margin-bottom: .75rem !important;
    letter-spacing: .05em;
}

/* Links */
.footer-container li a {
    color: #555 !important;
    font-size: .8125rem !important;
    text-decoration: none !important;
}

.footer-container li a:hover {
    color: #c8a84b !important;
    text-decoration: underline !important;
}

/* Bloque de contacto: alineado a la derecha */
.footer-container .block-contact {
    text-align: right !important;
}

.footer-container .block-contact h4 {
    font-size: .875rem !important;
    font-weight: 700 !important;
    text-transform: none !important;
    color: #232323 !important;
    margin-bottom: .75rem !important;
}

.footer-container .block-contact address {
    font-size: .8125rem !important;
    color: #555 !important;
    line-height: 1.6 !important;
}

.footer-container .block-contact a {
    color: #c8a84b !important;
    text-decoration: none !important;
}

/* 2. Clases responsive de Bootstrap 4 (fallback por si no cargan) */
.d-none { display: none !important; }

@media (min-width: 768px) {
    .d-md-none         { display: none !important; }
    .d-md-block        { display: block !important; }
    .d-md-inline-block { display: inline-block !important; }
    .d-md-flex         { display: flex !important; }
}

/* 3. Forzar layout de bloque/clearfix en el row del header-top
      para que los float de col-logo y col-search funcionen
      aunque Bootstrap 4 defina .row como flex */
#header .header-top > .container > .row {
    display: block !important;
}
#header .header-top > .container > .row::after {
    content: "";
    display: table;
    clear: both;
}

/* 4. Columnas con float para escritorio */
@media (min-width: 768px) {
    /* Logo: columna izquierda 38% */
    #header .header-top #_desktop_logo.col-logo {
        float: left !important;
        width: 38% !important;
        margin-top: 0;
    }

    /* Buscador: columna derecha 60% */
    #header .header-top .col-search {
        float: right !important;
        width: 60% !important;
        margin-top: 37px;
    }
}

/* 5. Navegación (displayTopMenu): debajo de las columnas,
      ancho completo, ítems horizontales */
@media (min-width: 768px) {
    /* Limpia los floats y ocupa todo el ancho */
    #header .header-top #_desktop_top_menu {
        clear: both !important;
        width: 100% !important;
        display: block !important;
        float: none !important;
    }

    /* ul de primer nivel → flex horizontal */
    #header .header-top #_desktop_top_menu > ul.top-menu[data-depth="0"] {
        display: flex !important;
        justify-content: space-around;
        align-items: center;
        list-style: none;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    /* Cada ítem ocupa el mismo espacio */
    #header .header-top #_desktop_top_menu > ul.top-menu[data-depth="0"] > li.category {
        flex: 1 !important;
        width: auto !important;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}


/* ===================================
   HEADER LAYOUT FIX - v5 (Estilo Pastilla)
   =================================== */

/* 1. Hacemos que la barra principal sea transparente para que no cruce toda la pantalla */
#header .header-nav {
    position: fixed !important;
    top: 0px; /* Le damos un poco de separación del borde superior */
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1001;
    background: transparent !important; /* FONTO TRANSPARENTE */
    height: auto;
    margin-bottom: 0 !important;
    pointer-events: none; /* Esto evita que la capa invisible bloquee clics en el fondo */
}

/* 2. Ajustamos el contenedor y la fila para alinear la pastilla a la derecha */
#header .header-nav > .container {
    display: flex;
    justify-content: flex-end; /* Alinea la pastilla a la derecha del contenedor */
    background: transparent !important;
}

#header .header-nav > .container > .row {
    display: flex !important; /* Cambiamos de block a flex */
    width: auto; 
    margin: 0;
}

/* 3. Aplicamos el fondo negro y los bordes redondeados solo a los iconos */
#header .header-nav .col-head2 {
    pointer-events: auto; /* Reactivamos los clics dentro de la pastilla */
    float: none !important;
    width: auto !important; /* IMPORTANTE: Que solo ocupe lo que midan los iconos */
    display: flex !important;
    align-items: center !important;
    background: #111 !important; /* El color negro ahora solo está aquí */
    height: 45px; /* Un poco más estilizada */
    padding: 0 25px; /* Espacio lateral interno */
    border-radius: 50px; /* Bordes totalmente redondeados */
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); /* Sombra suave para darle profundidad */
}

/* Ajuste para los iconos y el carrito dentro de la pastilla */
#header .header-nav .right-nav {
    display: flex;
    align-items: center;
    gap: 15px; /* Espacio entre los elementos (WhatsApp, Sesión, Carrito) */
}


/* CAMBIOS PARA ENLACE DE WHATSAPP*/

/* 1. LIBERAR LOS CONTENEDORES (Quitar las "tijeras") */
#header .header-nav, 
#header .header-nav .container, 
#header .header-nav .row,
#header .header-nav .col-head2 {
    overflow: visible !important; /* Permite que el menú salga hacia afuera */
    position: relative; 
}

/* 2. EL ANCLA (El punto de referencia) */
ul.contact > li {
    position: relative !important; /* La tarjeta se posicionará respecto a este punto */
    display: flex;
    align-items: center;
}

/* 3. LA TARJETA BLANCA (El desplegable) */
ul.contact li ul {
    display: none; /* Oculto por defecto */
    position: absolute !important;
    top: 100%; /* Justo debajo del icono */
    left: 50%;
    transform: translateX(-50%); /* Centrado perfecto */
    background: #ffffff !important;
    min-width: 320px;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 99999 !important; /* Por encima de cualquier otro elemento */
    margin-top: 15px;
}

/* 4. ACTIVACIÓN AL PASAR EL RATÓN */
ul.contact li:hover > ul {
    display: block !important; /* ¡Aparece! */
}

/* 5. EL TRIÁNGULO CONECTOR */
ul.contact li:hover > ul::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #ffffff;
}

/* =================================================
   ESTILOS VISUALES DEL DESPLEGABLE WHATSAPP
   (Solo afecta al interior de la caja)
   ================================================= */

/* 1. Forzamos la caja blanca (ul) */
#link-header ul.contact li ul {
    all: initial !important;
    display: none !important;
    position: absolute !important;
    background: #ffffff !important;
    width: 426px !important;
    padding: 30px 30px 9px !important;
    border: solid 1px #cccccc !important;
    right: -160px !important;
    top: 100% !important;
    z-index: 999999 !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important;
    visibility: visible !important;
}

/* 2. Mostrar al hacer hover */
#link-header ul.contact:hover li ul {
    display: block !important;
    border-radius: 6px !important;
}

.contact ul li {
    display: block;
}

/* 3. El <a> principal - columna centrada */
#link-header a.vwhatsapp {
    all: initial !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: Arial, sans-serif !important;
    font-size: 18px !important;
    color: #777777 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    width: 100% !important;
}

/* 4. El bloque del número - fila horizontal */
.vwhatsapp-int {
    all: initial !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    margin: 10px 0 7px !important;
    padding-top: 27px !important;
    border-top: solid 1px #cccccc !important;
    font-size: 30px !important;
    color: #333333 !important;
    font-family: Arial, sans-serif !important;
    width: 100% !important;
}

/* 5. Prefijo 0034 */
.vwhatsapp-int span {
    font-size: 15px !important;
    margin-right: 6px !important;
    color: #999 !important;
}

/* 6. Horario debajo del número */
#link-header a.vwhatsapp p {
    all: initial !important;
    display: block !important;
    font-size: 13px !important;
    color: #c3c3c3 !important;
    text-align: center !important;
    font-family: Arial, sans-serif !important;
    margin-top: 5px !important;
    width: 100% !important;
}

/* 7. Imagen del logo WhatsApp */
.vwhatsapp-int img {
    display: inline-block !important;
    vertical-align: middle !important;
    width: 30px !important;
    height: auto !important;
    margin-right: 8px !important;
}

/*Ocultar disponibilidad de stock en productos*/
.product-availability {                                                                                                                                                                         500 +    		display: none !important;
}

/* ===================================
   CARRITO - Fijar layout de línea de producto
   =================================== */
.cart-item {
    overflow: hidden;
}

.product-line-grid {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start;
}

.product-line-grid-body {
    overflow: hidden;
}

.product-line-info.product-price {
    clear: none;
}

/* ===================================
   CHECKOUT - Anular header fixed
   =================================== */
body#checkout #header .header-nav {
    position: static !important;
    background: #000000 !important;
    height: auto !important;
    pointer-events: auto !important;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 13px;
}

body#checkout #header .header-nav > .container {
    display: block !important;
    justify-content: flex-start !important;
    background: transparent !important;
}

body#checkout #header .header-nav > .container > .row {
    display: flex !important;
    width: 100%;
    margin: 0 -15px;
}

body#checkout #header .header-nav .logo {
    max-height: 80px !important;
    width: auto !important;
}

.btn-prv {
    margin-top: 15px; 
    background-color: black!important;
}

.btn-prv a {
    color: white !important;
}



/* ================================================
   FIX RESPONSIVE DEFINITIVO — custom.css
   Pegar AL FINAL del archivo custom.css
   Reemplaza todos los fixes anteriores de responsive
   ================================================ */

/* --------------------------------------------------
   GLOBAL: evitar scroll horizontal en toda la web
   -------------------------------------------------- */
html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* --------------------------------------------------
   LAPTOP ESTRECHO (992px - 1100px)
   El sub-logo tiene left:411px que desborda
   -------------------------------------------------- */
@media (min-width: 992px) and (max-width: 1100px) {
    .sub-logo {
        left: 360px !important;
        width: 210px !important;
    }
    .sub-logo p {
        font-size: 10px !important;
    }
}

/* --------------------------------------------------
   TABLET (768px - 991px)
   Menú se corta por la derecha
   -------------------------------------------------- */
@media (min-width: 768px) and (max-width: 991px) {

    /* Contener el header */
    #header .header-top,
    #header .header-top > .container {
        overflow: hidden !important;
        max-width: 100% !important;
    }

    /* Menú horizontal que cabe en el ancho */
    #header .header-top #_desktop_top_menu {
        clear: both !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    #header .header-top #_desktop_top_menu > ul.top-menu[data-depth="0"] {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        list-style: none !important;
    }

    #header .header-top #_desktop_top_menu > ul.top-menu[data-depth="0"] > li.category {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        text-align: center !important;
        overflow: hidden !important;
    }

    #header .header-top a[data-depth="0"] {
        font-size: 10px !important;
        padding: 6px 2px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }

    #header .header-top a[data-depth="0"] img {
        display: block !important;
        margin: 0 auto 2px !important;
        width: 22px !important;
        height: auto !important;
    }

    /* Pastilla nav: sin ancho fijo */
    #header .header-nav .col-head2 {
        width: auto !important;
        max-width: 100% !important;
    }

    /* Reducir textos del nav superior */
    .txt-nav { font-size: 10px !important; }
    #header .header-nav .right-nav { gap: 8px !important; }
}

/* --------------------------------------------------
   MÓVIL (< 768px)
   El tema usa .d-md-none > .fixed-menu para la nav móvil
   El tema lo pone en bottom:0 — lo movemos a top:0
   -------------------------------------------------- */
@media (max-width: 767px) {

    /* 1. CANCELAR el header-nav "pastilla" de escritorio:
          en móvil NO existe el .d-none.d-md-block, así que
          el header-nav solo contiene el bloque .d-md-none  */
    #header .header-nav {
        position: fixed !important;
        top: 0 !important;
        bottom: auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 50px !important;
        background: #111 !important;
        pointer-events: auto !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        overflow: visible !important;
        z-index: 1050 !important;
        margin-bottom: 0 !important;
    }

    /* Contenedor flex del nav */
    #header .header-nav > .container {
        display: flex !important;
        align-items: center !important;
        height: 50px !important;
        padding: 0 10px !important;
        background: transparent !important;
        max-width: 100% !important;
    }

    #header .header-nav > .container > .row {
        display: flex !important;
        width: 100% !important;
        align-items: center !important;
        margin: 0 !important;
        overflow: visible !important;
        flex-wrap: nowrap !important;
    }

    /* 2. FIXED-MENU: moverlo de bottom:0 a que fluya dentro del nav
          Tiene 3 reglas en theme.css con bottom:0 — las cancelamos todas */
    #header .header-nav .mobile .fixed-menu,
    .fixed-menu {
        position: static !important;
        bottom: auto !important;
        top: auto !important;
        z-index: auto !important;
        background: transparent !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 10px !important;
    }

    /* Texto e icono del botón menú */
    #header .header-nav .mobile .fixed-menu #menu-icon {
        color: #fff !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        cursor: pointer !important;
        font-size: 14px !important;
    }

    /* Logo móvil: centrado */
    #header .header-nav .mobile .top-logo {
        text-align: center !important;
        width: 100% !important;
        display: none !important; /* se oculta para no romper el layout del nav */
    }

    /* 3. BLOQUE DESKTOP: ya está oculto por d-none d-md-block del HTML,
          pero cancelamos la "pastilla" por si acaso */
    #header .header-nav .col-head2 {
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        height: 50px !important;
        padding: 0 !important;
    }

    /* 4. MENÚ DESPLEGABLE MÓVIL: aparece debajo del nav fijo */
    #mobile_top_menu_wrapper {
        position: fixed !important;
        top: 50px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        z-index: 1049 !important;
        background: #fff !important;
        max-height: calc(100vh - 50px) !important;
        overflow-y: auto !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    }

    /* 5. HEADER-TOP: empujar debajo del nav fijo de 50px */
    #header .header-top {
        margin-top: 50px !important;
        padding: 12px 15px !important;
        background: #111 !important;
    }

    /* Logo escritorio: centrado y ancho completo en móvil */
    #header .header-top #_desktop_logo.col-logo {
        float: none !important;
        width: 100% !important;
        text-align: center !important;
        margin: 0 0 10px !important;
        display: block !important;
    }

    /* Buscador: ancho completo */
    #header .header-top .col-search {
        float: none !important;
        width: 100% !important;
        margin-top: 0 !important;
        display: block !important;
        clear: both !important;
    }

    #header .header-top .search-widget {
        display: block !important;
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
    }

    #header .header-top .search-widget form {
        display: block !important;
        width: 100% !important;
        position: relative !important;
    }

    #header .header-top .search-widget form input[type=text] {
        width: 100% !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
    }

    /* Menú desktop: oculto en móvil */
    #header .header-top #_desktop_top_menu {
        display: none !important;
    }

    /* 6. FOOTER */
    .footer-container .block-contact {
        text-align: left !important;
    }

    /* 7. WhatsApp dropdown */
    #link-header ul.contact li ul {
        right: 0 !important;
        left: auto !important;
        width: 280px !important;
        padding: 15px !important;
    }
}

@media (max-width: 479px) {
    /* Cancelar específicamente el bottom:0 del tema en < 479px */
    .fixed-menu {
        position: static !important;
        bottom: auto !important;
        min-width: 0 !important;
    }

    /* El tema pone header-nav en position:initial aquí — lo mantenemos fixed */
    .header-nav,
    #header .header-nav {
        position: fixed !important;
        top: 0 !important;
        bottom: auto !important;
    }
}

@media (max-width: 349px) {
    /* Cancelar el min-width:327px del tema que causa overflow */
    .fixed-menu {
        min-width: 0 !important;
        position: static !important;
        bottom: auto !important;
    }
}




@media (min-width: 576px) {
    #modal .modal-dialog {
        max-width: 900px !important;
        width: 90% !important;
        margin: 30px auto !important;
    }
}

#modal .modal-content {
    padding: 30px 40px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

#modal .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 32px;
    line-height: 1;
    font-weight: bold;
    color: #000;
    opacity: 0.6;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 5px 10px;
    z-index: 10;
}

#modal .close:hover {
    opacity: 1;
}


/* Contenedor de cada opción de pago */
.payment-option.clearfix {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 15px !important;
    float: none !important;
}

/* El radio personalizado */
.payment-option .custom-radio.float-start {
    float: none !important;
    margin: 0 !important;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

/* El label con el botón de texto */
.payment-option > label {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* Alinear checkbox de términos y condiciones */
#conditions-to-approve ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

#conditions-to-approve li {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

#conditions-to-approve .float-start {
    float: none !important;
    margin: 0 !important;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

#conditions-to-approve .condition-label {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
}

#conditions-to-approve .condition-label label {
    margin: 0 !important;
    line-height: 1.4 !important;
}