/* SISTEMA DE VISTAS MÚLTIPLES PARA PRODUCTOS - SIMPLIFICADO */

/* ===== TOOLBAR DE VISTAS Y FILTROS ===== */
.catalog-toolbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px 0 !important;
    margin-bottom: 24px !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
}

.view-controls {
    display: flex !important;
    gap: 8px !important;
}

.view-btn {
    background: var(--card-bg, #f5f5f5) !important;
    border: 2px solid var(--border-color, #ddd) !important;
    color: var(--text-primary, #333) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.view-btn:hover {
    background: var(--primary-color, #007bff) !important;
    color: #ffffff !important;
    border-color: var(--primary-color, #007bff) !important;
}

.view-btn.active {
    background: var(--primary-color, #007bff) !important;
    color: #ffffff !important;
    border-color: var(--primary-color, #007bff) !important;
}

.sort-controls {
    display: flex !important;
    gap: 12px !important;
    align-items: center !important;
}

.sort-label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--text-secondary, #666) !important;
}

.sort-select {
    padding: 10px 16px !important;
    border: 2px solid var(--border-color, #ddd) !important;
    border-radius: 8px !important;
    background: var(--card-bg, #fff) !important;
    color: var(--text-primary, #333) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.sort-select:hover,
.sort-select:focus {
    border-color: var(--primary-color, #007bff) !important;
    outline: none !important;
}

/* ===== VISTA GRID (DEFAULT) ===== */
.products-grid.view-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 24px !important;
}

/* ===== VISTA MASONRY - PINTEREST STYLE ===== */
.products-grid.view-masonry {
    column-count: 4 !important;
    column-gap: 20px !important;
}

.products-grid.view-masonry .product-card,
.products-grid.view-masonry [class*="-card"],
.products-grid.view-masonry [class*="-item"],
.products-grid.view-masonry [class*="-product"] {
    display: inline-block !important;
    width: 100% !important;
    margin-bottom: 20px !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
}

.products-grid.view-masonry .product-image-container,
.products-grid.view-masonry [class*="-image"],
.products-grid.view-masonry [class*="-cover"],
.products-grid.view-masonry .album-cover,
.products-grid.view-masonry .poster-container {
    aspect-ratio: auto !important;
    height: auto !important;
    min-height: 200px !important;
}

.products-grid.view-masonry .product-image-container img,
.products-grid.view-masonry [class*="-image"] img {
    height: auto !important;
    max-height: 400px !important;
}

.products-grid.view-masonry .product-info,
.products-grid.view-masonry [class*="-info"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.products-grid.view-masonry .product-title,
.products-grid.view-masonry [class*="-title"],
.products-grid.view-masonry [class*="-name"] {
    display: block !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}

.products-grid.view-masonry .product-price,
.products-grid.view-masonry [class*="-price"] {
    display: block !important;
    font-size: 20px !important;
    font-weight: 900 !important;
}

.products-grid.view-masonry .product-description {
    display: none !important;
}

@media (max-width: 1200px) {
    .products-grid.view-masonry {
        column-count: 3 !important;
    }
}

@media (max-width: 768px) {
    .products-grid.view-masonry {
        column-count: 2 !important;
    }
    
    .catalog-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .view-controls {
        justify-content: center !important;
    }
    
    .sort-controls {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .sort-select {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .products-grid.view-masonry {
        column-count: 1 !important;
    }
}

/* ===== ESTILOS ESPECÍFICOS POR TEMPLATE ===== */

/* Spotify */
body.catalog-style-spotify .view-btn {
    background: #282828 !important;
    border-color: #282828 !important;
    color: #ffffff !important;
}

body.catalog-style-spotify .view-btn.active,
body.catalog-style-spotify .view-btn:hover {
    background: #1db954 !important;
    border-color: #1db954 !important;
    color: #000000 !important;
}

body.catalog-style-spotify .sort-select {
    background: #282828 !important;
    border-color: #282828 !important;
    color: #ffffff !important;
}

/* Netflix */
body.catalog-style-netflix .view-btn {
    background: #2f2f2f !important;
    border-color: #3f3f3f !important;
    color: #ffffff !important;
}

body.catalog-style-netflix .view-btn.active,
body.catalog-style-netflix .view-btn:hover {
    background: #e50914 !important;
    border-color: #e50914 !important;
}

body.catalog-style-netflix .sort-select {
    background: #2f2f2f !important;
    border-color: #3f3f3f !important;
    color: #ffffff !important;
}

/* Amazon */
body.catalog-style-amazon .view-btn.active,
body.catalog-style-amazon .view-btn:hover {
    background: #febd69 !important;
    border-color: #f90 !important;
    color: #0f1111 !important;
}

/* Apple */
body.catalog-style-apple .view-btn {
    border-radius: 12px !important;
}

body.catalog-style-apple .view-btn.active,
body.catalog-style-apple .view-btn:hover {
    background: #0071e3 !important;
    border-color: #0071e3 !important;
}

/* Nike */
body.catalog-style-nike .view-btn.active,
body.catalog-style-nike .view-btn:hover {
    background: #111 !important;
    border-color: #111 !important;
}

/* IKEA */
body.catalog-style-ikea .view-btn {
    background: #f5f5f5 !important;
    border-color: #e5e5e5 !important;
    color: #0058a3 !important;
    border-radius: 4px !important;
}

body.catalog-style-ikea .view-btn.active,
body.catalog-style-ikea .view-btn:hover {
    background: #0058a3 !important;
    border-color: #0058a3 !important;
    color: #ffdb00 !important;
}

body.catalog-style-ikea .sort-select {
    background: #ffffff !important;
    border-color: #e5e5e5 !important;
    color: #111111 !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
}

body.catalog-style-ikea .sort-select:hover,
body.catalog-style-ikea .sort-select:focus {
    border-color: #0058a3 !important;
}

body.catalog-style-ikea .sort-label {
    color: #111111 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
    letter-spacing: 1px !important;
}
