/* Estilos generales para contener todo el contenido */

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Previene el scroll horizontal en toda la página */

}

.container {
    max-width: 1200px; /* Ajusta este valor según tus necesidades */
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;



}



header {
    transition: height 0.3s ease-in-out, transform 0.3s ease-in-out;
}

header .container {
    transition: all 0.3s ease-in-out;
}

@media (max-width: 767px) {
    header {
        height: 70px !important; /* Forzar altura pequeña en móviles */
    }

    header img {
        height: 50px !important; /* Forzar tamaño de logo pequeño en móviles */
    }
}

@media (min-width: 768px) {
    header {
        height: 150px;
    }

    header.shrink {
        height: 70px;
    }

    header img {
        transition: height 0.3s ease-in-out;
        height: 120px;
    }

    header.shrink img {
        height: 60px;
    }
}

header.shrink {
    height: 70px;
}

header *, header *::before, header *::after {
    transition: all 0.3s ease-in-out;
}



header.shrink .container {
    padding-top: 5px;
    padding-bottom: 5px;
}

/* Ajustar el tamaño del logo */
header img {
    transition: height 0.3s ease;
    height: 120px;
}

header.shrink img {
    height: 60px;
}

/* Ajustar el tamaño del input de búsqueda */


header.shrink #searchInput {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Ajustar el tamaño de los iconos de redes sociales */
header .bi {
    transition: all 0.3s ease;
}

header.shrink .bi {
    width: 20px;
    height: 20px;
}


header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}



.header-logo {
    text-align: center;
    width: 40%; /* Ajusta según sea necesario */
}

.main-content {
    display: flex;
    margin-top: 2rem;
}

.categories {
    width: 25%;
    padding-right: 1rem;
}

.products {
    width: 75%;
}


.header-social-icons {
    display: flex;
    justify-content: flex-end;
    width: 30%; /* Ajusta según sea necesario */
}

#searchInput {
    padding-left: 40px; /* Ajusta según el tamaño de tu ícono */
    width: 100%;
}

#searchInput::placeholder {
    color: #fee305;
    opacity: 0.7;
}




#searchInput:focus {
    outline: none;
}
.header-search-container svg {
    transition: none;
    position: absolute;
    left: 10px; /* Ajusta según sea necesario */
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none; /* Permite que los clics pasen a través del icono */
    color: #2c3245; /* Mantén el color azul original */
}

.header-search-container:focus-within svg {
    color: #2c3245; /* Mantener el mismo color incluso cuando está enfocado */
}

/* Estilos para los iconos de redes sociales */
.social-icon {
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: white;
}


/* Ajustes para los resultados de búsqueda */
#searchResults {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1001;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-height: 80vh;
    overflow-y: auto;
}


.search-results-scroll {
    width: 100%;
}

#searchResults {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1001;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-height: 80vh;
    overflow-y: auto;
}

.search-results-scroll {
    width: 100%;
}

@media (max-width: 767px) {
    #searchResults {
        position: fixed;
        top: 70px; /* Ajusta esto según la altura de tu header en móvil */
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        max-height: calc(100vh - 70px); /* Permite que crezca hasta el máximo disponible */
        border-radius: 0;
    }

    .search-results-scroll {
        height: auto;
        max-height: calc(2.5 * 116px); /* 116px es la altura aproximada de cada resultado */
        overflow-y: auto;
    }

    .search-result-item {
        height: 116px; /* Altura fija para cada resultado */
        overflow: hidden;
    }
}


.search-result-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.search-result-item:hover {
    background-color: #f0f0f0;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Estilos existentes */
#shoppingCart {
    z-index: 1000;
    width: 100%; /* Cambiar a 100% para móviles */
    max-width: 400px; /* Mantener un máximo para escritorio */
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#cartItems {
    flex-grow: 1;
    overflow-y: auto;
}

#cartFooter {
    position: sticky;
    bottom: 0;
    background-color: white;
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 767px) {
    #shoppingCart {
        padding-bottom: 60px; /* Espacio para los controles del navegador */
    }

    #cartFooter {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
    }
}

#cartItems > div {
    transition: background-color 0.3s ease;
}

