/* === Модалка цен === */
.price-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

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

.price-modal__dialog {
    width: min(1100px, 96vw);
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.30);
    overflow: hidden;
    display: flex;
    animation: modalIn .18s ease-out;
    position: relative;
}

@keyframes modalIn {
    from { transform: translateY(6px); opacity: .85; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Левая зона: изображение */
.price-modal__media {
    background: #0f0f0f;
    position: relative;
    width: 51.65%;
    height: 426px;
    flex-shrink: 0;
}

.price-modal__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Кнопки навигации галереи */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav-prev {
    left: 1rem;
}

.gallery-nav-next {
    right: 1rem;
}

/* Счетчик изображений */
.gallery-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
}

/* Правая зона: контент */
.price-modal__body {
    display: flex;
    flex-direction: column;
    width: 48.35%;
    height: 426px;
    flex-shrink: 0;
}

.price-modal__content {
    padding: 1.25rem 1.25rem 1rem 1.25rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

.price-modal__footer {
    padding: 1rem 1.25rem 1.25rem 1.25rem;
    border-top: 1px solid #e0e0e0;
    background: #fff;
}

.price-modal__title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 2rem .4rem 0;
    color: #222;
}

.price-modal__price {
    color: var(--p-brand-dark);
    font-weight: 700;
    margin-bottom: .6rem;
    font-size: 1.2rem;
}

.price-modal__desc {
    color: #555;
    line-height: 1.55;
    margin-bottom: 1rem;
}

/* Характеристики в модалке */
.price-modal__specs {
    margin-bottom: 1rem;
}

.price-modal__specs h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--p-text-900);
    margin-bottom: 0.75rem;
}

/* Аккордеон характеристик */
.spec-accordion-item {
    margin-bottom: 0.5rem;
}

.spec-accordion-header {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--p-brand);
    color: white;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.3s;
}

.spec-accordion-header:hover {
    background: var(--p-brand-dark);
}

.spec-accordion-header[aria-expanded="true"] {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.spec-accordion-icon {
    transition: transform 0.3s;
    flex-shrink: 0;
}

.spec-accordion-header[aria-expanded="true"] .spec-accordion-icon {
    transform: rotate(180deg);
}

.spec-accordion-content {
    overflow: hidden;
    border: 1px solid var(--p-brand);
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.spec-accordion-content[hidden] {
    display: none;
}

.price-modal__specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.price-modal__specs-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.price-modal__specs-table tbody tr:last-child {
    border-bottom: none;
}

/* Строки характеристик */
.price-modal__specs-table td {
    padding: 0.6rem 1rem;
}

.price-modal__specs-table .spec-key {
    color: var(--p-text-600);
    width: 60%;
}

.price-modal__specs-table .spec-value {
    color: var(--p-text-900);
    font-weight: 500;
}

/* Кнопка в модалке */
.price-modal__footer .btn {
    width: 100%;
    background: linear-gradient(90deg, var(--p-brand), var(--p-brand-2) 90%);
    color: #333;
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
}

.price-modal__footer .btn:hover {
    background: linear-gradient(90deg, var(--p-brand), var(--p-brand-2) 90%);
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.36);
}

/* Кнопка закрытия */
.price-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,.5);
    color: #fff;
    border: none;
    cursor: pointer;
    line-height: 36px;
    text-align: center;
    font-size: 20px;
    transition: background .2s ease;
    z-index: 10;
}

.price-modal__close:hover { background: rgba(0,0,0,.75); }

/* Полоса прокрутки */
.price-modal__content::-webkit-scrollbar { width: 10px; }
.price-modal__content::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 8px;
}

/* Блокировка прокрутки body */
body.modal-open { overflow: hidden; }
