.hero-section {
    position: relative;
    height: 300px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-bg {
    position: absolute;
    inset: -20px;
    background: url('/static/images/hero_pergola.jpg') center/cover no-repeat;
    z-index: 0;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,75,154,0.7), rgba(0,40,80,0.5));
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
}
.hero-content h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.hero-content p { font-size: 1.1rem; opacity: 0.9; }

.calc-container { max-width: 820px; margin: -40px auto 0; position: relative; z-index: 2; }

.step-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 0 1.5rem 1.5rem;
    margin-bottom: 1.2rem;
    overflow: hidden;
    border-top: 4px solid #1a3a6e;
}
.step-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 -1.5rem 1.2rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #1a3a6e 0%, #2a5298 100%);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    letter-spacing: 0.01em;
}
.step-card-priority {
    border-top: 4px solid #ff9800;
    box-shadow: 0 4px 24px rgba(255, 152, 0, 0.25), 0 0 0 2px rgba(255, 152, 0, 0.35);
    background: #fffaf2;
}
.step-card-priority h3 {
    background: linear-gradient(135deg, #c75b00 0%, #ff9800 100%);
}
.step-card-priority .step-num {
    background: rgba(255,255,255,0.32);
}
.step-required-badge {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #fff;
    color: #c75b00;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.step-required-note {
    background: #fff3e0;
    border-left: 3px solid #ff9800;
    color: #6b3a00;
    font-size: 0.88rem;
    padding: 0.55rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 0.9rem;
}
.req-star {
    color: #d84315;
    font-weight: 700;
    margin-left: 0.15rem;
}
.dim-required {
    border: 2px solid #ffb74d;
    background: #fff;
    font-weight: 600;
}
.dim-required:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 0.2rem rgba(255, 152, 0, 0.25);
}
.dim-required.is-filled {
    border-color: #6db96d;
    background: #f6fff6;
}
.step-card h3 .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.22);
    font-size: 0.88rem;
    font-weight: 800;
    flex-shrink: 0;
    margin-right: 0.15rem;
}

.type-option {
    position: relative;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}
