/**
 * QP Configurator v2.0 — Стили конфигуратора ПК
 */

/* === Основной контейнер === */
#qp-configurator {
    max-width: 1200px;
    margin: 24px auto;
    padding: 24px;
    padding-bottom: 0;
    font-family: inherit;
    background: #6969691F;
    border-radius: 16px;
    color: #fff;
}

/* Wrapper для Elementor — заливаем всю ширину тёмным фоном */
.qp-configurator-wrapper {
    background: #0d0d1a;
}

/* === Двухколоночный layout (десктоп) === */
.qp-cfg-columns {
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .qp-cfg-columns {
        flex-direction: row;
        gap: 24px;
        align-items: flex-start;
    }

    .qp-cfg-col-left {
        flex: 1 1 58%;
        min-width: 0;
    }

    .qp-cfg-col-right {
        flex: 0 0 40%;
        position: sticky;
        top: 24px;
        align-self: flex-start;
    }
}

/* === Левая колонка — картинка выбранного компонента === */
.qp-cfg-col-image {
    display: none; /* На мобайле скрыта */
}

@media (min-width: 1025px) {
    .qp-cfg-col-image {
        display: block;
        flex: 0 0 26%;
        position: sticky;
        top: 130px;
        align-self: flex-start;
        z-index: 10;
    }
}

/* === Стек карточек выбранных компонентов === */
.qp-cfg-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    padding: 14px;
    box-sizing: border-box;
}

.qp-cfg-stack-card {
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.qp-cfg-stack-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
}

.qp-cfg-stack-card--expanded {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
}

/* Заголовок карточки (всегда виден) */
.qp-cfg-stack-card__head,
.qp-cfg-stack-card__head:hover,
.qp-cfg-stack-card__head:focus,
.qp-cfg-stack-card__head:focus-visible,
.qp-cfg-stack-card__head:active {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 14px;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    text-align: left;
    color: #fff !important;
    transition: background 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    text-decoration: none;
    transform: none !important;
}

.qp-cfg-stack-card--expanded .qp-cfg-stack-card__head {
    cursor: default;
}

.qp-cfg-stack-card__head-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.qp-cfg-stack-card__category {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.qp-cfg-stack-card__name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Тело карточки — раскрывается по max-height */
.qp-cfg-stack-card__body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.2s ease;
    padding: 0 12px;
}

.qp-cfg-stack-card--expanded .qp-cfg-stack-card__body {
    max-height: 600px;
    opacity: 1;
    padding: 0 12px 14px;
}

.qp-cfg-stack-card__media {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.qp-cfg-stack-card__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.qp-cfg-stack-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.qp-cfg-stack-card__placeholder-icon {
    font-size: 56px;
    color: rgba(255, 255, 255, 0.25);
}

.qp-cfg-stack-card__desc {
    font-size: 12px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 10px;
    white-space: pre-line;
}

.qp-cfg-stack-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
}

.qp-cfg-stack-card__price {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: rgba(148, 21, 21, 0.85);
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

.qp-cfg-stack-card__badge {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

/* === Десктоп: секции с обычным аккордеоном (кликабельный header) === */
@media (min-width: 1025px) {
    .qp-cfg-section {
        margin-bottom: 18px;
        scroll-margin-top: 130px;
    }
}

/* === Ошибка === */
.qp-cfg-error {
    background: #ff4444;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    animation: qp-fade-in 0.3s ease;
}

/* === Секция компонента (аккордеон) === */
.qp-cfg-section {
    margin-bottom: 16px;
}

.qp-cfg-section__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    margin-bottom: 0;
    cursor: pointer;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease, border-color 0.2s ease;
    user-select: none;
}

.qp-cfg-section__header:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.qp-cfg-section--open > .qp-cfg-section__header {
    border-radius: 10px 10px 0 0;
    border-bottom-color: transparent;
    background: rgba(255, 255, 255, 0.05);
}

.qp-cfg-section__icon {
    font-size: 20px;
    flex-shrink: 0;
}

.qp-cfg-section__title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.8);
}

/* Выбранный компонент в свёрнутом заголовке */
.qp-cfg-section__summary {
    margin-left: auto;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
    transition: opacity 0.2s ease;
}

.qp-cfg-section--open > .qp-cfg-section__header > .qp-cfg-section__summary {
    opacity: 0;
    pointer-events: none;
}

