/* ===== CATÁLOGO DE PRODUCTOS - JYS COMPUTER ===== */
/* Paleta de colores: Blanco base, Dorado (#FFD700) para acentos, Grises suaves */

/* ===== ESTRUCTURA GENERAL ===== */
.catalog-main {
    min-height: 100vh;
    background: #ffffff;
    color: #333;
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs-section {
    background: #f8f9fa;
    border-bottom: 2px solid #FFD700;
    padding: 15px 0;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: #FFD700;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.breadcrumbs a:hover {
    color: #FFC000;
    text-decoration: underline;
}

.breadcrumbs .separator {
    color: #6c757d;
    margin: 0 5px;
}

.breadcrumbs .current {
    color: #495057;
    font-weight: 500;
}

/* ===== HEADER DEL CATÁLOGO ===== */
.catalog-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #333;
    padding: 60px 0;
    border-bottom: 3px solid #FFD700;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.catalog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
    z-index: 1;
}

.catalog-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 2;
}

.catalog-title h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2c3e50;
    position: relative;
}

.catalog-title h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(45deg, #FFD700, #FFC000);
    border-radius: 2px;
}

.catalog-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin: 0;
    font-weight: 400;
}

/* Búsqueda rápida */
.search-box {
    min-width: 400px;
}

.search-input-group {
    position: relative;
    display: flex;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 30px;
    overflow: hidden;
    background: white;
}

.search-input {
    flex: 1;
    padding: 15px 25px;
    border: 2px solid #e9ecef;
    border-radius: 30px 0 0 30px;
    font-size: 1rem;
    outline: none;
    background: white;
    color: #333;
    border-right: none;
}

.search-input::placeholder {
    color: #6c757d;
}

.search-input:focus {
    border-color: #FFD700;
    box-shadow: inset 0 0 5px rgba(255, 215, 0, 0.1);
}

