/* products.css - Estilos para la página de productos */

/* Hero Section */
.products-hero {
    background: linear-gradient(rgba(42, 157, 143, 0.9), rgba(38, 70, 83, 0.9));
    color: white;
    padding: 100px 0;
    text-align: center;
    margin-top: 80px;
}

.products-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.products-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Filtros */
.products-filters {
    background-color: var(--white);
    padding: 30px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 80px;
    z-index: 100;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    color: var(--secondary);
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    background-color: var(--white);
    font-family: 'Inter', sans-serif;
    min-width: 200px;
}

.search-box {
    position: relative;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
}

.search-box button {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
}

/* Grid de Productos */
.products-listing {
    padding: 60px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.product-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    z-index: 2;
}

.product-badge.new {
    background-color: var(--primary);
}

.product-badge.eco {
    background-color: #25D366;
    /* Verde WhatsApp */
}

.product-badge.bestseller {
    background-color: #FF9F1C;
    /* Naranja */
}

.product-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.quick-view,
.add-wishlist {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: var(--dark);
    cursor: pointer;
    transition: var(--transition);
}

.quick-view:hover,
.add-wishlist:hover {
    background-color: var(--primary);
    color: white;
}

.product-info {
    padding: 20px;
}

.product-category {
    display: block;
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 5px;
    font-weight: 500;
}

.product-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--secondary);
}

.product-description {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.price-container {
    line-height: 1;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.price-unit {
    font-size: 0.8rem;
    color: var(--gray);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Paginación */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.page-number,
.page-nav {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.page-number:hover,
.page-nav:hover {
    background-color: var(--light);
}

.page-number.active {
    background-color: var(--primary);
    color: white;
}

.page-nav.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* CTA Section */
.products-cta {
    background-color: var(--light);
    padding: 80px 0;
    text-align: center;
}

.products-cta h2 {
    margin-bottom: 15px;
}

.products-cta p {
    max-width: 600px;
    margin: 0 auto 30px;
    color: var(--gray);
}

/* Responsive */
@media (max-width: 768px) {
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box {
        width: 100%;
    }

    .products-hero h1 {
        font-size: 2.2rem;
    }

    .products-hero {
        padding: 80px 0;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.list-unstyled {
    padding-left: 0;
    list-style: none;
}