/* ====== Глобальный прайс-виджет (pf-price-widget) ====== */
.pf-price-widget {
    margin: 20px 0;
    padding: 0 15px; /* Защитные боковые отступы */
    box-sizing: border-box;
}

/* --- Уровень 1: тип устройства (iPhone / iPad / MacBook) --- */
.pf-type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.pf-type-btn {
    background: #222;
    color: #ccc;
    border: 1px solid #444;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}
.pf-type-btn:hover  { background: #333; color: #fff; }
.pf-type-btn.active { background: #FFD600; color: #111; border-color: #FFD600; }

/* --- Уровень 2: вкладки моделей --- */
.pf-model-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0;
}
.pf-model-btn {
    background: #3a3a3a;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: background 0.2s, color 0.2s;
    outline: none;
}
.pf-model-btn:hover  { background: #555; }
.pf-model-btn.active { background: #FFD600; color: #111; }

/* Кнопка "Узнать цену" */
.price-ask-btn {
    background-color: #FFD600;
    color: #111;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.price-ask-btn:hover {
    background-color: #e6c100;
}

/* --- Панель с прайсом (Новый блочный вид) --- */
.pf-price-panel {
    background: #fff;
    padding: 20px;
    border-radius: 0 6px 6px 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.pf-price-body {
    column-count: 2;
    column-gap: 40px;
}

.pf-symptom-group {
    break-inside: avoid; /* Не разрывать колонку посередине группы */
    margin-bottom: 30px;
}

.pf-symptom-header {
    margin-bottom: 15px;
}

.pf-symptom-title {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin: 0 0 4px 0;
}

.pf-symptom-desc {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.pf-symptom-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pf-service-row {
    display: flex;
    align-items: flex-end;
    margin-bottom: 12px;
    font-size: 14px;
}

.pf-service-info {
    display: flex;
    flex-direction: column;
    max-width: 65%;
}

.pf-service-name {
    color: #333;
}
.pf-service-name a {
    color: #333;
    text-decoration: none;
}

.pf-service-subtitle {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.pf-service-dots {
    flex-grow: 1;
    border-bottom: 1px dotted #ccc;
    margin: 0 10px 4px 10px;
}

.pf-service-price-wrap {
    white-space: nowrap;
    text-align: right;
    font-weight: 700;
    color: #111;
}

/* Состояние загрузки */
.pf-loading {
    padding: 16px;
    text-align: center;
    color: #888;
    font-style: italic;
}

/* Спеццена (зачёркнутая старая) */
.price-cell.old-price {
    text-decoration: line-through;
    color: #999;
    font-weight: 400;
    margin-right: 4px;
}

/* Кнопка Ещё... */
.pf-more-btn {
    background: transparent;
    color: #999;
    border: 1px dashed #666;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: color 0.2s, border-color 0.2s;
    outline: none;
}
.pf-more-btn:hover {
    color: #FFD600;
    border-color: #FFD600;
}
.pf-model-btn.hidden-model {
    display: none !important;
}

/* --- Адаптив --- */
@media (max-width: 600px) {
    .pf-price-widget {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        min-width: 0;
        padding: 0 15px;
        box-sizing: border-box;
    }
    .pf-price-body {
        column-count: 1;
    }
    .pf-type-tabs,
    .pf-model-tabs {
        flex-wrap: wrap; /* Разрешаем перенос, чтобы не вылезало за экран */
    }
    .pf-type-btn,
    .pf-model-btn,
    .pf-more-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}
/* ====== Кнопка "Показать все цены" ====== */
.pf-show-all-wrap {
    text-align: center;
    margin-top: 15px;
    clear: both;
}

.pf-show-all-btn {
    background-color: rgba(0, 102, 255, 0.08); /* Светло-голубой фон */
    color: #0066FF; /* Синий текст */
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s ease, transform 0.1s ease;
    outline: none;
}

.pf-show-all-btn:hover {
    background-color: rgba(0, 102, 255, 0.15);
}

.pf-show-all-btn:active {
    transform: scale(0.98);
}
/* ====== /Глобальный прайс-виджет ====== */

/* ====== Попап «Узнать цену» ====== */
#pf-callback-overlay {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}
#pf-callback-overlay.open {
    display: flex;
}
.pf-callback-popup {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px;
    max-width: 400px;
    width: 90vw;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: pfPopupIn 0.3s ease;
}
@keyframes pfPopupIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.pf-callback-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}
.pf-callback-close:hover { color: #333; }

.pf-callback-service {
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
    font-weight: 500;
}
.pf-callback-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-bottom: 20px;
}
.pf-callback-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pf-phone-wrap {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.pf-phone-wrap:focus-within {
    border-color: #FFD600;
}
.pf-phone-prefix {
    padding: 14px 0 14px 16px;
    font-size: 17px;
    font-weight: 700;
    color: #111;
    user-select: none;
    flex-shrink: 0;
}
.pf-callback-phone,
.pf-callback-phone:focus,
.pf-callback-phone:active {
    flex: 1;
    padding: 14px 16px 14px 6px;
    border: none !important;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.5px;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    background: transparent;
    box-sizing: border-box;
    min-width: 0;
}
.pf-callback-phone::placeholder {
    color: #ccc;
}
.pf-callback-submit {
    width: 100%;
    padding: 14px;
    background: #FFD600;
    color: #111;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.pf-callback-submit:hover {
    background: #e6c100;
}
.pf-callback-submit:active {
    transform: scale(0.98);
}
.pf-phone-hint {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
    padding-left: 2px;
    transition: color 0.2s;
}
.pf-phone-hint.pf-hint-ok {
    color: #4CAF50;
    font-weight: 600;
}
.pf-callback-ok {
    text-align: center;
    padding: 20px 0;
}
.pf-callback-ok-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.pf-callback-ok-text {
    font-size: 16px;
    color: #333;
    font-weight: 600;
    line-height: 1.5;
}