#cartItems > div:hover {
    background-color: #f3f4f6;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.cart-item-details {
    flex-grow: 1;
    padding: 0 10px;
}

.cart-item-price {
    text-align: right;
    min-width: 80px;
}

.cart-quantity-controls button {
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}

.price-slider-container {
    height: 10px;
    position: relative;
    padding: 3.5px 0;
}

.price-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 3px;
    background: #d3d3d3;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    pointer-events: auto;
    margin-top: -3.5px;
}

.price-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    pointer-events: auto;
}

.price-slider::-webkit-slider-runnable-track {
    height: 3px;
    background: transparent;
}

.price-slider::-moz-range-track {
    height: 3px;
    background: transparent;
}

.price-slider:hover {
    opacity: 1;
}

.max-h-40 {
    max-height: 10rem;
}

.overflow-y-auto {
    overflow-y: auto;
}

.filter-content {
    transition: max-height 0.3s ease-in-out;
}

.filter-content.hidden {
    max-height: 0;
}

.line-through {
    text-decoration: line-through;
}

.text-red-600 {
    color: #dc2626;
}

.text-gray-500 {
    color: #6b7280;
}



.product-card {
    position: relative;
    transition: all 0.3s ease;
    width: 100%;

}

.add-to-cart-button {
    background-color: #3b82f6; /* bg-blue-500 */
    color: white;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

.add-to-cart-button:hover {
    background-color: #2563eb; /* bg-blue-600 */
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    font-size: 0.875rem;
    line-height: 1.25rem;
    height: 2.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bg-whatsapp-green {
    background-color: #25D366;
}

.hover\:bg-whatsapp-green-dark:hover {
    background-color: #128C7E;
}

.close-button {
    transition: all 0.3s ease;
}

.close-button:hover {
    transform: rotate(90deg);
}

@keyframes spiral {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(0.5);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

#whatsappPath, #locationPath {
    transform-origin: center;
    transition: transform 0.5s ease-in-out;
}

.whatsapp-icon:hover #whatsappPath,
.location-icon:hover #locationPath {
    animation: spiral 0.5s ease-in-out forwards;
}

#whatsappPath, #locationPath {
    will-change: transform;
}

@keyframes cartSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(0.5);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

#cartIcon svg {
    transition: transform 0.3s ease-in-out;
}

#cartIcon:hover svg {
    animation: cartSpin 0.5s ease-in-out;
}


#productGrid {
    display: grid;
    gap: 1rem;
}

/* Ajustes responsivos para el grid de productos */
@media (min-width: 1536px) { /* 2xl breakpoint en Tailwind por defecto */
    #productGrid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (min-width: 1280px) and (max-width: 1535px) { /* xl breakpoint */
    #productGrid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1024px) and (max-width: 1279px) { /* lg breakpoint */
    #productGrid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1023px) { /* md breakpoint */
    #productGrid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 640px) and (max-width: 767px) { /* sm breakpoint */
    #productGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 639px) {
    #productGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}



@media (max-width: 768px) {
    .header-content, .main-content {
        flex-direction: column;
    }

    .header-search-container, .header-logo, .header-social-icons,
    .categories, .products {
        width: 100%;
        margin-bottom: 1rem;
    }

    #menuButton {
        font-size: 1.125rem;
    }
    
    #searchInput {
        font-size: 1.125rem;
    }
    
    .header-search-container {
        max-width: 300px;
    }

    .bg-[#fee305] p {
        font-size: 2.5xl; /* Tamaño reducido para móviles */
        line-height: 1.2;
    }


    .sidebar-open {
    margin-left: 0;
    }
}



.banner-slider {
    position: relative;
    width: 100vw;
    height: 240px; /* Altura predeterminada para móviles */
    margin-left: calc(-50vw + 50%);
    margin-bottom: 30px;
    overflow: hidden;
    padding-top: 40px; /* Agregamos padding-top aquí */
}

