/* ==========================================================================
   ZocoShop - Catálogo Moderno y Atractivo
   ========================================================================== */

/* Hero Section */
.catalogo-hero {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    padding: 60px 20px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.catalogo-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.catalogo-hero-content {
    position: relative;
    z-index: 1;
}

.catalogo-hero-content h1 {
    font-size: 36px;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.catalogo-hero-content p {
    margin: 0;
    opacity: 0.95;
    font-size: 18px;
}

/* Container Principal */
.catalogo-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* Sidebar Filtros */
.catalogo-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.filtro-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.filtro-section h3 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.filtro-group {
    margin-bottom: 20px;
}

.filtro-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.filtro-group input,
.filtro-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
    background: #f8f9fa;
}

.filtro-group input:focus,
.filtro-group select:focus {
    outline: none;
    border-color: #17a2b8;
    background: white;
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1);
}

.btn-aplicar-filtros,
.btn-limpiar-filtros {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.btn-aplicar-filtros {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-aplicar-filtros:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(23, 162, 184, 0.4);
}

.btn-limpiar-filtros {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.btn-limpiar-filtros:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

/* Main Content */
.catalogo-main {
    min-height: 500px;
}

.catalogo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.catalogo-info {
    font-size: 16px;
    color: #495057;
    font-weight: 600;
}

.catalogo-info i {
    color: #17a2b8;
    margin-right: 8px;
}

.catalogo-ordenar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.catalogo-ordenar label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.catalogo-ordenar select {
    padding: 10px 14px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    background: #f8f9fa;
    transition: all 0.3s;
}

.catalogo-ordenar select:focus {
    outline: none;
    border-color: #17a2b8;
    background: white;
}

/* Grid de Productos */
.catalogo-productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.catalogo-producto-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid #e9ecef;
}

.catalogo-producto-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    border-color: #17a2b8;
}

.catalogo-producto-imagen {
    position: relative;
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.catalogo-producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in, transform 0.3s;
}

.catalogo-producto-imagen img.loaded {
    opacity: 1;
}

.catalogo-producto-card:hover .catalogo-producto-imagen img {
    transform: scale(1.08);
}

.catalogo-producto-imagen .placeholder-icon {
    font-size: 72px;
    color: #dee2e6;
}

.catalogo-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    backdrop-filter: blur(4px);
}

.catalogo-badge.nuevo {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.catalogo-badge.subasta {
    background: linear-gradient(135deg, #fd7e14 0%, #e8690c 100%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.catalogo-badge.descuento {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.catalogo-producto-info {
    padding: 20px;
}

.catalogo-producto-titulo {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    min-height: 44px;
}

.catalogo-producto-precio {
    font-size: 28px;
    font-weight: 700;
    color: #17a2b8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.catalogo-precio-original {
    font-size: 18px;
    color: #adb5bd;
    text-decoration: line-through;
    font-weight: 500;
}

.catalogo-producto-ubicacion {
    font-size: 13px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.catalogo-producto-ubicacion i {
    color: #17a2b8;
}

.catalogo-producto-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6c757d;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.catalogo-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.catalogo-meta-item i {
    color: #17a2b8;
}

/* Loading y Empty States */
.catalogo-loading,
.catalogo-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #adb5bd;
}

.catalogo-loading i,
.catalogo-empty i {
    font-size: 64px;
    display: block;
    margin-bottom: 20px;
    color: #dee2e6;
}

.catalogo-empty p {
    font-size: 18px;
    color: #6c757d;
}

.catalogo-spin {
    animation: catalogoSpin 1s linear infinite;
}

@keyframes catalogoSpin {
    to { transform: rotate(360deg); }
}

/* Paginación */
.catalogo-paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.catalogo-paginacion button {
    padding: 12px 18px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    color: #495057;
}

.catalogo-paginacion button:hover:not(:disabled) {
    background: #17a2b8;
    color: white;
    border-color: #17a2b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.catalogo-paginacion button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.catalogo-paginacion button.active {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border-color: #17a2b8;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.catalogo-paginacion .page-info {
    padding: 12px 16px;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    .catalogo-container {
        grid-template-columns: 1fr;
    }

    .catalogo-sidebar {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .catalogo-hero-content h1 {
        font-size: 28px;
    }

    .catalogo-hero-content p {
        font-size: 16px;
    }

    .catalogo-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .catalogo-productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .catalogo-producto-imagen {
        height: 180px;
    }

    .catalogo-producto-titulo {
        font-size: 14px;
        min-height: 40px;
    }

    .catalogo-producto-precio {
        font-size: 22px;
    }
}

/* Animaciones suaves de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.catalogo-producto-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: backwards;
}

.catalogo-producto-card:nth-child(1) { animation-delay: 0.05s; }
.catalogo-producto-card:nth-child(2) { animation-delay: 0.1s; }
.catalogo-producto-card:nth-child(3) { animation-delay: 0.15s; }
.catalogo-producto-card:nth-child(4) { animation-delay: 0.2s; }
