.product-hero-block .block-content {
    padding-bottom: 0;
    align-items: stretch;
}

.product-hero__title {
    margin-bottom: 40px;
}

.nowrap {
    white-space: nowrap;
}

.product-hero__card {
    display: flex;
    gap: 30px;
    align-items: stretch;
}

/* ---- Галерея (перенос 1-в-1 с эталона «Вологодское зодчество») ---- */

.card-gallery {
    flex: 1;
    max-width: none;
    min-width: 0;
}

.card-gallery-main {
    position: relative;
    width: 100%;
    height: 510px;
    border-radius: 10px;
    background: #e0e0e0;
    margin-bottom: 12px;
    user-select: none;
}

.card-gallery-main .swiper-pagination {
    bottom: 12px;
    width: 120px;
    height: 26px;
    fill: rgba(255, 255, 255, 0.10);
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.12));
    backdrop-filter: blur(4px);
    border-radius: 13px;
    z-index: 15;
}

.card-gallery-main .swiper-pagination .swiper-pagination-bullet {
    margin-top: 5px;
    transform: unset;
    width: 16px;
    height: 16px;
    border-radius: 8px;
    background: transparent;
    border: 2px solid rgba(0, 0, 0, 0.35);
    opacity: 1;
}

.card-gallery-main .swiper-pagination .swiper-pagination-bullet-active {
    border: 2px solid rgba(0, 0, 0, 0.35);
    background: rgba(0, 0, 0, 0.35);
}

.card-gallery-main .swiper-pagination .swiper-pagination-bullet-active-next-next,
.card-gallery-main .swiper-pagination .swiper-pagination-bullet-active-prev-prev {
    scale: 0.7;
}