.type-option:hover { border-color: #004B9A; transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,75,154,0.18); }
.type-option.selected { border-color: #004B9A; background: #f0f6ff; box-shadow: 0 4px 16px rgba(0,75,154,0.2); }
.type-option .check-mark {
    position: absolute; top: 10px; right: 10px; width: 26px; height: 26px;
    border-radius: 50%; border: 2px solid #ccc; background: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; z-index: 2;
}
.type-option .check-mark svg { opacity: 0; transition: opacity 0.2s; }
.type-option.selected .check-mark { border-color: #004B9A; background: #004B9A; }
.type-option.selected .check-mark svg { opacity: 1; }
.type-option .click-hint {
    font-size: 0.72rem; color: #999; margin-top: 0.4rem;
    transition: opacity 0.3s;
}
.type-option.selected .click-hint { opacity: 0; }
.type-option { display: flex; flex-direction: column; height: 100%; }
.type-option img { width: 100%; height: 160px; object-fit: cover; object-position: center 40%; border-radius: 6px; margin-bottom: 0.6rem; transition: transform 0.3s; flex-shrink: 0; background: #f5f7fb; }
.type-option:hover img { transform: scale(1.03); }
@media (max-width: 767px) {
    .type-option img { height: auto; max-height: 220px; object-fit: contain; background: #f5f7fb; }
}
.type-option .type-name { font-weight: 600; font-size: 0.95rem; color: #333; }
.type-option .type-desc { font-size: 0.8rem; color: #666; margin-top: 0.3rem; flex: 1; }
.type-option .click-hint { margin-top: auto; }

.variant-option {
    position: relative;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 1rem 1rem 0.8rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.variant-option:hover { border-color: #004B9A; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,75,154,0.12); }
.variant-option.selected { border-color: #004B9A; background: #f0f6ff; box-shadow: 0 4px 16px rgba(0,75,154,0.18); }
.variant-option .check-mark {
    position: absolute; top: 10px; right: 10px; width: 24px; height: 24px;
    border-radius: 50%; border: 2px solid #ccc; background: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; z-index: 2;
}
.variant-option .check-mark svg { opacity: 0; transition: opacity 0.2s; }
.variant-option.selected .check-mark { border-color: #004B9A; background: #004B9A; }
.variant-option.selected .check-mark svg { opacity: 1; }
.variant-option .variant-label {
    font-weight: 700; font-size: 1.05rem; color: #004B9A;
    margin-bottom: 0.5rem; padding-right: 30px;
}
.variant-specs { font-size: 0.82rem; color: #444; line-height: 1.6; }
.variant-specs .spec-row { display: flex; align-items: baseline; gap: 4px; }
.variant-specs .spec-icon { color: #004B9A; font-size: 0.7rem; min-width: 14px; text-align: center; }
.variant-specs .spec-overhang { margin-top: 2px; color: #2a7d2a; }
.variant-specs strong { color: #222; }

.variant-special { background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%); border-color: #b3cde8; }
.variant-special:hover { border-color: #004B9A; background: linear-gradient(135deg, #eef4ff 0%, #dde9ff 100%); }
.variant-special.selected { border-color: #004B9A; background: linear-gradient(135deg, #e0edff 0%, #d0e2ff 100%); }
.variant-label-special { display: flex; align-items: center; gap: 6px; }
.variant-label-special .special-icon { font-size: 1.1rem; color: #e8a900; }
.variant-special-desc { font-size: 0.82rem; color: #555; line-height: 1.4; padding-right: 30px; }

.compare-table-wrap { overflow-x: auto; margin-bottom: 1rem; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.compare-table th { background: #004B9A; color: #fff; padding: 0.6rem 0.8rem; text-align: left; font-weight: 600; white-space: nowrap; }
.compare-table td { padding: 0.55rem 0.8rem; border-bottom: 1px solid #e8e8e8; white-space: nowrap; }
.compare-row-clickable { cursor: pointer; transition: background 0.15s, box-shadow 0.15s; }
.compare-row-clickable:hover { background: #e8f0ff !important; }
.compare-row-active td { background: #dce8f8 !important; box-shadow: inset 3px 0 0 #004B9A; }
.compare-row-best td { background: #f0f8e8; }
.compare-diff { font-size: 0.75rem; color: #b44; margin-top: 2px; }
.compare-best { font-size: 0.75rem; color: #2a7d2a; margin-top: 2px; font-weight: 600; }
.compare-hint { text-align: center; font-size: 0.78rem; color: #888; margin: -0.5rem 0 1rem; }

.compare-specs-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.compare-specs-table th { background: #f0f6ff; color: #004B9A; padding: 0.5rem 0.6rem; text-align: center; font-weight: 600; font-size: 0.8rem; }
.compare-specs-table th:first-child, .compare-specs-table th:nth-child(2) { text-align: left; }
.compare-specs-table td { padding: 0.4rem 0.6rem; border-bottom: 1px solid #f0f0f0; text-align: center; font-size: 0.8rem; }
.compare-specs-table td:first-child { text-align: left; width: 36px; padding-right: 0; }
.compare-specs-table td:nth-child(2) { text-align: left; }
.spec-img-cell { width: 36px; padding: 0.3rem !important; }
.spec-img { width: 28px; height: 28px; vertical-align: middle; opacity: 0.85; }
.spec-photo-cell { padding: 0.5rem 0.4rem !important; text-align: center !important; vertical-align: middle; }
.spec-photo { max-width: 120px; height: 65px; object-fit: contain; border-radius: 4px; background: #fff; }
.spec-photo-label { font-size: 0.72rem; color: #555; display: block; margin-top: 2px; }
.tech-photos-row { display: flex; gap: 12px; margin-bottom: 0.8rem; flex-wrap: wrap; justify-content: center; align-items: flex-end; }
.tech-photo-item { text-align: center; flex: 0 1 160px; display: flex; flex-direction: column; align-items: center; }
.tech-photo { width: auto; max-width: 150px; height: 100px; object-fit: contain; border-radius: 6px; border: 1px solid #e0e8f0; background: #fff; }
.tech-photo-caption { font-size: 0.72rem; color: #555; margin-top: 4px; line-height: 1.2; }

.variant-detail-panel { margin-top: 1.5rem; padding: 1.2rem; background: #fafcff; border: 2px solid #004B9A; border-radius: 10px; animation: detailSlideIn 0.3s ease; }
.variant-detail-header { font-size: 1.1rem; font-weight: 700; color: #004B9A; margin-bottom: 0.8rem; text-align: center; padding-bottom: 0.6rem; border-bottom: 2px solid #e0e8f0; }
@keyframes detailSlideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.tech-spec-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.tech-spec-icon { width: 24px; height: 24px; opacity: 0.8; flex-shrink: 0; }

.variant-tech-block { margin-top: 1rem; padding: 0.8rem 1rem; background: #f8fbff; border-radius: 8px; border: 1px solid #e0e8f0; }
.variant-tech-title { font-weight: 600; color: #004B9A; font-size: 0.9rem; margin-bottom: 0.5rem; }
.variant-tech-specs { font-size: 0.82rem; color: #444; line-height: 1.7; }
.variant-tech-specs strong { color: #222; }

.dim-input label { font-weight: 500; margin-bottom: 4px; display: block; font-size: 0.9rem; white-space: nowrap; min-height: 1.3em; }
.dim-input .form-control { font-size: 1.1rem; padding: 0.6rem; }
.dim-hint { font-size: 0.78rem; color: #888; margin-top: 2px; }

.calc-btn {
    background: #004B9A;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}
.calc-btn:hover { background: #003670; }
.calc-btn:disabled { background: #aaa; cursor: not-allowed; }

.results-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 1.5rem 1.8rem;
    margin-top: 1.2rem;
    animation: fadeIn 0.4s;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.results-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #004B9A;
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5eeff;
}

.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.spec-table th { background: #f0f6ff; color: #004B9A; font-weight: 600; padding: 0.5rem 0.8rem; font-size: 0.85rem; text-align: left; }
.spec-table td { padding: 0.45rem 0.8rem; font-size: 0.88rem; border-bottom: 1px solid #f0f0f0; }

.cost-table { width: 100%; border-collapse: collapse; }
.cost-table td { padding: 0.5rem 0.8rem; font-size: 0.9rem; border-bottom: 1px solid #f0f0f0; }
.cost-table td:last-child { text-align: right; font-weight: 500; white-space: nowrap; }

.total-row { font-weight: 700; font-size: 1.05rem; border-top: 2px solid #004B9A; }
.total-row.cash { color: #1b5e20; font-size: 1.15rem; }
.total-row.non-cash { color: #333; }
.total-row.vat { color: #333; }

.payment-variants-block {
    margin-top: 1.2rem;
    border: 1px solid #c7d4f5;
    border-radius: 8px;
    overflow: hidden;
}
.payment-variants-title {
    background: #1a3a6b;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.7rem 1rem;
}
.payment-variant-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0f4ff;
    padding: 0.65rem 1rem;
    border-top: 1px solid #c7d4f5;
}
.payment-variant-label {
    font-size: 0.97rem;
    color: #333;
}
.payment-variant-price {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1a3a6b;
}
.payment-variant-price.pv-cash {
    color: #28a745;
    font-size: 1.2rem;
}

.kp-actions-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}
.pdf-btn {
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    flex: 1;
}
.pdf-btn:hover { background: #218838; }
.pdf-btn:disabled { background: #aaa; }
.share-btn {
    background: #1a3a6e;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.share-btn:hover { background: #0f2a52; }

.spinner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.option-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0;
}
.option-check label { font-size: 0.95rem; cursor: pointer; margin: 0; }

/* ─── Facade top-view SVG wrapper ─── */
.facade-topview-wrap {
    background: #f4f7fb;
    border: 1px solid #d8e2f0;
    border-radius: 8px;
    padding: 0.6rem 0.4rem 0.3rem;
    margin-bottom: 0.3rem;
    text-align: center;
}
#facade-topview-hint {
    font-size: 0.78rem;
    color: #888;
    margin-top: 4px;
    min-height: 18px;
}

/* ─── Facade opening table ─── */
.facade-table {
    width: 100%; border-collapse: collapse; font-size: 0.84rem;
    border: 1px solid #d8e2f0; border-radius: 7px; overflow: hidden;
}
.facade-table thead th {
    background: #e8eef8; color: #334; font-weight: 600; font-size: 0.78rem;
    padding: 6px 10px; text-align: left; border-bottom: 1px solid #c8d4ea;
}
.facade-table tbody tr { border-bottom: 1px solid #e4ecf5; }
.facade-table tbody tr:last-child { border-bottom: none; }
.facade-table tbody tr:hover { background: #f5f8fd; }
.facade-table tbody tr.facade-row-flash { background: #d8edff; transition: background 0.4s; }
.facade-table td { padding: 6px 10px; vertical-align: middle; }
.facade-table td:last-child { color: #556; font-size: 0.78rem; white-space: nowrap; }
.facade-lbl {
    display: inline-block; min-width: 28px; padding: 2px 6px;
    background: #1a3a6e; color: #fff; border-radius: 4px;
    font-size: 0.75rem; font-weight: 700; text-align: center; letter-spacing: 0.5px;
}
.facade-table .form-select-sm { font-size: 0.82rem; padding: 3px 6px; height: auto; }

/* ─── Legacy facade grid (kept for any fallback) ─── */
.facade-grid { display: grid; gap: 0.45rem; margin-bottom: 0.6rem; }
.facade-row { display: flex; align-items: center; gap: 0.4rem; }
.facade-row-label { width: 68px; flex-shrink: 0; font-size: 0.78rem; font-weight: 600; color: #555; text-align: right; }
.facade-bays { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.facade-bay {
    min-width: 58px; padding: 6px 10px;
    border: 2px solid #d0d8e8; border-radius: 5px;
    background: #f8f9fb; color: #555;
    font-size: 0.78rem; text-align: center; cursor: pointer;
    user-select: none; transition: border-color .15s, background .15s, color .15s;
}
.facade-bay:hover  { border-color: #5a82c0; background: #eaf0fb; color: #1a3a6e; }
.facade-bay.active { border-color: #1a3a6e; background: #1a3a6e; color: #fff; }
.facade-bay.active:hover { background: #2a4a8e; border-color: #2a4a8e; }
.facade-select-all { font-size: 0.78rem; color: #1a3a6e; cursor: pointer; text-decoration: underline; margin-left: 4px; white-space: nowrap; }

.installation-counter {
    background: linear-gradient(135deg, #004B9A, #0066CC);
    color: #fff;
    padding: 1.2rem;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,75,154,0.3);
    animation: pulse 2.5s infinite;
}
.installation-counter .counter-number {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}
.installation-counter .counter-label {
    font-size: 1.1rem;
    opacity: 0.95;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.015); }
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}
.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}
.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.promo-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.promo-badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    animation: pulse 2.5s infinite;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .hero-section { height: 200px; background-attachment: scroll; }
    .hero-content h1 { font-size: 1.5rem; }
    .calc-container { margin: -20px 0.5rem 0; }
    .step-card { padding: 0 1rem 1rem; }
    .step-card h3 { margin: 0 -1rem 1rem; }
    .type-option img { height: 100px; }
    .installation-counter .counter-number { font-size: 2.2rem; }
}

.saved-kp-banner {
    background: linear-gradient(135deg, #f0f6ff 0%, #e5eeff 100%);
    border: 2px solid #004B9A;
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    animation: fadeIn 0.4s;
}
.saved-kp-banner-title {
    width: 100%;
    font-size: 1rem;
    font-weight: 700;
    color: #004B9A;
    margin-bottom: 0.2rem;
}
.saved-kp-banner-params {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
    flex: 1;
}
.saved-kp-param {
    font-size: 0.88rem;
    color: #333;
    white-space: nowrap;
}
.saved-kp-param strong {
    color: #004B9A;
}
.saved-kp-new-btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: #004B9A;
    color: #fff;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}
.saved-kp-new-btn:hover {
    background: #003670;
    color: #fff;
}
@media (max-width: 768px) {
    .saved-kp-banner {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    .saved-kp-param {
        white-space: normal;
    }
    .saved-kp-new-btn {
        align-self: stretch;
        text-align: center;
    }
}

/* ===== ФОРМА ЗАЯВКИ ===== */
.ch-submit {
    width: 100%; padding: 14px;
    background: #e8622a; color: #fff;
    border: none; border-radius: 8px;
    font-size: 15px; font-weight: 700;
    cursor: pointer; margin-top: 16px;
    font-family: 'Arial', sans-serif;
    transition: background 0.2s;
}
.ch-submit:hover { background: #d4521e; }

.lead-form {
    background: #1e2a3a; border-radius: 12px;
    padding: 24px; margin-top: 16px; display: none;
}
.lead-form.visible { display: block; }
.lead-title { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.lead-sub { color: rgba(255,255,255,0.65); font-size: 13px; margin-bottom: 16px; line-height: 1.4; }
.lead-sub strong { color: #fff; }

.lead-channels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.lead-channel-btn {
    display: flex; align-items: center; justify-content: center;
    gap: 7px; padding: 11px 10px;
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 8px; color: #fff;
    font-size: 13px; font-weight: 600;
    cursor: pointer; font-family: 'Arial', sans-serif;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.lead-channel-btn:hover { background: rgba(255,255,255,0.13); border-color: rgba(255,255,255,0.3); color: #fff; }
.ch-wa { border-color: #25D366; color: #25D366; }
.ch-wa:hover { background: rgba(37,211,102,0.15); color: #25D366; }
.ch-tg { border-color: #229ED9; color: #229ED9; }
.ch-tg:hover { background: rgba(34,158,217,0.15); color: #229ED9; }
.ch-max { border-color: #A78BFA; color: #A78BFA; }
.ch-max:hover { background: rgba(167,139,250,0.15); color: #A78BFA; }

.lead-divider { display: flex; align-items: center; gap: 8px; margin: 12px 0 10px; }
.lead-divider::before, .lead-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.15); }
.lead-divider span { color: rgba(255,255,255,0.4); font-size: 11px; white-space: nowrap; }

.lead-row { display: flex; gap: 8px; }
.lead-phone {
    flex: 1; padding: 10px 12px;
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 8px; color: #fff;
    font-size: 15px; font-family: 'Arial', sans-serif; outline: none;
}
.lead-phone::placeholder { color: rgba(255,255,255,0.35); }
.lead-phone:focus { border-color: #e8622a; }
.lead-phone.err { border-color: #ff4d4f; animation: shake 0.3s; }

.lead-btn {
    padding: 10px 16px; background: #e8622a;
    color: #fff; border: none; border-radius: 8px;
    font-size: 14px; font-weight: 700;
    cursor: pointer; white-space: nowrap;
    font-family: 'Arial', sans-serif;
    transition: background 0.2s;
}
.lead-btn:hover { background: #d4521e; }
.lead-btn:disabled { opacity: 0.6; cursor: default; }

.lead-privacy { color: rgba(255,255,255,0.35); font-size: 11px; line-height: 1.4; margin-top: 12px; }
.lead-privacy a { color: rgba(255,255,255,0.5); }

.lead-success {
    background: #10b981; border-radius: 12px;
    padding: 28px 24px; margin-top: 16px; text-align: center;
    display: none; animation: chSlide 0.4s ease;
}
.lead-success.visible { display: block; }
.success-icon {
    width: 40px; height: 40px;
    background: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px;
}
.success-icon svg {
    width: 22px; height: 22px;
    fill: none; stroke: #10b981;
    stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}
.success-title { color: #fff; font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.success-sub { color: rgba(255,255,255,0.85); font-size: 13px; line-height: 1.5; }
.success-sub strong { color: #fff; }

@keyframes shake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
@media (max-width: 400px) {
    .lead-channels { grid-template-columns: 1fr; }
    .lead-form { padding: 18px 14px; }
}

.kp-section {
    margin-top: 1.5rem;
    animation: fadeIn 0.5s ease;
}
.kp-block {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 1.4rem 1.6rem;
    margin-bottom: 1rem;
}
.kp-block-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.8rem;
}
.kp-block-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    color: #fff;
}
.kp-block-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a3a6e;
    line-height: 1.3;
}
.kp-block p, .kp-block li {
    font-size: 0.88rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 0.3rem;
}
.kp-block ul {
    padding-left: 1.2rem;
    margin: 0.4rem 0;
}
.kp-block ul li::marker {
    color: #2e7d32;
}
.kp-number-badge {
    display: inline-block;
    background: #1a3a6e;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
}
.kp-price-hero {
    background: linear-gradient(135deg, #1a3a6e 0%, #2563eb 100%);
    color: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}
.kp-price-hero .kp-price-amount {
    font-size: 2rem;
    font-weight: 800;
    margin: 0.3rem 0;
}
.kp-price-hero .kp-price-label {
    font-size: 0.85rem;
    opacity: 0.85;
}
.kp-price-sublabel {
    display: block;
    font-size: 0.75rem;
    opacity: 0.7;
    font-weight: 400;
    margin-top: 2px;
}
.kp-price-hero .kp-price-label .kp-price-sublabel {
    display: inline;
    margin-left: 4px;
}
.kp-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.kp-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    background: #f8fbff;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #333;
}
.kp-feature-check {
    color: #2e7d32;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}
.kp-trust-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center;
}
.kp-stat {
    background: #f0f6ff;
    border-radius: 10px;
    padding: 12px 8px;
}
.kp-stat-number {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a3a6e;
}
.kp-stat-label {
    font-size: 0.72rem;
    color: #555;
    margin-top: 2px;
}
.kp-warranty-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f0faf0;
    border-radius: 8px;
    border-left: 3px solid #2e7d32;
    margin-bottom: 6px;
}
.kp-warranty-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}
.kp-warranty-text {
    font-size: 0.85rem;
    color: #333;
}
.kp-spec-hint {
    font-size: 0.75rem;
    color: #888;
    font-weight: 400;
    margin-top: 2px;
}
.kp-urgency-banner {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}
.kp-urgency-icon {
    font-size: 1.3rem;
}
.kp-payment-terms {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(255,255,255,0.3);
    font-size: 0.82rem;
    color: rgba(255,255,255,0.9);
}
.kp-upsell-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}
.kp-upsell-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #e5e7eb;
}
.kp-upsell-icon {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
}
.kp-upsell-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1a3a6e;
    margin-bottom: 0.2rem;
}
.kp-upsell-desc {
    font-size: 0.72rem;
    color: #888;
    margin-top: 0.15rem;
}
.kp-upsell-text {
    font-size: 0.78rem;
    color: #666;
}
.kp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}
.kp-gallery-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
}
.kp-cta-block {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}
.kp-cta-block h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.kp-cta-block p {
    font-size: 0.88rem;
    opacity: 0.9;
    color: #fff;
    margin-bottom: 0;
}
.pergola-videos-block {
    background: #f8fafc;
    padding: 20px 24px;
    margin-top: 24px;
    border-radius: 12px;
}
.pergola-videos-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1a3a6e;
}
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: start;
}
.video-card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #fff;
}
.video-card-shorts {
    max-width: 320px;
    justify-self: center;
}
.video-iframe-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
}
.video-iframe-shorts {
    padding-bottom: 177.78%;
}
.video-iframe-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.video-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 12px;
    color: #333;
}
.kp-video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: start;
}
.kp-video-card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #fff;
}
.kp-video-card-shorts {
    max-width: 320px;
    justify-self: center;
}
.kp-video-divider {
    grid-column: 1 / -1;
    text-align: center;
    padding: 8px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #f59e0b;
    border-top: 1px solid #e5e7eb;
    margin-top: 4px;
}
@media (max-width: 640px) {
    .video-grid { grid-template-columns: 1fr; }
    .video-card-shorts { max-width: 280px; }
    .video-iframe-shorts { max-height: 400px; padding-bottom: 0; height: 400px; }
    .kp-video-grid { grid-template-columns: 1fr; }
    .kp-video-card-shorts { max-width: 280px; }
}
@media (max-width: 576px) {
    .kp-features-grid { grid-template-columns: 1fr; }
    .kp-trust-stats { grid-template-columns: 1fr; }
    .kp-price-hero .kp-price-amount { font-size: 1.6rem; }
    .kp-upsell-grid { grid-template-columns: 1fr; }
    .kp-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* === Facade fill spoiler === */
.facade-spoiler {
    border: 2px solid #1a3a6e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(26,58,110,0.13);
}
.facade-spoiler-summary {
    list-style: none;
    cursor: pointer;
    padding: 0.85rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    user-select: none;
    background: linear-gradient(135deg, #1a3a6e 0%, #2a5298 100%);
    transition: filter 0.15s;
}
.facade-spoiler-summary:hover { filter: brightness(1.08); }
.facade-spoiler-summary::-webkit-details-marker { display: none; }
.facade-spoiler-badge {
    background: #f59e0b;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.18em 0.55em;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}
.facade-spoiler-title {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    flex: 1;
}
.facade-spoiler-hint {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    font-weight: 400;
}
.facade-spoiler-chevron {
    color: #fff;
    transition: transform 0.2s ease;
    font-size: 1rem;
}
.facade-spoiler[open] .facade-spoiler-chevron { transform: rotate(180deg); }
.facade-spoiler[open] .facade-spoiler-hint { display: none; }
.facade-spoiler-body {
    padding: 0.9rem 1rem 1.05rem;
    border-top: 1px solid #d6deea;
    background: #fff;
}
.facade-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7rem;
    margin-bottom: 0.9rem;
}
.facade-info-card {
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fbfcfe;
    display: flex;
    flex-direction: column;
}
.facade-info-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #eef2f7;
}
.facade-info-img.contain {
    object-fit: contain;
    padding: 0.5rem;
    background: #f4f7fb;
}
.facade-info-text {
    padding: 0.55rem 0.65rem 0.7rem;
}
.facade-info-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1a3a6e;
    margin-bottom: 0.25rem;
}
.facade-info-text p {
    font-size: 0.78rem;
    line-height: 1.35;
    color: #444;
    margin: 0 0 0.5rem;
}
.fz-fill-vars {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.4rem;
}
.fz-fill-var {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    background: #eef3fb;
    border: 1px solid #c8d8ef;
    border-radius: 6px;
    padding: 0.35rem 0.25rem;
    text-align: center;
}
.fz-fill-var--full {
    background: #e6f0fd;
    border-color: #a8c4e8;
}
.fz-fill-pct {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a3a6e;
    line-height: 1;
}
.fz-fill-desc {
    font-size: 0.68rem;
    color: #5a6e8a;
    line-height: 1.2;
}
.fz-fill-price {
    font-size: 0.76rem;
    font-weight: 600;
    color: #1a3a6e;
    margin-top: 0.1rem;
}
.fz-fill-extra {
    font-size: 0.72rem;
    color: #5a6e8a;
    margin-top: 0.35rem;
    font-style: italic;
}
.facade-info-source {
    grid-column: 1 / -1;
    text-align: right;
    font-size: 0.72rem;
    color: #8a93a3;
}
.facade-info-source a { color: #1a3a6e; text-decoration: none; }
.facade-info-source a:hover { text-decoration: underline; }
@media (max-width: 720px) {
    .facade-info { grid-template-columns: 1fr; }
    .facade-info-img { height: 160px; }
}
.facade-spoiler-icon {
    color: rgba(255,255,255,0.85);
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* === Facade how-to instruction === */
.facade-how-to {
    background: #f0f5ff;
    border: 1px solid #c8d8f5;
    border-left: 4px solid #2a5298;
    border-radius: 8px;
    padding: 0.6rem 0.9rem 0.65rem;
    margin: 0.75rem 0 0.65rem;
}
.facade-how-to-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a3a6e;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.facade-how-to-title i { font-size: 0.85rem; }
.facade-how-to-steps {
    margin: 0;
    padding-left: 1.3rem;
    font-size: 0.8rem;
    color: #374151;
    line-height: 1.55;
}
.facade-how-to-steps li { margin-bottom: 0.1rem; }
.facade-how-to-steps li:last-child { margin-bottom: 0; }

.glazing-rows { display: flex; flex-direction: column; gap: 8px; }
.glazing-row { background: #fff; border: 1px solid #e4ecf5; border-radius: 8px; padding: 8px 10px; }
.glazing-row-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.glazing-toggle { display: flex; align-items: center; gap: 0.45rem; font-size: 0.86rem; color: #1a3a6e; margin: 0; cursor: pointer; }
.glazing-toggle input[type="checkbox"] { transform: scale(1.05); }
.glazing-toggle .facade-lbl { display: inline-block; min-width: 26px; padding: 1px 6px; background: #1a3a6e; color: #fff; border-radius: 4px; font-weight: 700; font-size: 0.78rem; text-align: center; }
.glazing-toggle .glz-desc { color: #555; font-weight: 500; font-size: 0.82rem; }
.glz-dims { color: #556; font-size: 0.78rem; white-space: nowrap; }
.glazing-row-body { margin-top: 8px; display: grid; grid-template-columns: 1fr 220px; gap: 10px; align-items: center; }
.glz-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.glz-grid label { display: block; font-size: 0.75rem; color: #6b7280; margin-bottom: 3px; white-space: normal; line-height: 1.3; }
.glz-grid .form-select-sm { min-width: 0; width: 100%; }
/* SVG preview container — block layout, full width */
.glz-preview { display: block; width: 100%; margin-top: 0.5rem; }
.glz-preview svg.glz-mini-svg {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto;
}
/* glz-table: glazing configuration table classes */
#glazing-opening-table { overflow-x: hidden; width: 100%; }
.glz-table { width: 100%; min-width: 0; }
.glz-table thead th { white-space: nowrap; }
.glz-table td { vertical-align: middle; }
.glz-table .glz-cfg-row td {
    padding: 0.6rem 0.9rem;
    vertical-align: top;
    overflow-wrap: break-word;
    word-break: break-word;
}
/* Drive info block inside config row — ensure text wraps */
.glz-table .glz-cfg-row td > div { overflow-wrap: break-word; word-break: break-word; }
.glz-table tbody tr td:nth-child(3) { overflow-wrap: break-word; word-break: break-word; }
@media (max-width: 720px) {
    .glazing-row-body { grid-template-columns: 1fr; }
    .glz-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
}

/* === Marketing improvements === */
.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-top: 8px;
  align-items: center;
}
.trust-line span { line-height: 1.4; }

.model-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.badge-sun      { background: #fff8e6; color: #7a4e00; }
.badge-rain     { background: #e8f4fd; color: #1a5276; }
.badge-air      { background: #eaf4fb; color: #154360; }
.badge-open     { background: #f0eafd; color: #4a235a; }
.badge-winter   { background: #e8f8f5; color: #0e6655; }
.badge-insulation { background: #fdecea; color: #78281f; }
.badge-premium  { background: #fef9e7; color: #7d6608; }
.badge-style    { background: #fdf2e9; color: #784212; }
.badge-size     { background: #f2f3f4; color: #2c3e50; }

.step-placeholder {
  padding: 16px;
  background: #f8f9fa;
  border: 1px dashed #dde3f0;
  border-radius: 8px;
  color: #6b7a99;
  font-size: 14px;
  text-align: center;
  margin-bottom: 0;
}

.fill-hint { margin-bottom: 16px; }
.fill-hint__step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #3d3d3d;
}
.fill-hint__num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1a2744;
  color: white;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.price-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a2744;
  color: #fff;
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transform: translateY(0);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
.price-bar--hidden { transform: translateY(100%); }
.price-bar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.price-bar__label { font-size: 13px; opacity: 0.7; }
.price-bar__price { font-size: 20px; font-weight: 600; color: #e8622a; }
.price-bar__hint  { font-size: 11px; opacity: 0.5; }
@media (max-width: 480px) {
  .price-bar { padding: 10px 16px; }
  .price-bar__price { font-size: 18px; }
}

/* Mobile: shrink model dropdown font on additional pergola cards so the
   full model name (e.g. "B500 NEW (поворотные ламели)") is readable
   instead of being truncated. Also shrink dimension labels so "Ширина (м) *"
   fits the col-4 column without the required-star wrapping to a new line
   (which was misaligning the three dimension inputs). */
@media (max-width: 600px) {
  .pergola-card .pergola-model-select {
    font-size: 0.85rem;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    padding-right: 1.8rem;
  }
  .pergola-card .pergola-card-title { font-size: 0.95rem; }

  .dim-input label {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.3em;
  }
  .dim-input .form-control { font-size: 1rem; padding: 0.5rem; }
  .dim-hint { font-size: 0.7rem; }
  /* Keep the Bootstrap row gutter tight on phones so columns have more
     usable width for the input + label. */
  .pergola-card .row.g-3 { --bs-gutter-x: 0.6rem; }
}

/* === ZIP params card layout === */
.zip-params-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 10px;
  min-width: 220px;
}
.zip-param-field {
  display: flex;
  flex-direction: column;
}
.zip-param-field label {
  font-size: 0.7rem;
  color: #6b7280;
  margin-bottom: 2px;
  white-space: nowrap;
}
.zip-param-field .form-select-sm {
  font-size: 0.82rem;
  width: 100%;
  min-width: 0;
}

/* === Mobile: facade fill & ZIP table responsive === */
@media (max-width: 600px) {
  /* Facade fill table: smaller font, hide last area column */
  .facade-table:not(.zip-table) { font-size: 0.79rem; }
  .facade-table:not(.zip-table) thead th:last-child { display: none; }
  .facade-table:not(.zip-table) .facade-area { display: none; }
  .facade-table:not(.zip-table) .form-select-sm { font-size: 0.79rem; min-width: 0; }
  /* Glazing table: hide Расположение + Размер columns, compact layout */
  .glz-table .glz-th-loc,
  .glz-table .glz-td-loc,
  .glz-table .glz-th-area,
  .glz-table .glz-td-area { display: none; }
  .glz-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .glz-table { font-size: 0.82rem; }
  .glz-table .glz-cfg-row td { padding: 0.4rem 0.5rem; }
  /* SVG preview: constrained full-width on mobile */
  .glz-preview svg.glz-mini-svg { max-width: 100%; }
  .glz-preview { width: 100%; overflow: hidden; }

  /* ZIP table: collapse to card rows on mobile */
  .facade-table.zip-table { display: block; border: none; }
  .facade-table.zip-table thead { display: none; }
  .facade-table.zip-table tbody { display: flex; flex-direction: column; gap: 8px; }
  .facade-table.zip-table tr {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    grid-template-rows: auto auto;
    gap: 0 8px;
    background: #fff;
    border: 1px solid #d8e2f0 !important;
    border-radius: 8px;
    padding: 10px 10px 8px;
    align-items: start;
  }
  .facade-table.zip-table tr td:nth-child(1) { grid-row: 1; grid-column: 1; }
  .facade-table.zip-table tr td:nth-child(2) {
    grid-row: 1; grid-column: 2;
    font-size: 0.8rem; line-height: 1.35;
    vertical-align: top;
    padding: 0;
  }
  .facade-table.zip-table tr td:nth-child(3) {
    grid-row: 1; grid-column: 3;
    padding: 0;
  }
  .facade-table.zip-table tr td:nth-child(4) {
    grid-row: 2; grid-column: 1 / -1;
    padding: 8px 0 0;
  }
  .facade-table.zip-table td {
    padding: 0;
    border: none;
  }
  .zip-params-card {
    grid-template-columns: 1fr 1fr;
    gap: 6px 8px;
  }
}

@media (max-width: 420px) {
  .zip-params-card { grid-template-columns: 1fr; }
  .glz-grid { grid-template-columns: 1fr; }
}

/* Multi-pergola input cards (Phase 1) */
.pergola-card {
    border: 2px solid #e3e6ea;
    border-radius: 10px;
    padding: 14px 16px 16px;
    background: #fafbfc;
    margin-top: 12px;
}
.pergola-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.pergola-num-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 14px;
    background: #1e3a5f;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}
.pergola-card-title { font-weight: 600; color: #1e3a5f; }
.pergola-card-model { color: #6b7280; font-size: 13px; }
.pergola-del-btn {
    margin-left: auto;
    line-height: 1;
    padding: 2px 10px;
    font-size: 18px;
    font-weight: 700;
}
.btn-add-pergola {
    background: #fff;
    border: 2px dashed #1e3a5f;
    color: #1e3a5f;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    width: 100%;
}
.btn-add-pergola:hover { background: #f0f4f8; }
.btn-add-pergola-plus { font-size: 18px; font-weight: 700; }
.multi-pergola-notice {
    background: #fff8e1;
    border-left: 4px solid #f0ad4e;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    color: #5f4b00;
}
.pergola-mix-error {
    color: #b91c1c;
    font-size: 13px;
    margin-top: 8px;
    padding: 6px 10px;
    background: #fef2f2;
    border-radius: 6px;
}

/* Phase 2: Pergola tabs in Step 4 */
.pergola-tabs {
    margin: 0 0 14px;
    padding: 10px 12px;
    background: #f0f4f8;
    border-radius: 8px;
}
.pergola-tabs-label {
    font-size: 13px;
    color: #4a5563;
    margin-bottom: 6px;
    font-weight: 500;
}
.pergola-tabs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pergola-tab {
    background: #fff;
    border: 2px solid #d0d7de;
    color: #1e3a5f;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.pergola-tab:hover { border-color: #1e3a5f; }
.pergola-tab.active {
    background: #1e3a5f;
    color: #fff;
    border-color: #1e3a5f;
}

/* Phase 3: Multi-pergola summary block */
.multi-pergola-summary {
    background: #fff;
    border: 2px solid #1e3a5f;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.08);
}
.mp-summary-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 12px;
    border-bottom: 1px solid #e0e6ed;
    padding-bottom: 8px;
}
.mp-pergola-row {
    padding: 10px 0;
    border-bottom: 1px dashed #e0e6ed;
}
.mp-pergola-row:last-of-type { border-bottom: none; }
.mp-pergola-label {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 6px;
}
.mp-pergola-prices {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    color: #4a5563;
}
.mp-pergola-prices strong { color: #1e3a5f; }
.mp-grand-total {
    margin-top: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: #fff;
    border-radius: 8px;
}
.mp-grand-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    opacity: 0.95;
}
.mp-grand-rows {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 15px;
}
.mp-grand-rows strong { font-size: 17px; font-weight: 700; }
.mp-pdf-notice {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fff8e1;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    font-size: 12px;
    color: #6b5419;
}