/* Стрелка-индикатор */
.qp-cfg-section__arrow {
    flex-shrink: 0;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.qp-cfg-section--open > .qp-cfg-section__header > .qp-cfg-section__arrow {
    transform: rotate(180deg);
}

/* === Контент секции (сворачиваемый) === */
.qp-cfg-section__body {
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    max-height: 0;
    opacity: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: rgba(255, 255, 255, 0.02);
}

.qp-cfg-section--open > .qp-cfg-section__body {
    opacity: 1;
}

.qp-cfg-section__body-inner {
    padding: 8px 8px 10px;
}

/* === Опция (radio-карточка) === */
.qp-cfg-section__options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Wrapper строки опции (содержит .qp-cfg-option и preview под ней) */
.qp-cfg-option-row {
    display: block;
}

.qp-cfg-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}

.qp-cfg-option-row--previewing > .qp-cfg-option {
    border-color: rgba(148, 21, 21, 0.6);
    background: rgba(148, 21, 21, 0.1);
}

/* Preview-блок под опцией (раскрывается при клике) */
.qp-cfg-option__preview {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
}

.qp-cfg-option-preview__inner {
    padding: 14px 16px 16px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: none;
    border-radius: 0 0 10px 10px;
    margin-top: -1px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 1025px) {
    .qp-cfg-option-preview__inner {
        flex-direction: row;
        align-items: stretch;
        gap: 16px;
    }
}

.qp-cfg-option-preview__media {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    max-width: 320px;
}

@media (min-width: 1025px) {
    .qp-cfg-option-preview__media {
        flex: 0 0 40%;
        max-width: none;
        margin: 0;
        align-self: flex-start;
    }
}

.qp-cfg-option-preview__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 1025px) {
    .qp-cfg-option-preview__body {
        flex: 1 1 60%;
        min-width: 0;
    }
}

.qp-cfg-option-preview__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.qp-cfg-option-preview__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.qp-cfg-option-preview__placeholder-icon {
    font-size: 56px;
    color: rgba(255, 255, 255, 0.25);
}

.qp-cfg-option-preview__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
}

.qp-cfg-option-preview__badge {
    font-size: 11px;
    font-weight: 700;
    color: #69f0ae;
    background: rgba(0, 200, 83, 0.2);
    border: 1px solid rgba(0, 200, 83, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    box-shadow: none;
}

.qp-cfg-option-preview__desc {
    font-size: 12px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.75);
    white-space: pre-line;
    flex: 1 1 auto;
}

.qp-cfg-option-preview__btn,
.qp-cfg-option-preview__btn:hover,
.qp-cfg-option-preview__btn:focus,
.qp-cfg-option-preview__btn:focus-visible,
.qp-cfg-option-preview__btn:active {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 12px 16px !important;
    margin: 0 !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    font-style: normal !important;
    line-height: 1.4 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    text-align: center !important;
    text-decoration: none !important;
    color: #fff !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 1px solid #fff !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: background-color 0.18s ease, transform 0.18s ease !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transform: none !important;
}

.qp-cfg-option-preview__btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    background-color: rgba(255, 255, 255, 0.12) !important;
    transform: translateY(-1px) !important;
}

.qp-cfg-option-preview__btn:active {
    background: rgba(255, 255, 255, 0.2) !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    transform: none !important;
}

.qp-cfg-option-preview__btn--committed,
.qp-cfg-option-preview__btn:disabled {
    background: rgba(76, 175, 80, 0.18) !important;
    border-color: rgba(76, 175, 80, 0.45) !important;
    color: #4caf50 !important;
    cursor: default !important;
    transform: none !important;
}

.qp-cfg-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(148, 21, 21, 0.4);
}

.qp-cfg-option--selected {
    background: rgba(148, 21, 21, 0.12);
    border-color: #941515;
    box-shadow: 0 0 0 1px rgba(148, 21, 21, 0.3);
}

.qp-cfg-option--disabled {
    display: none !important;
}

/* Radio скрыт */
.qp-cfg-option__radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Кастомный чек */
.qp-cfg-option__check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}

.qp-cfg-option--selected .qp-cfg-option__check {
    border-color: #941515;
    background: #941515;
}

