/* ===== СТИЛИ ДЛЯ КАРТОЧКИ ТОВАРА ==== */
:root {
    --primary-red: #d65049;
    --dark-gray: #443f3c;
    --light-beige: #faf5ef;
    --border-color: #dcc8b7;
    --text-light: #a69e98;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(68, 63, 60, 0.08);
    --transition: all 0.3s ease;
}

.product-main {
    padding: 120px 0 60px;
    min-height: 100vh;
    background-color: var(--light-beige);
}

.product-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== ХЛЕБНЫЕ КРОШКИ ===== */
.breadcrumbs {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--dark-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--primary-red);
}

.breadcrumbs .separator {
    margin: 0 0.5rem;
    color: var(--border-color);
}

.breadcrumbs .current {
    color: var(--primary-red);
}

/* ===== ОСНОВНАЯ СЕТКА ===== */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

/* ===== ГАЛЕРЕЯ ===== */
.product-gallery {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.main-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 15px 30px rgba(68, 63, 60, 0.15);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.main-image:hover img {
    transform: scale(1.02);
}

/* Фиксированные размеры на всех разрешениях */
@media (max-width: 1200px) { .product-gallery { max-width: 450px; } }
@media (max-width: 992px) { .product-gallery { max-width: 400px; } }
@media (max-width: 768px) { .product-gallery { max-width: 350px; } }
@media (max-width: 576px) { .product-gallery { max-width: 300px; } }
@media (max-width: 480px) { .product-gallery { max-width: 280px; } }
@media (max-width: 375px) { .product-gallery { max-width: 250px; } }
@media (max-width: 320px) { .product-gallery { max-width: 220px; } }

/* ===== БЕЙДЖИ ===== */
.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-badge.sold {
    background-color: var(--dark-gray);
    color: var(--light-beige);
}

.product-badge.new {
    background-color: var(--primary-red);
    color: var(--light-beige);
}

/* ===== МИНИАТЮРЫ ===== */
.thumbnail-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.thumbnail {
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumbnail.active {
    border-color: var(--primary-red);
}

.thumbnail:hover {
    opacity: 0.8;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== ИНФОРМАЦИЯ О ТОВАРЕ ===== */
.product-info {
    padding: 1rem 0;
}

.product-header {
    margin-bottom: 1.5rem;
}

.product-title {
    font-size: 2.5rem;
    font-family: "Literata", serif;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    color: var(--dark-gray);
}

.product-artist {
    font-size: 1.2rem;
}

.artist-label {
    color: var(--text-light);
    margin-right: 0.5rem;
}

.artist-link {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.artist-link:hover {
    color: var(--dark-gray);
    text-decoration: underline;
}

/* ===== ХАРАКТЕРИСТИКИ ===== */
.product-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--light-beige);
    border-radius: 16px;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.spec-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.spec-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-gray);
}

/* ===== ОПИСАНИЕ ===== */
.product-description {
    margin-bottom: 2rem;
}

.product-description h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    font-family: "Unbounded", sans-serif;
    font-weight: 500;
    color: var(--dark-gray);
}

.product-description p {
    line-height: 1.6;
    color: var(--dark-gray);
}

/* ===== БЛОК ПОКУПКИ ===== */
.product-purchase {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--light-beige);
    border-radius: 16px;
}

.price-block {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.price-label {
    font-size: 1rem;
    color: var(--text-light);
}

.price-value {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--primary-red);
}

/* ===== МЕТА-ИНФОРМАЦИЯ ===== */
.product-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(220, 200, 183, 0.3);
    border-bottom: 1px solid rgba(220, 200, 183, 0.3);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.meta-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark-gray);
}

/* ===== ДОСТАВКА ===== */
.product-delivery {
    margin-bottom: 2rem;
}

.product-delivery h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-family: "Unbounded", sans-serif;
    font-weight: 500;
    color: var(--dark-gray);
}

.delivery-list {
    list-style: none;
    padding: 0;
}

.delivery-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0;
    color: var(--dark-gray);
}

.delivery-list svg {
    width: 20px;
    height: 20px;
    color: var(--primary-red);
    flex-shrink: 0;
}

