.product-detail {
    display: grid;
    grid-template-columns: 520px 1fr;
    gap: 70px;
    align-items: flex-start;
}

.product-detail__image {
    position: relative;
    padding: 40px;
    border-radius: 28px;
    background: #f7fbfd;
    box-shadow: 0 18px 45px rgba(5,33,48,0.08);
}

.product-detail__image img {
    width: 100%;
    height: 480px;
    object-fit: contain;
}

.product-detail__thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.product-thumb {
    height: 90px;
    padding: 8px;
    border: 1px solid rgba(5,33,48,0.12);
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: 0.25s ease;
}

.product-thumb.is-active,
.product-thumb:hover {
    border-color: var(--color-primary);
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-detail__title {
    margin-bottom: 18px;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--color-dark);
}

.product-detail__price {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 24px;
}

.product-detail__price-old {
    font-size: 18px;
    font-weight: 600;
    color: #9aa7ad;
    text-decoration: line-through;
}

.product-detail__price-new {
    font-size: 28px;
    font-weight: 800;
    color: #e02424;
}

.product-detail__intro {
    max-width: 620px;
    margin-bottom: 28px;
    font-size: 17px;
    line-height: 1.7;
    color: #5c6b74;
}

.product-detail__request {
    margin-bottom: 34px;
}

.product-detail__meta {
    display: grid;
    gap: 10px;
    font-size: 16px;
    color: #5c6b74;
}

.product-detail__meta span {
    color: var(--color-dark);
    font-weight: 700;
}

.product-detail__meta strong {
    font-weight: 600;
}


.product-detail__badges {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: calc(100% - 40px);
}

.product-detail__badge {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 16px rgba(5,33,48,0.18);
}

.product-tabs {
    margin-top: 60px;
}

.product-tabs__nav {
    display: flex;
    gap: 10px;
}

.product-tabs__btn {
    min-height: 54px;
    padding: 0 28px;
    border-radius: 18px 18px 0 0;
    background: #f7fbfd;
    color: var(--color-dark);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 14px;
}

.product-tabs__btn.is-active {
    background: var(--color-primary);
    color: #ffffff;
}

.product-tabs__content {
    display: none;
    padding: 34px;
    border-radius: 0 24px 24px 24px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(5,33,48,0.08);
    font-size: 16px;
    line-height: 1.75;
    color: #5c6b74;
}

.product-tabs__content.is-active {
    display: block;
}

.product-specs {
    width: 100%;
    border-collapse: collapse;
}

.product-specs th,
.product-specs td {
    padding: 16px 18px;
    border: 1px solid rgba(5,33,48,0.1);
    text-align: left;
    font-size: 15px;
}

.product-specs th {
    width: 260px;
    background: #f7fbfd;
    font-weight: 800;
    color: var(--color-dark);
}

.product-specs td {
    color: #5c6b74;
}

.product-gallery-trigger {
    display: block;
}

.product-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(5, 33, 48, 0.92);
    touch-action: pan-y;
}

.product-gallery-modal.is-open {
    display: flex;
}

body.modal-open {
    overflow: hidden;
}

.product-gallery-modal img {
    max-width: 85vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 16px;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-drag: none;
}

.product-gallery-modal__close,
.product-gallery-modal__prev,
.product-gallery-modal__next {
    position: absolute;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: 0.25s ease;
    touch-action: manipulation;
}

.product-gallery-modal__close:hover,
.product-gallery-modal__prev:hover,
.product-gallery-modal__next:hover {
    background: var(--color-primary);
}

.product-gallery-modal__close {
    top: 24px;
    right: 24px;
}

.product-gallery-modal__prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.product-gallery-modal__next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 992px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .product-detail__image img {
        height: 380px;
    }
}

@media (max-width: 576px) {
    .product-detail__image {
        padding: 24px;
        border-radius: 22px;
    }

    .product-detail__image img {
        height: 300px;
    }

    .product-detail__thumbs {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-thumb {
        height: 76px;
    }

    .product-detail__title {
        font-size: 26px;
    }

    .product-detail__price-new {
        font-size: 24px;
    }

    .product-tabs__nav {
        display: grid;
    }

    .product-tabs__btn {
        border-radius: 14px;
    }

    .product-tabs__content {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .product-specs th,
    .product-specs td {
        display: block;
        width: 100%;
    }

    .product-gallery-modal img {
        max-width: 78vw;
    }

    .product-gallery-modal__prev,
    .product-gallery-modal__next {
        width: 40px;
        height: 40px;
        font-size: 20px;
        background: rgba(0,0,0,0.45);
    }

    .product-gallery-modal__prev {
        left: 8px;
    }

    .product-gallery-modal__next {
        right: 8px;
    }

    .product-gallery-modal__close {
        width: 40px;
        height: 40px;
        top: 16px;
        right: 16px;
        background: rgba(0,0,0,0.45);
    }
}







.product-video-thumb {
    position: relative;
    overflow: hidden;
}
.product-video-thumb img {
    filter: brightness(0.75);
}
.product-video-thumb__play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #ffffff;
    transform: translate(-50%, -50%);
}


.product-video-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(5, 33, 48, 0.92);
}
.product-video-modal.is-open {
    display: flex;
}
.product-video-modal__frame {
    position: relative;
    width: 85vw;
    max-width: 960px;
    aspect-ratio: 16 / 9;
}
.product-video-modal__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
}
.product-video-modal__close {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: 0.25s ease;
}
.product-video-modal__close:hover {
    background: var(--color-primary);
}

