/*pp_product-modal — поп-ап быстрой покупки в каталоге (Figma 10:64090, 10:64395, 266:143512; моб 10:64709, 10:64743, 266:143817)*/
.pp_product-modal .pp__bg {
    background-color: rgba(34, 29, 30, .3);
    /*шапка с корзиной и меню остаётся видимой и не затемняется*/
    top: var(--product-modal-top, 0px);
}
.pp__content_content_product-modal {
    padding: 0;
    width: clamp(700px, calc(1474 / 1920 * 100vw), 1474px);
    max-width: calc(100vw - 40px);
    height: clamp(600px, calc(772 / 1920 * 100vw), 772px);
    max-height: calc(100vh - 40px);
}
/*десктоп: центрируем в области под шапкой, --product-modal-top ставит product-modal.js*/
@media screen and (min-width: 768px) {
    .pp.pp_product-modal {
        padding-top: var(--product-modal-top, 0px);
        box-sizing: border-box;
    }
    /*снимаем top: 60px из css_styles.css (@media max-width 1800) — иначе padding-top не сдвигает карточку*/
    .pp_product-modal .pp__content {
        top: auto;
    }
    .pp__content_content_product-modal {
        max-height: calc(100vh - var(--product-modal-top, 0px) - 40px);
    }
}
.pp_product-modal .pp__close {
    padding: 0;
    top: clamp(12px, calc(20 / 1920 * 100vw), 20px);
    right: clamp(12px, calc(20 / 1920 * 100vw), 20px);
    width: clamp(20px, calc(24 / 1920 * 100vw), 24px);
    height: clamp(20px, calc(24 / 1920 * 100vw), 24px);
    z-index: 3;
}
.pp_product-modal .close__lane {
    height: 1px;
    background-color: #221D1E;
}
.pp_product-modal .close__lane:nth-child(2) {
    margin-top: -1px;
}
.popup-content_product-modal {
    padding: 0;
    height: 100%;
}
.popup-content_product-modal form {
    height: 100%;
}
.product-modal-wrapper {
    display: flex;
    height: 100%;
}

/*Фото: колонка 700/1474, кадры квадратные (aspect-ratio 1/1), листаются вертикально, следующий выглядывает снизу*/
.product-modal-images {
    position: relative;
    flex-shrink: 0;
    width: calc(700 / 1474 * 100%);
    height: 100%;
    background-color: #fff;
}
.product-modal-images .swiper-container {
    height: 100%;
}
.product-modal-images .swiper-slide {
    height: auto;
    aspect-ratio: 1 / 1;
    /*на низком окне кадр короче колонки на 72/772 — следующее фото всегда выглядывает снизу, как в макете*/
    max-height: calc(700 / 772 * 100%);
    overflow: hidden;
}
.product-modal-images .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/*Стрелок на фото нет: курсор над верхней/нижней половиной колонки превращается в стрелку, клик листает*/
.product-modal-images .product-prev,
.product-modal-images .product-next {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 2;
    height: 50%;
}
.product-modal-images .product-prev {
    top: 0;
    cursor: url("data:image/svg+xml,%3Csvg width='14' height='31' viewBox='0 0 14 31' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.7704 29.9222C5.7704 30.423 6.17636 30.829 6.67713 30.829C7.17791 30.829 7.58387 30.423 7.58387 29.9222L6.67713 29.9222L5.7704 29.9222ZM7.31829 0.265575C6.96419 -0.088525 6.39008 -0.088525 6.03598 0.265575L0.265575 6.03598C-0.088525 6.39008 -0.088525 6.96418 0.265575 7.31828C0.619675 7.67238 1.19378 7.67238 1.54788 7.31828L6.67714 2.18898L11.8064 7.31827C12.1605 7.67237 12.7346 7.67237 13.0887 7.31827C13.4428 6.96417 13.4428 6.39008 13.0887 6.03598L7.31829 0.265575ZM6.67713 29.9222L7.58387 29.9222L7.58387 0.906675L6.67714 0.906675L5.7704 0.906675L5.7704 29.9222L6.67713 29.9222Z' fill='%234E4A4B'/%3E%3C/svg%3E") 7 15, pointer;
}
.product-modal-images .product-next {
    bottom: 0;
    cursor: url("data:image/svg+xml,%3Csvg width='14' height='31' viewBox='0 0 14 31' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.58398 0.906738C7.58398 0.405962 7.17802 2.46568e-06 6.67725 2.44379e-06C6.17647 2.4219e-06 5.77051 0.405962 5.77051 0.906738L6.67725 0.906738L7.58398 0.906738ZM6.03609 30.5634C6.39019 30.9175 6.9643 30.9175 7.3184 30.5634L13.0888 24.793C13.4429 24.4389 13.4429 23.8648 13.0888 23.5107C12.7347 23.1566 12.1606 23.1566 11.8065 23.5107L6.67724 28.64L1.54797 23.5107C1.19387 23.1566 0.619757 23.1566 0.265655 23.5107C-0.0884481 23.8648 -0.0884481 24.4389 0.265654 24.793L6.03609 30.5634ZM6.67725 0.906738L5.77051 0.906738L5.77051 29.9223L6.67724 29.9223L7.58398 29.9223L7.58398 0.906738L6.67725 0.906738Z' fill='%234E4A4B'/%3E%3C/svg%3E") 7 15, pointer;
}
.product-modal-images .product-prev.swiper-button-disabled,
.product-modal-images .product-next.swiper-button-disabled {
    display: none;
}
.product-modal-images .swiper-pagination {
    display: none;
}

