/* ==========================================================================
   NESDY — новый дизайн главной (изолированный namespace .hp / .h-)
   ========================================================================== */

.hp {
    --h-navy:    #20294a;
    --h-navy-2:  #28335a;
    --h-blue:    #2f6be0;
    --h-blue-d:  #2557c4;
    --h-text:    #1d2540;
    --h-muted:   #6b7488;
    --h-line:    #e3e8f2;
    --h-bg-grey: #eef2f8;
    --h-bg-soft: #f5f8fc;
    --h-radius:  10px;
    --h-shadow:  0 8px 30px rgba(31, 45, 80, .08);
    --h-container: 1200px;

    font-family: 'IBM Plex Sans', Arial, sans-serif;
    color: var(--h-text);
    font-size: 16px;
    line-height: 1.5;
}

.hp * { box-sizing: border-box; }
.hp img { max-width: 100%; height: auto; display: block; }
.hp a { text-decoration: none; }

.h-container {
    width: 100%;
    max-width: var(--h-container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Кнопки ---------- */
.h-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    padding: 0 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background .2s, color .2s, border-color .2s, opacity .2s;
    white-space: nowrap;
}
.h-btn svg { width: 18px; height: 18px; flex: none; }

.h-btn--primary { background: var(--h-blue); color: #fff; }
.h-btn--primary:hover { background: var(--h-blue-d); }

.h-btn--outline { background: transparent; color: var(--h-navy); border-color: #9aa6bd; height: 42px; padding: 0 18px; font-size: 14px; }
.h-btn--outline:hover { border-color: var(--h-blue); color: var(--h-blue); }

.h-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.h-btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.h-header { background: #fff; border-bottom: 1px solid var(--h-line); }
.h-header__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 88px;
    padding-top: 12px;
    padding-bottom: 12px;
}
.h-logo { flex: none; }
.h-logo img { width: 200px; height: auto; }

.h-header__info { display: flex; flex-direction: column; gap: 7px; max-width: 290px; }
.h-header__info-row { display: flex; align-items: center; gap: 8px; }
.h-header__icon { width: 18px; height: 18px; color: var(--h-blue); flex: none; }
.h-header__info-main { font-size: 13px; line-height: 1.3; color: var(--h-text); }
.h-header__info-sub { font-size: 13px; color: var(--h-muted); }

.h-header__phones { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.h-header__phones-icon { width: 22px; height: 22px; color: var(--h-blue); flex: none; }
.h-header__phones-list { display: flex; flex-direction: column; gap: 3px; }
.h-header__phone { font-size: 17px; font-weight: 600; color: var(--h-navy); white-space: nowrap; }
.h-header__phone:hover { color: var(--h-blue); }
.h-header__phone--sub { font-size: 13px; font-weight: 500; color: var(--h-muted); }
.h-header__phone--sub span { font-weight: 400; }

.h-header__callback { flex: none; }

.h-header__actions { display: flex; align-items: center; gap: 8px; }
.h-iconbtn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    color: var(--h-navy);
    transition: color .2s;
}
.h-iconbtn:hover { color: var(--h-blue); }
.h-iconbtn svg { width: 24px; height: 24px; }
.h-iconbtn--cart svg { width: 23px; height: 23px; }
.h-iconbtn__badge {
    position: absolute; top: -5px; right: -5px;
    min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 9px; background: var(--h-blue); color: #fff;
    font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
}

.h-burger { display: none; width: 42px; height: 42px; border: none; background: var(--h-bg-grey); border-radius: 8px; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.h-burger span { display: block; width: 20px; height: 2px; background: var(--h-navy); border-radius: 2px; transition: .25s; }
.h-burger.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.h-burger.is-active span:nth-child(2) { opacity: 0; }
.h-burger.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ==========================================================================
   NAV
   ========================================================================== */
.h-nav { background: #12192c; }
.h-nav__list { display: flex; align-items: stretch; gap: 4px; margin: 0; padding: 0; list-style: none; }
.h-nav__item { position: relative; }
.h-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 52px;
    padding: 0 18px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    transition: background .2s, color .2s;
}
.h-nav__link svg { width: 11px; height: 8px; transition: transform .2s; }
.h-nav__link:hover { background: rgba(255,255,255,.07); color: #fff; }
.h-nav__item--has-drop > .h-nav__link { color: #fff; }

/* Выпадающий каталог */
.h-nav__drop {
    position: absolute;
    top: 100%; left: 0;
    min-width: 280px;
    background: #fff;
    border-radius: 0 0 var(--h-radius) var(--h-radius);
    box-shadow: var(--h-shadow);
    padding: 8px 0;
    list-style: none; margin: 0;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: .2s;
    z-index: 30;
}
.h-nav__item--has-drop:hover .h-nav__drop { opacity: 1; visibility: visible; transform: translateY(0); }
.h-nav__item--has-drop:hover .h-nav__link svg { transform: rotate(180deg); }
.h-nav__drop a { display: block; padding: 10px 20px; font-size: 14px; color: var(--h-text); transition: background .15s, color .15s; }
.h-nav__drop a:hover { background: var(--h-bg-grey); color: var(--h-blue); }

/* ==========================================================================
   HERO
   ========================================================================== */
.h-hero {
    position: relative;
    background-color: #1a2340;
    background-image:
        linear-gradient(105deg, #1a2340 0%, #1f2a50 42%, rgba(31,42,80,.6) 60%, rgba(31,42,80,0) 84%),
        url(/assets/img/flanec.png);
    background-repeat: no-repeat, no-repeat;
    background-position: center, right -20px center;
    background-size: cover, auto 86%;
    color: #fff;
    overflow: hidden;
}
.h-hero__inner {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 440px;
    padding-top: 56px;
    padding-bottom: 56px;
}
.h-hero__content { width: 100%; max-width: 740px; }
.h-hero__title { font-size: 44px; line-height: 1.12; font-weight: 600; margin: 0 0 18px; letter-spacing: -.5px; max-width: 560px; }
.h-hero__subtitle { font-size: 19px; line-height: 1.45; font-weight: 500; color: #fff; margin: 0 0 30px; }

.h-hero__features { display: flex; flex-wrap: wrap; gap: 20px 40px; margin: 0 0 34px; padding: 0; list-style: none; }
.h-hero__feature { display: flex; align-items: flex-start; gap: 14px; }
.h-hero__feature svg { width: 42px; height: 42px; color: #9fb4ee; flex: none; }
.h-hero__feature strong { display: block; font-size: 15px; font-weight: 600; }
.h-hero__feature span { display: block; font-size: 13px; color: #aab4d2; margin-top: 2px; max-width: 170px; }

.h-hero__buttons { display: flex; flex-wrap: wrap; gap: 14px; }

/* ==========================================================================
   Общие секции
   ========================================================================== */
.h-section { padding: 64px 0; }
.h-section__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.h-section__title { font-size: 24px; font-weight: 700; color: var(--h-text); margin: 0; }
.h-section__title--center { text-align: center; margin-bottom: 40px; }
.h-section__link { display: inline-flex; align-items: center; gap: 8px; color: var(--h-blue); font-size: 15px; font-weight: 500; }
.h-section__link svg { width: 18px; height: 18px; transition: transform .2s; }
.h-section__link:hover svg { transform: translateX(4px); }

/* ---------- Каталог продукции ---------- */
.h-cat__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.h-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--h-line);
    border-radius: var(--h-radius);
    overflow: hidden;
    transition: box-shadow .25s, transform .25s, border-color .25s;
}
.h-card:hover { box-shadow: var(--h-shadow); transform: translateY(-4px); border-color: transparent; }
.h-card__img { height: 150px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.h-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.h-card:hover .h-card__img img { transform: scale(1.05); }
.h-card__title {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
    padding: 16px 16px 18px;
    background: var(--h-bg-grey);
    font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--h-text);
    flex: 1 1 auto;
}
.h-card__arrow {
    flex: none; width: 26px; height: 26px; border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M2.5 8h10M8.5 3.5 13 8l-4.5 4.5' stroke='%232f6be0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat;
    transition: background-color .2s;
}
.h-card:hover .h-card__arrow { background-color: #e7eefb; }

/* ---------- Преимущества ---------- */
.h-adv { background: var(--h-bg-grey); padding-top: 32px; }
.h-adv .h-section__title { margin-bottom: 32px; }
.h-adv__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.h-adv__item { display: flex; align-items: flex-start; gap: 16px; background: #fff; border-radius: var(--h-radius); padding: 26px 24px; box-shadow: var(--h-shadow); }
.h-adv__body { min-width: 0; }
.h-adv__icon { order: -1; flex: none; color: var(--h-blue); }
.h-adv__icon svg { width: 32px; height: 32px; }
.h-adv__title { font-size: 17px; font-weight: 600; margin: 0 0 8px; color: var(--h-text); }
.h-adv__text { font-size: 14px; color: var(--h-muted); margin: 0; line-height: 1.5; }

/* ---------- Статистика ---------- */
.h-stats { background: var(--h-navy); color: #fff; padding: 44px 0; }
.h-stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.h-stats__item { display: flex; align-items: center; gap: 16px; }
.h-stats__item svg { width: 44px; height: 44px; color: #8fa6e0; flex: none; }
.h-stats__item strong { display: block; font-size: 22px; font-weight: 600; line-height: 1.15; }
.h-stats__item span { display: block; font-size: 14px; color: #b9c2dd; margin-top: 4px; }

/* ---------- CTA / Консультация ---------- */
.h-cta {
    background-color: var(--h-bg-soft);
    background-image:
        linear-gradient(to right, var(--h-bg-soft) 30%, rgba(245,248,252,.55) 52%, rgba(245,248,252,0) 78%),
        url(/assets/img/callback.jpg);
    background-position: center, center right;
    background-size: cover, cover;
    background-repeat: no-repeat, no-repeat;
}
.h-cta__inner { display: flex; align-items: flex-start; gap: 40px; padding-top: 64px; padding-bottom: 64px; }
.h-cta__content { flex: 0 0 400px; }
.h-cta__title { font-size: 24px; font-weight: 700; margin: 0 0 12px; }
.h-cta__text { font-size: 16px; color: var(--h-text); margin: 0; }
.h-cta__form { flex: 1 1 auto; max-width: 560px; }

/* Форма */
.h-form { max-width: 520px; }
.h-form__token { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.h-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.h-form__input, .h-form__textarea {
    width: 100%;
    border: 1px solid var(--h-line);
    border-radius: 8px;
    background: #fff;
    padding: 13px 16px;
    font-family: inherit;
    font-size: 15px;
    color: var(--h-text);
    transition: border-color .2s;
}
.h-form__input:focus, .h-form__textarea:focus { outline: none; border-color: var(--h-blue); }
.h-form__textarea { min-height: 110px; resize: vertical; margin-bottom: 16px; display: block; }
.h-form__agree { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--h-muted); margin-bottom: 20px; cursor: pointer; }
.h-form__checkbox { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--h-blue); flex: none; }
.h-form__submit { min-width: 200px; }

/* AjaxForm сообщения */
.hp .af .form-control,
.hp form.feedback .feedback__input { font-family: inherit; }

/* ---------- Поставщики ---------- */
.h-sup { padding: 24px 0; }
.h-sup .h-section__title { margin: 0 0 32px; }
.h-sup__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 30px; align-items: center; }
.h-sup__item { display: flex; align-items: center; justify-content: center; height: 60px; }
.h-sup__item img { max-height: 48px; width: auto; object-fit: contain; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.h-footer { background: #181f36; color: #c2cae0; }
.h-footer__top {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr;
    gap: 30px;
    padding: 56px 20px;
}
.h-footer__logo { width: 180px; height: auto; margin-bottom: 18px; filter: brightness(0) invert(1); }
.h-footer__desc { font-size: 14px; line-height: 1.6; color: #97a1bd; margin: 0 0 20px; max-width: 280px; }
.h-footer__social { display: flex; gap: 10px; }
.h-footer__social a { width: 38px; height: 38px; border-radius: 8px; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; color: #c2cae0; transition: background .2s, color .2s; }
.h-footer__social a:hover { background: var(--h-blue); color: #fff; }
.h-footer__social svg { width: 20px; height: 20px; }

.h-footer__heading { font-size: 16px; font-weight: 600; color: #fff; margin: 0 0 16px; }
.h-footer__col { display: flex; flex-direction: column; gap: 7px; }
.h-footer__link { font-size: 14px; color: #97a1bd; transition: color .2s; }
.h-footer__link:hover { color: #fff; }

.h-footer__contacts { display: flex; flex-direction: column; gap: 14px; }
.h-footer__crow { display: flex; align-items: flex-start; gap: 10px; }
.h-footer__cicon { width: 18px; height: 18px; color: var(--h-blue); flex: none; margin-top: 3px; }
.h-footer__phones-col { display: flex; flex-direction: column; gap: 3px; }
.h-footer__phone { font-size: 17px; font-weight: 600; color: #fff; }
.h-footer__phone span { font-size: 12px; font-weight: 400; color: #97a1bd; }
.h-footer__contact { font-size: 14px; color: #97a1bd; transition: color .2s; }
a.h-footer__crow:hover .h-footer__contact { color: #fff; }
.h-footer__address { line-height: 1.5; }

.h-footer__bottom { border-top: 1px solid rgba(255,255,255,.1); }
.h-footer__bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; font-size: 13px; color: #8089a6; }
.h-footer__bottom a { color: #97a1bd; }
.h-footer__bottom a:hover { color: #fff; }

/* ==========================================================================
   АДАПТИВ
   ========================================================================== */
@media (max-width: 1200px) {
    .h-hero__title { font-size: 38px; }
    .h-cat__grid { grid-template-columns: repeat(3, 1fr); }
    .h-sup__grid { grid-template-columns: repeat(3, 1fr); gap: 26px; }
}

@media (max-width: 1024px) {
    .h-header__inner { flex-wrap: wrap; gap: 16px 24px; min-height: 0; }
    .h-header__info { order: 4; }
    .h-header__phones { margin-left: auto; }
    .h-header__callback { order: 5; }
    .h-burger { display: inline-flex; }

    .h-nav { display: none; }
    .h-nav.is-open { display: block; }
    .h-nav__list { flex-direction: column; gap: 0; }
    .h-nav__link { height: 50px; width: 100%; border-bottom: 1px solid rgba(255,255,255,.08); justify-content: space-between; }
    .h-nav__drop { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border-radius: 0; background: rgba(0,0,0,.18); display: none; padding: 0; }
    .h-nav__item--has-drop.is-open .h-nav__drop { display: block; }
    .h-nav__drop a { color: #d6dcec; padding-left: 34px; }
    .h-nav__drop a:hover { background: rgba(255,255,255,.06); color: #fff; }

    .h-hero { background-size: cover, auto 55%; background-position: center, right bottom; }
    .h-hero__inner { min-height: 0; }
    .h-hero__content { max-width: none; }

    .h-adv__grid { grid-template-columns: repeat(2, 1fr); }
    .h-stats__grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }

    .h-cta {
        background-image:
            linear-gradient(rgba(245,248,252,.9), rgba(245,248,252,.9)),
            url(/assets/img/callback.jpg);
        background-position: center, center;
    }
    .h-cta__inner { flex-direction: column; align-items: stretch; gap: 28px; }
    .h-cta__content { flex: none; }
    .h-cta__form { max-width: none; }

    .h-footer__top { grid-template-columns: 1fr 1fr; }
    .h-footer__about { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
    .h-section { padding: 44px 0; }
    .h-section__head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .h-section__title { font-size: 24px; }
    .h-hero {
        background-image:
            linear-gradient(180deg, rgba(26,35,64,.8), rgba(26,35,64,.96)),
            url(/assets/img/flanec.png);
        background-position: center;
        background-size: cover;
    }
    .h-hero__title { font-size: 30px; }
    .h-hero__subtitle { font-size: 16px; }
    .h-hero__features { gap: 18px; }
    .h-hero__feature span { max-width: none; }

    .h-cat__grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .h-adv__grid { grid-template-columns: 1fr; }
    .h-stats__grid { grid-template-columns: 1fr; }
    .h-sup__grid { grid-template-columns: repeat(2, 1fr); }

    .h-form__row { grid-template-columns: 1fr; }
    .h-form__submit { width: 100%; }

    .h-header__phones .h-header__phone--sub span { display: none; }
    .h-footer__top { grid-template-columns: 1fr; padding: 40px 20px; }
    .h-footer__bottom-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}