@media (max-width: 576px) {
    .product-video-modal__frame {
        width: 92vw;
    }
    .product-video-modal__close {
        width: 40px;
        height: 40px;
        top: 16px;
        right: 16px;
        background: rgba(0,0,0,0.45);
    }
}





.request-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 33, 48, 0.55);
}
.request-modal.is-open {
    display: flex;
}
.request-modal__box {
    position: relative;
    width: 100%;
    max-width: 460px;
    padding: 40px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(5,33,48,0.2);
}
.request-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f7fbfd;
    color: var(--color-dark);
    font-size: 20px;
    cursor: pointer;
    transition: 0.25s ease;
}
.request-modal__close:hover {
    background: var(--color-primary);
    color: #ffffff;
}
.request-modal__title {
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 800;
    color: var(--color-dark);
}
.request-modal__subtitle {
    margin-bottom: 26px;
    font-size: 15px;
    line-height: 1.6;
    color: #5c6b74;
}
.request-modal__form {
    display: grid;
    gap: 14px;
}
.request-modal__form input,
.request-modal__form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(5,33,48,0.12);
    border-radius: 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--color-dark);
    resize: vertical;
}
.request-modal__form input:focus,
.request-modal__form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}
.request-modal__submit {
    margin-top: 6px;
    width: 100%;
}
.request-modal__status {
    min-height: 20px;
    margin: 0;
    font-size: 14px;
    text-align: center;
}
.request-modal__status.is-success {
    color: #1a9c5a;
}
.request-modal__status.is-error {
    color: #e02424;
}

@media (max-width: 576px) {
    .request-modal__box {
        padding: 28px 22px;
        border-radius: 20px;
    }
}

.product-detail__short-desc {
    margin: -8px 0 20px;
    font-size: 15px;
    line-height: 1.5;
    color: #8a98a3;
}





.product-detail__image {
    position: relative;
}
.product-detail__badges {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    pointer-events: none;
}
.product-detail__badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .14);
}



.badge-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    color: var(--color-white);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .14);
}


.badge-tag--discount   { background: #e63946; } 
.badge-tag--bestseller { background: #f4a300; } 
.badge-tag--delivery   { background: #2a9d5c; } 
.badge-tag--install    { background: #2f80c4; } 
.badge-tag--default    { background: var(--color-primary); }


.product-detail__image {
    position: relative;
}
.product-detail__badges {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    pointer-events: none;
}


.product-card__image {
    position: relative;
    display: block;
}
.product-card__badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    pointer-events: none;
}
.product-card__badges .badge-tag {
    padding: 4px 10px;
    font-size: 10.5px;
}




.related-products {
    padding-top: 20px;
}
.related-products__title {
    margin-bottom: 24px;
    font-size: 26px;
    font-weight: 800;
    color: var(--color-dark);
}
@media (max-width: 768px) {
    .related-products__title {
        font-size: 21px;
    }
}






/* === Блок отзывов === */
.product-reviews {
    margin-top: 60px;
    padding-top: 50px;
    border-top: 1px solid rgba(5,33,48,0.1);
}
.product-reviews__title {
    margin-bottom: 24px;
    font-size: 28px;
    font-weight: 800;
    color: var(--color-dark);
}

/* Форма отзыва */
.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-dark);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(5,33,48,0.12);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--color-dark);
    outline: none;
    transition: 0.2s ease;
}
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
}
.form-group textarea {
    min-height: 90px;
    resize: vertical;
}
#comment-form-placeholder button[type="submit"],
#comment-form-placeholder .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 24px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: 0.25s ease;
}
#comment-form-placeholder button[type="submit"]:hover,
#comment-form-placeholder .btn:hover {
    background: var(--color-dark);
}
#comment-form-placeholder .error {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #e02424;
}

/* Звёзды в форме — интерактивный выбор оценки */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 4px;
}
.star-rating input {
    display: none;
}
.star-rating label {
    display: inline-block;
    font-size: 24px;
    color: #d6d6d6;
    cursor: pointer;
    margin: 0;
    transition: color 0.15s ease;
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #f5a623;
}

/* Список отзывов */
.review-list {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
}
.review-item {
    padding: 20px 0;
    border-bottom: 1px solid rgba(5,33,48,0.08);
}
.review-item:first-child {
    padding-top: 0;
}
.review-item:last-child {
    border-bottom: none;
}
.review-item__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.review-item__author {
    font-weight: 700;
    font-size: 14px;
    color: var(--color-dark);
}
.review-item__date {
    font-size: 12px;
    color: #8a98a3;
}
.review-item__text {
    font-size: 14px;
    line-height: 1.6;
    color: #5c6b74;
}

/* Звёзды в выводе отзыва — статичное отображение оценки */
.review-stars-display {
    --rating: 0;
    position: relative;
    display: inline-block;
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1;
    color: #e0e0e0;
    letter-spacing: 2px;
}
.review-stars-display::before {
    content: "★★★★★";
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #f5a623;
    width: calc(var(--rating) * 20%);
}

@media (max-width: 576px) {
    .product-reviews {
        margin-top: 40px;
        padding-top: 30px;
    }
    .product-reviews__title {
        font-size: 24px;
    }
    .star-rating label {
        font-size: 22px;
    }
}