/*Инфо: 614/1474, отступ от фото 64, справа 96, по центру по вертикали*/
.product-modal-info {
    flex: 1;
    min-width: 0;
    padding: clamp(32px, calc(48 / 1920 * 100vw), 48px)
             clamp(40px, calc(96 / 1920 * 100vw), 96px)
             clamp(32px, calc(48 / 1920 * 100vw), 48px)
             clamp(24px, calc(64 / 1920 * 100vw), 64px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    color: #221D1E;
    /*компоновка по высоте колонки — @container product-modal-info ниже*/
    container: product-modal-info / size;
}
.product-modal-info-wrapper {
    width: 100%;
    margin: auto 0;
}
.product-modal-promocode {
    display: inline-flex;
    align-items: center;
    height: clamp(20px, calc(24 / 1920 * 100vw), 24px);
    padding: 0 clamp(8px, calc(16 / 1920 * 100vw), 16px);
    margin-bottom: clamp(10px, calc(16 / 1920 * 100vw), 16px);
    background-color: #4F6FC1;
    color: #FFFFFF;
    font-weight: 500;
    font-size: clamp(14px, calc(16 / 1920 * 100vw), 16px);
    line-height: 1;
    text-transform: uppercase;
}
.product-modal-title {
    margin-bottom: clamp(16px, calc(32 / 1920 * 100vw), 32px);
    font-weight: 300;
    font-size: clamp(20px, calc(28 / 1920 * 100vw), 28px);
    line-height: 1.5;
    text-transform: uppercase;
}
.product-modal-title b {
    font-weight: 500;
}
.product-modal-desc {
    margin-bottom: clamp(24px, calc(64 / 1920 * 100vw), 64px);
    font-weight: 300;
    font-size: clamp(14px, calc(16 / 1920 * 100vw), 16px);
    line-height: 1.5;
}
.product-modal-desc a {
    color: #4F6FC1;
}
.product-modal-desc a:hover {
    text-decoration: underline;
}

.product-modal-price {
    margin-bottom: clamp(24px, calc(64 / 1920 * 100vw), 64px);
}
.product-modal-price .price {
    display: flex;
    align-items: baseline;
    gap: clamp(10px, calc(16 / 1920 * 100vw), 16px);
    font-weight: 300;
    font-size: clamp(20px, calc(28 / 1920 * 100vw), 28px);
    line-height: 1.5;
    text-transform: uppercase;
}
.product-modal-price .old-price {
    position: relative;
    order: 1;
    font-size: clamp(14px, calc(18 / 1920 * 100vw), 18px);
    line-height: 1;
    color: #221D1E;
}
.product-modal-price .old-price:before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    margin: auto;
    background-color: #221D1E;
}
.product-modal-price .old-price:not([hidden]) + .new-price {
    color: #ff4f72;
}
.product-modal-price .old-price.hidden {
    display: none;
}
.product-modal-price .separate-payments {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 300;
    font-size: clamp(14px, calc(16 / 1920 * 100vw), 16px);
    line-height: 1.5;
    color: #4F6FC1;
}
.product-modal-price .separate-payments svg {
    flex-shrink: 0;
    width: 18px;
}
/*«i» открывает условия оплаты частями (.pp__parts-modal) поверх поп-апа товара — product-modal.js*/
.product-modal-price .separate-payments {
    cursor: pointer;
}
.pp.pp__parts-modal.show {
    z-index: 101;
}

