/* ======================================= */
/* 1. RESET Y BASE                         */
/* ======================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.logoOneButton {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* ======================================= */
/* 2. HEADER Y NAVEGACIÓN                  */
/* ======================================= */

header{
    background: #ffd900;
    color: #000;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    top: 0;
    z-index: 1000;
    flex-wrap: wrap;
}

.imgHead {
    display: block;
    width: 130px;
    height: auto;
}

/* --- Búsqueda --- */
.searchContainer {
    flex-grow: 1;
    padding: 0 20px;
}

.inputHeader {
    padding: 7px 20px;
    border: 2px solid #ccc;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    position: relative;
}

.buttonHeader {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    top: 2px;
}

.buttonHeader:hover {
    background-color: #f0f0f0;
}

.iconSearch {
    width: 16px;
    height: 16px;
    position: relative;
}

/* --- Navegación Superior --- */
.aHeader {
    margin: 0 10px;
    text-decoration: none;
    color: #000;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.56s ease;
}

.aHeader:hover {
    color: #ffffff;
    font-size: 18px;
}

.separadorHeader {
    background-color: transparent;
    border: none;
    font-size: 25px;
}

.aImage {
    height: 22px;
    position: relative;
    top: 5px;
    transition: transform 0.4s ease, filter 0.5s ease;
}

.aImage:hover {
    transform: scale(1.2);
    filter: brightness(1.15);
}

/* --- Barra de Categorías (Botones) --- */
.divCategorias {
    width: 100%;
    background-color: #ededed;
    padding: 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap; 
    font-size: 12px;
    border-bottom: 1px solid #e0e0e0;
    
    /* Añadir estas propiedades para garantizar el scroll */
    overflow-x: scroll; /* Fuerza el scroll horizontal */
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
    scrollbar-width: none; /* Oculta scrollbar en Firefox */
    -ms-overflow-style: none; /* Oculta scrollbar en IE/Edge */
    white-space: nowrap; /* Previene el wrap del contenido */
}



.buttonCategorias {
    background-color: #f7f7f7; 
    border: none;
    border-right: 1px solid #e0e0e0; 
    cursor: pointer;
    text-align: center;
    padding: 10px 5px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex-grow: 1; 
    flex-shrink: 1;
    flex-basis: 0;
}

.buttonCategorias:last-child {
    border-right: none;
}

.buttonCategorias:hover {
    transform: none; 
    background-color: #e8e8e8; 
}

.imgCategorias {
    width: 50px;
    height: 50px; 
    object-fit: contain; 
    margin-bottom: 5px;
    transition: transform 0.3s ease;
}

.pCategorias {
    font-weight: bold;
    font-size: 11px;
    line-height: 1.2;
}

/* ======================================= */
/* 3. CARRUSEL                             */
/* ======================================= */

.container {
    width: 100%;
}

.slide {
    width: 100%;
    max-width: none;
    aspect-ratio: 3/1;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}

.imgNuestrasMarcas {
    width: 70%;
    height: auto;
    display: block;
    position: relative;
    margin: 20px auto;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.9); /* sombra */ 
}

a:hover,
a:focus,
a:active {
    text-decoration: none !important;
}

.slide ul {
    display: flex;
    padding: 0;
    list-style: none;
    width: 300%;
}

.slide li {
    width: 33.333%;
    height: 100%;
    position: relative;
}

.slide img,
.slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Botón del Carrusel (PC/Tablet) */
.carruselButton {
    position: absolute;
    top: 65%;
    left: 10%;
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    background-color: #ffdd20;
    color: #000000;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: background-color 0.3s ease;
    z-index: 5;
}

.carruselButton:hover {
    background-color: #ffe343;
    color: #000000;
}

/* Ajuste específico: bajar 25px el botón del guante poliuretano */
.carruselButton.guante-pu {
    top: calc(65% + 25px);
}

@keyframes slideEnterRight {
  0% { opacity: 0; transform: translateX(32px); }
  60% { opacity: 1; transform: translateX(-8px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes slideExitLeft {
  0% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(-28px); }
}
@keyframes slideExitRight {
  0% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(28px); }
}

.slideItem.enter-left {
  animation: slideEnterLeft 420ms cubic-bezier(.2,.9,.3,1) both;
  z-index: 3;
}
.slideItem.enter-right {
  animation: slideEnterRight 420ms cubic-bezier(.2,.9,.3,1) both;
  z-index: 3;
}
.slideItem.exit-left {
  animation: slideExitLeft 340ms ease both;
  z-index: 2;
}
.slideItem.exit-right {
  animation: slideExitRight 340ms ease both;
  z-index: 2;
}

.slideItem.is-active {
  will-change: transform, opacity;
}

/* Small visual polish when animating */
.slideItem > * {
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}


/* Flechas de Navegación (diseño moderno) */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000; /* Fondo negro */
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    font-size: 18px;
    z-index: 20;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s, opacity 0.12s;
    user-select: none;
}

