/* Item detail only. Scoped so catalog/modal rules do not affect this page. */
html:has(.item-detail),
body:has(.item-detail) {
    background: #fff;
    height: auto;
    min-height: 0;
}

.item-detail {
    box-sizing: border-box;
    max-width: 1120px;
    margin: 12px auto 0;
    padding: 4px 24px 0;
    color: #222;
    font-family: Arial, Helvetica, sans-serif;
    background: #fff;
}

.item-detail *,
.item-detail *::before,
.item-detail *::after {
    box-sizing: border-box;
}

.item-detail__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.9fr) 280px;
    column-gap: 28px;
    row-gap: 16px;
    align-items: start;
}

.item-detail__gallery {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    min-width: 0;
}

.item-detail__thumbs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-detail__thumb {
    width: 76px;
    height: 76px;
    padding: 4px;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.item-detail__thumb.is-selected {
    border-color: #222;
}

.item-detail__thumb img,
.item-detail__stage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.item-detail__stage {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.item-detail__stage img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 460px;
}

.item-detail__info {
    min-width: 0;
}

.item-detail__info h1 {
    margin: 0 0 14px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    color: #111;
}

.item-detail__desc {
    margin: 0;
    color: #222;
    font-size: 15px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.item-detail__desc--html {
    white-space: normal;
}

.item-detail__desc--html p {
    margin: 0 0 8px;
}

.item-detail__desc--html ul,
.item-detail__desc--html ol {
    margin: 0 0 8px;
    padding-left: 1.2em;
}

.item-detail__desc--html li {
    margin: 0 0 4px;
}

.item-detail__card {
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    padding: 16px 16px 14px;
    background: #fff;
}

.item-detail__note {
    font-size: 13px;
    line-height: 1.4;
    color: #666;
}

.item-detail__price {
    margin: 8px 0;
    color: #2A8703;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
}

.item-detail__pickup {
    margin: 0 0 12px;
    color: #2A8703;
    font-weight: 700;
}

.item-detail__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
    font-size: 15px;
}

.item-detail__row--total {
    font-weight: 700;
    margin-bottom: 12px;
}

.item-detail__pay {
    width: 100%;
    background: #5b4dff;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 12px;
    font-size: 18px;
    cursor: pointer;
}

.item-detail__stripe {
    margin-top: 8px;
    text-align: center;
    color: #888;
    font-size: 12px;
}

.item-detail__empty {
    margin: 24px 0;
}

@media (max-width: 980px) {
    .item-detail__grid {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

    .item-detail__gallery {
        grid-column: 1 / -1;
    }

    .item-detail__stage img {
        max-height: 380px;
    }
}

@media (max-width: 700px) {
    .item-detail {
        margin-top: 8px;
        padding: 0 16px;
    }

    .item-detail__grid {
        grid-template-columns: 1fr;
        row-gap: 18px;
    }

    .item-detail__gallery {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .item-detail__stage {
        order: 1;
    }

    .item-detail__stage img {
        max-height: 280px;
    }

    .item-detail__thumbs {
        order: 2;
        flex-direction: row;
        gap: 8px;
    }

    .item-detail__thumb {
        width: 64px;
        height: 64px;
    }

    .item-detail__info h1 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .item-detail__desc {
        font-size: 14px;
    }
}
