/* Шаблоны страницы товара. Все классы — с префиксом .product-tpl-* / .product-* */

/* --- общие блоки --- */
.product-gallery--sticky { position: sticky; top: 1rem; }
.product-gallery-thumbs img { width: 64px; height: 64px; object-fit: cover; cursor: pointer; }
.product-buybox--card { border: 1px solid var(--bs-border-color); border-radius: .75rem; padding: 1.25rem; }
.product-content--tabs [x-cloak] { display: none !important; }
.product-sticky-atc { position: fixed; inset-inline: 0; bottom: 0; z-index: 1030; background: #fff; box-shadow: 0 -2px 12px rgba(0,0,0,.08); }
[x-cloak] { display: none !important; }
.product-gallery--full .swiper-slide { aspect-ratio: auto; }
.product-gallery--full .swiper-slide img { max-height: 70vh; object-fit: contain; }
.product-gallery--full .product-video { max-height: 70vh; }

/* --- видео в галерее --- */
.product-video-poster { position: absolute; inset: 0; background: none; }

/* --- ответ магазина на отзыв --- */
.product-review-reply { background: var(--bs-gray-100, #f8f9fa); border-inline-start: 3px solid var(--bs-primary, #0d6efd); }

/* --- compact --- */
.product-tpl-compact .container-lg { --bs-gutter-y: .5rem; }

/* --- minimal --- */
.product-tpl-minimal .h1 { font-weight: 300; }
.product-tpl-minimal .container-lg { padding-top: 1.5rem; padding-bottom: 3rem; }
.product-tpl-minimal .product-content { margin-top: 2rem; }
.product-tpl-minimal .product-reviews { margin-top: 3rem; }

/* --- wide --- */
.product-tpl-wide .product-buybox-sticky { position: sticky; top: 1rem; }

/* --- split --- */
.product-tpl-split .product-gallery--sticky { top: 1rem; }

/* --- marketplace --- */
.product-tpl-marketplace .product-specs { font-size: .9rem; }

/* --- gallery --- */
.product-tpl-gallery .product-buybox-sticky { position: sticky; top: 1rem; }

/* --- boutique --- */
.product-tpl-boutique .h1 { letter-spacing: .02em; }

/* --- editorial --- */
.product-tpl-editorial .product-content-section { max-width: 720px; margin-inline: auto; }

/* --- showroom --- */
.product-tpl-showroom .product-specs td { padding-block: .5rem; }

/* --- techsheet --- */
.product-tpl-techsheet .product-specs { font-size: .875rem; }

/* --- wholesale --- */
.product-tpl-wholesale .product-wholesale { background: var(--bs-gray-100, #f8f9fa); }

/* --- landing --- */
.product-tpl-landing section { margin-block: 3rem; }

/* --- карточки товара (thumb) --- */
.product-card .product-thumb-image--square img { aspect-ratio: 1; object-fit: contain; }
.product-card .product-thumb-image--portrait img { aspect-ratio: 2 / 3; object-fit: cover; }
.product-card .product-thumb-image--landscape img { aspect-ratio: 4 / 3; object-fit: cover; }
.product-thumb-image--hover .product-thumb-image-secondary {
    position: absolute; inset: 0; opacity: 0; transition: opacity .25s ease;
}
@media (hover: hover) {
    .product-thumb-image--hover:hover .product-thumb-image-secondary { opacity: 1; }
}
.product-thumb-swatch { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; border: 1px solid var(--bs-border-color); display: inline-flex; }
.product-thumb-swatch img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb-swatch--more { align-items: center; justify-content: center; font-size: .7rem; background: var(--bs-light); }

.product-thumb-dense .card-body { padding: .5rem; }
.product-thumb-dense .card-title { font-size: .9rem; }

.product-thumb-compact .card-body { padding: .375rem; }

/* --- fashion / fashion-swatch --- */
@media (hover: hover) {
    .product-thumb-fashion .product-thumb-hover-cta,
    .product-thumb-fashion-swatch .product-thumb-hover-cta { opacity: 0; transition: opacity .2s ease; }
    .product-thumb-fashion:hover .product-thumb-hover-cta,
    .product-thumb-fashion-swatch:hover .product-thumb-hover-cta { opacity: 1; }
}

/* --- minimal --- */
.product-thumb-minimal .product-thumb-minimal-overlay { background: #fff; }
@media (hover: hover) {
    .product-thumb-minimal .product-thumb-minimal-overlay { position: absolute; inset-inline: 0; bottom: 0; opacity: 0; transition: opacity .2s ease; }
    .product-thumb-minimal:hover .product-thumb-minimal-overlay { opacity: 1; }
}

/* --- rozetka --- */
.product-thumb-rozetka .card-title { font-size: .9rem; }

/* --- prom --- */
.product-thumb-prom .btn { text-transform: none; }

/* --- amazon --- */
/* specificity boosted (ancestor + own class) so it beats theme's base .card-title { -webkit-line-clamp: 2 } */
.product-thumb-amazon .product-thumb-amazon-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    height: auto;
}
.product-thumb-amazon .btn-warning { color: #111; }

/* --- fashion (страница товара: видео 9:16 + фото, свотчи, характеристики-ссылки) --- */
.product-tpl-fashion .js-product-plyr,
.product-tpl-fashion .plyr {
    aspect-ratio: 9 / 16;
    max-height: 640px;
}

.product-tpl-fashion .product-gallery-thumb { width: 84px; }

.product-tpl-fashion .product-gallery-thumb img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.product-color-swatch {
    width: 34px;
    height: 34px;
    display: inline-block;
}

.product-buybox-specs a { text-decoration: none; }
.product-buybox-specs a:hover { text-decoration: underline; }

/* --- atelier (страница товара: вертикальные миниатюры, бренд/артикул строками) --- */
.product-tpl-atelier .product-thumbs-vertical { width: 84px; max-height: 560px; overflow-y: auto; }

.product-thumb-vertical img {
    width: 76px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.product-thumb-vertical.active img {
    border-color: var(--bs-primary, #4154f1);
    border-width: 2px;
}

.product-gallery-arrow {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    opacity: .85;
}

.product-gallery-arrow:hover { opacity: 1; }

.product-buybox-meta a { text-decoration: none; }
.product-buybox-meta a:hover { text-decoration: underline; }

/* --- list-вид листинга (горизонтальная карточка) --- */
.product-thumb-list { overflow: hidden; }
.product-thumb-list__img { min-height: 140px; border-radius: .375rem; }
.product-thumb-list .line-clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
