/* static/css/nuestros_productos.css */

/* --- Layout & Sidebar --- */
.catalog-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2em; align-items: start; }

.filters-sidebar { 
    background: rgba(26, 26, 26, 0.8); padding: 1.5em; border-radius: 8px; 
    border: 1px solid rgba(192, 8, 18, 0.3); backdrop-filter: blur(10px); 
}

.filter-group { border-bottom: 1px solid rgba(255, 255, 255, 0.1); margin-bottom: 1.5em; padding-bottom: 1.5em; }
.filter-group:last-child { border-bottom: none; margin-bottom: 0; }
.filter-group h4 { margin: 0 0 15px 0; font-size: 1.1em; color: var(--blanco); font-weight: 600; }

.filter-input-row { display: flex; gap: 10px; }
.filter-input { 
    width: 100%; padding: 10px; border: 1px solid rgba(255, 255, 255, 0.2); 
    border-radius: 4px; background: rgba(0, 0, 0, 0.5); color: var(--blanco); 
}

.btn-filter { 
    width: 100%; background: linear-gradient(135deg, var(--rojo-rvm) 0%, #a0060e 100%);
    color: white; border: none; padding: 12px; border-radius: 5px; 
    cursor: pointer; font-weight: bold; transition: 0.3s; 
}
.btn-filter:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(192, 8, 18, 0.4); }
.clear-filters { display: block; text-align: center; margin-top: 15px; color: var(--rojo-rvm); text-decoration: none; font-size: 0.9em; }

/* --- Listas y Enlaces --- */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { margin-bottom: 8px; }
.check-list a { color: #ccc; text-decoration: none; transition: color 0.3s; display: block; }
.check-list a:hover, .check-list label:hover { color: var(--rojo-rvm); }
.check-list label { display: flex; align-items: center; cursor: pointer; color: #ccc; }
.check-list input[type="checkbox"] { margin-right: 8px; transform: scale(1.2); accent-color: var(--rojo-rvm); }

/* Subcategorías */
.check-list .subcategoria a { padding-left: 1.5em; font-size: 0.95em; color: #aaa; }
.check-list .parent-category { font-weight: bold; color: var(--blanco); }

/* --- Grid Productos --- */
.grid-productos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2em; padding: 0; list-style: none; }

.card-producto { 
    background: rgba(26, 26, 26, 0.7); border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 8px; overflow: hidden; position: relative; 
    transition: transform 0.3s, box-shadow 0.3s; display: flex; flex-direction: column;
}
.card-producto:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.5); border-color: rgba(192, 8, 18, 0.5); }

.card-carrusel { 
    position: relative; 
    height: 300px;
    overflow: hidden; 
    background-color: var(--gris-medio); 
    display: block; 
}

.card-img-slide { width: 100%; height: 100%; object-fit: cover; position: absolute; opacity: 0; transition: opacity 0.3s; }
.card-img-slide.visible { opacity: 1; }

/* Selectores de Color */
.card-color-selector { display: flex; gap: 8px; justify-content: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.card-selector { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); cursor: pointer; transition: 0.2s; }
.card-selector:hover, .card-selector.active { transform: scale(1.2); border-color: var(--blanco); }

/* Info y Botones */
.card-info { padding: 1.5em; display: flex; flex-direction: column; flex-grow: 1; }
.card-info h3 { margin: 0 0 0.5em; }
.card-info h3 a { color: var(--blanco); text-decoration: none; }
.precio { font-size: 1.2em; color: var(--rojo-rvm); font-weight: bold; margin-bottom: 0.5em; display: block; }

.btn-ver-mas, .btn-consultar-small { 
    text-align: center; border-radius: 5px; font-weight: bold; text-decoration: none; 
    transition: 0.3s; margin-top: auto; padding: 0.6em 1em; display: inline-block;
}
.btn-ver-mas { background: linear-gradient(135deg, #f0ad4e 0%, #ec971f 100%); color: #fff; }
.btn-consultar-small { background: linear-gradient(135deg, #25D366 0%, #1da851 100%); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-consultar-small svg { width: 16px; height: 16px; fill: currentColor; }

/* --- Funcionalidad Comparar --- */
.compare-check {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    cursor: pointer;
    border-radius: 4px;
    margin: 0;
    vertical-align: middle; 
    background-color: rgba(0, 0, 0, 0.6); 
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease-in-out;
}

.compare-check:hover {
    border-color: var(--rojo-rvm);
    box-shadow: 0 0 8px rgba(192, 8, 18, 0.4);
}

.compare-check:checked {
    background-color: var(--rojo-rvm); 
    border-color: var(--rojo-rvm);
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-size: 70% 70%;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.1); 
}

.compare-wrapper { 
    position: absolute; 
    top: 10px; 
    right: 10px; 
    z-index: 10; 
    background: rgba(0,0,0,0.8); 
    border-radius: 4px; 
    padding: 6px 10px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 0.85em; 
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1); 
}

#btn-float-comparar {
    position: fixed; bottom: 30px; right: 30px; z-index: 1000;
    background: linear-gradient(135deg, var(--rojo-rvm) 0%, #a0060e 100%);
    color: white; padding: 15px 25px; border-radius: 50px;
    font-weight: bold; box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    text-decoration: none; display: none; transition: transform 0.3s;
}
#btn-float-comparar:hover { 
    transform: scale(1.05); 
    box-shadow: 0 8px 25px rgba(192, 8, 18, 0.4); 
}

@media (max-width: 768px) { .catalog-layout { grid-template-columns: 1fr; } }