/* ============================================
   PRODUCT RELATED — карусель похожих товаров
   ============================================ */

.product-related {
    background: var(--surface-general-primary);
    padding: 0 0 64px;
    overflow: hidden;
}

/* Заголовок */
.product-related__header {
    max-width: 1472px;
    margin: 0 auto;
    padding: 0 16px;
}

.product-related__header-inner {
    margin-bottom: 48px;
}

.product-related__title {
    color: var(--base-neutral-lightest);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.1;
    margin: 0;
    max-width: 714px;
}

/* ===== КАРУСЕЛЬ ===== */
.product-related__carousel {
    max-width: 1472px;
    margin: 0 auto;
    padding: 0 16px;
}



.product-related__slide {
    height: auto;
    display: flex;
}

/* ===== КАРТОЧКА ТОВАРА ===== */
.card-product {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 451px;
    border-radius: 16px;
    overflow: hidden;
    outline: 1px solid var(--border-primary);
    outline-offset: -1px;
    background: transparent;
    transition: outline-color 400ms var(--easing-gentle);
}

.card-product:hover {
    outline-color: transparent;
}

/* Ссылка на всю карточку */
.card-product__link {
    position: absolute;
    inset: 0;
    z-index: 3;
}

/* ===== HOVER: круглая заливка + декоративные SVG-горы ===== */
.card-product__hover-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    color: var(--base-neutral-lightest);
    background: var(--surface-general-secondary);
    /* Волна начинается внизу по центру и целиком закрывает карточку. */
    clip-path: circle(0% at 50% 100%);
    transition: clip-path 650ms var(--easing-gentle);
    will-change: clip-path;
}

.card-product:hover .card-product__hover-bg {
    clip-path: circle(150% at 50% 100%);
}

.card-product__hover-svg {
    position: absolute;
    height: auto;
    pointer-events: none;
}

/* V-шеврон (остриём вниз) — верх карточки, ширина 310% карточки */
.card-product__hover-svg--top {
    max-width: none;
    top: 4.5%;
    left: -85%;
    width: 310%;
}

/* Шеврон остриём вверх — низ карточки, ширина 240% карточки */
.card-product__hover-svg--bottom {
    top: 47.5%;
    left: -128.5%;
    width: 240%;
    max-width: none;
}

/* ===== ИЗОБРАЖЕНИЕ ===== */
.card-product__image-wrapper {
    position: relative;
    z-index: 1;
    padding: 8px 8px 0;
}

.card-product__image-container {
    position: relative;
    width: 100%;
    height: 260px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-general-secondary);
}

.card-product__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 600ms var(--easing-gentle);
}

.card-product:hover .card-product__image {
    transform: scale(1.05);
}

.card-product__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(57, 74, 90, 0.12);
    pointer-events: none;
}

/* Бейджи */
.card-product__badges {
    position: absolute;
    top: 0;
    left: 0;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.card-product__badge {
    display: inline-flex;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.card-product__badge--light {
    background: var(--surface-general-accent-secondary);
    color: var(--text-content-tertiary);
}

.card-product__badge--dark {
    background: var(--surface-general-secondary);
    color: var(--base-neutral-lightest);
}

.card-product__badge--accent {
    background: var(--surface-general-accent-primary);
    color: var(--text-content-secondary);
}

/* ===== КОНТЕНТ КАРТОЧКИ ===== */
.card-product__info {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
}

.card-product__details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card-product__title {
    color: var(--base-neutral-lightest);
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.2;
    margin: 0;
    /* Название строго в 2 строки: карточки одной высоты */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(2 * 1.2em);
}

.card-product__specs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-product__spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.card-product__spec-label {
    color: #E8E1E1;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.card-product__spec-value {
    color: var(--base-neutral-lightest);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    text-align: right;
}

/* ===== ДЕЙСТВИЯ (цена + подробнее) ===== */
.card-product__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border-primary);
    transition: border-color 400ms var(--easing-gentle);
}

.card-product:hover .card-product__actions {
    border-top-color: var(--border-secondary);
}

.card-product__price {
    color: var(--base-neutral-lightest);
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.2;
    transition: color 400ms var(--easing-gentle);
}

.card-product:hover .card-product__price {
    color: var(--surface-general-accent-primary);
}

.card-product__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-link-default);
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.2;
    transition: color 300ms var(--easing-gentle);
}

.card-product:hover .card-product__more {
    color: var(--text-link-hover);
}

.card-product__more svg {
    fill: currentColor;
    flex-shrink: 0;
}

/* ===== КОНТРОЛЫ (пагинация + стрелки) ===== */
.product-related__controls {
    max-width: 1472px;
    margin: 0 auto;
    padding: 0 16px;
    margin-top: 12px;
}

.product-related__controls-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-related__pagination {
    display: flex;
    align-items: center;
    gap: 2px;
    color: var(--base-neutral-lightest);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.product-related__pagination-current,
.product-related__pagination-total {
    min-width: 24px;
    min-height: 24px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-related__arrows {
    display: flex;
    gap: 12px;
}

.product-related__nav {
    width: 48px;
    height: 48px;
    padding: 12px;
    background: var(--surface-general-accent-secondary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 300ms var(--easing-gentle);
    color: var(--surface-general-secondary);
}

.product-related__nav:hover {
    background: var(--surface-general-secondary);
    color: var(--base-neutral-lightest);
}

.product-related__nav svg {
    fill: currentColor;
    flex-shrink: 0;
}

.product-related__nav.swiper-button-disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ===== АДАПТИВ: 1440-835 ===== */
@media (max-width: 1440px) {
    .product-related__carousel {
        padding-right: 0;
    }

    .product-related__title {
        font-size: 24px;
    }

    .card-product__title {
        font-size: 16px;
    }

    .card-product__spec-label,
    .card-product__spec-value {
        font-size: 14px;
    }

    .card-product__price,
    .card-product__more {
        font-size: 16px;
    }

    .card-product__badge {
        font-size: 14px;
    }

    .product-related__swiper {
        overflow: visible;
    }
}

/* ===== АДАПТИВ: МОБИЛЬНЫЙ (≤834) ===== */
@media (max-width: 834px) {
    .product-related {
        padding-bottom: 40px;
    }

    .product-related__header-inner {
        margin-bottom: 24px;
    }

    .product-related__carousel {
        padding-right: 0;
    }

    .card-product {
        min-height: 400px;
    }

    .card-product__image-container {
        height: 220px;
    }

    .card-product__info {
        padding: 20px 12px;
        gap: 20px;
    }

    .card-product__details {
        gap: 16px;
    }

    .card-product__actions {
        padding-top: 16px;
    }
}