/* ===== ПОДЕЛИТЬСЯ ===== */
.product-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.share-links {
    display: flex;
    gap: 0.5rem;
}

.share-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(214, 80, 73, 0.1);
    color: var(--primary-red);
    transition: var(--transition);
}

.share-links a:hover {
    background-color: var(--primary-red);
    color: var(--white);
    transform: translateY(-2px);
}

.share-links svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ===== ПОХОЖИЕ РАБОТЫ ===== */
.similar-works {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(220, 200, 183, 0.3);
}

.similar-works .section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: left;
    font-family: "Literata", serif;
    color: var(--dark-gray);
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.similar-card {
    transition: transform 0.3s;
}

.similar-card:hover {
    transform: translateY(-5px);
}

.similar-image {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.similar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.similar-card:hover .similar-image img {
    transform: scale(1.05);
}

.similar-info h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.similar-info h3 a {
    color: var(--dark-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.similar-info h3 a:hover {
    color: var(--primary-red);
}

.similar-artist {
    font-size: 0.85rem;
    color: var(--primary-red);
    margin-bottom: 0.3rem;
}

.similar-price {
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark-gray);
}

/* Виртуальная комната */
.virtual-room-btn {
    margin-top: 1rem;

}

#virtualRoomBtn {
    padding: 10px 27px !important;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: #fff;
    margin: 2rem auto;
    padding: 1.5rem;
    width: 90%;
    max-width: 900px;
    border-radius: 20px;
    position: relative;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    cursor: pointer;
}

.room-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin: 1rem 0;
}

.room-image-wrapper {
    position: relative;
    display: inline-block;
}

.room-image {
    width: 100%;
    display: block;
    border-radius: 12px;
}

.movable-artwork {
    position: absolute;
    cursor: move;
    width: 200px;
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.movable-artwork:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.room-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.room-controls label {
    font-weight: 500;
}

.room-controls input {
    flex: 1;
    max-width: 200px;
}

@media (max-width: 768px) {
    .modal-content {
        margin: 1rem auto;
        padding: 1rem;
        width: 95%;
    }
    .room-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .room-controls input {
        max-width: 100%;
    }
}

/* ===== АДАПТАЦИЯ (БЕЗ КНОПОК) ===== */
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .product-info { padding: 0; }
    .similar-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .product-main { padding: 90px 0 40px; }
    .product-container { padding: 0 1rem; }
    .product-title { font-size: 2rem; }
    .product-specs { grid-template-columns: 1fr 1fr; }
    .product-meta { flex-wrap: wrap; gap: 1rem; }
    .similar-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .share-links a { width: 36px; height: 36px; }
}

@media (max-width: 576px) {
    .product-title { font-size: 1.8rem; }
    .product-specs { grid-template-columns: 1fr; padding: 1rem; }
    .thumbnail-list { grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
    .price-value { font-size: 1.8rem; }
}

@media (max-width: 480px) {
    .product-main { padding: 80px 0 30px; }
    .product-title { font-size: 1.6rem; }
    .product-specs { padding: 0.8rem; }
    .spec-item { gap: 0.1rem; }
    .spec-label { font-size: 0.7rem; }
    .spec-value { font-size: 0.85rem; }
    .price-value { font-size: 1.6rem; }
    .product-badge { padding: 0.3rem 1rem; font-size: 0.7rem; top: 8px; left: 8px; }
}

@media (max-width: 375px) {
    .product-title { font-size: 1.4rem; }
    .similar-grid { grid-template-columns: 1fr; }
    .share-links a { width: 32px; height: 32px; }
    .share-links svg { width: 16px; height: 16px; }
}

@media (max-width: 320px) {
    .product-main { padding: 70px 0 20px; }
    .product-container { padding: 0 0.5rem; }
    .product-title { font-size: 1.3rem; }
    .product-badge { padding: 0.2rem 0.8rem; font-size: 0.65rem; }
    .thumbnail-list { gap: 0.3rem; }
    .price-value { font-size: 1.4rem; }
    .price-label { font-size: 0.85rem; }
}