/*Опции: свотчи 28, кольцо выбранного 36, ошибка «Выберите цвет» под свотчами поверх отступа — кнопка не сдвигается*/
.product-modal-colors-sizes {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, calc(32 / 1920 * 100vw), 32px);
    margin-bottom: clamp(24px, calc(64 / 1920 * 100vw), 64px);
}
.product-modal-colors,
.product-modal-sizes {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.product-modal-colors input,
.product-modal-sizes input {
    display: none;
}
.product-modal-color {
    position: relative;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #BCBDC2;
    border-radius: 50%;
    cursor: pointer;
}
.product-modal-color:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    border: 1px solid #221D1E;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity .3s;
}
input[type=radio]:checked + .product-modal-color:before,
.product-modal-color.active:before {
    opacity: 1;
}
.product-modal-error {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    font-weight: 300;
    font-size: clamp(14px, calc(16 / 1920 * 100vw), 16px);
    line-height: 1.25;
    color: #FF4F72;
    white-space: nowrap;
}
.pp_product-modal.has-error .product-modal-colors .product-modal-error,
.pp_product-modal.has-error-size .product-modal-sizes .product-modal-error {
    display: block;
}
.product-modal-size {
    display: flex;
    align-items: center;
    height: clamp(30px, calc(36 / 1920 * 100vw), 36px);
    padding: 0 clamp(10px, calc(14 / 1920 * 100vw), 14px);
    border: 1px solid #BCBDC2;
    border-radius: 24px;
    background-color: #fff;
    font-weight: 300;
    font-size: clamp(14px, calc(16 / 1920 * 100vw), 16px);
    line-height: 1.5;
    cursor: pointer;
}
input[type=radio]:checked + .product-modal-size,
.product-modal-size.active {
    border-color: #221D1E;
}

/*Кнопка «добавить» 180×40 и счётчик 190×40 на её месте после добавления;
  если колонке всё же не хватит высоты — кнопка прилипает к низу и не уходит из вида*/