.nav-arrow:hover {
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
    background: #111; /* sutil aclarado en hover */
}

.nav-arrow:active {
    transform: translateY(-50%) scale(0.98);
}

.nav-arrow svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: #fff; /* Icono blanco para contraste */
}

#prevArrow { left: 12px; }
#nextArrow { right: 12px; }

@media (max-width: 767px) {
    .nav-arrow { width: 40px; height: 40px; }
    .nav-arrow svg { width: 16px; height: 16px; }
}

.divCategorias {
    position: sticky;
}

/* ======================================= */
/* 4. MAPA (1 COLUMNA) */
/* ======================================= */
/* --- Mapa y Ubicación (Diseño de 2 Columnas) --- */

/* Contenedor principal para las dos columnas */
.map-info-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
    display: flex;
    position: relative;
    border: 1px solid #ccc; /* Borde exterior */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 450px; /* Altura mínima para asegurar visibilidad */
}

.map-column, .info-column {
    flex: 1; /* Ambos ocupan la mitad del espacio */
    padding: 0;
    position: relative;
}

.map-column {
    border-right: 1px solid #ccc; /* La línea divisoria vertical */
    background-color: #f0f0f0;
}

/* Contenedor responsivo para el iframe del mapa */
/* Contenedor responsivo para el iframe del mapa */
/* Aseguramos que la altura sea 100% del padre */
.map-responsive {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* CLAVE: Ocupa todo el alto de la columna */
    overflow: hidden;
}

.map-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    border: 0;
}

.info-column {
    display: flex;
    align-items: center; /* Centra el contenido verticalmente */
    justify-content: center;
    background-color: #fff;
    padding: 30px;
}

.divDivMapU {
    text-align: left;
}

.divDivMapU h2 {
    margin-bottom: 20px;
    color: #444;
    font-size: 24px;
}

.divDivMapU h3 {
    margin-top: 25px;
    margin-bottom: 10px;
    color: #ffd900;
    font-size: 20px;
}

.divDivMapU p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 8px;
}
/* Asegura que el cambio de tamaño sea suave */
.map-column, .info-column {
    /* CLAVE: Añadir transición aquí */
    transition: flex-basis 0.5s ease, padding 0.5s ease, opacity 0.4s ease;
    will-change: flex-basis, opacity;
    min-width: 0; /* importante para que flex-basis 0 funcione bien */
}

/* Estado EXPANDIDO */
.map-info-container.expanded .map-column {
    flex-basis: 100%; 
}

.map-info-container.expanded .info-column {
    flex-basis: 0; /* CLAVE */
    padding: 0;
    overflow: hidden;
}

/* Rotación de la imagen de la flecha */
.expand-icon {
    transition: transform 0.5s ease;
}
.map-info-container.expanded .expand-icon {
    transform: rotate(180deg);
}

/* Efecto rebote al expandir/colapsar el mapa */
@keyframes mapBounce {
  0% { transform: scale(1) translateZ(0); }
  30% { transform: scale(1.03) translateZ(0); }
  60% { transform: scale(0.995) translateZ(0); }
  100% { transform: scale(1) translateZ(0); }
}

@keyframes infoBounce {
  0% { transform: translateY(0); opacity: 1; }
  30% { transform: translateY(-6px); opacity: 0.95; }
  60% { transform: translateY(2px); opacity: 0.5; }
  100% { transform: translateY(0); opacity: 0; }
}

.map-column.bounce {
  animation: mapBounce 560ms cubic-bezier(.34,1.56,.64,1);
  transform-origin: left center;
}

.info-column.bounce-collapse {
  animation: infoBounce 420ms ease-in-out forwards;
}




/* --- ESTILOS DE LA SECCIÓN DE MAPA --- */

.separator-icon {
    position: absolute;
    top: 50%;
    left: 50%; /* POSICIÓN POR DEFECTO: Centrada */
    transform: translate(-50%, -50%); /* Centrado con 50% y -50% */
    width: 50px;
    height: 50px;
    background-color: #ffe343; 
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: left 0.5s ease, transform 0.5s ease; /* CLAVE: Añadir transición para 'left' */
}

/* --- ESTADO EXPANDIDO: Mueve la flecha a la derecha y rota la imagen --- */

