:root {
    --white: #FFFFFF;
    --black: #000000;
    --brown: #4E342E;
    --light-brown: #8D6E63;
    --gold: #C6A776;
    --transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background: var(--white);
    color: var(--black);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

section {
    position: relative;
    overflow: hidden;
}

/* Шапка */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

.header.scrolled {
    background: var(--white);
    padding: 15px 5%;
    box-shadow: 0 5px 30px rgba(0,0,0,0.05);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 60px;
    width: auto;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 35px;
    margin-right: 30px;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1.5px;
    position: relative;
    padding: 5px 0;
    text-transform: uppercase;
}

.header.scrolled .nav-links a {
    color: var(--black);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--brown);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.cart-icon {
    width: 24px;
    height: 24px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.cart-icon svg {
    fill: var(--white);
}

.header.scrolled .cart-icon svg {
    fill: var(--black);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--brown);
    color: var(--white);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
}

/* Мобильное меню */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
    fill: var(--white);
}

.header.scrolled .mobile-menu-btn svg {
    fill: var(--black);
}

/* Герой-секция для каталога с изображением */
.catalog-hero {
    height: 70vh;
    min-height: 500px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.catalog-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.catalog-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.catalog-hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 1200px;
    padding: 0 5%;
}

.catalog-title {
    font-size: 72px;
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(30px);
}

.catalog-subtitle {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--white);
    opacity: 0.9;
    opacity: 0;
    transform: translateY(30px);
}

/* Фильтры по коллекциям */
.collections-filter {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 5% 30px;
    text-align: center;
}

.filter-title {
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--light-brown);
    margin-bottom: 25px;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--light-brown);
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 12px 25px;
    transition: var(--transition);
    position: relative;
    opacity: 1 !important;
    transform: none !important;
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 25px;
    right: 25px;
    height: 1px;
    background: var(--brown);
    transform: scaleX(0);
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--brown);
}

.filter-btn:hover::after,
.filter-btn.active::after {
    transform: scaleX(1);
}

/* Сетка товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5% 100px;
}

.product-card {
    position: relative;
    overflow: hidden;
    will-change: transform, opacity;
    cursor: pointer;
}

.product-image-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
    aspect-ratio: 3 / 4;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    background-color: #f5f5f5;
}

.product-card:hover .product-image {
    transform: scale(1.03);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--brown);
    color: var(--white);
    padding: 5px 10px;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 2;
}

.product-info {
    text-align: center;
    padding: 0 5px;
}

.product-name {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 8px;
    color: var(--black);
}

.product-price {
    font-size: 14px;
    color: var(--light-brown);
    margin-bottom: 15px;
}

.product-colors {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.color-option {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
}

.color-option.active::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 1px solid var(--brown);
    border-radius: 50%;
}

/* ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ КНОПКИ В КАТАЛОГЕ */
.catalog-add-to-cart-btn {
    background: transparent;
    border: 1px solid var(--brown);
    color: var(--brown);
    padding: 10px 0;
    width: 100%;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(10px);
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    line-height: normal !important;
    text-align: center !important;
    border-radius: 0 !important;
    font-weight: normal !important;
}

.product-card:hover .catalog-add-to-cart-btn {
    opacity: 1;
    transform: translateY(0);
}

.catalog-add-to-cart-btn:hover {
    background: var(--brown);
    color: var(--white);
}

/* Корзина (боковая панель) */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100%;
    background: var(--white);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transition: right 0.5s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.cart-title {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 1px;
}

.close-cart {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--light-brown);
    transition: var(--transition);
}

.close-cart:hover {
    color: var(--brown);
}

.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 30px;
}

.cart-items {
    padding: 20px 0;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.cart-item-image {
    width: 100px;
    height: 120px;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-size: 14px;
    margin-bottom: 8px;
}

.cart-item-price {
    font-size: 14px;
    color: var(--light-brown);
    margin-bottom: 10px;
}

.cart-item-size {
    font-size: 12px;
    color: var(--light-brown);
    margin-bottom: 10px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.1);
}