.product-modal-buttons {
    position: sticky;
    bottom: 0;
    z-index: 1;
    display: flex;
    background-color: #fff;
}
.product-modal-buttons .product-modal-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: clamp(34px, calc(40 / 1920 * 100vw), 40px);
    padding: 0 32px;
    border: 0;
    border-radius: 24px;
    background: linear-gradient(to top right, #FDD1DB 6%, #AABBE7 99%);
    color: #221D1E;
    font-weight: 500;
    font-size: clamp(14px, calc(16 / 1920 * 100vw), 16px);
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
}
.product-modal-buttons .product-modal-add:before {
    display: none;
}
.product-modal-buttons .product-modal-add svg {
    flex-shrink: 0;
    width: clamp(20px, calc(24 / 1920 * 100vw), 24px);
    height: auto;
    margin: 0;
}
.product-modal-counter {
    display: none;
    height: clamp(34px, calc(40 / 1920 * 100vw), 40px);
    border: 1px solid #EAEDFF;
    border-radius: 22px;
    overflow: hidden;
}
.pp_product-modal.is-added .product-modal-add {
    display: none;
}
.pp_product-modal.is-added .product-modal-counter {
    display: inline-flex;
}
.product-modal-counter .decrement,
.product-modal-counter .increment {
    width: 50px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px;
    cursor: pointer;
}
.product-modal-counter .decrement {
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='3' y1='8.5' x2='15' y2='8.5' stroke='%23221D1E'/%3E%3C/svg%3E");
}
.product-modal-counter .increment {
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='3' y1='8.5' x2='14' y2='8.5' stroke='%23221D1E'/%3E%3Cline x1='8.5' y1='3' x2='8.5' y2='14' stroke='%23221D1E'/%3E%3C/svg%3E");
}
.product-modal-counter input {
    width: 90px;
    height: 100%;
    padding: 0;
    border: solid #EAEDFF;
    border-width: 0 1px;
    text-align: center;
    color: #221D1E;
    font-weight: 500;
    font-size: clamp(14px, calc(16 / 1920 * 100vw), 16px);
    -moz-appearance: textfield;
}
.product-modal-counter input::-webkit-outer-spin-button,
.product-modal-counter input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/*Мобильный: полноэкранная панель под шапкой, фото сверху, содержимое прокручивается внутри*/
/*Невысокое окно (ноутбук 1280×615, 1366×657): ужимаем вертикальные отступы, чтобы всё влезло без прокрутки*/
@media screen and (min-width: 768px) and (max-height: 800px) {
    .product-modal-info {
        padding-top: 20px;
        padding-bottom: 20px;
    }
}
@container product-modal-info (max-height: 620px) {
    .product-modal-promocode {
        margin-bottom: 10px;
    }
    .product-modal-title {
        margin-bottom: 12px;
        line-height: 1.3;
    }
    .product-modal-desc,
    .product-modal-price {
        margin-bottom: 20px;
    }
    .product-modal-colors-sizes {
        gap: 24px;
        margin-bottom: 28px;
    }
}
@container product-modal-info (max-height: 560px) {
    .product-modal-desc,
    .product-modal-price {
        margin-bottom: 16px;
    }
}
@container product-modal-info (max-height: 450px) {
    .product-modal-title {
        font-size: 20px;
    }
    .product-modal-colors-sizes {
        gap: 20px;
        margin-bottom: 24px;
    }
}
@media screen and (max-width: 767px) {
    /*на мобильном — под шапкой (sticky, остаётся видимой, корзина в ней обновляется), --product-modal-top ставит product-modal.js*/
    .pp.pp_product-modal {
        top: var(--product-modal-top, 0px);
        height: calc(100% - var(--product-modal-top, 0px));
        background-color: #fff;
    }
    .pp_product-modal .pp__content,
    .product-modal-info {
        overscroll-behavior: contain;
    }
    .pp_product-modal .pp__content {
        top: 0;
        margin-bottom: 0;
        transform: translateX(100%);
    }
    .pp_product-modal.show .pp__content {
        transform: translateX(0%);
    }
    .pp__content_content_product-modal {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: none;
    }
    /*вместо крестика — ссылка «вернуться» со стрелкой, без фона и рамки, как .product-card__back (область нажатия 44 px по высоте)*/
    .pp_product-modal .pp__close {
        top: 12px;
        left: 10px;
        right: auto;
        width: auto;
        height: 44px;
        padding: 0 10px;
        display: flex;
        flex-direction: row;
        white-space: nowrap;
        align-items: center;
        gap: 8px;
        font-weight: 300;
        font-size: 14px;
        line-height: 1;
        color: #4E4A4B;
        text-transform: lowercase;
    }
    .pp_product-modal .pp__close:before {
        content: "";
        width: 18px;
        height: 12px;
        background: url("data:image/svg+xml,%3Csvg width='18' height='12' viewBox='0 0 18 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 6H1M1 6L6 1M1 6L6 11' stroke='%23221D1E'/%3E%3C/svg%3E") no-repeat center;
    }
    .pp_product-modal .pp__close:after {
        content: "Вернуться";
    }
    .pp_product-modal .close__lane {
        display: none;
    }
    .popup-content_product-modal {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .popup-content_product-modal form {
        height: auto;
    }
    .product-modal-wrapper {
        flex-direction: column;
        height: auto;
    }
    .product-modal-images {
        width: 100%;
        height: auto;
    }
    .product-modal-images .product-prev,
    .product-modal-images .product-next {
        display: none;
    }
    .product-modal-images .swiper-pagination {
        display: flex;
        gap: 10px;
        left: 10px;
        bottom: 16px;
        width: auto;
    }
    .product-modal-images .swiper-pagination .swiper-pagination-bullet {
        width: 4px;
        height: 4px;
        margin: 0;
        border-radius: 0;
        background-color: #fff;
        opacity: .5;
        transition: width .3s ease-in-out;
    }
    .product-modal-images .swiper-pagination .swiper-pagination-bullet-active {
        width: 12px;
        opacity: 1;
    }
    .product-modal-info {
        padding: 16px 10px 0;
        overflow: visible;
        container: none;
    }
    /*как у sleepandglow: кнопка в потоке после свотчей, не прилипает к низу, прокручивается вместе с содержимым*/
    .product-modal-buttons {
        position: static;
        padding: 0 0 24px;
    }
    .product-modal-promocode {
        height: 21px;
        padding: 0 8px;
        margin-bottom: 10px;
        font-size: 14px;
    }
    .product-modal-title {
        margin-bottom: 10px;
        font-size: 18px;
    }
    .product-modal-desc,
    .product-modal-price .separate-payments,
    .product-modal-error,
    .product-modal-size {
        font-size: 14px;
    }
    .product-modal-desc,
    .product-modal-price,
    .product-modal-colors-sizes {
        margin-bottom: 24px;
    }
    .product-modal-colors-sizes {
        gap: 24px;
    }
    .product-modal-price .price {
        font-size: 18px;
    }
    .product-modal-price .old-price {
        font-size: 14px;
    }
    .product-modal-buttons .product-modal-add {
        height: 29px;
        padding: 0 16px;
        font-size: 14px;
    }
    .product-modal-buttons .product-modal-add svg {
        width: 18px;
    }
    .product-modal-counter {
        height: 29px;
        border-radius: 18px;
    }
    .product-modal-counter .decrement,
    .product-modal-counter .increment {
        width: 44px;
        background-size: 12px;
    }
    .product-modal-counter input {
        width: 77px;
        font-size: 14px;
    }
}
/*pp_product-modal*/

/* Подключение на боевом сайте (QW 2611-162): недоступные варианты, предзаказ, ошибка группы (класс has-error на самой группе), скрытые элементы */
.pp_product-modal [hidden] {
    display: none !important;
}
.pp_product-modal input[type=radio]:disabled + .product-modal-color,
.pp_product-modal input[type=radio]:disabled + .product-modal-size,
.pp_product-modal .product-modal-color.is-unavailable,
.pp_product-modal .product-modal-size.is-unavailable {
    opacity: .35;
    cursor: not-allowed;
    position: relative;
}
.pp_product-modal .product-modal-color.is-unavailable:after,
.pp_product-modal .product-modal-size.is-unavailable:after {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    top: 50%;
    border-top: 1px solid #4E4A4B;
    transform: rotate(-45deg);
    pointer-events: none;
}
.pp_product-modal .product-modal-preorder {
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.4;
    color: #4E4A4B;
}
.pp_product-modal .product-modal-colors.has-error .product-modal-error,
.pp_product-modal .product-modal-sizes.has-error .product-modal-error {
    display: block;
}
.pp_product-modal .product-modal-add.is-pending {
    opacity: .6;
    pointer-events: none;
}
