: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;
}

body {
    background: var(--white);
    color: var(--black);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* Сайдбар корзины - СТИЛИ ИЗ КАТАЛОГА */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: var(--white);
    z-index: 2000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-title {
    font-size: 18px;
    font-weight: 500;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--light-brown);
}

.cart-content {
    flex: 1;
    overflow-y: auto;
}

.cart-items {
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
}

.cart-item-image {
    width: 80px;
    height: 100px;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: 500;
}

.cart-item-price {
    font-size: 14px;
    color: var(--brown);
    margin-bottom: 5px;
}

.cart-item-size {
    font-size: 12px;
    color: var(--light-brown);
    margin-bottom: 10px;
}

.size-option-cart {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid #eee;
    margin-right: 5px;
    cursor: pointer;
    font-size: 11px;
    transition: var(--transition);
}

.size-option-cart.selected {
    border-color: var(--brown);
    background: var(--brown);
    color: var(--white);
}

.cart-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    border: 1px solid #eee;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.quantity-btn:hover {
    border-color: var(--brown);
}

.quantity-input {
    width: 30px;
    text-align: center;
    border: 1px solid #eee;
    padding: 2px;
}

.remove-item {
    background: none;
    border: none;
    color: var(--light-brown);
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.remove-item:hover {
    color: var(--brown);
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 500;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: var(--brown);
    color: var(--white);
    border: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
}

.checkout-btn:hover {
    background: var(--light-brown);
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: var(--light-brown);
}

/* Хлебные крошки */
.breadcrumbs {
    max-width: 1400px;
    margin: 120px auto 0;
    padding: 30px 5% 0;
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--light-brown);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.breadcrumbs a {
    color: var(--light-brown);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--brown);
}

.breadcrumbs span {
    margin: 0 8px;
    color: var(--light-brown);
}

/* Основной контент карточки товара */
.product-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

/* Галерея товара */
.product-gallery {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.main-image-container {
    position: relative;
    margin-bottom: 15px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background-color: #f5f5f5;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.main-image.zoomed {
    transform: scale(1.5);
    cursor: zoom-out;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.thumbnail.active {
    border-color: var(--brown);
}

.thumbnail:hover {
    opacity: 0.8;
}

/* Информация о товаре */
.product-info {
    padding-top: 20px;
    position: relative;
}

/* УБИРАЕМ БЕЙДЖ КОЛЛЕКЦИИ */
.product-badge {
    display: none !important;
}

.product-title {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 15px;
    letter-spacing: 1px;
    line-height: 1.3;
}

.product-price {
    font-size: 20px;
    color: var(--brown);
    margin-bottom: 25px;
    font-weight: 500;
}

.product-description {
    margin-bottom: 30px;
    line-height: 1.8;
    color: var(--light-brown);
    font-size: 14px;
}

/* Выбор цвета */
.color-selector {
    margin-bottom: 30px;
}

.color-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    color: var(--light-brown);
    font-weight: 500;
}

.color-options {
    display: flex;
    gap: 10px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    border: 1px solid #eee;
    transition: var(--transition);
}

.color-option.active::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 1px solid var(--brown);
    border-radius: 50%;
}

.color-option:hover {
    transform: scale(1.1);
}

/* Выбор размера */
.size-selector {
    margin-bottom: 30px;
}

.size-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    color: var(--light-brown);
    font-weight: 500;
}

.size-guide {
    color: var(--light-brown);
    text-decoration: none;
    font-size: 11px;
    transition: var(--transition);
}

.size-guide:hover {
    color: var(--brown);
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.size-option {
    min-width: 40px;
    padding: 8px 12px;
    border: 1px solid #eee;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
    font-weight: 500;
}

.size-option:hover {
    border-color: var(--brown);
}

.size-option.active {
    border-color: var(--brown);
    background: var(--brown);
    color: var(--white);
}

.size-option.disabled {
    color: #ccc;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* КНОПКА ДОБАВЛЕНИЯ В КОРЗИНУ */
.action-buttons {
    display: block !important;
    margin-bottom: 30px;
    min-height: 60px;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 100;
    width: 100%;
}

.add-to-cart-btn {
    width: 100% !important;
    padding: 18px 20px !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 13px !important;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--brown) !important;
    font-weight: 600 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    line-height: 1.2 !important;
    text-align: center !important;
    border-radius: 0 !important;
    background: var(--brown) !important;
    color: var(--white) !important;
}

.add-to-cart-btn:hover {
    background: transparent !important;
    color: var(--brown) !important;
}

/* Детали товара */
.product-details {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.details-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    color: var(--light-brown);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    transition: var(--transition);
}

.details-title:hover {
    color: var(--brown);
}

.details-content {
    display: none;
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--light-brown);
    font-size: 14px;
}

.details-content.active {
    display: block;
}

.details-content p {
    margin-bottom: 10px;
}

/* Похожие товары */
.related-products {
    max-width: 1400px;
    margin: 80px auto 0;
    padding: 0 5% 100px;
}

.related-title {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: 1px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.related-product {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.related-product:hover {
    transform: translateY(-5px);
}

.related-image-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
}

.related-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.related-product:hover .related-image {
    transform: scale(1.03);
}

.related-info {
    text-align: center;
}

.related-name {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 8px;
    color: var(--black);
}

.related-price {
    font-size: 13px;
    color: var(--light-brown);
    font-weight: 500;
}

/* Модальное окно для размера */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--light-brown);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--brown);
}

.modal-title {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--brown);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.size-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.size-table th, .size-table td {
    border: 1px solid #eee;
    padding: 10px;
    text-align: center;
    font-size: 12px;
}

.size-table th {
    background: #f9f9f9;
    color: var(--brown);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.product-not-found {
    max-width: 1400px;
    margin: 120px auto 100px;
    padding: 0 5%;
    text-align: center;
}

.not-found-content {
    padding: 60px 20px;
}

.not-found-content h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #4E342E;
    font-weight: 300;
}

.not-found-content p {
    font-size: 16px;
    margin-bottom: 30px;
    color: #8D6E63;
}

.back-to-catalog-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #4E342E;
    color: #FFFFFF;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 12px;
    border: 1px solid #4E342E;
    transition: all 0.3s ease;
    font-weight: 500;
}

.back-to-catalog-btn:hover {
    background-color: transparent;
    color: #4E342E;
}

/* Анимации */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: var(--transition);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-gallery {
        position: static;
    }

    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .cart-sidebar {
        width: 350px;
    }
}

@media (max-width: 768px) {
    .breadcrumbs {
        margin-top: 100px;
        padding: 15px 5% 0;
    }

    .product-title {
        font-size: 24px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .related-image {
        height: 250px;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .breadcrumbs {
        font-size: 11px;
    }

    .product-title {
        font-size: 20px;
    }

    .product-price {
        font-size: 18px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .thumbnail-gallery {
        justify-content: center;
    }

    .cart-sidebar {
        width: 100%;
    }
}