.search-btn {
    background: linear-gradient(45deg, #FFD700, #FFC000);
    border: 2px solid #FFD700;
    border-left: none;
    padding: 15px 25px;
    border-radius: 0 30px 30px 0;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 120px;
}

.search-btn:hover {
    background: linear-gradient(45deg, #FFC000, #FFB000);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* ===== LAYOUT DEL CATÁLOGO ===== */
.catalog-content {
    padding: 30px 0;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* ===== SIDEBAR DE FILTROS ===== */
.filters-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.filters-container {
    padding: 25px 20px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #FFD700;
}

.filters-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: 700;
}

.filters-controls {
    display: flex;
    gap: 8px;
}

.filters-control-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filters-control-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

.clear-filters {
    color: #dc3545;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 15px;
    background: rgba(220, 53, 69, 0.1);
}

.clear-filters:hover {
    color: white;
    background: #dc3545;
    transform: translateY(-1px);
}

/* Grupos de filtros */
.filter-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0;
    transition: all 0.3s ease;
}

.filter-group h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 15px 0;
    background: none;
    border: none;
    transition: all 0.3s ease;
    user-select: none;
}

.filter-group h4:hover {
    color: #FFD700;
}

.filter-group h4::after {
    content: '▼';
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: #6c757d;
}

.filter-group.collapsed h4::after {
    transform: rotate(-90deg);
}

.filter-options {
    overflow: hidden;
    transition: all 0.3s ease;
    max-height: 300px;
    padding-top: 10px;
    padding-bottom: 20px;
    opacity: 1;
    visibility: visible;
}

.filter-group.collapsed .filter-options {
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
    visibility: hidden;
    margin: 0;
}

.filter-group.collapsed {
    margin-bottom: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-option:hover {
    padding-left: 10px;
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
    margin: 0;
    accent-color: #FFD700;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-option span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #495057;
    font-weight: 400;
}

.filter-option:hover span {
    color: #2c3e50;
}

.filter-option small {
    color: #6c757d;
    font-size: 0.8rem;
    margin-left: auto;
}

/* Rango de precio */
.price-range {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px 0;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-inputs input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    background: white;
    color: #495057;
    outline: none;
    transition: all 0.2s ease;
}

.price-inputs input:focus {
    border-color: #FFD700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.price-inputs input::placeholder {
    color: #6c757d;
}

.price-inputs span {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.9rem;
}

.price-range-info {
    text-align: center;
    color: #6c757d;
    font-size: 0.8rem;
}

/* Botón aplicar filtros */
.apply-filters-btn {
    width: 100%;
    background: linear-gradient(135deg, #FFD700, #FFC000);
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 25px;
}

.apply-filters-btn:hover {
    background: linear-gradient(135deg, #FFC000, #FFD700);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

/* ===== ÁREA DE PRODUCTOS ===== */
.products-area {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

/* Toolbar */
.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.mobile-filters-toggle {
    display: none;
    background: linear-gradient(45deg, #FFD700, #FFC000);
    color: #000;
    border: none;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.mobile-filters-toggle:hover {
    background: linear-gradient(45deg, #FFC000, #FFB000);
    transform: translateY(-2px);
}

.sort-form {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-form label {
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
}

.sort-form select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #495057;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    min-width: 160px;
}

.sort-form select:focus {
    border-color: #FFD700;
    background: white;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
}

/* ===== GRID DE PRODUCTOS ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 25px;
    background: #fafafa;
}

/* Tarjeta de producto */
.product-card {
    position: relative;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: #dee2e6;
}

/* Badges del producto */
.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.product-badge.new {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.product-badge.bestseller {
    background: linear-gradient(45deg, #ff6b35, #fd7e14);
    color: white;
}

.product-badge.featured {
    background: linear-gradient(45deg, #FFD700, #FFC000);
    color: #000;
    font-weight: 800;
}

.product-badge.discount {
    background: linear-gradient(45deg, #dc3545, #e74c3c);
    color: white;
    font-weight: 800;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.product-discount {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, #dc3545, #e74c3c);
    color: white;
    padding: 8px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.4);
}

/* Imagen del producto */
.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: white;
    border-bottom: 1px solid #f1f3f4;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Información del producto */
.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: white;
    text-align: center;
}

.product-brand {
    color: #6c757d;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.product-name {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    min-height: 2.5em;
}

.product-name a {
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
}

.product-name a:hover {
    color: #495057;
}

/* Eliminamos la descripción del producto */

/* Precio */
.product-price {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.price-current {
    font-size: 1.6rem;
    font-weight: 800;
    color: #2c3e50;
}

.price-original {
    font-size: 1.1rem;
    color: #6c757d;
    text-decoration: line-through;
    font-weight: 500;
}

.product-price .discount-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.product-price .discount-info .price-original {
    font-size: 1.1rem;
    margin: 0;
    color: #6c757d;
    text-decoration: line-through;
}

.product-price .discount-info .price-current {
    font-size: 1.6rem;
    color: #2c3e50;
    font-weight: 800;
}

/* Eliminamos la sección de stock */

/* Acciones del producto */
.product-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    justify-content: center;
    align-items: center;
}

.product-actions .btn {
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    text-transform: none;
    letter-spacing: 0.3px;
    width: auto;
    min-width: 160px;
}

.product-actions .btn-primary {
    background: linear-gradient(135deg, #FFD700 0%, #FFC000 100%);
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    border: none;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.3px;
}

.product-actions .btn-primary:hover {
    background: linear-gradient(135deg, #FFC000 0%, #FFB000 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

/* Eliminamos los estilos del botón secundario ya que solo usamos uno */

/* Eliminamos los estilos del botón de favoritos */

/* ===== ESTADO VACÍO ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #6c757d;
    background: white;
    border-radius: 15px;
    margin: 30px;
    border: 1px solid #e9ecef;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 25px;
    color: #dee2e6;
}

.empty-state h3 {
    margin-bottom: 15px;
    color: #495057;
    font-size: 1.5rem;
}

.empty-state p {
    margin-bottom: 30px;
    font-size: 1.1rem;
    color: #6c757d;
}

/* ===== PAGINACIÓN ===== */
.pagination-nav {
    padding: 30px;
    border-top: 1px solid #e9ecef;
    background: white;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.pagination-btn {
    padding: 12px 18px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 45px;
    text-align: center;
}

.pagination-btn:hover {
    background: #f8f9fa;
    border-color: #FFD700;
    color: #FFD700;
}

.pagination-btn.current {
    background: linear-gradient(45deg, #FFD700, #FFC000);
    color: #000;
    border-color: #FFD700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.pagination-btn.prev,
.pagination-btn.next {
    padding: 12px 25px;
    font-weight: 700;
}

.pagination-dots {
    padding: 12px 8px;
    color: #6c757d;
    font-weight: bold;
}

.pagination-info {
    text-align: center;
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 1024px) {
    .catalog-layout {
        grid-template-columns: 250px 1fr;
        gap: 20px;
    }
    
    .catalog-header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .search-box {
        min-width: 100%;
        max-width: 400px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
        padding: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        border-radius: 0;
        overflow-y: auto;
    }
    
    .filters-sidebar.open {
        left: 0;
    }
    
    .mobile-filters-toggle {
        display: block;
    }
    
    .catalog-header {
        padding: 30px 0;
    }
    
    .catalog-title h1 {
        font-size: 2rem;
    }
    
    .search-box {
        width: 100%;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        padding: 15px;
        gap: 15px;
    }
    
    .catalog-toolbar {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .sort-form {
        justify-content: space-between;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card {
        max-width: 100%;
    }
    
    .catalog-header {
        padding: 20px 0;
    }
    
    .catalog-title h1 {
        font-size: 1.75rem;
    }
    
    .pagination-btn.prev,
    .pagination-btn.next {
        padding: 8px 12px;
    }
    
    .pagination-btn.prev i,
    .pagination-btn.next i {
        display: none;
    }
}

/* ===== OVERLAY PARA FILTROS MÓVILES ===== */
.filters-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.filters-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ===== ANIMACIONES ===== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: slideInUp 0.3s ease;
}

.product-card:nth-child(odd) {
    animation-delay: 0.1s;
}

.product-card:nth-child(even) {
    animation-delay: 0.2s;
}

/* ===== MEJORAS UX ===== */
.filter-option:hover input[type="radio"],
.filter-option:hover input[type="checkbox"] {
    transform: scale(1.1);
}

.product-actions .btn:active {
    transform: scale(0.98);
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== BADGES DE FILTROS ===== */
.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 15px;
    animation: slideInRight 0.3s ease;
}

.featured-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFC000 100%);
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.new-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.filter-badge i {
    font-size: 0.9rem;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive para badges */
@media (max-width: 768px) {
    .filter-badge {
        margin-left: 10px;
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    .catalog-subtitle {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