.slider-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.slide {
    min-width: 100vw;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.slide img {
    width: auto;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

.slider-progress {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
}

.progress-bar {
    width: 20%;
    height: 100%;
    background-color: white;
    transition: transform 0.3s ease-in-out;
}

/* Media query para dispositivos de escritorio */
@media (min-width: 768px) {
    .banner-slider {
        height: 500px;
        padding-top: 40px; /* Mantenemos el padding-top en escritorio */
    }
}

@media (max-width: 767px) {
    .related-products-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 1rem;
    }
    
    .related-products-scroll {
        display: flex !important;
        gap: 0rem;
    }
    
}

.description {
    font-size: 1em !important;
    color: #4B5563;
    overflow-y: visible !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
}


.whisky-marca {
    font-size: 0.9em;
    color: #4B5563;
    text-transform: lowercase;
}

.whisky-marca a {
    color: inherit;
    text-decoration: none;
}

.whisky-marca a:hover {
    text-decoration: underline;
}

.product-sku {
    color: #a9a9a9;
}



#productName {
    font-family: "Proxima Nova", -apple-system, Roboto, Arial, sans-serif;
    font-size: 1.8em;
    font-weight: bold;
    letter-spacing: -0.05em;
    line-height: 1;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    #productName {
        font-size: 3em;
    }
}



@media (min-width: 768px) {
    .product-card .add-to-cart-button {
        opacity: 0;
        pointer-events: none;
    }

    .product-card:hover .add-to-cart-button {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 767px) {
    .product-card .add-to-cart-button {
        opacity: 1;
        pointer-events: auto;
    }
}

.related-products-container {
    position: relative;
    overflow: hidden; /* Oculta la barra de desplazamiento */
    padding-bottom: 1em;
}

.related-products-scroll {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Para Firefox */
    -ms-overflow-style: none; /* Para Internet Explorer y Edge */
}

.related-products-scroll::-webkit-scrollbar {
    display: none; /* Para Chrome, Safari y Opera */
}

.product-brand, .product-sku {
    font-size: 0.9em; /* Aumentado 2 puntos (asumiendo que el tamaño base es 16px) */
}

.product-name-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.5em;
    transition: color 0.3s ease;
}

#cartItems a {
    text-decoration: none;
    color: inherit;
}

#cartItems a:hover .product-name-truncate {
    color: #3182ce; /* Un tono de azul, ajusta según tu esquema de colores */
}

#cartItems .flex-shrink-0 a {
    display: block;
    overflow: hidden;
}

#cartItems .flex-shrink-0 a img {
    transition: transform 0.3s ease;
}

#cartItems .flex-shrink-0 a:hover img {
    transform: scale(1.05);
}

.divgene, .divtragos-container, #relatedProducts {
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 20px;
    background-color: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border-radius: 0.5rem;
}

.divgene {
font-size: 1em;
}

.div1, .div2 {
    flex: 1;
    min-width: 300px;
}
.div2 > * {
    margin-bottom: 15px;
}

.store-info {
    margin-bottom: 0;
}



.price-container {
    display: flex;
    gap: 20px;
    align-items: center;
}
#productCategory {
    text-transform: lowercase;
}
#productCategory a {
    color: inherit;
    text-decoration: none;
    text-transform:uppercase;
}
#productCategory a:hover {
    text-decoration: underline;
}




.price-discounted {
    font-weight: bold;
    color: #3B82F6; /* Color azul del botón */
    font-size: 1.2em;
}
.price-original {
    text-decoration: line-through;
    color: #6B7280; /* Un gris medio */
}

.quantity-add-container {
    display: flex;
    align-items: center;
    gap: 20px;
}
.quantity-container {
    display: flex;
    align-items: center;
    border: 1px solid #E5E7EB;
    border-radius: 0.375rem;
    overflow: hidden;
}
.quantity-container button {
    width: 40px;
    height: 40px;
    font-size: 18px;
    border: none;
    background-color: #F3F4F6;
    cursor: pointer;
    color: #4B5563;
}
.quantity-container span {
    width: 40px;
    text-align: center;
    font-weight: bold;
    color: #1F2937;
}
.add-to-cart {
    flex-grow: 1;
    padding: 10px;
    background-color: #3B82F6;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: background-color 0.3s;
}
.add-to-cart:hover {
    background-color: #2563EB;
}
.store-info, .payment-info {
    font-size: 0.9em;
    color: #4B5563;
}
.divtragos-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #1F2937;
}
.divtragos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.divtragos-item, .product-card {
    border: 1px solid #E5E7EB;
    border-radius: 0.375rem;
    overflow: hidden;
    transition: box-shadow 0.3s;
}
.divtragos-item:hover, .product-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.divtragos-image, .product-card img {
    height: 200px;
    object-fit: contain;
}
.divtragos-info, .product-card > div {
    padding: 10px;
}
.divtragos-name, .product-card h3 {
    font-weight: bold;
    color: #1F2937;
}
.divtragos-type, .product-card p {
    color: #4B5563;
    font-size: 0.875em;
}
.divtragos-more, .product-card button {
    width: 100%;
    padding: 8px;
    background-color: #3B82F6;
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.3s;
}
.divtragos-more:hover, .product-card button:hover {
    background-color: #2563EB;
}