.qp-cfg-option--selected .qp-cfg-option__check::after {
    content: '';
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Название */
.qp-cfg-option__name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Бейдж DDR4/DDR5 */
.qp-cfg-option__badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.qp-cfg-option__badge--ddr4 {
    background: rgba(255, 152, 0, 0.2);
    color: #ffb74d;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.qp-cfg-option__badge--ddr5 {
    background: rgba(0, 200, 83, 0.2);
    color: #69f0ae;
    border: 1px solid rgba(0, 200, 83, 0.3);
}

/* === Карточки корпусов (платформ) === */
.qp-cfg-platforms {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.qp-cfg-platform-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.qp-cfg-platform-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(148, 21, 21, 0.4);
}

.qp-cfg-platform-card--selected {
    border-color: #941515;
    background: rgba(148, 21, 21, 0.12);
    box-shadow: 0 0 0 1px rgba(148, 21, 21, 0.3);
}

.qp-cfg-platform-card--disabled {
    display: none !important;
}

.qp-cfg-platform-card__radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.qp-cfg-platform-card__img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background: rgba(255, 255, 255, 0.02);
}

.qp-cfg-platform-card__img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: rgba(255, 255, 255, 0.02);
}

.qp-cfg-platform-card__info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.qp-cfg-platform-card__name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-align: center;
}

/* Правая колонка — только секции выбора */
.qp-cfg-col-right {
    display: flex;
    flex-direction: column;
}