.card-gallery-main > .swiper {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.card-gallery-main .swiper .swiper-slide {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.card-gallery-main .swiper .swiper-slide .cover {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.card-gallery-main .swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
}

.card-gallery-main .swiper .swiper-slide.img-contain img {
    object-fit: contain;
    background: #FFFFFF;
}

.card-gallery-main .swiper .swiper-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-gallery-main .swiper .swiper-button-next,
.card-gallery-main .swiper .swiper-button-prev {
    width: calc(100% / 4);
    height: 100%;
    top: 0;
    bottom: 0;
    margin: unset;
    display: flex;
}

.card-gallery-main .swiper .swiper-button-next::after,
.card-gallery-main .swiper .swiper-button-prev::after {
    content: none;
}

.card-gallery-main .swiper .swiper-button-next {
    right: 0;
    justify-content: flex-end;
}

.card-gallery-main .swiper .swiper-button-prev {
    left: 0;
    justify-content: flex-start;
}

.card-gallery-main .swiper .swiper-button-next span,
.card-gallery-main .swiper .swiper-button-prev span {
    height: 100%;
    width: 35px;
    background-color: rgba(0, 0, 0, 0);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-position: center;
    background-repeat: no-repeat;
    transition-duration: 0.3s;
    overflow: hidden;
}

.card-gallery-main .swiper:hover .swiper-button-next span,
.card-gallery-main .swiper:hover .swiper-button-prev span {
    background-color: rgba(0, 0, 0, 0.2);
    opacity: 0.5;
}

.card-gallery-main .swiper .swiper-button-next:hover span,
.card-gallery-main .swiper .swiper-button-prev:hover span {
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 1;
}

.card-gallery-main .full-screen-btn {
    position: absolute;
    width: calc(100% / 2);
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    height: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.25s;
    z-index: 10;
}

.card-gallery-main .full-screen-btn span {
    width: 100px;
    height: 100px;
    border-radius: 100%;
    background-color: rgba(0, 0, 0, 0);
    opacity: 0;
    transition-duration: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-gallery-main .full-screen-btn span > img {
    width: 40px;
}

.card-gallery-main .swiper:hover .full-screen-btn span {
    background-color: rgba(0, 0, 0, 0.2);
    opacity: 0.5;
}

.card-gallery-main .swiper .full-screen-btn:hover span {
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 1;
}

.card-badge-sale {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 11;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--Gradient-Gold, linear-gradient(101deg, #D9B059 0%, #B38F41 100%));
    height: 28px;
    pointer-events: none;
}

.card-badge-sale span {
    font-weight: 500;
    font-size: 16px;
    line-height: 20px;
    color: #FFFFFF;
}

.card-badge-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.card-save-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 11;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 4px;
    background: rgba(50, 60, 76, 0.5);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    border: none;
    cursor: pointer;
    height: 34px;
    transition: background 0.2s;
}

.card-save-btn:hover {
    background: rgba(50, 60, 76, 0.72);
}

.card-save-btn.saved .card-save-icon {
    filter: brightness(0) saturate(100%) invert(27%) sepia(80%) saturate(600%) hue-rotate(320deg) brightness(110%);
}

.card-save-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: filter 0.2s;
}

.card-thumbs {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    flex-wrap: nowrap;
}

.card-thumbs .swiper-layout-overflow {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: rgba(0, 0, 0, 0.60);
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    justify-content: center;
}

.card-thumbs .swiper-layout-overflow .floor {
    color: #FFF;
    text-shadow: 1px 0 2px #8A8A8A, -1px 0 2px #8A8A8A, 0 1px 2px #8A8A8A, 0 -1px 2px #8A8A8A, 1px 1px 2px #8A8A8A, -1px -1px 2px #8A8A8A, -1px 1px 2px #8A8A8A, 1px -1px 2px #8A8A8A;
    font-size: 30px;
    font-style: normal;
    font-weight: 600;
    line-height: 36px;
    white-space: nowrap;
}

.card-thumbs .swiper-layout-overflow .name {
    color: #FFF;
    text-shadow: 1px 0 2px #8A8A8A, -1px 0 2px #8A8A8A, 0 1px 2px #8A8A8A, 0 -1px 2px #8A8A8A, 1px 1px 2px #8A8A8A, -1px -1px 2px #8A8A8A, -1px 1px 2px #8A8A8A, 1px -1px 2px #8A8A8A;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-thumbs .img-contain picture {
    object-fit: contain;
}

.card-thumbs .img-contain picture img {
    object-fit: contain !important;
    background: #FFFFFF;
}

.product-thumbs-swiper {
    width: 100%;
    height: 97px;
}

.product-thumbs-swiper .swiper-slide {
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.product-thumbs-swiper .swiper-slide > img,
.product-thumbs-swiper .swiper-slide > picture,
.product-thumbs-swiper .swiper-slide > picture > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumbs-swiper .swiper-slide.img-contain > img {
    object-fit: contain;
    background: #FFFFFF;
}

.product-thumbs-swiper .swiper-slide .cover {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.60);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Инфо-панель ---- */

.product-hero__info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 315px;
    height: 613px;
    /* Figma 239-60352: колонка 315px без внутренних отступов, контент на всю ширину. */
    padding: 0;
    flex-shrink: 0;
}

.product-hero__stats {
    display: flex;
    flex-direction: column;
    gap: 45px;
}

.product-hero__text-block {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.product-hero__label {
    color: var(--Text-Secondary, #8B8B8B);
    font-size: 16px;
    line-height: 1;
}

/* Figma: у подписи «Материал стен» line-height 20px (в отличие от подписи площади). */
.product-hero__material .product-hero__label {
    line-height: 20px;
}

.product-hero__area-value {
    color: var(--Brand-Secondary, #454452);
    font-size: 44px;
    font-weight: 600;
    line-height: 1;
    text-transform: lowercase;
    margin-top: 6px;
}

.product-hero__material-value {
    color: var(--Text-Primary, #1E2433);
    font-size: 16px;
    line-height: 20px;
    margin-top: 5px;
}

.product-hero__specs {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    gap: 18px 42px;
}

.product-hero__spec {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-hero__spec-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
}

.product-hero__spec-icon {
    width: 60px;
    height: 60px;
    margin-bottom: -4px;
}

.product-hero__spec-label {
    color: var(--Text-Primary, #1E2433);
    font-size: 14px;
    line-height: 18px;
    text-align: center;
    white-space: nowrap;
}

.product-hero__purchase {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-hero__price {
    text-transform: lowercase;
    /* Figma: число 44px, приписка «млн ₽» 20px. */
    font-size: 44px;
    line-height: 1;
}

.product-hero__price .product-price__unit {
    font-size: 20px;
}

.product-hero__buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-hero__buttons .btn {
    width: 100%;
    /* Figma Button/M: 22/20, паддинги 16/40 → высота кнопки 52 на всех брейкпоинтах. */
    padding: 16px 40px;
    font-size: 22px;
}

.product-hero__buttons .btn img {
    width: 27px;
    height: 28px;
    display: block;
}

/* display: block выше перебивает UA-стиль атрибута hidden — возвращаем скрытие. */
.product-hero__buttons .btn img[hidden] {
    display: none;
}

.product-hero__mobile-stats {
    display: none;
}

@media (max-width: 1439px) {
    /* Figma Laptop 991: зазор рамок 8px + внутренний отступ инфо-колонки 12px = визуальные 20px. */
    .product-hero__card {
        gap: 8px;
    }

    .card-gallery {
        flex: 1;
        max-width: none;
    }

    .card-gallery-main {
        height: 491px;
    }

    .product-thumbs-swiper {
        height: 88px;
    }

    .product-hero__info {
        width: 315px;
        height: 586px;
        /* Figma Laptop 991: контент 291px при ширине колонки 315px. */
        padding: 0 12px;
    }
}

@media (max-width: 989px) {
    .product-hero-block .block-content {
        /*padding-top: 20px;*/
    }

    .product-hero__title {
        margin-bottom: 10px;
        font-size: 24px;
        line-height: 1.1;
    }

    .product-hero__card {
        flex-direction: column;
        gap: 16px;
    }

    .card-gallery {
        flex: none;
        width: 100%;
        max-width: 100%;
    }

    .card-gallery-main {
        height: auto;
        aspect-ratio: 4 / 3;
        border-radius: 8px;
        margin-bottom: 8px;
    }

    .card-gallery-main .full-screen-btn,
    .card-gallery-main .swiper-button-next,
    .card-gallery-main .swiper-button-prev {
        display: none !important;
    }

    .product-thumbs-swiper {
        height: auto;
    }

    .product-thumbs-swiper .swiper-slide {
        height: auto;
        aspect-ratio: 152 / 97 !important;
        max-height: 75px;
    }

    .card-thumbs .swiper-layout-overflow .floor {
        font-size: 20px;
        font-weight: 500;
        line-height: 1.2;
    }

    .card-thumbs .swiper-layout-overflow .name {
        font-size: 14px;
        font-weight: 400;
        line-height: 1.2;
    }

    .product-hero__info {
        width: 100%;
        height: auto;
        padding: 0;
        gap: 20px;
    }

    .product-hero__stats {
        order: 1;
        gap: 0;
    }

    .product-hero__text-block {
        display: none;
    }

    /* Специфики на мобильном: 4 в ряд, [число+иконка] сверху, подпись снизу (Figma phone) */
    .product-hero__specs {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 0;
    }

    .product-hero__spec {
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 2px;
    }

    .product-hero__spec-body {
        display: contents;
    }

    .product-hero__spec-num {
        order: 1;
    }

    .product-hero__spec-icon {
        order: 2;
        width: 48px;
        height: 48px;
        margin-bottom: 0;
    }

    .product-hero__spec-label {
        order: 3;
        width: 100%;
        text-align: center;
    }

    .product-hero__purchase {
        order: 2;
        gap: 12px;
    }

    .product-hero__price {
        display: none;
    }

    .product-hero__buttons {
        flex-direction: column;
        gap: 10px;
    }

    .product-hero__mobile-stats {
        order: 3;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }

    .product-hero__mobile-stat {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .product-hero__mobile-stat--price {
        align-items: flex-end;
        text-align: right;
    }

    .product-hero__mobile-stat .product-hero__label {
        font-size: 12px;
    }

    .product-hero__mobile-value {
        color: var(--Brand-Secondary, #454452);
        font-size: 32px;
        font-weight: 700;
        line-height: 1;
        text-transform: lowercase;
    }

    /* Figma Phone 361: приписка «млн ₽» 12px при числе 32px. */
    .product-hero__mobile-value .product-price__unit {
        font-size: 12px;
    }
}

/* ---- Стыки блоков главной на странице товара (по Figma-карточке товара) ----
   Зазор до тёмной CTA-карточки: 80/60/40 по брейкпоинтам.
   Карта идёт сразу после CTA (блока камер пока нет) — её верхний паддинг главной убираем,
   зазор задаёт padding-bottom CTA-блока. */

.color-section + .cta-block .block-content,
.about-section + .cta-block .block-content {
    padding-top: 80px;
}

.cta-block + .map-block .block-content {
    padding-top: 0;
}

@media (max-width: 1439px) {
    .color-section + .cta-block .block-content,
    .about-section + .cta-block .block-content {
        padding-top: 60px;
    }
}

@media (max-width: 989px) {
    .color-section + .cta-block .block-content,
    .about-section + .cta-block .block-content {
        padding-top: 40px;
    }
}