.quantity-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

.quantity-input {
    width: 40px;
    height: 30px;
    border: none;
    border-left: 1px solid rgba(0,0,0,0.1);
    border-right: 1px solid rgba(0,0,0,0.1);
    text-align: center;
    font-size: 14px;
}

.remove-item {
    background: none;
    border: none;
    color: var(--light-brown);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    transition: var(--transition);
}

.remove-item:hover {
    color: var(--brown);
}

.cart-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 18px;
}

.checkout-btn {
    width: 100%;
    background: var(--brown);
    color: var(--white);
    border: none;
    padding: 15px;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.checkout-btn:hover {
    background: var(--light-brown);
}

.empty-cart {
    text-align: center;
    padding: 60px 0;
    color: var(--light-brown);
}

/* Новые стили для выбора размера в корзине */
.size-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.size-option-cart {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
}

.size-option-cart.selected {
    border-color: var(--brown);
    background: var(--brown);
    color: var(--white);
}

/* Подвал */
.footer {
    padding: 80px 5% 40px;
    background: var(--black);
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 20px;
}

.footer-text {
    max-width: 300px;
    line-height: 1.8;
    margin-bottom: 30px;
    color: rgba(255,255,255,0.7);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: var(--transition);
    filter: invert(1);
}

.social-icon:hover {
    opacity: 1;
}

.footer-title {
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 25px;
    text-transform: uppercase;
    color: var(--white);
}

.footer-links a {
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    margin-bottom: 15px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.copyright {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 1.5px;
}

/* Анимации */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: var(--transition);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ленивая загрузка */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy.loaded {
    opacity: 1;
}

/* Кнопка "Показать еще" */
.load-more-container {
    display: flex;
    justify-content: center;
    margin: 30px 0 80px;
}

.load-more-btn {
    background: transparent;
    border: 1px solid var(--brown);
    color: var(--brown);
    padding: 12px 30px;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.load-more-btn:hover {
    background: var(--brown);
    color: var(--white);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);

    }

    .product-image {
        height: 100%;
    }
    
    .catalog-title {
        font-size: 56px;
    }
    
    .cart-sidebar {
        width: 400px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 15px 5%;
    }
    
    .logo {
        height: 50px;
    }
    
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        z-index: 999;
        transform: translateY(-100%);
        transition: transform 0.5s ease;
    }
    
    .nav-links.active {
        display: flex;
        transform: translateY(0);
    }
    
    .nav-links a {
        color: var(--black);
        font-size: 18px;
        padding: 10px 20px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .header.scrolled .nav-links a {
        color: var(--black);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
        padding-bottom: 60px;
    }
    
    .filter-buttons {
        justify-content: center;
        gap: 8px;
    }
    
    .filter-btn {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .catalog-title {
        font-size: 36px;
        margin-bottom: 15px;
    }
    
    .catalog-subtitle {
        font-size: 16px;
    }

    .product-image {
        height: 100%;
    }

    .catalog-hero {
        height: 60vh;
        min-height: 400px;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 40px;
    }
    
    .footer-logo {
        height: 50px;
        margin-bottom: 15px;
    }
    
    .footer-text {
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .social-links {
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .product-image {
        height: 100%;
    }
    
    .catalog-title {
        font-size: 32px;
    }
    
    .catalog-subtitle {
        font-size: 14px;
    }
    
    .filter-buttons {
        gap: 6px;
    }
    
    .filter-btn {
        padding: 8px 12px;
        font-size: 11px;
    }

    .product-name {
        font-size: 15px;
    }

    .product-price {
        font-size: 13px;
    }
    
    .cart-header {
        padding: 20px;
    }
    
    .cart-content {
        padding: 0 20px;
    }
    
    .cart-footer {
        padding: 20px;
    }
    
    .cart-item {
        flex-direction: column;
    }
    
    .cart-item-image {
        width: 100%;
        height: auto;
    }
    
    .size-option-cart {
        width: 25px;
        height: 25px;
        font-size: 10px;
    }
}