/* =========================================================
   VAMORI — PRODUCT DETAIL
   ========================================================= */

.product-detail {
    width: 100%;
    background: #fcf8f4;
    color: #4b3a32;
    padding: 90px 0 120px;
    box-sizing: border-box;
}

.product-detail__container {
    width: min(1200px, calc(100% - 80px));
    margin: 0 auto;
}


/* ---------------------------------------------------------
   Кнопка назад
   --------------------------------------------------------- */

.product-detail__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 50px;

    color: #806052;
    text-decoration: none;

    font-size: 13px;
    letter-spacing: 1px;

    transition: color 0.25s ease;
}

.product-detail__back:hover {
    color: #b17e6b;
}


/* ---------------------------------------------------------
   Основной блок
   --------------------------------------------------------- */

.product-detail__layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(380px, 0.95fr);

    gap: 90px;

    align-items: start;
}


/* =========================================================
   ГАЛЕРЕЯ
   ========================================================= */

.product-detail__gallery {
    min-width: 0;
}


/* Большая фотография */

.product-detail__photos {
    position: relative;

    width: 100%;
    aspect-ratio: 4 / 5;

    overflow: hidden;

    background: #eee2da;
}


/* Все большие фотографии лежат друг на друге */

.product-detail__main-image {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}


/* Активная фотография */

.product-detail__main-image.is-active {
    opacity: 1;
    visibility: visible;
}


/* Само большое изображение */

.product-detail__main-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}


/* =========================================================
   МИНИАТЮРЫ
   ========================================================= */

.product-detail__thumbnails {
    display: flex;

    gap: 10px;

    margin-top: 14px;

    overflow-x: auto;
}


/* Миниатюра */

.product-detail__thumbnail {
    flex: 0 0 64px;

    width: 64px;
    height: 80px;

    display: block;

    padding: 0;

    overflow: hidden;

    background: #eee2da;

    border: 1px solid transparent;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        border-color 0.25s ease,
        transform 0.25s ease;
}


/* Картинка внутри миниатюры */

.product-detail__thumbnail img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* Наведение */

.product-detail__thumbnail:hover {
    border-color: #c89582;

    transform: translateY(-2px);
}


/* Выбранная миниатюра */

.product-detail__thumbnail.is-active {
    border-color: #806052;
}
/* ---------------------------------------------------------
   Информация о товаре
   --------------------------------------------------------- */

.product-detail__info {
    padding-top: 20px;
}

.product-detail__category {
    margin-bottom: 18px;

    color: #b18c7b;

    font-size: 11px;
    letter-spacing: 2px;

    text-transform: uppercase;
}

.product-detail__title {
    margin: 0;

    color: #392d27;

    font-family: Georgia, "Times New Roman", serif;

    font-size: clamp(42px, 5vw, 64px);

    font-weight: 400;

    line-height: 1.05;
}

.product-detail__line {
    width: 70px;
    height: 1px;

    margin: 30px 0;

    background: #d4ad9d;
}

.product-detail__price {
    margin-bottom: 30px;

    color: #49352c;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 28px;
}


/* ---------------------------------------------------------
   Описание
   --------------------------------------------------------- */

.product-detail__description {
    max-width: 560px;

    margin-bottom: 40px;

    color: #78675e;

    font-size: 15px;

    line-height: 1.85;
}

.product-detail__description p {
    margin: 0 0 10px;
}


/* ---------------------------------------------------------
   Информация о товаре
   --------------------------------------------------------- */

.product-detail__meta {
    display: flex;

    flex-direction: column;

    gap: 14px;

    margin-bottom: 40px;

    padding: 24px 0;

    border-top: 1px solid #e5d8d0;
    border-bottom: 1px solid #e5d8d0;
}

.product-detail__meta div {
    display: flex;

    justify-content: space-between;

    gap: 30px;

    color: #51423a;

    font-size: 14px;
}

.product-detail__meta span {
    color: #a38d82;
}


/* ---------------------------------------------------------
   Кнопка
   --------------------------------------------------------- */