.map-info-container.expanded .separator-icon {
    /* 1. Mueve el centro del círculo al 100% del contenedor */
    left: 100%; 
    /* 2. Empuja el círculo de nuevo hacia la izquierda por la mitad de su ancho (25px) 
          y lo mantiene centrado verticalmente */
    transform: translate(-25px, -50%); 
    /* 3. Ajuste visual: rota la imagen de la flecha */
}

.map-info-container.expanded .expand-icon {
    transform: rotate(180deg);
}
/* Aseguramos que la columna de info se colapse */
.map-info-container.expanded .info-column {
    flex-basis: 0;
    padding: 0;
    overflow: hidden;
}
/* Aseguramos que el mapa se expanda */
.map-info-container.expanded .map-column {
    flex-basis: 100%;
    border-right: none;
}

/* Ícono separador (el círculo azul en tu diseño) */
.separator-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.expand-icon {
    width: 30px;
    height: 30px;
    filter: invert(1); /* Si el ícono es oscuro, lo vuelve blanco */
}

/* ======================================= */
/* 5. FOOTER                               */
/* ======================================= */

footer {
    background-color: #333 !important;
    color: #fff !important;
    padding: 40px 20px !important;
    font-size: 14px;
}

.footerContent {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.footerSection {
    flex: 1;
    min-width: 200px;
}

.footerSection h4 {
    color: #ffd900;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: bold;
}

.footerSection p {
    line-height: 1.6;
    margin-bottom: 5px;
}

.footerSection ul {
    list-style: none;
    padding: 0;
}

.footerSection ul li a {
    color: #ccc;
    text-decoration: none;
    line-height: 1.8;
    transition: color 0.3s;
}

.footerSection ul li a:hover {
    color: #ffd900;
}

.footerLogo {
    width: 100px;
    margin-bottom: 10px;
    filter: brightness(0) invert(1);
}



/* ======================================= */
/* 6. MEDIA QUERIES (Responsiveness)       */
/* ======================================= */

/* --- Tablet (hasta 1024px) --- */
@media (max-width: 1024px) {
    /* HEADER: Contenedor principal que permite el reordenamiento */
    header {
        padding: 10px 15px;
    }
    .imgHead {
        width: 80px; /* Logo más pequeño en móvil */
    }
    
    /* Búsqueda */
    .searchContainer {
        padding: 0 5px;
    }
    .inputHeader {
        width: 65%;
        max-width: 220px;
        font-size: 14px;
        padding: 8px 15px;
        border-radius: 5px 0 0 5px;
    }
    .buttonHeader {
        padding: 6px 10px;
        top: 1px;
    }
    
    /* Navegación de Texto (los <a> en Fila 2) */
    .header-nav-text {
        margin-top: 8px;
        padding-top: 5px;
    }
    .aHeader {
        font-size: 12px; /* Enlaces de texto más pequeños */
        margin: 0 5px;
    }
	
    
    /* BARRA DE CATEGORÍAS (scroll horizontal) */
    .divCategorias {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        border-bottom: none !important;
    }
    .buttonCategorias {
        min-width: 100px !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
    }
    .imgCategorias {
        width: 40px !important;
        height: 40px !important;
    }
    
    /* Carrusel y Botón */
    .slide {
        aspect-ratio: 16/9;
    }
    .carruselButton {
        top: auto;
        left: 5%;
        bottom: 5px;
        padding: 8px 15px;
        font-size: 14px;
        max-width: 45%;
    }

    /* FOOTER y MAPA */
    .footerContent {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .map-responsive {
        padding-bottom: 75%;
    }
	.nav-arrow {
		position: absolute;
		top: 30%;
	}
    .imgNuestrasMarcas {
        height: auto;
        display: block;
        position: relative;
        width: 90%;
        margin: 20px auto;
        bottom: 90px;
    }
}

/* --- Móviles (hasta 767px) --- */
@media (max-width: 767px) {
    
    /* HEADER: Ajustes finos */
    header {
        padding: 10px 15px;
    }
    .imgHead {
        width: 80px; /* Logo más pequeño en móvil */
    }
    
    /* Búsqueda */
    .searchContainer {
        padding: 0 5px;
    }
    .inputHeader {
        width: 65%;
        max-width: 220px;
        font-size: 14px;
        padding: 8px 15px;
        border-radius: 5px 0 0 5px;
    }
    .buttonHeader {
        padding: 6px 10px;
        top: 1px;
    }
    
    /* Navegación de Texto (los <a> en Fila 2) */
    .header-nav-text {
        margin-top: 8px;
        padding-top: 5px;
    }
    .aHeader {
        font-size: 12px; /* Enlaces de texto más pequeños */
        margin: 0 5px;
    }
    
    /* BARRA DE CATEGORÍAS (scroll horizontal) */
    .divCategorias {
        overflow-x: scroll;
        flex-wrap: nowrap;
        border-bottom: none;
    }
    .buttonCategorias {
        min-width: 100px;
        flex-shrink: 0;
        flex-grow: 0;
    }
    .imgCategorias {
        width: 40px;
        height: 40px;
    }
    
    /* Carrusel y Botón */
    .slide {
        aspect-ratio: 16/9;
    }
    .carruselButton {
        top: auto;
        left: 5%;
        bottom: 5px;
        padding: 8px 15px;
        font-size: 14px;
        max-width: 45%;
    }
z    
    /* Botón del guante en móvil: 20px más arriba */
    .carruselButton.guante-pu {
        bottom: calc(5px + 20px);
    }
    .separator-icon {
        display: none; 
    }
    /* Aseguramos que el estado 'expanded' no rompa el diseño apilado en móvil */
    .map-info-container.expanded {
        flex-direction: column; 
    }
    .map-info-container.expanded .map-column,
    .map-info-container.expanded .info-column {
    flex-basis: auto;
    } 
    .map-column {
        height: 350px; 
        border-right: none;
        border-bottom: 1px solid #ccc; 
        position: relative;
    }
    .imgNuestrasMarcas {
        height: auto;
        display: block;
        position: relative;
        width: 90%;
        margin: 20px auto;
        bottom: 90px;
    }
    .map-info-container {
        position: relative;
        top: -90px; 
    }
}
    /* --- Tablet y Móvil (hasta 1024px) --- */
@media (max-width: 1024px) {
    /* FOOTER y MAPA */
    .footerContent {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .map-responsive {
        padding-bottom: 75%;
    }
	.nav-arrow {
		position: absolute;
		top: 30%;
    }    
    /* MAPA: Se apila en una sola columna */
    .map-info-container {
        flex-direction: column; /* Apila las columnas */
        min-height: auto;
    }

    .map-column, .info-column {
        flex-basis: auto; /* Anula el 50% de la versión de escritorio */
        width: 100%; /* CLAVE: Ocupa todo el ancho en modo columna */
    }
    .separator-icon {
        display: none; 
    }
    /* Aseguramos que el estado 'expanded' no rompa el diseño apilado en móvil */
    .map-info-container.expanded {
        flex-direction: column; 
    }
    .map-info-container.expanded .map-column,
    .map-info_container.expanded .info-column {
        flex-basis: auto;
    }

    .map-column {
        height: 350px; 
        border-right: none;
        border-bottom: 1px solid #ccc; 
        position: relative;
    }
    
    .info-column {
        padding: 20px;
        align-items: flex-start;
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    
    /* ... (Otros estilos para 767px) ... */
    
    /* ---------------------------------- */
    /* SOLUCIÓN DE ESPACIO BLANCO */
    /* ---------------------------------- */
    
    /* 1. Elimina el margen superior del contenedor del mapa */
    .map-info-container {
        /* Anula el margen de escritorio que crea la separación */
        margin-top: 0 !important; 
        
        /* Asegura que no haya padding interno arriba */
        padding-top: 0 !important; 
        
        /* Reajustar el margen inferior si lo tuviera */
        margin-bottom: 0 !important;
    }

    /* 2. Si el carrusel tiene una clase wrapper (ej: .main-carrusel-wrapper) */
    /* Esto es para asegurar que el carrusel no empuje el contenido de abajo */
    /* Revisa tu HTML para ver si tienes una clase contenedora del carrusel. */
    .carrusel-contenedor-principal { 
        margin-bottom: 0 !important;
    }
    
    /* ---------------------------------- */
    /* MAPA (Mantenemos los ajustes de altura) */
    /* ---------------------------------- */
    .map-column {
        height: 250px; 
    }
}



/* Contenedor centrado del spinner */
.loader-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
}

/* Círculo giratorio */
.spinner {
  width: 70px;
  height: 70px;
  border-top: 6px solid #f1c40f;     /* color amarillo (puedes cambiarlo) */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Animación de giro */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.divCategorias {
    position: static;
}

.divInfoMapU {
    text-align: left;
}

.divInfoMapU h2 {
    margin-bottom: 20px;
    color: #444;
    font-size: 24px;
}

.divInfoMapU h3 {
    margin-top: 25px;
    margin-bottom: 10px;
    color: #ffd900;
    font-size: 20px;
}

.divInfoMapU p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.map-info-container.expanded .separator-icon {
    left: 100%; 
    transform: translate(-25px, -50%); 
}
