/*
 * Страница «Планировки» (pages/floorplans.php) — по макету
 * new_pages/sun-hills-layan-floorplans-no-crop.html. Всё под .np--floorplans.
 * Переменные и базовые классы (.np-wrap, .np-btn, .np-chip…) — pages.css.
 */

.np--floorplans .np-btn {
    white-space: normal;
    text-align: center;
}

.np--floorplans .fp-btn-navy {
    background: var(--np-navy);
    color: #fff;
    min-height: 56px;
    padding: 14px 26px;
}

.np--floorplans .fp-btn-outline {
    background: #fff;
    border: 1px solid #cfd6dd;
    color: var(--np-ink);
}

.np--floorplans .fp-btn-white {
    background: #fff;
    color: #0c2234;
}

.np--floorplans .np-btn--green:hover {
    background: #5cc026;
}

/* ---------- Первый экран ---------- */
.np--floorplans .fp-hero {
    padding-bottom: 56px;
}

.np--floorplans .fp-h1 {
    margin: 0;
    max-width: 1060px;
    font-size: clamp(40px, 6.8vw, 84px);
    font-weight: 500;
    line-height: 1.03;
    letter-spacing: -.06em;
    overflow-wrap: anywhere;
}

.np--floorplans .fp-location {
    margin: 22px 0 0;
    color: #7e8790;
    font-size: clamp(18px, 2.3vw, 24px);
}

.np--floorplans .fp-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--np-green);
}

.np--floorplans .fp-hero-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
    margin-top: 32px;
}

.np--floorplans .fp-hero-bottom--single {
    grid-template-columns: minmax(0, 1fr);
}

.np--floorplans .fp-intro {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    min-height: 390px;
    padding: 35px;
    border-radius: 32px;
    background: var(--np-soft);
}

.np--floorplans .fp-hero-bottom--single .fp-intro {
    min-height: 0;
}

.np--floorplans .fp-intro-title {
    margin: 0 0 22px;
    font-size: clamp(30px, 3.8vw, 50px);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -.05em;
}

.np--floorplans .fp-intro-text {
    max-width: 470px;
    margin: 0 0 18px;
    color: #7d858e;
    font-size: 18px;
    line-height: 1.6;
}

.np--floorplans .fp-intro .np-btn {
    align-self: flex-start;
}

.np--floorplans .fp-gallery-wrap {
    min-width: 0;
}

.np--floorplans .fp-gallery {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    padding-bottom: 4px;
    border-radius: 28px;
}

.np--floorplans .fp-slide {
    position: relative;
    flex: 0 0 85%;
    height: 390px;
    margin: 0;
    overflow: hidden;
    border-radius: 28px;
    background: #f1f1f1;
    scroll-snap-align: start;
}

.np--floorplans .fp-gallery .fp-slide:only-child {
    flex-basis: 100%;
}

.np--floorplans .fp-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.np--floorplans .fp-gallery-hint {
    margin-top: 8px;
    color: #687581;
    font-size: 13px;
}

/* ---------- Планы ---------- */
.np--floorplans .fp-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 32px;
}

.np--floorplans .fp-head .np-h2 {
    margin: 0;
    font-weight: 500;
}

.np--floorplans .fp-head-text {
    max-width: 430px;
    margin: 0;
    color: #79828d;
    font-size: 17px;
    line-height: 1.6;
}

.np--floorplans .fp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 0 30px;
}

.np--floorplans .fp-filters[hidden] {
    display: none;
}

.np--floorplans .fp-filter {
    padding: 12px 21px;
    border: 1px solid #e3e6ea;
    border-radius: 999px;
    background: var(--np-soft);
    color: #4c5964;
    font-size: 16px;
    line-height: 1.2;
}

.np--floorplans .fp-filter:hover {
    border-color: #c3ccd4;
}

.np--floorplans .fp-filter.is-active {
    background: var(--np-navy);
    border-color: var(--np-navy);
    color: #fff;
}

.np--floorplans .fp-group + .fp-group {
    margin-top: 44px;
}

.np--floorplans .fp-group[hidden] {
    display: none;
}

.np--floorplans .fp-group-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 0 0 18px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -.03em;
}

.np--floorplans .fp-group-title span {
    color: var(--np-muted);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0;
}

.np--floorplans .fp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.np--floorplans .fp-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e0e4e7;
    border-radius: 30px;
    background: #fff;
}

