/* collection/static/collection/css/exhibit_detail.css */

/* DETAIL PAGE */

.detail-page {
    padding: 18px 0 78px;
}

.detail-page .container {
    width: min(100% - 96px, 1320px);
    margin: 0 auto;
}

.detail-title {
    margin: 0 0 26px;
    font-size: 46px;
    line-height: 1.1;
    font-weight: 400;
    color: #0077c8;
}

/* Основная сетка: слева фото, справа характеристики */

.detail-layout {
    display: grid;
    grid-template-columns: minmax(360px, 520px) minmax(0, 1fr);
    gap: 52px;
    align-items: start;
}

.detail-media {
    min-width: 0;
    overflow: hidden;
}

.detail-content {
    min-width: 0;
}

/* SLIDER */

.detail-slider {
    width: 100%;
}

.detail-main-image {
    position: relative;
    width: 100%;
    height: 330px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.detail-zoom-preview {
    position: fixed;
    top: 70%;
    left: 28%;

    width: min(380px, 35vw);
    aspect-ratio: 1;

    transform: translate(-50%, -50%) scale(0.96);

    background-repeat: no-repeat;
    background-position: center;
    background-size: 220%;

    border: 4px solid #ffffff;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    z-index: 1000;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}

.detail-zoom-preview.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Показываем эффект только на устройствах с мышкой */
@media (hover: none), (pointer: coarse) {
    .detail-zoom-preview {
        display: none;
    }
}

@media (max-width: 900px) {
    .detail-zoom-preview {
        width: min(380px, 55vw);
    }
}
.detail-slide {
    display: none;
    width: 100%;
    height: 100%;
}

.detail-slide.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* На случай, если где-то остался старый шаблон без .detail-slide */
.detail-main-image > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.detail-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(to bottom, #f4f4f4, #d1d1d1);
}

/* Стрелки */

.slider-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 42px;
    height: 42px;
    padding: 0;
    border: none;
    background: transparent;
    color: #111;
    font-size: 56px;
    line-height: 38px;
    font-weight: 300;
    cursor: pointer;
    transform: translateY(-50%);
}

.slider-arrow-prev {
    left: 0;
}

.slider-arrow-next {
    right: 0;
}

.slider-arrow:hover {
    color: #0077c8;
}

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

.gallery-strip {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 8px;
    scrollbar-width: thin;
}

.gallery-thumb {
    width: 92px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 7px;
    background: #f2f2f2;
    overflow: hidden;
    flex: 0 0 auto;
    cursor: pointer;
    opacity: 0.75;
}

.gallery-thumb.active {
    border-color: #0077c8;
    opacity: 1;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* На случай, если в шаблоне остался старый вариант: gallery-strip сразу с img */
.gallery-strip > img {
    width: 92px;
    height: 72px;
    object-fit: cover;
    border-radius: 7px;
    flex: 0 0 auto;
    display: block;
}

/* CHARACTERISTICS */

.detail-subtitle {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 400;
    color: #111;
}

.characteristics {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #bfc0c2;
    border-radius: 7px;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.25;
    background: #f7f7f7;
}

.characteristics th,
.characteristics td {
    padding: 9px 14px;
    border-bottom: 1px solid #c8c8c8;
    text-align: left;
    vertical-align: top;
    font-weight: 400;
}

.characteristics th {
    width: 280px;
    color: #204982;
    border-right: 1px solid #c8c8c8;
    background: #f3f3f3;
}

.characteristics td {
    color: #111;
    background: #f7f7f7;
    word-break: break-word;
}

.characteristics tr:last-child th,
.characteristics tr:last-child td {
    border-bottom: none;
}

/* AUDIO */

.audio-box {
    margin-top: 24px;
    padding: 11px 14px;
    border: 1px solid #bfc0c2;
    border-radius: 22px;
    background: #dedede;
}

.audio-box audio {
    width: 100%;
    display: block;
}

/* DESCRIPTION */

.detail-description {
    margin-top: 18px;
    font-size: 21px;
    line-height: 1.35;
    color: #111;
}

.detail-description p {
    margin: 0 0 12px;
}

.detail-description p:last-child {
    margin-bottom: 0;
}

/* TABLET */

@media (max-width: 1100px) {
    .detail-page .container {
        width: min(100% - 64px, 1060px);
    }

    .detail-layout {
        grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
        gap: 32px;
    }

    .detail-title {
        font-size: 42px;
    }

    .detail-main-image {
        height: 300px;
    }

    .characteristics th {
        width: 230px;
    }
}

/* MOBILE */

@media (max-width: 768px) {
    .detail-page {
        padding: 10px 0 64px;
    }

    .detail-page .container {
        width: min(100% - 52px, 650px);
    }

    .detail-title {
        margin-bottom: 24px;
        font-size: 42px;
        line-height: 1.08;
    }

    .detail-layout {
        display: block;
    }

    .detail-media {
        margin-bottom: 28px;
    }

    .detail-main-image {
        height: 260px;
    }

    .slider-arrow {
        width: 34px;
        height: 34px;
        font-size: 46px;
        line-height: 30px;
    }

    .gallery-strip {
        justify-content: flex-start;
    }

    .gallery-thumb,
    .gallery-strip > img {
        width: 84px;
        height: 64px;
    }

    .detail-subtitle {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .characteristics {
        font-size: 16px;
    }

    .characteristics th {
        width: 46%;
        padding: 9px 10px;
    }

    .characteristics td {
        padding: 9px 10px;
    }

    .audio-box {
        margin-top: 22px;
    }

    .detail-description {
        font-size: 18px;
        line-height: 1.35;
    }
}

@media (max-width: 520px) {
    .detail-page .container {
        width: min(100% - 32px, 430px);
    }

    .detail-title {
        font-size: 36px;
    }

    .detail-main-image {
        height: 220px;
    }

    .gallery-thumb,
    .gallery-strip > img {
        width: 76px;
        height: 58px;
    }

    .characteristics {
        font-size: 15px;
    }

    .characteristics th,
    .characteristics td {
        padding: 8px;
    }

    .detail-description {
        font-size: 17px;
    }
}
