/* Estilos para el carrusel de productos */
.product-carousel {
    width: 100%;
    overflow-x: scroll; /* Cambio de auto a scroll para forzar scrollbar */
    padding: 10px 0 16px 0; /* Padding extra abajo para la scrollbar */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; /* Firefox - scrollbar permanente */
    scrollbar-color: rgba(0, 86, 154, 0.4) rgba(0, 0, 0, 0.1);
}

/* Scrollbar permanente siempre visible */
.product-carousel::-webkit-scrollbar {
    height: 8px;
    -webkit-appearance: none;
}

.product-carousel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
}

.product-carousel::-webkit-scrollbar-thumb {
    background: rgba(0, 86, 154, 0.5);
    border-radius: 4px;
    -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
}

/* Forzar que siempre haya contenido scrolleable */
.product-carousel-container {
    min-width: calc(100% + 1px); /* Fuerza que siempre haya scroll */
}

.product-carousel-container {
    display: flex;
    gap: 12px;
    padding: 5px;
    width: max-content; /* Asegura que el contenido determine el ancho */
}

.product-card {
    min-width: 160px;
    max-width: 160px;
    min-height: 220px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    flex-shrink: 0; /* Evita que las tarjetas se compriman */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.product-image-container {
    height: 120px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    position: relative;
}

@keyframes productImageShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.product-image-container.image-loading {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: productImageShimmer 1.2s ease-in-out infinite;
}

.product-image-container.image-loading .product-image {
    opacity: 0;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 42px;
    line-height: 1.3;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: #00569a;
    margin-bottom: 8px;
}

.product-brand {
    font-size: 11px;
    color: #777;
    margin-bottom: 4px;
    font-weight: 500;
}

.product-stock {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.product-stock.available {
    color: #28a745;
}

.product-stock.unavailable {
    color: #dc3545;
}

.product-stock.consult {
    color: #666;
    font-style: italic;
    font-size: 11px;
}

 .product-stock.web-available {
     color: #00569a;
     background: rgba(0, 86, 154, 0.08);
     border: 1px solid rgba(0, 86, 154, 0.2);
     padding: 4px 8px;
     border-radius: 6px;
     display: inline-block;
     font-weight: 600;
     line-height: 1.2;
     margin-bottom: 5px;
 }

.product-location {
    font-size: 11px;
    color: #555;
    margin-bottom: 5px;
    font-weight: 500;
}

.product-section {
    font-size: 11px;
    color: #555;
    margin-bottom: 5px;
    font-weight: 500;
}

.product-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #00569a;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    z-index: 1;
}

.buy-button {
    background-color: #00569a;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    text-align: center;
    margin-top: auto;
}

.buy-button:hover {
    background-color: #003A70;
}

/* Estilos para la sección de productos relacionados */
.related-products-section {
    margin-top: 10px;
    margin-bottom: 15px;
    width: 100%;
    display: flex;
    flex-direction: column;
    clear: both;
}

.related-products-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    padding-left: 5px;
    order: -1;
    display: block;
    width: 100%;
}

/* Animación para el carrusel */
@keyframes slideIn {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.product-card {
    animation: slideIn 0.3s ease forwards;
    animation-delay: calc(var(--index) * 0.1s);
    opacity: 0;
}



/* Estilos para promociones */
.product-promotion {
    font-size: 11px;
    background-color: #f44336;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
}