/* План целиком, без обрезки («no-crop»): object-fit: contain */
.np--floorplans .fp-visual {
    position: relative;
    background: #f5f5f5;
}

.np--floorplans .fp-zoom {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 420px;
    padding: 34px;
    cursor: zoom-in;
}

.np--floorplans .np-wrap .fp-zoom img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    mix-blend-mode: multiply;
}

.np--floorplans .fp-expand {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    border-radius: 50%;
    background: #fff;
    color: #273745;
    font-size: 22px;
    box-shadow: 0 3px 12px rgba(7, 25, 37, .08);
}

.np--floorplans .fp-thumbs {
    display: flex;
    gap: 8px;
    padding: 0 20px 16px;
    overflow-x: auto;
}

.np--floorplans .fp-thumb {
    flex: 0 0 72px;
    height: 72px;
    padding: 6px;
    border: 1px solid var(--np-line);
    border-radius: 12px;
    background: #fff;
    cursor: zoom-in;
}

.np--floorplans .fp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.np--floorplans .fp-details {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 30px 32px 32px;
}

.np--floorplans .fp-topline {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    color: #8b939c;
    font-size: 14px;
}

.np--floorplans .fp-topline a {
    color: var(--np-link);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.np--floorplans .fp-name {
    margin: 16px 0 12px;
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
}

.np--floorplans .fp-size {
    font-size: clamp(32px, 3.6vw, 44px);
    font-weight: 650;
    line-height: 1.05;
    letter-spacing: -.05em;
}

.np--floorplans .fp-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.np--floorplans .fp-facts span {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--np-soft);
    color: #4f5c67;
    font-size: 13px;
}

.np--floorplans .fp-facts .fp-price {
    background: #eaf7ec;
    color: #2f7d47;
    font-weight: 650;
}

.np--floorplans .fp-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
    padding-top: 24px;
}

.np--floorplans .fp-buttons .np-btn {
    padding: 14px 12px;
    font-size: 14px;
}

.np--floorplans .fp-card--noimg .fp-details {
    background: linear-gradient(145deg, #f7f9fa, #eef3f6);
}

/* ---------- Сравнение форматов ---------- */
.np--floorplans .fp-compare {
    padding: 54px;
    border-radius: 40px;
    background: var(--np-soft);
}

.np--floorplans .fp-compare .np-h2 {
    font-weight: 500;
}

.np--floorplans .fp-compare-text {
    max-width: 750px;
    margin: 0;
    color: #7a858e;
    line-height: 1.6;
}

.np--floorplans .fp-formats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    margin-top: 30px;
}

.np--floorplans .fp-format {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 25px 20px;
    border: 1px solid #e0e6e9;
    border-radius: 24px;
    background: #fff;
}

.np--floorplans .fp-format-num {
    color: #91a4b3;
    font-size: 13px;
}

.np--floorplans .fp-format-title {
    margin: 18px 0 14px;
    font-size: 23px;
    letter-spacing: -.04em;
    font-weight: 650;
}

.np--floorplans .fp-format-area {
    margin-top: auto;
    color: #0c2234;
    font-size: 23px;
    font-weight: 700;
}

.np--floorplans .fp-format-price {
    margin-top: 4px;
    color: #4f5c67;
    font-size: 15px;
}

.np--floorplans .fp-format-units {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 10px;
    border-radius: 16px;
    background: #f0f7f0;
    color: #344b5a;
    font-size: 13px;
    line-height: 1.5;
}

.np--floorplans .fp-format-units b {
    color: #0a1d2b;
    font-weight: 600;
}

.np--floorplans .fp-format-units a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.np--floorplans .fp-unit-dot {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: #65ce35;
}

.np--floorplans .fp-format-btn {
    display: block;
    margin-top: 16px;
    padding: 12px 10px;
    border: 0;
    border-radius: 99px;
    background: #e9f3fb;
    color: #176ea6;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
}

.np--floorplans .fp-format-btn:hover {
    background: #dcecf8;
}

/* ---------- Заявка ---------- */
.np--floorplans .fp-cta-section {
    padding-top: 0;
}

.np--floorplans .fp-cta {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    align-items: center;
    gap: 35px;
    padding: 60px;
    border-radius: 36px;
    background: #0c2234;
    color: #fff;
}

.np--floorplans .fp-cta-eyebrow {
    color: #8ea4b5;
}

