/*==============START BARRA DE NAVEGACION============================*/

/* Estilos globales del botón hamburguesa */
.hamburger-menu {
    background: transparent;
    border: none;
    width: 30px;
    height: 24px;
    display: none; /* Oculto por defecto, se muestra en móvil */
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger-menu[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Estilos globales del menú desplegable móvil */
.mobile-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 8px 24px var(--color-shadow-hover);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
    display: none; /* Oculto por defecto */
}

.mobile-menu-dropdown[aria-hidden="false"] {
    max-height: 600px;
    opacity: 1;
    overflow-y: auto;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-item {
    display: block;
    width: 100%;
    padding: 16px 20px;
    text-align: left;
    text-decoration: none;
    color: var(--color-text);
    font-size: 16px;
    font-weight: 500;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-menu-item:hover,
.mobile-menu-item:active {
    background-color: var(--color-bg);
    color: var(--color-accent);
}

.mobile-menu-item:last-child {
    border-bottom: none;
}

/* Divisor en el menú móvil */
.mobile-menu-divider {
    height: 8px;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    margin: 0;
    padding: 0;
}

/* Dropdown de marcas en móvil */
.nav-marcas-dropdown-mobile {
    background-color: var(--color-bg);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.nav-marcas-dropdown-mobile[aria-hidden="false"] {
    max-height: 400px;
    opacity: 1;
    overflow-y: auto;
}

.nav-marcas-list-mobile {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.nav-marcas-list-mobile li {
    padding: 0;
}

.nav-marcas-list-mobile a,
.nav-marcas-list-mobile button {
    display: block;
    width: 100%;
    padding: 12px 20px 12px 40px;
    text-align: left;
    text-decoration: none;
    color: var(--color-text-light);
    font-size: 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-marcas-list-mobile a:hover,
.nav-marcas-list-mobile button:hover {
    background-color: rgba(92, 29, 40, 0.1);
    color: var(--color-accent);
    padding-left: 45px;
}

/* Media queries para desktop */
@media (min-width: 768px) {
    
    .box-menu{
        display: none
    }
    
    /* Ocultar elementos móviles en desktop */
    .search-box-mobile,
    .hamburger-menu,
    .mobile-menu-dropdown {
        display: none !important;
    }
    
    /* Mostrar elementos desktop */
    .desktop-menu,
    .search-box-desktop {
        display: flex !important;
    }
    
    .nav-principal-inner {
        flex-wrap: nowrap;
    }
}

/* Media queries para móvil */
@media (max-width: 767px) {
    
    .box-menu{
        display: block
    }
	.dd-stock{
		display: none;
	}
	
	.dd-archivos{
        display: none;
    }
	
	.accesos-nav-logo{
	    width: 120px;
	    max-width: 40vw;
	}
	
	/* Ocultar saludo y redes en móvil */
	.cont-saludo-redes {
	    display: none;
	}
	
	/* Ajustar navegación principal para móvil */
	.nav-principal {
	    height: auto;
	    min-height: 60px;
	    padding: 12px 16px;
	    margin-bottom: 0;
	    position: relative;
	}
	
	.nav-principal-inner {
	    flex-wrap: wrap;
	    gap: 12px;
	    position: relative;
	}
	
	/* Logo y hamburguesa en la primera fila */
	.logo-link {
	    flex: 0 0 auto;
	    order: 1;
	}
	
	.hamburger-menu {
	    flex: 0 0 auto;
	    order: 2;
	    margin-left: auto;
	    display: flex !important; /* Forzar display flex en móvil */
	}
	
	/* Buscador en la segunda fila (ancho completo) */
	.search-box-mobile {
	    flex: 1 1 100%;
	    order: 3;
	    max-width: 100%;
	    min-width: 100%;
	    margin-left: 0;
	}
	
	/* Ocultar elementos desktop en móvil */
	.desktop-menu,
	.search-box-desktop,
	.nav-marcas-dropdown {
	    display: none !important;
	}
	
	/* Mostrar menú móvil */
	.mobile-menu-dropdown {
	    display: block; /* Mostrar en móvil */
	}
	
	/* Ajustar el input de búsqueda en móvil */
	.search-box-mobile .search-input {
	    font-size: 14px;
	    padding: 10px 40px 10px 12px;
	}
	
	.search-box-mobile .search-input::placeholder {
	    font-size: 13px;
	}
}

/* Mejoras adicionales para móvil */
@media (max-width: 480px) {
    .search-box-mobile {
        font-size: 13px;
    }
    
    .mobile-menu-item {
        font-size: 15px;
        padding: 14px 16px;
    }
    
    .nav-marcas-list-mobile a,
    .nav-marcas-list-mobile button {
        font-size: 13px;
        padding: 10px 16px 10px 32px;
    }
    
    .nav-marcas-list-mobile a:hover,
    .nav-marcas-list-mobile button:hover {
        padding-left: 37px;
    }
}

/*==============END BARRA DE NAVEGACION========================*/

/*==============START PRODUCTO DETALLE==========================*/
@media (max-width: 767px) {
    .producto-detalle {
        width: 100%;
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .producto-detalle__header {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        padding: var(--spacing-md);
    }
    
    .producto-detalle__principal {
        min-height: 280px;
        padding: var(--spacing-md);
    }
    
    .producto-detalle__principal img {
        max-height: 320px;
    }
    
    .producto-detalle__miniaturas-lista {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: var(--spacing-xs);
    }
    
    .producto-miniatura img {
        max-height: 70px;
    }
    
    .producto-detalle__titulo {
        font-size: 24px;
    }
    
    .producto-detalle__caracteristicas h2 {
        font-size: 14px;
    }
    
    .producto-detalle__caracteristicas li {
        font-size: 13px;
    }
    
    .producto-relacionado {
        padding: 0 var(--spacing-sm);
    }
    
    .producto-relacionado__header {
        font-size: 10px;
        gap: var(--spacing-xs);
    }
    
    .producto-relacionado__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .producto-relacionado__card {
        padding: var(--spacing-sm);
    }
    
    .producto-relacionado__card img {
        width: 70px;
        height: 70px;
    }
    
    .producto-relacionado__card h3 {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .producto-detalle {
        padding: var(--spacing-sm) var(--spacing-xs);
    }
    
    .producto-detalle__header {
        padding: var(--spacing-sm);
    }
    
    .producto-detalle__principal {
        min-height: 240px;
        padding: var(--spacing-sm);
    }
    
    .producto-detalle__principal img {
        max-height: 280px;
    }
    
    .producto-detalle__miniaturas-lista {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .producto-detalle__titulo {
        font-size: 20px;
    }
    
    .producto-relacionado__card img {
        width: 60px;
        height: 60px;
    }
}
/*==============END PRODUCTO DETALLE============================*/

/*==============START MARCAS Y SOBRE NOSOTROS===================*/
@media (max-width: 767px) {
    /* Ocultar sección "Sobre Nosotros" en móviles */
    .sec-sobre-nosotros {
        display: none !important;
    }
    
    /* Ajustar sección de marcas para móviles */
    .sec-marcas {
        width: 100% !important;
        max-width: 100vw !important;
        padding: 0 !important;
        margin: var(--spacing-md) 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .cont-titulo-marca {
        width: 100%;
        padding: var(--spacing-sm) var(--spacing-sm);
        margin: var(--spacing-sm) 0;
        box-sizing: border-box;
    }
    
    .cont-marcas {
        width: calc(100% - 32px) !important;
        max-width: calc(100vw - 32px) !important;
        margin: 0 auto !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 12px !important;
        box-sizing: border-box !important;
    }
    
    .box-marca {
        width: 100% !important;
        max-width: 100% !important;
        padding: 8px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }
    
    .img-marca {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    .sec-marcas {
        padding: 0 !important;
    }
    
    .cont-marcas {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        padding: 8px !important;
        width: calc(100% - 16px) !important;
        max-width: calc(100vw - 16px) !important;
    }
    
    .box-marca {
        padding: 6px !important;
    }
}
/*==============END MARCAS Y SOBRE NOSOTROS=====================*/

/*==============START EMPRESAS QUE CONFIAN======================*/
@media (max-width: 767px) {
    .sec-empre-confian {
        width: 100% !important;
        max-width: 100vw !important;
        padding: 0 !important;
        margin: var(--spacing-md) 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .carou-empresa-confian {
        width: calc(100% - 32px) !important;
        max-width: calc(100vw - 32px) !important;
        margin: 0 auto !important;
        padding: var(--spacing-md) !important;
        box-sizing: border-box !important;
    }
    
    .carou-empresa-confian .swiper-wrapper {
        box-sizing: border-box !important;
    }
    
    .carou-empresa-confian-box-img {
        min-height: 150px;
        padding: var(--spacing-sm) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }
    
    .carou-empresa-confian-box-img .img-empresa {
        max-height: 120px !important;
        width: auto !important;
        max-width: 90% !important;
    }
}

@media (max-width: 480px) {
    .sec-empre-confian {
        padding: 0 !important;
    }
    
    .carou-empresa-confian {
        width: calc(100% - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        padding: var(--spacing-sm) !important;
    }
    
    .carou-empresa-confian-box-img {
        min-height: 140px;
        padding: var(--spacing-sm) !important;
    }
    
    .carou-empresa-confian-box-img .img-empresa {
        max-height: 110px !important;
        max-width: 85% !important;
    }
}
/*==============END EMPRESAS QUE CONFIAN========================*/

/*==============START FOOTER RESPONSIVE=========================*/
@media (max-width: 767px) {
    .footer-principal {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .cont-footer {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .box-footer {
        width: 100%;
        align-items: center;
    }
    
    /* Ocultar algunas secciones en móvil para simplificar */
    .box-footer:first-child {
        display: none; /* Oculta "Servicio al cliente" */
    }
    
    .titulo-box-footer {
        font-size: 14px;
        margin-bottom: var(--spacing-xs);
    }
    
    .link-box-footer {
        font-size: 13px;
        padding: 6px 0;
    }
    
    .cont-iconos-redes-footer {
        justify-content: center;
        gap: var(--spacing-md);
    }
    
    .icono-redes-footer {
        font-size: 24px;
    }
    
    .cont-copy-footer {
        padding: var(--spacing-sm) 0;
        margin-top: var(--spacing-sm);
    }
    
    .texto-copy-footer {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .footer-principal {
        padding: var(--spacing-sm) var(--spacing-xs);
    }
    
    .cont-footer {
        gap: var(--spacing-sm);
    }
    
    .box-footer {
        gap: 8px;
    }
    
    /* Mostrar solo redes sociales y copyright en móviles pequeños */
    .box-footer:nth-child(2) {
        display: none; /* Oculta "Información" */
    }
}
/*==============END FOOTER RESPONSIVE===========================*/

/*==============START MARCA FLYER RESPONSIVE===========================*/
@media (max-width: 767px) {
    .marca-hero {
        width: 100% !important;
        max-width: 100vw !important;
        padding: var(--spacing-md) var(--spacing-sm) !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .marca-hero__content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    .marca-hero__flyer {
        width: calc(100% - 32px) !important;
        max-width: calc(100vw - 64px) !important;
        margin: 0 auto !important;
        padding: var(--spacing-xs) !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .marca-hero__flyer img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        object-fit: contain !important;
    }
    
    .marca-hero__title {
        font-size: 24px !important;
    }
    
    .marca-hero__subtitle {
        font-size: 14px !important;
    }
    
    .marca-productos {
        width: calc(100% - 32px) !important;
        max-width: calc(100vw - 32px) !important;
        margin: 0 auto var(--spacing-md) !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    .marca-hero {
        padding: var(--spacing-sm) var(--spacing-xs) !important;
    }
    
    .marca-hero__flyer {
        width: calc(100% - 16px) !important;
        max-width: calc(100vw - 32px) !important;
        padding: 8px !important;
    }
    
    .marca-hero__title {
        font-size: 20px !important;
    }
    
    .marca-hero__eyebrow {
        font-size: 11px !important;
    }
    
    .marca-productos {
        width: calc(100% - 16px) !important;
        max-width: calc(100vw - 16px) !important;
    }
}
/*==============END MARCA FLYER RESPONSIVE===========================*/

/*==============START IMAGE LOADING SKELETON===========================*/
/* Skeleton placeholder para imágenes que están cargando */
.img-loading-skeleton {
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Ocultar la imagen mientras carga */
.img-loading-skeleton img {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Mostrar la imagen una vez cargada */
.img-loading-skeleton.loaded img {
    opacity: 1;
}

/* Remover el skeleton una vez cargada */
.img-loading-skeleton.loaded {
    background: none;
    animation: none;
}
/*==============END IMAGE LOADING SKELETON===========================*/

/*==============START PAGE LOADER===========================*/
/* Loader de página con icono animado */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.page-loader.fade-out {
    opacity: 0;
}

.loader-content {
    position: relative;
    text-align: center;
}

.loader-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
}

.wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    margin: -60px 0 0 -60px;
    border-radius: 50%;
    border: 3px solid var(--color-primary, #d4af37);
    opacity: 0;
    animation: wave-expand 2s ease-out infinite;
}

.wave-1 {
    animation-delay: 1.8s;
}

.wave-2 {
    animation-delay: 3.8s;
}

.wave-3 {
    animation-delay: 5.8s;
}

@keyframes wave-expand {
    0% {
        width: 120px;
        height: 120px;
        margin: -60px 0 0 -60px;
        opacity: 0.6;
    }
    100% {
        width: 280px;
        height: 280px;
        margin: -140px 0 0 -140px;
        opacity: 0;
    }
}

.loader-icon {
    position: relative;
    width: 120px;
    height: 120px;
    animation: icon-appear 0.8s ease-out forwards, pulse 2s ease-in-out infinite;
    animation-delay: 0s, 0.8s;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
    z-index: 2;
    transform: scale(0);
}

@keyframes icon-appear {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(0.95);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Ajuste del icono en dispositivos móviles */
@media (max-width: 767px) {
    .loader-waves {
        width: 150px;
        height: 150px;
    }
    
    .loader-icon {
        width: 80px;
        height: 80px;
    }
    
    .wave {
        width: 80px;
        height: 80px;
        margin: -40px 0 0 -40px;
    }
    
    @keyframes wave-expand {
        0% {
            width: 80px;
            height: 80px;
            margin: -40px 0 0 -40px;
            opacity: 0;
        }
        10% {
            opacity: 0.4;
        }
        50% {
            opacity: 0.2;
        }
        100% {
            width: 180px;
            height: 180px;
            margin: -90px 0 0 -90px;
            opacity: 0;
        }
    }
}
/*==============END PAGE LOADER===========================*/