/* ════════════════════════════════════════════
   PRODUCT DETAIL PAGE — product-detail.css
   All classes prefixed with `pd-`
   ════════════════════════════════════════════ */

/* ── Page title ── */
.sr__title {
    font-size: 48px;
    font-weight: 700;
    color: #111;
    text-transform: uppercase;
    line-height: normal;
    padding: 30px 50px 24px;
}

/* ════════════════════════════════════════════
   HERO: gallery + info
   ════════════════════════════════════════════ */

.pd-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: #fff;
    border-radius: 20px;
    margin: 0 50px 30px;
    padding: 50px;
}

/* ── Gallery ── */
.pd-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pd-gallery__main {
    border-radius: 20px;
    border: 1px solid #e2e2e2;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.pd-gallery__active-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}

.pd-gallery__thumbs {
    display: flex;
    gap: 14px;
}

.pd-gallery__thumb {
    flex: 1;
    aspect-ratio: 1 / 1;
    border: 1px solid #e2e2e2;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    background: none;
    padding: 0;
    transition: border-color 0.2s;
}

.pd-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pd-gallery__thumb--active,
.pd-gallery__thumb:hover {
    border-color: #ff7d01;
}

/* ── Info panel ── */
.pd-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pd-info__series {
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    color: #111;
    line-height: 1.3;
    margin-bottom: 20px;
}

.pd-info__series-accent {
    color: #ff7d01;
}

.pd-info__desc {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 28px;
}

/* ── Color picker ── */
.pd-colors {
    margin-bottom: 24px;
}

.pd-colors__label {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin-bottom: 12px;
}

.pd-colors__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* Each item is the rounded rectangle container */
.pd-color {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s;
    overflow: hidden;
}

.pd-color:hover {
    border-color: #ccc;
}

.pd-color:has(input:checked) {
    border-color: #ff7d01;
}

.pd-color input[type="radio"] {
    display: none;
}

.pd-color__swatch {
    width: 40px;
    height: 20px;
    border-radius: 2px;
    flex-shrink: 0;
    display: block;
}

.pd-color__code {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Dropdowns ── */
.pd-dropdowns {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    position: relative;
}

.pd-dropdown {
    flex: 1;
    position: relative;
}

.pd-dropdown__btn {
    width: 100%;
    height: 50px;
    border-radius: 10px;
    border: 1px solid #111;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    font-family: 'Sansation', Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #111;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.pd-dropdown--open .pd-dropdown__btn {
    border-color: #ff7d01;
    color: #ff7d01;
}

.pd-dropdown__btn svg {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.pd-dropdown__panel {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    min-width: 270px;
    background: #fff;
    border: 1px solid #efefef;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    padding: 20px;
    z-index: 20;
}

.pd-dropdown__panel[hidden] {
    display: none;
}

/* holes dropdown */
.pd-dropdown__radios {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.pd-dropdown__radio {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    border: 1px solid #dadada;
    border-radius: 5px;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    gap: 6px;
    transition: border-color 0.2s;
}

.pd-dropdown__radio input[type="radio"] { display: none; }

.pd-dropdown__radio--checked,
.pd-dropdown__radio:has(input:checked) {
    border-color: #ff7d01;
    background: #fff5ec;
    color: #666;
}

.pd-dropdown__thumbs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.pd-dropdown__thumbs img {
    flex: 1;
    width: 0;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    border: 0.3px solid #dbdbdb;
}

.pd-dropdown__apply {
    width: 100%;
    height: 35px;
    background: #ff7d01;
    border: none;
    border-radius: 9px;
    font-family: 'Sansation', Arial, sans-serif;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    transition: opacity 0.2s;
}

.pd-dropdown__apply:hover { opacity: 0.88; }

/* coating dropdown */
.pd-dropdown__coat-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pd-coat-item {
    cursor: pointer;
    transition: opacity 0.15s;
}

.pd-coat-item:hover {
    opacity: 0.75;
}

.pd-coat-item__name {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
}

.pd-coat-item--active .pd-coat-item__name {
    color: #ff7d01;
    text-decoration: underline;
}

.pd-coat-item__desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.pd-coat-item--active .pd-coat-item__desc { color: #ff7d01; opacity: 0.76; }

/* ── CTA button ── */
.pd-cta {
    width: 100%;
    height: 87px;
    background: #ff7d01;
    border: none;
    border-radius: 16px;
    font-family: 'Sansation', Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    text-transform: uppercase;
    margin-top: auto;
    transition: opacity 0.2s;
}

.pd-cta:hover { opacity: 0.88; }

/* ════════════════════════════════════════════
   DESCRIPTION + SPECS
   ════════════════════════════════════════════ */

.pd-tabs-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 0 50px 40px;
}

.pd-tab-card {
    background: #fff;
    border-radius: 20px;
    padding: 56px;
    min-height: 512px;
}

.pd-tab-card__title {
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 36px;
}

.pd-tab-card__text {
    font-size: 18px;
    color: #666;
    line-height: 1.7;
}

.pd-specs {
    display: flex;
    flex-direction: column;
}

.pd-specs__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    line-height: 40px;
}

.pd-specs__row dt {
    font-size: 18px;
    color: #666;
    font-weight: 400;
}

.pd-specs__row dd {
    font-size: 18px;
    color: #666;
    text-align: right;
    flex-shrink: 0;
    margin: 0;
}

/* ════════════════════════════════════════════
   SHARED: section header, nav buttons, slider
   ════════════════════════════════════════════ */

.pd-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.pd-section-head__title {
    font-size: 48px;
    font-weight: 700;
    color: #111;
    line-height: 1.1;
}

.pd-section-title {
    font-size: 48px;
    font-weight: 700;
    color: #111;
    margin-bottom: 30px;
}

.pd-section-head__nav {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.pd-nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.pd-nav-btn--dark { background: #222; }
.pd-nav-btn--orange { background: #ff7d01; }
.pd-nav-btn--disabled { opacity: 0.4; cursor: default; }

.pd-slider {
    overflow: hidden;
}

.pd-slider__track {
    display: flex;
    gap: 20px;
    transition: transform 0.35s ease;
}

/* ════════════════════════════════════════════
   КОМПЛЕКТУЮЩИЕ
   ════════════════════════════════════════════ */

.pd-accessories {
    padding: 0 50px 60px;
}

.pd-acc-card {
    flex: 0 0 425px;
    height: 575px;
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.pd-acc-card__link {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 40px;
    height: 40px;
    background: #ff7d01;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transform: rotate(-90deg);
    transition: opacity 0.2s;
    z-index: 1;
}

.pd-acc-card__link:hover { opacity: 0.85; }
.pd-acc-card__link img { width: 14px; height: 14px; }

.pd-acc-card__img {
    flex: 0 0 380px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #e2e2e2;
}

.pd-acc-card__img img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
}

.pd-acc-card__name {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    text-transform: uppercase;
    margin-bottom: 8px;
    line-height: 1.2;
}

.pd-acc-card__desc {
    font-size: 18px;
    color: #666;
    line-height: 1.5;
}

/* ════════════════════════════════════════════
   ДОКУМЕНТАЦИЯ
   ════════════════════════════════════════════ */

.pd-docs {
    background: #fff;
    border-radius: 20px;
    margin: 0 50px 60px;
    padding: 50px;
}

.pd-docs__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

/* Horizontal card: PDF icon left, content right */
.pd-doc-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f4f4f4;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    transition: opacity 0.2s;
    max-width: 300px;
}



.pd-doc-card__icon svg {
    width: 56px;
    height: auto;
    flex-shrink: 0;
}

.pd-doc-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pd-doc-card__name {
    font-size: 14px;
    color: #111;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.pd-doc-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ff7d01;
    color: #fff;
    font-family: 'Sansation', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 6px;
    height: 30px;
    padding: 0 12px;
    width: fit-content;
    flex-shrink: 0;
    text-decoration: none;
}

/* ════════════════════════════════════════════
   ПОХОЖИЕ ПРОДУКТЫ
   ════════════════════════════════════════════ */

.pd-related {
    padding: 0 50px 60px;
}

.pd-rel-card {
    flex: 0 0 425px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid #e2e2e2;
    text-decoration: none;
    color: inherit;
}

.pd-rel-card__img {
    flex: 0 0 425px;
    overflow: hidden;
}

.pd-rel-card__img img {
    width: 100%;
    height: 425px;
    object-fit: cover;
    display: block;
}

.pd-rel-card__link {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #ff7d01;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transform: rotate(-90deg);
    transition: opacity 0.2s;
    z-index: 1;
}

.pd-rel-card__link:hover { opacity: 0.85; }
.pd-rel-card__link img { width: 14px; height: 14px; }

.pd-rel-card__name {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    text-transform: uppercase;
    padding: 20px 24px 28px;
    line-height: 1.3;
}

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */

@media (max-width: 1200px) {
    .pd-hero,
    .pd-tabs-section {
        grid-template-columns: 1fr;
    }

    .pd-hero { padding: 40px 32px; }

    .pd-docs { margin-left: 28px; margin-right: 28px; padding: 36px 28px; }
    /* .pd-docs__grid { grid-template-columns: repeat(3, 1fr); } */

    .pd-acc-card { flex-basis: 360px; }
    .pd-rel-card { flex-basis: 360px; }
}

@media (max-width: 960px) {
    .sr__title { font-size: 36px; padding: 30px 28px 20px; }

    .pd-hero,
    .pd-tabs-section,
    .pd-accessories,
    .pd-docs,
    .pd-related {
        margin-left: 28px;
        margin-right: 28px;
    }

    .pd-accessories,
    .pd-related {
        padding-left: 0;
        padding-right: 0;
    }

    .pd-docs__grid {
        gap: 16px;
    }

    .pd-hero { padding: 32px 24px; margin: 0 28px 24px; }
    .pd-tabs-section { margin: 0 28px 30px; }

    .pd-section-head__title,
    .pd-section-title { font-size: 36px; }

    .pd-tab-card { padding: 36px 28px; min-height: 0; }

    /* .pd-docs__grid { grid-template-columns: repeat(2, 1fr); } */

    .pd-dropdowns { flex-direction: column; }
    .pd-dropdown { flex: none; }
}

@media (max-width: 640px) {
    .sr__title { font-size: 26px; padding: 24px 20px 16px; }

    .pd-hero,
    .pd-tabs-section,
    .pd-accessories,
    .pd-docs,
    .pd-related {
        margin-left: 16px;
        margin-right: 16px;
    }

    .pd-hero { padding: 24px 16px; margin-bottom: 16px; }
    .pd-tabs-section { margin-bottom: 20px; }

    .pd-info__series { font-size: 22px; }
    .pd-cta { height: 64px; font-size: 20px; }

    .pd-section-head__title,
    .pd-section-title { font-size: 28px; }

    .pd-tab-card { padding: 24px 20px; }
    .pd-tab-card__title { font-size: 22px; margin-bottom: 20px; }
    .pd-tab-card__text { font-size: 16px; }

    .pd-specs__row dt,
    .pd-specs__row dd { font-size: 15px; line-height: 36px; }

    .pd-acc-card { flex-basis: 300px; height: 460px; }
    .pd-acc-card__img { flex-basis: 290px; }
    .pd-acc-card__img img { height: 290px; }
    .pd-rel-card { flex-basis: 300px; }
    .pd-rel-card__img { flex-basis: 300px; }
    .pd-rel-card__img img { height: 300px; }
    .pd-rel-card__name { font-size: 17px; padding: 16px 18px 20px; }

    .pd-docs { margin-left: 16px; margin-right: 16px; padding: 24px 16px; }
    .pd-docs__grid { grid-template-columns: 1fr 1fr; }
    .pd-doc-card {width: 100%; max-width: 100%;}
    /* .pd-doc-card__icon { width: 80px; padding: 14px 6px 14px 14px; } */
    /* .pd-doc-card__icon svg { width: 44px; } */

    .pd-colors__grid { gap: 6px; }
    .pd-color { padding: 0 8px; gap: 7px; }
    .pd-color__swatch { width: 28px; height: 16px; }
    .pd-color__code { font-size: 12px; }
}

/* ════════════════════════════════════════════
   МОДАЛКА КП
   ════════════════════════════════════════════ */

.kp-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.kp-modal.is-open {
    display: flex;
}

.kp-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.kp-modal__box {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 48px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.kp-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: #f4f4f4;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.kp-modal__close:hover {
    background: #e8e8e8;
}

.kp-modal__title {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
    margin-bottom: 28px;
    padding-right: 44px;
    text-align: center;
    text-transform: uppercase;
}

.kp-modal__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.kp-modal__field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kp-modal__label {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.kp-modal__input {
    width: 100%;
    height: 60px;
    padding: 0 20px;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    background: #fff;
    font-family: 'Sansation', Arial, sans-serif;
    font-size: 16px;
    color: #111;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.kp-modal__input::placeholder {
    color: #aaa;
}

.kp-modal__input:focus {
    border-color: #ff7d01;
    box-shadow: 0 0 0 3px rgba(255, 125, 1, 0.15);
}

.kp-modal__phone {
    display: flex;
    align-items: center;
    height: 60px;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    background: #fff;
    padding: 0 20px;
    gap: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.kp-modal__phone:focus-within {
    border-color: #ff7d01;
    box-shadow: 0 0 0 3px rgba(255, 125, 1, 0.15);
}

.kp-modal__phone-prefix {
    font-family: 'Sansation', Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #111;
    flex-shrink: 0;
}

.kp-modal__phone-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: 'Sansation', Arial, sans-serif;
    font-size: 16px;
    color: #111;
    outline: none;
    min-width: 0;
}

.kp-modal__phone-input::placeholder {
    color: #aaa;
}

.kp-modal__textarea {
    height: 164px;
    padding: 16px 20px;
    resize: vertical;
    min-height: 100px;
}

.kp-modal__submit {
    width: 100%;
    height: 60px;
    background: #ff7d01;
    border: none;
    border-radius: 16px;
    font-family: 'Sansation', Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    margin-top: 4px;
    transition: opacity 0.2s;
}

.kp-modal__submit:hover {
    opacity: 0.88;
}

.kp-modal__submit.sent {
    background: #3a9e5f;
}

@media (max-width: 600px) {
    .kp-modal__box {
        padding: 32px 20px;
    }

    .kp-modal__title {
        font-size: 22px;
    }

    .kp-modal__input,
    .kp-modal__phone {
        height: 52px;
    }

    .kp-modal__submit {
        height: 52px;
        font-size: 18px;
    }
}
