/* CSS Document */
/* ==========================================================================
   Sección de la Tienda (Contenedor Principal)
   ========================================================================== */
.product-shop-section {
    background: #f8fafc;
    padding: 60px 0;
}

/* Cabecera interna de la vitrina */
.shop-header-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.shop-view-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--insac-dark);
    margin-bottom: 0;
}

/* ==========================================================================
   Filtros de categorías estilo lista horizontal
   ========================================================================== */
.shop-filter-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: auto; /* Permite scroll horizontal en móviles si las categorías desbordan */
    white-space: nowrap;
}

.shop-filter-nav li {
    margin-left: 20px;
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
}

.shop-filter-nav li::before {
    content: "•"; /* Corregido el carácter extraño por un punto limpio */
    margin-right: 8px;
    color: #cbd5e1;
}

.shop-filter-nav li.active, 
.shop-filter-nav li:hover {
    color: var(--insac-primary);
}

.shop-filter-nav li.active::before {
    color: #22c55e; /* Punto verde de estado activo igual que la plantilla */
}

/* ==========================================================================
   Estructura de Animación y Control del Filtrado
   ========================================================================== */
.product-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Animación de entrada suave cuando un producto aparece al filtrar */
@keyframes fadeInProduct {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Tarjeta del Producto Individual
   ========================================================================== */
.product-grid-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 16px;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInProduct 0.4s ease-in-out forwards;
}

.product-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

/* Etiqueta de Descuento Flotante */
.discount-tag-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ef4444; /* Rojo vibrante comercial */
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 10;
}

/* Contenedor simétrico para centrar imágenes de distinto tamaño */
.product-item-img-wrap {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    padding: 10px;
}

.product-item-img-wrap img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* Textos y Detalles de la Tarjeta */
.product-grid-item h4 {
    font-size: 16px;
    font-weight: 700;
    color: #047857; /* Verde oscuro para títulos de productos comerciales */
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Corta el texto con puntos suspensivos si es muy largo */
}

.product-grid-item .desc-short {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Estrellas de Calificación */
.rating-stars-box {
    font-size: 11px;
    color: #ef4444; /* Estrellas rojas de acuerdo al diseño provisto */
    margin-bottom: 15px;
}

.rating-stars-box span {
    color: #64748b;
    font-weight: 600;
    margin-left: 5px;
}

/* Contenedor de Precios */
.product-price-row {
    margin-bottom: 18px;
}

.price-old-strike {
    font-size: 13px;
    text-decoration: line-through;
    color: #94a3b8;
    margin-right: 8px;
    font-weight: 600;
}

.price-current-bold {
    font-size: 15px;
    font-weight: 800;
    color: #000000;
}

/* Botón "Add to cart" Estilo Esquinas Cuadradas Suaves */
.btn-add-cart-outline {
    background: transparent;
    border: 1px solid #047857;
    color: #047857;
    font-weight: 700;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    width: 100%;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none !important;
}

.btn-add-cart-outline:hover {
    background: #047857;
    color: #ffffff;
}

/* ==========================================================================
   Responsive / Media Queries
   ========================================================================== */

/* Forzar visualización horizontal de 6 columnas solo en pantallas grandes */
@media (min-width: 1200px) {
    .col-xl-custom-6 {
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }
}

@media (max-width: 767px) {
    .shop-header-box {
        flex-direction: column;
        align-items: flex-start;
    }
    .shop-filter-nav {
        margin-top: 15px;
        width: 100%;
    }
    .shop-filter-nav li:first-child {
        margin-left: 0;
    }
}