.product-image-container {
    width: 100%;
    padding-top: 100%; /* Esto crea un contenedor cuadrado */
    position: relative;
    overflow: hidden;
}
.product-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-card-image-container {
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.product-card-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}



/* Estilos para el botón de menú */
#menuButton {
    transition: transform 0.3s ease;
}

#menuButton:hover {
    transform: scale(1.1);
}

/* Estilos para el panel deslizable */
#categorySidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background-color: white;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}


#categorySidebar.open {
    transform: translateX(0);
}
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

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

/* Ajusta el ancho del sidebar en móviles si es necesario */
@media (max-width: 767px) {
    #categorySidebar {
        width: 80%; /* O el ancho que prefieras para móviles */
        max-width: 300px;
    }
}

/* Previene el scroll en el body cuando el sidebar está abierto en móviles */
body.sidebar-open {
    overflow: hidden;
}

/* Asegúrate de ajustar también la transformación para que coincida con el nuevo ancho */
#categorySidebar.hidden {
    transform: translateX(-300px); /* Este valor debe coincidir con el ancho del sidebar */
}

.sidebar-hidden {
    transform: translateX(-300px); /* Asegúrate de que este valor coincida con el ancho del sidebar */
}

.container[role="main"] {
    padding-top: 0; /* Eliminamos cualquier padding superior que pudiera haber */
}

.container[role="main"].sidebar-open {
    margin-left: 0;
}

/* Ajuste para el contenido principal cuando el sidebar está abierto */
.sidebar-open {
    margin-left: 16rem; /* 64px = ancho del sidebar */
}

/* Estilos para dispositivos móviles */





@media (max-width: 767px) {
    #menuButton span {
        display: none;
    }
    
    #searchInput::placeholder {
        color: inherit; /* o el color que prefieras */
    }
    
    .header-search-container {
        max-width: 40px;

    }
    
    .header-search-container:focus-within {
        max-width: 100%;
    }
}

.header-search-container {
    width: 100%;
    max-width: 300px;
    transition: max-width 0.3s ease;
    position: relative;
}


#menuButton, .header-search-container svg {
    transition: transform 0.3s ease;
}

#menuButton:hover, .header-search-container:hover svg {
    transform: scale(1.1);
}

.header-search-container input:focus {
    outline: none;
}

#menuButton, .header-search-container {
    transition: transform 0.3s ease;
}

.header-search-container:hover svg {
    transform: translateY(-50%); /* Mantener solo la transformación vertical */
}

/* ================================================================= */

.category-item {
    margin: 5px 0;
}




.category-item:hover {
    background-color: #2c3245;
    border-radius: 10px; /* Esto ya estaba, pero lo mantenemos para claridad */

}

.category-item:hover .category-link {
    color: #464646;
    text-decoration: none;
}

.category-link {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    color: #464646;
    padding: 10px 15px;
    border-radius: 5px; /* Esto ya estaba, pero lo mantenemos para claridad */
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
}


/* Aplicar hover solo a elementos no seleccionados */
.category-item:not(.selected) .category-link:hover {
    background-color: #2c3245;
    color: #fee305;
}

/* Estilo para el elemento seleccionado */
.category-item.selected .category-link {
    background-color: #2c3245;
    font-weight: bold; /* Opcional: hacer el texto más destacado */
    color: #fee305;
}


.category-link:hover {
    background-color: #dcdcdc;
    text-decoration: none;
    

}


.filter-content {
    background-color: white; /* O el color de fondo que prefieras */
}
