.page-header {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    text-align: center;
}

.page-header h1 {
    font-size: 56px;
    color: var(--primary);
    margin-bottom: 15px;
}

.page-header p {
    font-size: 20px;
    color: var(--text-light);
}

.catalog-section {
    padding: 60px 0 120px;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

.filters {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filters h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--primary);
}

.filter-group {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

.filter-group:last-of-type {
    border-bottom: none;
}

.filter-group h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--primary);
    font-weight: 600;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 14px;
}

.filter-option input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

.filter-option span {
    color: var(--text);
}

.filter-option:hover span {
    color: var(--accent);
}

.catalog-content {
    min-height: 600px;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.results-count {
    font-size: 16px;
    color: var(--text-light);
}

.results-count span {
    font-weight: 600;
    color: var(--primary);
}

.sort-select {
    padding: 12px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.sort-select:hover {
    border-color: var(--accent);
}

.sort-select:focus {
    outline: none;
    border-color: var(--accent);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.product-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.product-info {
    padding: 25px;
}

.product-info h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--primary);
}

.product-category {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 20px;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 1000px;
    width: 100%;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--primary);
    color: var(--white);
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: var(--accent);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.modal-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 15px;
}

.modal-info {
    display: flex;
    flex-direction: column;
}

.modal-info h2 {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 15px;
}

.modal-brand {
    font-size: 16px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
}

.modal-category {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.modal-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 30px;
}

.modal-description {
    margin-bottom: 25px;
    line-height: 1.8;
    color: var(--text);
}

.modal-features {
    margin-bottom: 30px;
}

.modal-features h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary);
}

.modal-features ul {
    list-style: none;
    padding: 0;
}

.modal-features li {
    padding: 8px 0;
    color: var(--text);
    position: relative;
    padding-left: 25px;
}

.modal-features li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--accent);
}

.modal-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: auto;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-selector button {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--light);
    color: var(--primary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-selector button:hover {
    background: var(--accent);
    color: var(--white);
}

.quantity-selector input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.quantity-selector input::-webkit-inner-spin-button,
.quantity-selector input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.modal-actions .btn {
    flex: 1;
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }
    
    .filters {
        position: static;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-image img {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 36px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .catalog-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .sort-select {
        width: 100%;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-info h2 {
        font-size: 28px;
    }
    
    .modal-price {
        font-size: 28px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .quantity-selector {
        width: 100%;
    }
}
