/* ========== ESTILOS ESPECÍFICOS PARA CATÁLOGO ========== */

/* CONTENIDO PRINCIPAL */
.catalog-page {
    padding: 30px 20px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

/* FILTROS */
.catalog-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px;
    background: #ffffff;
}

.filter-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Botón Filtrar */
.filter-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 10px 25px;
    font-size: 14px;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: #927a1b;
    color: #927a1b;
}

.filter-btn i {
    font-size: 14px;
}

/* Contador de productos */
.product-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* MODAL DE FILTROS */
.filter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.filter-modal.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 320px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 25px 24px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #777;
    cursor: pointer;
}

.modal-title {
    font-size: 13px;
    font-weight: 400;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0;
}

.modal-body {
    padding: 20px 24px;
}

.filter-option {
    margin-bottom: 20px;
}

.filter-label {
    display: block;
    font-size: 11px;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 400;
}

.filter-select {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    background: transparent;
    color: #222;
    transition: all 0.2s;
    appearance: none;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-bottom-color: #000;
}

.filter-select[type="text"] {
    padding: 12px 0;
}

.modal-actions {
    padding: 20px 24px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
    background: white;
}

.btn-apply, .btn-clear {
    flex: 1;
    padding: 14px;
    border: none;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.btn-apply {
    background: #000;
    color: white;
    border: 1px solid #000;
}

.btn-apply:hover {
    background: #222;
}

.btn-clear {
    background: white;
    color: #666;
    border: 1px solid #ddd;
}

.btn-clear:hover {
    background: #fafafa;
    color: #333;
}

.filter-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-size: 12px;
    padding-right: 25px;
}

.filter-select[type="text"] {
    background-image: none;
    padding-right: 0;
}

.filter-select option {
    background-color: white !important;
    color: #000 !important;
}

.filter-select option:checked {
    background-color: #f5f5f5 !important;
    color: #000 !important;
}

/* PRODUCTOS */
.catalog-products {
    padding: 0 10px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 1200px) {
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .catalog-page {
        padding: 20px 15px;
    }
    
    .filter-btn {
        padding: 6px 18px;
        font-size: 12px;
    }
    
    .product-count {
        font-size: 12px;
    }
}

@media (min-width: 1600px) {
    .catalog-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 35px;
    }
}

.catalog-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.catalog-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-image {
    height: 260px;
    background-color: #fafafa;
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
}

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

.product-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-hover {
    opacity: 1;
}

.wishlist-icon, .add-cart-icon {
    color: white;
    font-size: 18px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.wishlist-icon:hover {
    color: #ff6b6b;
}

.add-cart-icon:hover {
    color: #927a1b;
}

.product-info {
    text-align: center;
}

.product-name {
    font-weight: 400;
    margin-bottom: 6px;
    color: #222;
    font-size: 14px;
    text-transform: uppercase;
}

.product-brand {
    color: #777;
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.product-price {
    color: #222;
    font-weight: 400;
    font-size: 15px;
}

/* PAGINACIÓN */
.pagination-arrows {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.arrow-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    color: #927a1b;
    font-size: 14px;
}

.arrow-btn:hover:not(:disabled) {
    border-color: #000;
    color: #000;
    background: #f8f8f8;
}

.arrow-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* FILTROS ACTIVOS TAGS */
.filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background: #927a1b;
    color: white;
    font-size: 12px;
    gap: 8px;
}

.filter-tag button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

/* NO PRODUCTOS */
.no-products {
    text-align: center;
    padding: 100px 20px;
}

.no-products i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #ddd;
}

.no-products h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 400;
    color: #444;
}

/* Responsive para móvil */
@media (max-width: 768px) {
    .catalog-page {
        padding: 20px 15px;
    }
    
    .filter-btn {
        padding: 6px 18px;
        font-size: 12px;
    }
    
    .product-count {
        font-size: 12px;
    }
    
    .filter-tag {
        font-size: 11px;
        padding: 4px 10px;
    }
}

@media (max-width: 480px) {
    .catalog-page {
        padding: 15px 12px;
    }
    
    .filter-btn {
        padding: 5px 15px;
        font-size: 11px;
    }
    
    .product-count {
        font-size: 11px;
    }
    
    .filter-tag {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* ========== CENTRAR ÚLTIMA FILA DEL GRID ========== */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 20px;
    margin-bottom: 40px;
}

/* Para escritorio (4 columnas) */
@media (min-width: 992px) {
    .catalog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Centrar elementos cuando la última fila tiene menos de 4 productos */
    .catalog-grid:after {
        content: "";
        flex: auto;
    }
}

/* Para tablets (3 columnas) */
@media (max-width: 991px) and (min-width: 768px) {
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Para móviles (2 columnas) */
@media (max-width: 767px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Usar flexbox para centrar la última fila */
.catalog-products {
    padding: 0 10px;
}

.catalog-grid {
    display: grid;
}

/* Estilo para que los productos se vean consistentes */
.catalog-card {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
}

/* ========== PRECIO CON DESCUENTO (CATÁLOGO) ========== */

.catalog-card .product-price-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.catalog-card .old-price {
    font-size: 12px;
    color: #aaa;
    text-decoration: line-through;
    font-weight: 400;
    line-height: 1.2;
}

.catalog-card .new-price {
    font-size: 15px;
    color: #222;
    font-weight: 500;
    line-height: 1.2;
}

.catalog-card .discount {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: #927a1b;
    padding: 2px 7px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 3px;
}

@media (max-width: 480px) {
    .catalog-card .old-price { font-size: 11px; }
    .catalog-card .new-price { font-size: 13px; }
    .catalog-card .discount  { font-size: 9px; padding: 1px 5px; }
}