/* src/public/modules/store/product-grid/product-grid.css */

/* 1. Contenedor Principal */
#product-grid-container {
    display: block; 
    margin-top: 20px;
    padding-bottom: 50px;
}

/* 2. Grid de Productos */
.category-products-grid {
    display: grid;
    /* Mínimo 220px por tarjeta asegura buena visibilidad */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
}

/* 3. Título de la Sección */
.category-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 30px;
    margin-top: 10px;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

/* --- ESTILOS DE PAGINACIÓN (LOAD MORE) --- */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

.load-more-btn {
    background-color: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
    padding: 12px 40px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.load-more-btn:hover {
    border-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.load-more-btn:active {
    transform: scale(0.98);
}

/* Loader Spinner */
.loader-container {
    display: flex;
    justify-content: center;
    padding: 30px;
    width: 100%;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #FFC107; /* Dorado */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state-msg {
    text-align: center;
    padding: 50px;
    color: #6c757d;
    font-size: 1.2rem;
}

/* --- Estilos de Tarjeta (Mantenidos) --- */
.product-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    border: 1px solid #e5e7eb;
    position: relative;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    border-bottom: 1px solid #f3f4f6;
    background-color: #fff;
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    object-position: center;
    display: block;
    padding: 10px;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #dc3545;
    color: white;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.product-info {
    padding: 15px;
    flex-grow: 1;
    text-align: center;
}

.product-name {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-color);
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
}

.price-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.original-price-crossed {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 0.9em;
    font-weight: 500;
}

.product-price {
    font-size: 1.2em;
    color: #333;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.product-price.discount-price {
    color: #dc3545;
}

.add-to-cart-btn {
    width: 100%;
    background-color: #dc3545;
    color: #fff;
    padding: 10px;
    border-radius: 0 0 8px 8px;
    text-transform: uppercase;
    margin-top: auto; 
    font-size: 0.9em;
}

.add-to-cart-btn:hover {
    background-color: #a02030;
}