/* ============================================================
   Выдвижная панель выбора материала и параметров.
   Разметку собирает скрипт js/custom.js, поэтому имена классов
   здесь заданы им и менять их нельзя.
   ============================================================ */

.popup_color {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100050;
    display: none;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.popup_color.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* затемнение позади панели — щелчок по нему закрывает окно */
.popup_color .popup_overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

/* сама панель выезжает справа */
.popup_color .popup_content {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    box-sizing: border-box;
    width: 600px;
    max-width: 50%;
    height: 100%;
    padding: 30px 32px 40px;
    background: #fff;
    box-shadow: -6px 0 35px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.popup_color.active .popup_content {
    transform: translateX(0);
}

.popup_color .popup_close_btn {
    position: absolute;
    top: 20px;
    right: 22px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #f1f3f5;
    color: #495057;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}

.popup_color .popup_close_btn:hover {
    background: #e9ecef;
    color: #000;
    transform: scale(1.08);
}

.popup_color .popup_loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    color: #6c757d;
    font-size: 14px;
}

/* заголовок панели и выбор раздела внутри неё */
.popup_color .product-card__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding-right: 40px;
    padding-bottom: 14px;
    border-bottom: 1px solid #edf2f7;
}

.popup_color .product-card__title strong {
    color: #1a202c;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.popup_color .product-card__title .js-popupSection {
    max-width: 270px;
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #f8fafc;
    color: #334155;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}

.popup_color .product-card__title .js-popupSection:focus {
    border-color: #ffb800;
}

@media (max-width: 991.98px) {
    .popup_color .popup_content {
        width: 520px;
        max-width: 85%;
        padding: 24px 20px 30px;
    }
}

@media (max-width: 575.98px) {
    .popup_color .popup_content {
        width: 100%;
        max-width: 100%;
        padding: 20px 16px 30px;
    }
}