/* === Кнопки (общие стили, используются в sticky bar) === */
.qp-cfg-total__btn {
    display: block;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.qp-cfg-total__btn--consult {
    background: transparent !important;
    color: #FFFFFF !important;
    border: 1px solid #BBBBBB !important;
}

.qp-cfg-total__btn--consult:hover {
    background: #941515 !important;
    border-color: #941515 !important;
    color: #FFFFFF !important;
    transform: translateY(-1px);
}

.qp-cfg-total__btn--order {
    background: #941515 !important;
    color: #FFFFFF !important;
    border: 1px solid #BBBBBB !important;
}

.qp-cfg-total__btn--order:hover {
    background: #FFFFFF !important;
    color: #000000 !important;
    border-color: #BBBBBB !important;
    transform: translateY(-1px);
}

.qp-cfg-total__btn:active {
    transform: translateY(0);
}

.qp-cfg-total__btn:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

/* === Sidebar (десктоп) — правая панель конфигурации === */
.qp-cfg-sidebar {
    display: none;
}

@media (min-width: 1025px) {
    .qp-cfg-sidebar {
        display: block;
        flex: 0 0 36%;
        position: relative;
        z-index: 50;
    }

    /* Правая колонка скрыта на десктопе — все секции в левой колонке */
    .qp-cfg-col-right {
        display: none;
    }

    /* Центральная колонка с аккордеоном */
    .qp-cfg-col-left {
        flex: 1 1 60% !important;
        min-width: 0;
    }

    /* Sidebar растягивается на высоту левой колонки для JS-sticky */
    .qp-cfg-columns {
        align-items: stretch;
    }
}

.qp-cfg-sidebar__inner {
    padding: 20px;
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.qp-cfg-sidebar__close {
    position: absolute;
    top: 12px;
    right: 16px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    line-height: 1;
    transition: color 0.2s;
    z-index: 2;
    display: none; /* Sidebar всегда открыт на десктопе, крестик не нужен */
}

.qp-cfg-sidebar__close:hover {
    color: #fff;
}

.qp-cfg-sidebar__title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.qp-cfg-sidebar__components {
    margin-bottom: 16px;
}

/* Каждый компонент — категория сверху, значение снизу */
.qp-cfg-sidebar__item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.qp-cfg-sidebar__item:last-child {
    border-bottom: none;
}

.qp-cfg-sidebar__item-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.qp-cfg-sidebar__item-value {
    font-size: 14px;
    font-weight: 400;
    color: #fff;
}

.qp-cfg-sidebar__price {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.qp-cfg-sidebar__price-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.qp-cfg-sidebar__price-value {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
}

.qp-cfg-sidebar__buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qp-cfg-sidebar__buttons .qp-cfg-total__btn {
    width: 100%;
    text-align: center;
}

/* === FPS Widget === */
.qp-cfg-sidebar__fps {
    margin-bottom: 12px;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.qp-fps__title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    margin-bottom: 12px;
}

.qp-fps__dlss-row {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    padding-top: 8px;
    margin-left: 50%;
}

.qp-fps__dlss {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.qp-fps__dlss-state {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3);
    transition: color 0.2s;
}

.qp-fps__dlss-input:checked ~ .qp-fps__dlss-on {
    color: #00e676;
}

.qp-fps__dlss-input:not(:checked) ~ .qp-fps__dlss-off {
    color: #00d9ff;
}

.qp-fps__dlss-input {
    display: none;
}

.qp-fps__dlss-track {
    position: relative;
    width: 32px;
    height: 18px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 9px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.qp-fps__dlss-input:checked + .qp-fps__dlss-track {
    background: #00e676;
}

.qp-fps__dlss-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.qp-fps__dlss-input:checked + .qp-fps__dlss-track .qp-fps__dlss-thumb {
    transform: translateX(14px);
}

.qp-fps__gauges {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.qp-fps__gauge {
    flex: 1;
    text-align: center;
    position: relative;
}

.qp-fps__svg {
    width: 100%;
    max-width: 110px;
    display: block;
    margin: 0 auto;
}

.qp-fps__arc {
    transition: stroke-dasharray 0.4s ease, stroke 0.4s ease;
}

.qp-fps__value {
    font-size: 22px;
    font-weight: 800;
    margin-top: -8px;
    line-height: 1;
    transition: color 0.4s ease;
}

.qp-fps__label {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-top: 4px;
}

.qp-fps__hint {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 2px;
    line-height: 1.3;
}

/* FPS per-gauge details */
.qp-fps__more {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: opacity 0.2s;
    opacity: 0.7;
}

.qp-fps__more:hover {
    opacity: 1;
}

.qp-fps__more--active {
    opacity: 1;
}

.qp-fps__details {
    display: none;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 6px;
}

.qp-fps__details--open {
    display: block;
}

.qp-fps__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}

.qp-fps__row-name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
}

.qp-fps__row-value {
    font-size: 13px;
    font-weight: 700;
}

.qp-fps__disclaimer {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.815);
    margin-top: 10px;
    text-align: center;
}

/* FPS in sticky bar (mobile) */
.qp-cfg-sticky-bar__fps {
    padding: 10px 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

.qp-cfg-sticky-bar__fps .qp-fps {
    padding: 0 0 8px;
    border-top: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.qp-cfg-sticky-bar__fps .qp-fps__svg {
    max-width: 80px;
}

.qp-cfg-sticky-bar__fps .qp-fps__value {
    font-size: 18px;
    margin-top: -6px;
}

.qp-cfg-sticky-bar__fps .qp-fps__label {
    font-size: 12px;
}

.qp-cfg-sticky-bar__fps .qp-fps__hint {
    font-size: 9px;
}

.qp-cfg-sticky-bar__fps .qp-fps__title {
    font-size: 10px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Кликабельный заголовок со стрелкой (мобайл sticky) */
.qp-fps__title--toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.qp-fps__title-arrow {
    font-size: 16px;
    line-height: 1;
    transition: transform 0.2s ease;
    opacity: 0.85;
}

/* Свёрнутое состояние на мобайле */
.qp-cfg-sticky-bar__fps--collapsed .qp-fps__content {
    display: none;
}

.qp-cfg-sticky-bar__fps--collapsed .qp-fps__title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.qp-cfg-sticky-bar__fps--collapsed {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 10px;
}

.qp-cfg-sticky-bar__fps:not(.qp-cfg-sticky-bar__fps--collapsed) .qp-fps__title-arrow {
    transform: rotate(180deg);
}

/* === Sticky bar === */
.qp-cfg-sticky-bar {
    z-index: 100;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6);
    margin: 24px 0 0;
    border-radius: 16px;
}

/* Скрыть бар когда sidebar открыт */
.qp-cfg-sticky-bar--hidden {
    display: none !important;
}

/* Кнопка раскрытия sidebar */
.qp-cfg-sticky-bar__expand {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    transition: background 0.2s;
}

.qp-cfg-sticky-bar__expand:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Скрыть expand — больше не нужна (sidebar всегда открыт на десктопе) */
.qp-cfg-sticky-bar__expand {
    display: none;
}

/* Скрыть sticky bar на десктопе — кнопки в sidebar */
@media (min-width: 1025px) {
    .qp-cfg-sticky-bar,
    .qp-cfg-sticky-bar__placeholder {
        display: none !important;
    }
}

/* Когда бар зафиксирован внизу экрана */
.qp-cfg-sticky-bar--fixed {
    position: fixed;
    bottom: 8px;
    margin: 0;
}

/* Плейсхолдер чтобы контент не прыгал когда бар становится fixed */
.qp-cfg-sticky-bar__placeholder {
    display: none;
}

.qp-cfg-sticky-bar__placeholder--active {
    display: block;
}

.qp-cfg-sticky-bar__inner {
    padding: 16px 24px;
}

.qp-cfg-sticky-bar__toggle-arrow {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
}

/* Таблица компонентов в sticky bar */
.qp-cfg-sticky-bar__table {
    width: 100%;
    border-collapse: collapse;
}

.qp-cfg-sticky-bar__table tr + tr {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.qp-cfg-sticky-bar__table td {
    padding: 4px 0;
}

.qp-cfg-sticky-bar__table-label {
    color: #fff;
    font-weight: 400;
    font-size: 13px;
    white-space: nowrap;
    padding-right: 12px;
    width: 1%;
}

.qp-cfg-sticky-bar__table-value {
    color: #fff;
    font-weight: 400;
    font-size: 14px;
    text-align: right;
}

/* Нижняя часть: цена + кнопки */
.qp-cfg-sticky-bar__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.qp-cfg-sticky-bar__price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-shrink: 0;
}

.qp-cfg-sticky-bar__label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.qp-cfg-sticky-bar__value {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
}

.qp-cfg-sticky-bar__buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* === Мобильная адаптация sticky bar === */
@media (max-width: 768px) {
    .qp-cfg-sticky-bar {
        margin: 16px 0 0;
    }

    .qp-cfg-sticky-bar__inner {
        padding: 12px 16px;
    }

    .qp-cfg-sticky-bar__bottom {
        flex-direction: column;
        gap: 10px;
    }

    .qp-cfg-sticky-bar__price {
        width: 100%;
        justify-content: space-between;
    }

    .qp-cfg-sticky-bar__value {
        font-size: 22px;
    }

    .qp-cfg-sticky-bar__buttons {
        width: 100%;
    }

    .qp-cfg-sticky-bar__btn {
        flex: 1;
        padding: 10px 12px !important;
        font-size: 12px !important;
        text-align: center;
    }

    .qp-cfg-sticky-bar__components {
        font-size: 12px;
    }
}

/* === Анимация === */
@keyframes qp-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Адаптив === */
@media (max-width: 480px) {
    #qp-configurator {
        padding: 16px;
    }

    .qp-cfg-option {
        padding: 10px 12px;
        gap: 8px;
    }

    .qp-cfg-option__name {
        font-size: 13px;
    }

    .qp-cfg-total__price {
        font-size: 24px;
    }

    .qp-cfg-platforms {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .qp-cfg-platform-card__name {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .qp-cfg-platforms {
        grid-template-columns: 1fr;
    }
}

/* Loading indicator (indeterminate progress bar) */
.qp-cfg-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 200px;
    padding: 40px 20px;
    width: 100%;
}

.qp-cfg-loading__text {
    font-size: 16px;
    font-weight: 500;
    color: #e6e6e6;
    letter-spacing: 0.3px;
    text-align: center;
}

.qp-cfg-loading__text::after {
    content: '';
    display: inline-block;
    width: 1.2em;
    text-align: left;
    animation: qp-cfg-loading-dots 1.4s steps(4, end) infinite;
}

.qp-cfg-loading__bar {
    position: relative;
    width: min(320px, 80%);
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.qp-cfg-loading__bar-inner {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #941515 0%, #b41a1a 50%, #d62121 100%);
    border-radius: 2px;
    animation: qp-cfg-loading-slide 1.4s ease-in-out infinite;
}

@keyframes qp-cfg-loading-slide {
    0% {
        left: -40%;
        width: 40%;
    }
    50% {
        width: 50%;
    }
    100% {
        left: 100%;
        width: 40%;
    }
}

@keyframes qp-cfg-loading-dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}
