/**
 * BEETOS - Estilos de Categoría
 * categoria.css
 */

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb-section {
    background: #f8f8f8;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #5a2d5a;
}

.breadcrumb .separator {
    color: #999;
}

.breadcrumb .current {
    color: #333;
    font-weight: 600;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.categoria-main {
    padding: 40px 0 80px 0;
    background: #fafafa;
}

.categoria-header {
    margin-bottom: 40px;
    text-align: center;
}

.categoria-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
}

.categoria-descripcion {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.categoria-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* ============================================
   SIDEBAR DE FILTROS
   ============================================ */

.categoria-sidebar {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-inputs input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.price-inputs input:focus {
    outline: none;
    border-color: #5a2d5a;
}

.price-inputs span {
    color: #999;
}

.checkbox-list {
    max-height: 200px;
    overflow-y: auto;
}

.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: color 0.3s;
}

.checkbox-list label:hover {
    color: #5a2d5a;
}

.checkbox-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #5a2d5a;
}

.btn-limpiar-filtros {
    width: 100%;
    padding: 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.btn-limpiar-filtros:hover {
    background: #e0e0e0;
    color: #333;
}

.btn-limpiar-filtros i {
    margin-right: 8px;
}

/* ============================================
   CONTENIDO PRINCIPAL
   ============================================ */

.categoria-content {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Toolbar */
.categoria-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.toolbar-left .productos-count {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ordenamiento-select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.ordenamiento-select:focus {
    outline: none;
    border-color: #5a2d5a;
}

.view-toggle {
    display: flex;
    gap: 5px;
    background: #f0f0f0;
    padding: 5px;
    border-radius: 8px;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

.view-btn:hover {
    background: rgba(90, 45, 90, 0.1);
    color: #5a2d5a;
}

.view-btn.active {
    background: white;
    color: #5a2d5a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ============================================
   GRID DE PRODUCTOS
   ============================================ */

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    min-height: 400px;
}

.productos-grid.list-view {
    grid-template-columns: 1fr;
}

.productos-loader {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.productos-loader i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.productos-loader p {
    font-size: 16px;
    margin: 0;
}

/* Tarjeta de producto */
.product-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #5a2d5a;
}

.product-image {
    position: relative;
    padding-bottom: 100%;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 8px;
    background: #fafafa;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.product-marca {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: #5a2d5a;
    margin: 10px 0;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-add-to-cart {
    flex: 1;
    padding: 12px;
    background: #5a2d5a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add-to-cart:hover {
    background: #6d3a6d;
    transform: translateY(-2px);
}

.btn-view-details {
    padding: 12px 20px;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-view-details:hover {
    background: #e0e0e0;
}

/* Vista lista */
.product-card.list-mode {
    display: flex;
    gap: 25px;
    align-items: center;
}

.product-card.list-mode .product-image {
    width: 150px;
    min-width: 150px;
    padding-bottom: 150px;
    margin-bottom: 0;
}

.product-card.list-mode .product-info {
    flex: 1;
}

.product-card.list-mode .product-name {
    font-size: 18px;
}

/* ============================================
   PAGINACIÓN
   ============================================ */

.paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.paginacion button {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.paginacion button:hover {
    border-color: #5a2d5a;
    color: #5a2d5a;
}

.paginacion button.active {
    background: #5a2d5a;
    color: white;
    border-color: #5a2d5a;
}

.paginacion button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 968px) {
    .categoria-layout {
        grid-template-columns: 1fr;
    }

    .categoria-sidebar {
        position: static;
    }

    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 640px) {
    .categoria-header h1 {
        font-size: 28px;
    }

    .categoria-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .toolbar-right {
        justify-content: space-between;
    }

    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .product-card.list-mode {
        flex-direction: column;
    }

    .product-card.list-mode .product-image {
        width: 100%;
    }
}