/* ======================================= */
/* HEADER */
/* ======================================= */
/* solid, full-width header — flush with the viewport edges */
.header{
    position: fixed;
    left: 0;
    top: 0;
    right: 0;

    transition: transform 0.15s ease-in-out;

    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 0 var(--ed-line, #e4e2df);

    z-index: 10;
}

.scroll-up .header{
    transform: translateY(0);
}

.scroll-down .header{
    transform: translateY(-100%);
}

.admin-bar .header{
    top: 32px;
}

@media screen and (max-width: 782px){
    .admin-bar .header{
        top: 46px;
    }
}

.header-inside{
    display: flex;
    align-items: center;

    padding: 12px 0;
}

/* ---------- brand block: red vignette logo + caption ---------- */
.logo-container{
    display: flex;
    align-items: center;
    margin-right: auto;
}

.logo{
    display: block;

    width: 150px;

    background: url("../images/logo-upd.svg") center center / 100% no-repeat;
}

.logo:before{
    content: "";

    display: block;
    padding-top: 36.39803947719392%;
}

.logo-text{
    position: relative;

    color: var(--gray);
    font-size: 12px;
    line-height: 1.5;
    text-transform: none;
    letter-spacing: 0.01em;

    margin-left: 24px;
    padding-left: 24px;
}

.logo-text:before{
    content: "";

    position: absolute;
    left: 0;
    top: 50%;
    margin-top: -18px;

    height: 36px;

    border-left: 1px solid var(--light-gray);
}

.logo-text strong{
    color: var(--common);
    font-weight: 600;
    font-size: 12px;
}

.header-menu{
    /* intentionally NOT position:relative — .catalog-menu-panel needs to
       bind to .header (the next positioned ancestor up) instead, so it can
       span the full header width edge-to-edge rather than a small floating
       box hanging off this wrapper */
}

/* ---------- primary nav ---------- */
.nav-menu{
    display: flex;
    align-items: center;
}

.nav-menu > .menu-item{
    position: relative;

    padding: 0 18px;
}

.nav-menu > .menu-item > a{
    display: block;

    color: var(--common);
    font: 400 12px/1.4 var(--font);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    white-space: nowrap;

    padding: 12px 0;
}

/* every nav item reads at equal weight — no red/accent treatment;
   red belongs to the logo and nowhere else */
.nav-menu > .menu-item.accent > a{
    color: var(--common);
    font-weight: 400;
}

@media screen and (min-width: 1025px){
    .nav-menu > .menu-item > a{
        transition: opacity var(--dur) ease-in-out;
    }

    .nav-menu > .menu-item > a:hover,
    .nav-menu > .menu-item.accent > a:hover{
        color: var(--common);
        opacity: 0.5;
    }
}

/* ---------- category panel ("Каталог") — flat, full-width, solid strip
   flush under the header, plain text only (deVOL Kitchens pattern: opaque
   panel, no imagery, no card/shadow/radius). left:0/right:0 here bind to
   .container (the nearest positioned ancestor, see .header-menu above),
   whose own box already spans the header's full effective width, so this
   lines up edge-to-edge with the header without any extra positioning
   trick. Open state is driven by JS hover-intent (.js-open on
   .header-menu), NOT plain CSS :hover — the gap between the nav link and
   the panel below it is a dead zone that :hover alone cannot bridge, so a
   pure-CSS version drops out the moment the cursor crosses it. See
   js/catalog.js for the mouseenter/mouseleave-with-delay logic. */
.catalog-menu-panel{
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;

    background-color: var(--ed-bg-soft, #f7f6f4);
    border-top: 1px solid var(--ed-line, #e4e2df);
    box-shadow: 0 1px 0 var(--ed-line, #e4e2df);

    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out, visibility 0.2s;
}

.header-menu.js-open .catalog-menu-panel{
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.catalog-menu-panel__inner{
    display: flex;
    flex-wrap: wrap;
    column-gap: 56px;
    row-gap: 14px;

    max-width: 1770px;
    padding: 26px 32px;
    margin: 0 auto;
}

.catalog-menu-panel__item{
    display: block;

    color: var(--common);
    font: 400 16px/1.4 var(--font);
    letter-spacing: 0.01em;
}

@media screen and (min-width: 1025px){
    .catalog-menu-panel__item{
        transition: opacity var(--dur) ease-in-out;
    }

    .catalog-menu-panel__item:hover{
        opacity: 0.5;
    }
}

/* ---------- phone + CTA ---------- */
.head-contacts{
    display: flex;
    align-items: center;

    margin-left: 28px;
}

.head-contacts .head-phone{
    color: var(--common);
    font: 600 13px/1.4 var(--font);
    letter-spacing: 0.02em;
    white-space: nowrap;

    margin-right: 24px;
}

@media screen and (min-width: 1025px){
    .head-contacts .head-phone{
        transition: opacity var(--dur) ease-in-out;
    }

    .head-contacts .head-phone:hover{
        opacity: 0.55;
    }
}

/* quiet outlined CTA — premium restraint, the only framed element in the row */
.btn-outline{
    display: inline-block;

    padding: 12px 22px;

    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 1px solid var(--common);
    border-radius: 0;

    color: var(--common);
    font: 400 11px/1.2 var(--font);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;

    cursor: pointer;
    transition: background-color var(--dur) ease-in-out, color var(--dur) ease-in-out;
}

.btn-outline:hover{
    background-color: var(--common);
    color: var(--light);
}

/* ---------- mobile hamburger ---------- */
.menu-btn{
    padding: 18px 10px;
    margin-left: 12px;

    cursor: pointer;
    user-select: none;
}

/* the hamburger is a mobile-only affordance — on desktop the full nav-menu
   (with the category dropdown) is already visible */
@media screen and (min-width: 1025px){
    .menu-btn{
        display: none;
    }
}

.menu-btn__row{
    position: relative;

    width: 32px;
    height: 1px;

    margin-top: 6px;

    background-color: var(--common);
}

.menu-btn__row:first-child{
    margin: 0;
}

.menu-btn:active .menu-btn__row:first-child{
    top: 1px;
}

.menu-btn:active .menu-btn__row:last-child{
    top: -1px;
}

@media screen and (min-width: 1025px){
    .menu-btn__row{
        transition: background-color var(--dur) ease-in-out;
    }

    .menu-btn:hover .menu-btn__row{
        background-color: var(--gray);
    }
}

/* ======================================= */
/* mobile full-screen menu */
/* ======================================= */
/* mobile menu — matches the light, solid header now (was a dark full-bleed
   panel left over from the old theme; kept the slide-in mechanics, flipped
   the palette to light so it reads as one continuous brand, not two) */
.modal-menu{
    display: none;

    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;

    width: 100%;
    max-width: 645px;

    padding-top: 78px;

    color: var(--common);

    background-color: var(--light);
    box-shadow: -8px 0 40px rgba(0,0,0,0.1);

    box-sizing: border-box;

    transition: all 0.3s ease-in-out;


    transform: translateX(100%);
    opacity: 0;

    z-index: 11;
}

.modal-menu.active{
    display: block;
}

.modal-menu.visible{
    transform: translateX(0);
    opacity: 1;
}


.admin-bar .modal-menu{
    top: 32px;
}

@media screen and (max-width: 782px){
    .admin-bar .modal-menu{
        top: 46px;
    }
}

.modal-menu__head{
    position: absolute;
    left: 0;
    top: 0;
    right: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 22px 75px 16px 40px;
}

.modal-menu__logo{
    width: 90px;
}

.close-modal-menu{
    padding: 10px;
    margin-right: -10px;

    user-select: none;
    cursor: pointer;
}

.close-modal-menu:active{
    transform: scale(0.96);
}

.close-modal-icon{
    width: 20px;
    height: 20px;
}

.close-modal-icon.line{
    fill: var(--common);
}

.modal-menu__body{
    display: flex;
    flex-direction: column;

    height: 100%;

    padding: 0 75px;

    overflow: auto;
}

/* ---------- contacts block: one tidy card at the top, not three loose
   scattered elements — phone+WhatsApp share a row, CTA is a real filled
   button (was an underlined text link, easy to miss / hard to tap) ---------- */
.modal-menu__contacts{
    display: flex;
    align-items: center;
    gap: 12px;

    padding-bottom: 28px;
    margin-bottom: 28px;

    border-bottom: 1px solid var(--light-gray);
}

.modal-menu__phone-row{
    display: flex;
    align-items: center;
    gap: 10px;

    color: var(--common);
    font: 600 19px/1.3 var(--font);
}

.modal-menu__phone-icon{
    flex: none;

    width: 20px;
    height: 20px;

    fill: none;
    stroke: var(--common);
    stroke-width: 1.4;
}

.modal-menu__whatsapp-btn{
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;

    width: 38px;
    height: 38px;

    border-radius: 50%;
    background-color: #1bd741;
}

.modal-menu__whatsapp-btn svg{
    width: 20px;
    height: 20px;
    fill: var(--light);
}

.modal-menu__cta{
    width: 100%;
    margin-top: 16px;
}

.btn-solid{
    display: inline-block;

    padding: 15px 20px;
    width: auto;

    -webkit-appearance: none;
    appearance: none;
    border: 1px solid var(--common);
    border-radius: 0;

    background-color: var(--common);
    color: var(--light);
    font: 400 12px/1.2 var(--font);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;

    cursor: pointer;
}

/* ---------- nav hierarchy: "Каталог" (the money section) reads as a real
   heading, the rest of the utility links (about/news/sale/contacts) are
   demoted to a quieter, denser block instead of matching it item-for-item —
   a flat list where everything looks equally important is what made this
   read as a generic default WP menu ---------- */
.additional-menu{
    font-size: 0;
    line-height: 0;
}

.additional-menu > .menu-item{
    padding: 14px 0;

    border-bottom: 1px solid var(--light-gray);
}

.additional-menu > .menu-item:first-child{
    padding-top: 0;
}

.additional-menu > .menu-item > a{
    display: block;

    color: var(--common);
    font: 400 15px/1.3 var(--font);
    letter-spacing: 0.02em;

    padding: 2px 0;
}

/* "Каталог" — the one item with children — gets the visual weight */
.additional-menu > .menu-item-has-children{
    padding-top: 0;
    padding-bottom: 20px;
}

.additional-menu > .menu-item-has-children > a{
    font: 600 24px/1.3 var(--font);
    letter-spacing: 0.01em;
}

.additional-menu > .menu-item.accent > a{
    color: var(--common);
    font-weight: 400;
}

/* nested categories under "Каталог" — tied to it with a left accent rule
   instead of just hanging indented text */
.additional-menu .sub-menu{
    padding: 10px 0 4px 16px;
    margin: 4px 0 0;

    border-left: 1px solid var(--light-gray);
}

.additional-menu .sub-menu .menu-item{
    padding: 7px 0;
    border-bottom: none;
}

.additional-menu .sub-menu .menu-item > a{
    font: 400 17px/1.3 var(--font);
    text-transform: none;
    padding: 0;
}

@media screen and (min-width: 1025px){
    .additional-menu > .menu-item > a,
    .additional-menu .sub-menu .menu-item > a{
        transition: opacity var(--dur) ease-in-out;
    }

    .additional-menu > .menu-item > a:hover,
    .additional-menu .sub-menu .menu-item > a:hover,
    .additional-menu > .menu-item.accent > a:hover{
        opacity: 0.55;
    }

    .close-modal-icon.line{
        transition: opacity var(--dur) ease-in-out;
    }

    .close-modal-menu:hover .close-modal-icon.line{
        opacity: 0.6;
    }
}

/* ======================================= */
/* responsive */
/* ======================================= */
@media screen and (max-width: 1650px){
    .nav-menu > .menu-item{
        padding: 0 12px;
    }

    .logo-text{
        margin-left: 16px;
        padding-left: 16px;
    }

    .head-contacts{
        margin-left: 18px;
    }
}

@media screen and (max-width: 1440px){
    .logo-text{
        max-width: 240px;
    }
}

@media screen and (max-width: 1380px){
    .nav-menu > .menu-item > a{
        font-size: 11px;
    }

    .head-contacts .head-phone{
        font-size: 12px;
        margin-right: 16px;
    }

    .btn-outline{
        padding: 10px 16px;
    }

    .nav-menu > .menu-item{
        padding: 0 8px;
    }

    .logo{
        width: 130px;
    }

    .logo-text{
        font-size: 11px;
        max-width: 210px;
    }

    .logo-text strong{
        font-size: 11px;
    }
}

@media screen and (min-width: 1025px) and (max-width: 1230px){
    .logo-text{
        display: none;
    }
}

@media screen and (max-width: 1024px){
    .header-inside{
        padding: 10px 0;
    }

    .nav-menu{
        display: none;
    }

    /* phone + quick-request live in the mobile menu (.modal-menu__contacts) */
    .head-contacts{
        display: none;
    }

    .menu-btn{
        margin-right: -10px;
    }

    .logo{
        width: 120px;
    }

    .modal-menu{
        padding-top: 60px;
        max-width: 535px;
    }

    .modal-menu__head{
        padding: 10px 20px;
    }

    .modal-menu__body{
        padding: 0 20px;
    }

    .additional-menu > .menu-item-has-children > a{
        font-size: 21px;
    }
}

@media screen and (max-width: 841px){
    .menu-btn{
        margin-left: 4px;
    }

    .modal-menu__contacts{
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
}

@media screen and (max-width: 767px){
    .logo-text{
        font-size: 10px;
        max-width: 200px;
    }

    .logo-text strong{
        font-size: 11px;
    }
}
