/* ===== Catalog Page Styles ===== */

/* Catalog Hero */
.catalog-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.catalog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.catalog-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.catalog-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Catalog Section */
.catalog-section {
    padding: var(--spacing-2xl) 0;
    background-color: var(--bg-gray);
    min-height: 100vh;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

/* Sidebar */
.catalog-sidebar {
    background: white;
    border-radius: 16px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar for sidebar */
.catalog-sidebar::-webkit-scrollbar {
    width: 8px;
}

.catalog-sidebar::-webkit-scrollbar-track {
    background: var(--bg-gray);
    border-radius: 4px;
}

.catalog-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.catalog-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.sidebar-section {
    padding-bottom: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

/* Search Box */
.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

/* Filter Select */
.filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Price Filter */
.price-filter {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.price-input {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.price-input:focus {
    outline: none;
    border-color: var(--primary);
}

.price-separator {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.checkbox-label:hover {
    color: var(--primary);
}

.filter-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Button Variants */
.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

/* Catalog Main */
.catalog-main {
    min-height: 600px;
}

.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.results-count {
    font-size: 1rem;
    color: var(--text-secondary);
}

.results-count span {
    font-weight: 700;
    color: var(--primary);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.product-card.hidden {
    display: none;
}

.product-image {
    display: flex;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: var(--bg-gray);
}

.pc-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition-base);
}

.product-card:hover .pc-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-new {
    background: var(--secondary);
    color: white;
}

.badge-popular {
    background: var(--accent);
    color: white;
}

.badge-premium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.product-info {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
}

.product-price {
    margin-bottom: var(--spacing-md);
}

.price-current {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.product-specs {
    list-style: none;
    margin-bottom: var(--spacing-lg);
    flex-grow: 1;
}

.product-specs li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    border-bottom: 1px solid var(--border);
}

.product-specs li:last-child {
    border-bottom: none;
}

.product-specs strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* No Results */
.no-results {
    text-align: center;
    padding: var(--spacing-2xl);
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.no-results svg {
    margin-bottom: var(--spacing-lg);
}

.no-results h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    font-size: 1rem;
}

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

    .catalog-sidebar {
        position: static;
        margin-bottom: var(--spacing-lg);
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .catalog-hero {
        padding: 6rem 0 3rem;
    }

    .catalog-title {
        font-size: 2rem;
    }

    .catalog-description {
        font-size: 1rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .catalog-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .price-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .price-separator {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .product-image {
        height: 200px;
    }

    .product-name {
        font-size: 1.125rem;
    }

    .price-current {
        font-size: 1.5rem;
    }
}

/* ===== Cart Button Feedback ===== */
.product-card .btn-primary {
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.product-card .btn-primary.btn-added {
    background: var(--secondary);
    animation: catalogButtonPulse 0.3s ease;
}

@keyframes catalogButtonPulse {
    0% {
        transform: scale(1);
        box-shadow: var(--shadow-md);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: var(--shadow-md);
    }
}