.product-detail__button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 230px;

    padding: 16px 30px;

    box-sizing: border-box;

    background: #806052;

    color: #ffffff;

    text-decoration: none;

    font-size: 12px;
    letter-spacing: 1.3px;

    text-transform: uppercase;

    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.product-detail__button:hover {
    background: #654a3d;

    transform: translateY(-2px);
}


/* ---------------------------------------------------------
   Адаптация под планшет
   --------------------------------------------------------- */

@media (max-width: 900px) {

    .product-detail {
        padding: 70px 0 90px;
    }

    .product-detail__container {
        width: min(100% - 40px, 700px);
    }

    .product-detail__layout {
        grid-template-columns: 1fr;

        gap: 55px;
    }

    .product-detail__info {
        padding-top: 0;
    }

}


/* ---------------------------------------------------------
   Адаптация под телефон
   --------------------------------------------------------- */

@media (max-width: 600px) {

    .product-detail {
        padding: 55px 0 70px;
    }

    .product-detail__container {
        width: calc(100% - 30px);
    }

    .product-detail__back {
        margin-bottom: 30px;
    }

    .product-detail__title {
        font-size: 42px;
    }

    .product-detail__price {
        font-size: 25px;
    }

    .product-detail__meta div {
        flex-direction: column;

        gap: 4px;
    }

    .product-detail__button {
        width: 100%;
    }

}
/* =========================================================
   ПРОСМОТР ФОТОГРАФИИ НА ВЕСЬ ЭКРАН
   ========================================================= */

.product-lightbox {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 40px;

    box-sizing: border-box;

    background: rgba(55, 42, 36, 0.88);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}


/* Открытое окно */

.product-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}


/* Область фотографии */

.product-lightbox__content {
    width: min(90vw, 1100px);
    height: min(82vh, 850px);

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;
}


/* Большая фотография */

.product-lightbox__image {
    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;

    cursor: zoom-in;

    transform: scale(1);

    transition:
        transform 0.2s ease;
}


/* Закрыть */

.product-lightbox__close {
    position: absolute;

    top: 25px;
    right: 30px;

    width: 45px;
    height: 45px;

    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.35);

    background: rgba(255, 255, 255, 0.08);

    color: #ffffff;

    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: 300;

    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}


.product-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.18);

    border-color: rgba(255, 255, 255, 0.7);
}


/* Кнопки увеличения */

.product-lightbox__controls {
    position: absolute;

    bottom: 30px;
    left: 50%;

    transform: translateX(-50%);

    display: flex;

    align-items: center;

    gap: 18px;

    padding: 8px 12px;

    background: rgba(255, 255, 255, 0.12);

    border: 1px solid rgba(255, 255, 255, 0.25);
}


.product-lightbox__controls button {
    width: 38px;
    height: 38px;

    padding: 0;

    border: none;

    background: transparent;

    color: #ffffff;

    font-family: Arial, sans-serif;

    font-size: 25px;

    line-height: 1;

    cursor: pointer;
}


.product-lightbox__controls button:hover {
    background: rgba(255, 255, 255, 0.12);
}


#product-lightbox-zoom {
    min-width: 55px;

    color: #ffffff;

    font-size: 13px;

    text-align: center;
}


/* =========================================================
   АДАПТАЦИЯ ПОД ТЕЛЕФОН
   ========================================================= */

@media (max-width: 600px) {

    .product-lightbox {
        padding: 20px;
    }

    .product-lightbox__content {
        width: 94vw;
        height: 80vh;
    }

    .product-lightbox__close {
        top: 15px;
        right: 15px;
    }

    .product-lightbox__controls {
        bottom: 20px;
    }

}
/* ---------------------------------------------------------
   Заглушка для товара без фотографии
--------------------------------------------------------- */

.product-detail__photos--no-image {
    background: #eee2da;
}

.product-detail__photos--no-image .product-detail__main-image img {
    object-fit: contain;
    padding: 30px;
    box-sizing: border-box;
}