.np--floorplans .fp-cta-title {
    margin: 0 0 18px;
    font-size: clamp(32px, 4.6vw, 56px);
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -.055em;
}

.np--floorplans .fp-cta-text {
    margin: 0;
    color: #b9c6d0;
    font-size: 17px;
    line-height: 1.6;
}

.np--floorplans .fp-cta-buttons {
    display: grid;
    gap: 12px;
}

.np--floorplans .fp-cta-buttons .np-btn {
    padding: 18px 22px;
}

/* ---------- Просмотр плана (создаёт floorplans.js) ---------- */
.np--floorplans .fp-dialog {
    width: min(920px, 95vw);
    max-width: none;
    max-height: 92vh;
    padding: 0;
    border: 0;
    border-radius: 25px;
    background: #fff;
    box-shadow: 0 15px 100px rgba(0, 0, 0, .3);
}

.np--floorplans .fp-dialog::backdrop {
    background: rgba(7, 25, 37, .8);
}

.np--floorplans .fp-dialog-inner {
    padding: 18px 20px 24px;
}

.np--floorplans .fp-dialog-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 10px;
}

.np--floorplans .fp-dialog-bar strong {
    font-size: 18px;
}

.np--floorplans .fp-dialog-close {
    flex: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #f2f3f4;
    font-size: 26px;
    line-height: 1;
}

.np--floorplans .fp-dialog img {
    width: auto;
    max-width: 100%;
    max-height: 72vh;
    margin: 0 auto;
    object-fit: contain;
}

.np--floorplans .fp-dialog p {
    margin: 14px 0 0;
    color: #7c858e;
    font-size: 14px;
    text-align: center;
}

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
    .np--floorplans .fp-formats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .np--floorplans .fp-hero-bottom {
        grid-template-columns: minmax(0, 1fr);
    }

    .np--floorplans .fp-intro {
        min-height: 0;
    }

    .np--floorplans .fp-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .np--floorplans .fp-head {
        display: block;
    }

    .np--floorplans .fp-head-text {
        margin-top: 18px;
    }

    .np--floorplans .fp-cta {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .np--floorplans .fp-intro {
        padding: 26px;
        border-radius: 25px;
    }

    .np--floorplans .fp-intro-text {
        font-size: 16px;
    }

    .np--floorplans .fp-intro .np-btn {
        align-self: stretch;
    }

    .np--floorplans .fp-slide {
        flex-basis: 92%;
        height: 265px;
        border-radius: 24px;
    }

    .np--floorplans .fp-head-text {
        font-size: 15px;
    }

    .np--floorplans .fp-filters {
        gap: 7px;
    }

    .np--floorplans .fp-filter {
        padding: 10px 14px;
        font-size: 14px;
    }

    .np--floorplans .fp-group-title {
        font-size: 22px;
    }

    .np--floorplans .fp-card {
        border-radius: 24px;
    }

    .np--floorplans .fp-zoom {
        height: 320px;
        padding: 22px;
    }

    .np--floorplans .fp-expand {
        top: 12px;
        right: 12px;
    }

    .np--floorplans .fp-details {
        padding: 22px 22px 24px;
    }

    .np--floorplans .fp-buttons {
        grid-template-columns: minmax(0, 1fr);
    }

    .np--floorplans .fp-compare {
        padding: 28px 16px;
        border-radius: 26px;
    }

    .np--floorplans .fp-formats {
        gap: 10px;
    }

    .np--floorplans .fp-format {
        padding: 16px 12px;
        border-radius: 19px;
    }

    .np--floorplans .fp-format-title {
        font-size: 19px;
    }

    .np--floorplans .fp-format-area {
        font-size: 17px;
    }

    .np--floorplans .fp-format-price {
        font-size: 13px;
    }

    .np--floorplans .fp-format-units {
        padding: 10px 7px;
        font-size: 12px;
    }

    .np--floorplans .fp-format-btn {
        font-size: 12px;
        padding: 11px 6px;
    }

    .np--floorplans .fp-cta {
        padding: 32px 22px;
        border-radius: 26px;
    }

    .np--floorplans .fp-dialog-inner {
        padding: 14px;
    }

    .np--floorplans .fp-dialog-bar strong {
        font-size: 14px;
    }
}

@media (max-width: 370px) {
    .np--floorplans .fp-formats {
        grid-template-columns: minmax(0, 1fr);
    }
}
