/* ---------------------------------------------------------------
   header.css - header and top menu of mmoscal
   Linked from index.tpl.html right after head.tpl.html, so it loads
   after style.css and wins the cascade without touching style.css,
   trig.css or media.css. Prefix: mh-
   --------------------------------------------------------------- */

body div.mh {
    background: #f2f9fc;
    background: linear-gradient(180deg, #fdfeff 0%, #f2f9fc 60%, #e6f3f9 100%);
    font-family: "Open Sans", Arial, sans-serif;
}

/* The page grid is fluid: div.sidenav has margin-left 1% and div.content
   has padding 0 1%, so the gutters are 1% of the viewport, not a fixed
   pixel value. The header must use the same gutters, otherwise the logo
   drifts away from the sidebar on wide monitors. */

.mh-in {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: none;
    margin: 0;
    padding: 16px 1%;
    box-sizing: border-box;
}

/* ---- brand -------------------------------------------------------- */

.mh-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
    text-decoration: none;
}

.mh-brand:hover { text-decoration: none; }

.mh-logo {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    object-fit: cover;
    object-position: left top;
    border: 0;
}

.mh-brand-text { display: block; }

.mh-name {
    display: block;
    color: #123f63;
    font-size: 38px;
    font-weight: 800;
    line-height: .95;
    letter-spacing: -.01em;
}

.mh-tag {
    display: block;
    color: #123f63;
    font-size: 14px;
    line-height: 1.45;
}

.mh-name + .mh-tag { margin-top: 7px; }

/* ---- phone and call ----------------------------------------------- */

.mh-contacts {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    flex: 1 1 auto;
}

.mh-tel {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #123f63 !important;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
}

.mh-tel:hover { text-decoration: none; }

.mh-hours {
    color: #7d9dad;
    font-size: 13px;
}

.mh-call {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 20px;
    border: 1px solid rgba(27, 111, 156, .35);
    border-radius: 12px;
    background: rgba(27, 111, 156, .1);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    backdrop-filter: blur(12px) saturate(160%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
    color: #12507d !important;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    -webkit-transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
    transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.mh-call:hover {
    background: rgba(120, 200, 255, .22);
    border-color: #5aa9d6;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 18px rgba(90, 180, 235, .45);
    text-decoration: none;
}

/* style.css:600 and :622 turn ".zvonok span" into a button of its own -
   190x32 with its own border, radius and shadow. Inside the new glass
   button that showed up as a button within a button. Reset here. */

.mh-call span {
    display: inline;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: inherit;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.2;
    text-shadow: none;
}

.mh-call:hover span {
    background: none;
    border-color: transparent;
    color: inherit;
    text-shadow: none;
}

/* ---- cart ---------------------------------------------------------- */

.mh-cart-wrap { flex: 0 0 auto; } /* display: flex - see favorites below */

body div.mh .basket {
    position: static;
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    color: #123f63;
    font-size: 100%;
    text-align: left;
}

.mh-cart {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #123f63 !important;
    text-decoration: none;
}

.mh-cart:hover { text-decoration: none; }

.mh-cart-ico {
    position: relative;
    display: flex;
    color: #1b6f9c;
}

.mh-cart-badge {
    position: absolute;
    top: -5px;
    right: -7px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    box-sizing: border-box;
    border-radius: 10px;
    background: #1b6f9c;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 19px;
    text-align: center;
}

.mh-cart-text {
    display: block;
    line-height: 1.35;
}

.mh-cart-label {
    display: block;
    font-size: 15px;
}

.mh-cart-sum {
    display: block;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap; /* "119 070 &#8381;" - one line */
}

/* ---- favorites (heart next to the cart) ------------------------------
   Markup: index.tpl.html, counter kept in sync by js/catalog.js
   ([data-fav-count]); the list itself lives in the mm_fav cookie. */

.mh-cart-wrap {
    display: flex;
    align-items: center;
    gap: 28px;
}

a.mh-fav {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #123f63 !important;
    font-size: 15px;
    text-decoration: none !important;
}

a.mh-fav .mh-cart-ico { color: #1b6f9c; }
a.mh-fav:hover .mh-cart-ico { color: #e05a4e; }
a.mh-fav .mh-cart-badge { background: #e05a4e; }

.mh-cart-badge.is-empty,
.mh-mob-badge.is-empty { display: none; }

.mh-mob-fav .mh-mob-badge { background: #e05a4e; }

/* ---- личный кабинет (значок слева от избранного, includes/dz_lk.php) ----
   зелёная точка - покупатель вошёл */
a.mh-lk:hover .mh-cart-ico { color: #0d6efd; }
.mh-lk-dot {
    position: absolute;
    top: 0;
    right: -2px;
    width: 9px;
    height: 9px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #22a45d;
}
.mh-mob-lk .mh-lk-dot { top: 5px; right: 5px; }

/* a short "pulse" when a product is added */
.mh-fav.is-bump .mh-cart-ico,
.mh-mob-fav.is-bump svg { animation: mh-fav-bump .45s ease; }

@keyframes mh-fav-bump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* style.css:2381 styles ".basket > a" as the old checkout link:
   dashed underline, padding-top 35px, fixed width 100px. The new cart is
   exactly such a child, so all of it has to go. */

body div.mh .basket > a.mh-cart {
    width: auto;
    padding: 0;
    border-bottom: 0;
    color: #123f63;
}

body div.mh .basket > a.mh-cart:hover {
    color: #1b6f9c;
    text-decoration: none;
}

/* trig.css:190 pins ".new_basket" to the top right corner as a floating
   pill. mai1.js adds that class on scroll when the cart is not empty,
   which would tear the cart out of the new header. */

body div.mh .basket.new_basket {
    position: static;
    top: auto;
    right: auto;
    z-index: auto;
    width: auto;
    height: auto;
    margin: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font-size: 100%;
}

/* ---- navigation bar ------------------------------------------------ */

body div.navigation_wrap.mh-nav {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    /* the bar is a stacking context and the search dropdown lives inside it,
       so this number has to beat anything positioned in the page body */
    z-index: 1000;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    background: #1b6f9c;
    background: linear-gradient(180deg, #2585b4 0%, #1b6f9c 55%, #155b81 100%);
    box-shadow: none;
    font-size: 100%;
}

body div.navigation_wrap.mh-nav .navigation {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-width: 0;
    /* was overflow:hidden - it cut off the search dropdown, which is
       positioned inside this very block */
    overflow: visible;
    gap: 10px 22px;
    width: auto;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 10px 1%;
    box-sizing: border-box;
    background: none;
    float: none;
}

.mh-nav .navigation_new {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding: 0;
    background: none;
}

.mh-cat {
    display: flex;
    align-items: center;
    gap: 11px;
    width: auto;
    height: auto;
    margin: 0;
    padding: 9px 18px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 10px;
    background: rgba(255, 255, 255, .16);
    -webkit-backdrop-filter: blur(14px) saturate(170%);
    backdrop-filter: blur(14px) saturate(170%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
    color: #fff;
    font-size: 15px;
    line-height: 1.2;
    cursor: pointer;
    -webkit-transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
    transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.mh-cat:hover {
    background: rgba(140, 215, 255, .24);
    border-color: #8fd8f5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 18px rgba(90, 200, 255, .45);
}

/* min-width:0 lets the menu shrink below the width of its own text.
   Without it a flex item never goes under its min-content width, the row
   cannot fit, and the search field gets pushed past the right edge of the
   page - which is what produced the horizontal scrollbar. */

body div.navigation_wrap.mh-nav ul#topmenuwpaka {
    display: flex;
    align-items: center;
    gap: 12px 26px;
    flex: 1 1 auto;
    flex-wrap: wrap;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 0;
    background: none;
    float: none;
}

body div.navigation_wrap.mh-nav ul#topmenuwpaka li {
    float: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    list-style: none;
}

body div.navigation_wrap.mh-nav ul#topmenuwpaka li a {
    display: inline-block;
    padding: 0;
    background: none;
    color: #fff;
    font-size: 15px;
    line-height: 1.2;
    text-decoration: none;
    text-shadow: none;
    white-space: nowrap;
}

body div.navigation_wrap.mh-nav ul#topmenuwpaka li a:hover {
    color: #fff;
    text-decoration: underline;
}

body div.navigation_wrap.mh-nav ul#topmenuwpaka li a.pasprodlink {
    color: #f2c16b !important;
    font-weight: 600;
    text-shadow: none !important;
}

body div.navigation_wrap.mh-nav ul#topmenuwpaka li.active a {
    text-decoration: underline;
}

/* ---- search inside the navigation bar ------------------------------ */

/* flex-basis 170px with grow lets the field take the space that is
   actually left in the row instead of demanding 260px and pushing itself
   off the page. max-width keeps it from stretching across the whole bar
   when the menu is short. */

body div.navigation_wrap.mh-nav .search.mh-search {
    position: static;
    flex: 1 1 170px;
    width: auto;
    min-width: 140px;
    max-width: 260px;
    height: auto;
    margin: 0 0 0 auto;
    padding: 0;
    background: none;
    box-sizing: border-box;
}

.mh-form { margin: 0; }

.mh-field {
    display: flex;
    box-sizing: border-box;
    max-width: 100%;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 9px;
    background: #dceef8;
    -webkit-transition: box-shadow .25s ease, border-color .25s ease;
    transition: box-shadow .25s ease, border-color .25s ease;
}

.mh-field:hover,
.mh-field:focus-within {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}

.mh-field-ico {
    display: flex;
    flex: 0 0 auto;
    color: #1b6f9c;
    line-height: 0;
}

.mh-field-input {
    flex: 1 1 auto;
    min-width: 0;
}

.mh-field-input input {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #123f63;
    font-family: "Open Sans", Arial, sans-serif;
    font-size: 15px;
    line-height: 22px;
    outline: none;
}

/* trig.css:2710 and :2789 give ".form-control" its own white background,
   border and a 4px blue focus ring. Inside the new field that looked like
   a second input drawn on top of the first one. */

.mh-field-input input:focus,
.mh-field-input input:active {
    border: 0;
    background: none;
    box-shadow: none;
    outline: none;
}

.mh-field-input input::-webkit-input-placeholder { color: #7a99a9; }
.mh-field-input input::-moz-placeholder { color: #7a99a9; }
.mh-field-input input:-ms-input-placeholder { color: #7a99a9; }
.mh-field-input input::placeholder { color: #7a99a9; }

/* ---- mobile bar ----------------------------------------------------- */

#topfixx.mh-mob { display: none; }

.mh-mob-btn {
    position: static;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 1px solid #a8cfe2;
    border-radius: 9px;
    background: #fff;
    color: #1b6f9c;
    cursor: pointer;
}

#lefmunuhide.mh-mob-btn {
    border-color: rgba(255, 255, 255, .5);
    background: linear-gradient(180deg, #2585b4 0%, #1b6f9c 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}

#lefmunuhide.mh-mob-btn img {
    width: 20px;
    height: auto;
    border: 0;
}

.mh-mob-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1 1 auto;
    min-width: 0;
    text-decoration: none;
}

.mh-mob-logo {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    object-fit: cover;
    object-position: left top;
    border: 0;
}

.mh-mob-text {
    display: block;
    min-width: 0;
}

.mh-mob-name {
    display: block;
    color: #123f63;
    font-size: 20px;
    font-weight: 800;
    line-height: .95;
    letter-spacing: -.01em;
}

.mh-mob-tag {
    display: block;
    margin-top: 2px;
    color: #7d9dad;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mh-mob-cart {
    position: relative;
    text-decoration: none;
}

.mh-mob-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    box-sizing: border-box;
    border-radius: 9px;
    background: #1b6f9c;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 17px;
    text-align: center;
}

/* ---- "added to cart" toast (js/cart-toast.js) ----------------------
   Same look as the cart page (css/cart.css): white card, blue #0d6efd
   button, product photo and name, a bar that shows when it closes
   (pauses on hover). */

.mh-toast {
    position: fixed;
    top: 90px;
    right: 18px;
    z-index: 1200;
    width: 350px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    overflow: hidden;
    padding: 16px 18px 18px;
    border: 1px solid #d9e6f2;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(16, 41, 74, .18), 0 2px 6px rgba(16, 41, 74, .06);
    color: #10294a;
    font-family: Arial, Helvetica, sans-serif;
    text-align: left;
    -webkit-transform: translateX(120%);
    transform: translateX(120%);
    -webkit-transition: transform .35s ease, opacity .35s ease;
    transition: transform .35s ease, opacity .35s ease;
    opacity: 0;
}

.mh-toast * { box-sizing: border-box; }

.mh-toast.is-open {
    -webkit-transform: translateX(0);
    transform: translateX(0);
    opacity: 1;
}

.mh-toast-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #14713f;
    font-size: 15px;
    font-weight: 700;
}

.mh-toast-head svg { flex: 0 0 auto; }
.mh-toast-title { flex: 1 1 auto; }

.mh-toast-x {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    margin: -4px -6px -4px 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #8a97a8;
    cursor: pointer;
}

.mh-toast-x:hover { background: #eef3f8; color: #10294a; }

.mh-toast-prod {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 10px;
    background: #f5f9fd;
}

.mh-toast-img {
    flex: 0 0 64px;
    width: 64px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    background: #fff;
}

.mh-toast-ptxt {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.mh-toast-pname {
    font-size: 14px;
    line-height: 1.3;
}

.mh-toast-popts {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #5b6b80;
    font-size: 12.5px;
    line-height: 1.35;
}

.mh-toast-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    color: #4a5a6e;
    font-size: 14px;
    line-height: 1.7;
}

.mh-toast-row b {
    color: #10294a;
    font-size: 15px;
    white-space: nowrap;
}

.mh-toast-btns {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.mh-toast-go,
.mh-toast-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    font: 700 14px/1.2 Arial, Helvetica, sans-serif;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.mh-toast-go {
    border: 0;
    background: #0d6efd;
    background: linear-gradient(180deg, #2a82ff 0%, #0d6efd 100%);
    box-shadow: 0 6px 14px rgba(13, 110, 253, .28);
    color: #fff !important;
}

.mh-toast-go:hover {
    box-shadow: 0 8px 18px rgba(13, 110, 253, .38);
    text-decoration: none;
}

.mh-toast-close {
    border: 1px solid #cfdbe7;
    background: #fff;
    color: #10294a;
}

.mh-toast-close:hover { border-color: #0d6efd; color: #0d6efd; }

.mh-toast-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: #0d6efd;
    opacity: .35;
    -webkit-transform-origin: left center;
    transform-origin: left center;
}

@media only screen and (max-width: 640px) {

    .mh-toast {
        top: auto;
        bottom: 14px;
        right: 12px;
        left: 12px;
        width: auto;
        -webkit-transform: translateY(140%);
        transform: translateY(140%);
    }

    .mh-toast.is-open {
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

/* ---- the cart as a panel over the page (js/cart-drawer.js) -----------
   Only when Settings -> Cart and order = overlay. Same look as the cart
   page (css/cart.css). */

.crd {
    position: fixed;
    inset: 0;
    z-index: 2100;
    color: #10294a;
    font-family: Arial, Helvetica, sans-serif;
    text-align: left;
}

.crd[hidden] { display: none; }
.crd * { box-sizing: border-box; }

.crd-back {
    position: absolute;
    inset: 0;
    background: rgba(10, 25, 45, .45);
    opacity: 0;
    transition: opacity .3s ease;
}

.crd-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: 440px;
    max-width: 100%;
    background: #fff;
    box-shadow: -12px 0 40px rgba(10, 25, 45, .2);
    transform: translateX(100%);
    transition: transform .3s ease;
}

.crd.is-open .crd-back { opacity: 1; }
.crd.is-open .crd-panel { transform: none; }
body.crd-lock { overflow: hidden; }

.crd-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e3eaf2;
}

.crd-title { font-size: 20px; font-weight: 700; }
.crd-title span { color: #5b6b80; font-weight: 400; }

.crd-x {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #10294a;
    cursor: pointer;
}

.crd-x:hover { background: #e3eaf2; }

.crd-added {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 20px 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #e7f6ec;
    color: #14713f;
    font-size: 14px;
    font-weight: 700;
}

.crd-added[hidden] { display: none; }

.crd-content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 6px 20px 10px;
    overscroll-behavior: contain;
}

.crd-load { display: flex; justify-content: center; padding: 50px 0; }

.crd-load span {
    width: 32px;
    height: 32px;
    border: 3px solid #d9e6f2;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: crdSpin .8s linear infinite;
}

@keyframes crdSpin { to { transform: rotate(360deg); } }

.crd-err { padding: 30px 0; color: #c62f33; text-align: center; }

.crd-empty {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 50px 0;
    text-align: center;
    color: #5b6b80;
}

.crd-empty b { color: #10294a; font-size: 17px; }

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

.crd-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 14px 26px 14px 0;
    border-bottom: 1px solid #eef2f6;
    transition: opacity .2s ease, background .6s ease;
}

.crd-item.is-new { animation: crdNew 1.6s ease; }
@keyframes crdNew { 0%, 40% { background: #eaf3ff; } 100% { background: transparent; } }
.crd-item.is-busy { opacity: .5; pointer-events: none; }

.crd-img {
    flex: 0 0 84px;
    height: 64px;
    overflow: hidden;
    border-radius: 8px;
    background: #f1f5f9;
}

.crd-img img { display: block; width: 100%; height: 100%; object-fit: cover; }

.crd-body { flex: 1 1 auto; min-width: 0; }

a.crd-name {
    display: block;
    color: #10294a !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
}

a.crd-name:hover { color: #0d6efd !important; text-decoration: none; }

.crd-opts {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 3px;
    color: #5b6b80;
    font-size: 12.5px;
    line-height: 1.35;
}

.crd-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.crd-qty {
    display: inline-flex;
    align-items: center;
    height: 32px;
    border: 1px solid #cfdbe7;
    border-radius: 8px;
}

.crd-qty button {
    width: 30px;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: #10294a;
    font-size: 17px;
    cursor: pointer;
}

.crd-qty button:disabled { color: #c3ccd6; cursor: default; }
.crd-qty button:not(:disabled):hover { color: #0d6efd; }
.crd-qty span { min-width: 22px; font-weight: 700; font-size: 14px; text-align: center; }

.crd-price { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.crd-price s { color: #8a97a8; font-size: 12px; }
.crd-price b { font-size: 16px; }

.crd-del {
    position: absolute;
    top: 12px;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #8a97a8;
    cursor: pointer;
}

.crd-del:hover { background: #fdecec; color: #e0393e; }

.crd-sum { padding: 12px 0 4px; }

.crd-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0;
    color: #4a5a6e;
    font-size: 14px;
}

.crd-line--disc span + span { color: #e0393e; }

.crd-line--total {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid #e3eaf2;
    color: #10294a;
    font-size: 16px;
    font-weight: 700;
}

.crd-line--total b { font-size: 20px; }

.crd-foot {
    padding: 14px 20px 18px;
    border-top: 1px solid #e3eaf2;
    background: #f5f9fd;
}

.crd.is-empty .crd-go { display: none; }

a.crd-go {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    border-radius: 10px;
    background: #0d6efd;
    background: linear-gradient(180deg, #2a82ff 0%, #0d6efd 100%);
    box-shadow: 0 8px 18px rgba(13, 110, 253, .28);
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

a.crd-go:hover { color: #fff !important; text-decoration: none; box-shadow: 0 10px 22px rgba(13, 110, 253, .38); }

.crd-foot__row { display: flex; gap: 8px; margin-top: 8px; }

a.crd-cart,
.crd-cont {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid #cfdbe7;
    border-radius: 10px;
    background: #fff;
    color: #10294a !important;
    font: 700 13.5px Arial, Helvetica, sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

a.crd-cart:hover,
.crd-cont:hover { border-color: #0d6efd; color: #0d6efd !important; text-decoration: none; }

@media only screen and (max-width: 480px) {
    .crd-panel { width: 100%; }
    .crd-head, .crd-foot { padding-left: 16px; padding-right: 16px; }
    .crd-content { padding: 6px 16px 10px; }
    .crd-added { margin: 10px 16px 0; }
}

/* ---- breakpoints ---------------------------------------------------- */

@media only screen and (max-width: 1180px) {

    .mh-name { font-size: 32px; }

    .mh-tel { font-size: 21px; }

    body div.navigation_wrap.mh-nav .search.mh-search {
        flex-basis: 150px;
        width: auto;
        min-width: 130px;
        max-width: 210px;
    }

    body div.navigation_wrap.mh-nav ul#topmenuwpaka { gap: 18px; }
}

@media only screen and (max-width: 985px) {

    body div.mh { display: none; }

    /* шапка на телефоне закреплена сверху (fixed, а не sticky: у body
       в media.css overflow-x: hidden - с ним sticky не держится); место под
       неё - отступ у строки города .mh-mcity, которая идёт сразу за ней */
    #topfixx.mh-mob {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        box-shadow: 0 2px 10px rgba(18, 63, 99, .12);
        display: flex;
        align-items: center;
        gap: 9px;
        width: auto;
        height: auto;
        margin: 0;
        padding: 9px 10px;
        box-sizing: border-box;
        background: linear-gradient(180deg, #fdfeff 0%, #f2f9fc 60%, #e6f3f9 100%);
    }

    body div.navigation_wrap.mh-nav { display: none; }
}

/* Safety net: nothing in the header may make the page wider than the
   viewport. */

body div.mh,
body div.navigation_wrap.mh-nav {
    max-width: 100%;
    /* clip, not hidden: overflow-x:hidden silently turns overflow-y into
       auto and clips the search dropdown. clip keeps the vertical axis
       visible. Old browsers drop the line entirely - no clipping at all,
       which is still better than a hidden dropdown. */
    overflow-x: clip;
    overflow-y: visible;
}

/* ---- promo bar ------------------------------------------------------
   Replaces the old two-part promo: a line of red text plus a separate
   flip-clock. The flip-clock markup lives in four different templates
   The old flip-clock markup and its two scripts have been removed from
   the templates, so there is nothing left to hide here.
   --------------------------------------------------------------------- */

body div.content .skidkatop.mm-promo {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 26px;
    width: auto;
    /* media.css прибивает .skidkatop к height:59px !important - на телефоне
       таймер и ссылка вылезали наружу и наезжали на хлебные крошки */
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    margin: 0 0 18px;
    padding: 16px 22px;
    box-sizing: border-box;
    border-radius: 10px;
    background: #e8f4fb;
    background: linear-gradient(180deg, #eef8fd 0%, #dff0fa 100%);
    color: #123f63;
    font-family: "Open Sans", Arial, sans-serif;
    text-align: left;
}

.mm-promo-main {
    flex: 1 1 260px;
    min-width: 0;
}

.mm-promo-title {
    color: #123f63;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
}

.mm-promo-sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 7px;
}

.mm-promo-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #d99000;
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
}

.mm-promo-text {
    color: #123f63;
    font-size: 15px;
}

.mm-promo-timer {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 0 1 auto;
    color: #123f63;
    font-size: 15px;
    white-space: nowrap;
}

.mm-promo-timer svg {
    flex: 0 0 17px;
    color: #1b6f9c;
}

.mm-promo-timer-label {
    color: #5c7f92;
}

.mm-promo-timer-value {
    font-weight: 700;
}

.mm-promo-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    color: #1b6f9c !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.mm-promo-link:hover {
    color: #12507d !important;
    text-decoration: underline;
}

@media only screen and (max-width: 900px) {

    body div.content .skidkatop.mm-promo {
        display: block;
        padding: 14px 16px;
        text-align: center;
    }

    .mm-promo-title {
        font-size: 20px;
    }

    .mm-promo-sub {
        justify-content: center;
    }

    .mm-promo-timer {
        justify-content: center;
        margin-top: 11px;
        font-size: 14px;
        white-space: normal;
    }

    .mm-promo-link {
        margin-top: 11px;
    }
}

/* ---- search dropdown: shorter list ---------------------------------
   Base styles live in css/search.css (loaded through the @import chain
   in style.css). Only the height and the row metrics are trimmed here,
   so search.css itself stays untouched and its ?ver does not move.
   -------------------------------------------------------------------- */

.search-dropdown {
    max-height: 340px;
}

.search-dropdown .sd-item {
    padding: 7px 12px;
}

.search-dropdown .sd-img {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
}

.search-dropdown::-webkit-scrollbar {
    width: 8px;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background: #cfe6f3;
    border-radius: 4px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: #f2f9fc;
}

@media only screen and (max-width: 640px) {

    .search-dropdown {
        max-height: 280px;
    }
}

/* ---- Тонкая полоса прокрутки страницы (компьютер). scrollbar-width -
   только для Firefox: новый Chrome при нём игнорирует ::-webkit-scrollbar */
@supports (-moz-appearance: none) {
    html { scrollbar-width: thin; scrollbar-color: #a8cfe2 #f2f9fc; }
}
html::-webkit-scrollbar { width: 8px; height: 8px; }
html::-webkit-scrollbar-track { background: #f2f9fc; }
html::-webkit-scrollbar-thumb { background: #a8cfe2; border-radius: 4px; border: 2px solid #f2f9fc; }
html::-webkit-scrollbar-thumb:hover { background: #7fb6d3; }

/* ---- Мобильная шапка (#topfixx): все кнопки 40x40, без надписи MOSKAL,
   меню - SVG «три полоски» / крестик (открыто - класс metka от
   js/new-menu.js, он же меняет картинку img - её не показываем). trig.css
   задавал меню 60x48 с отступами, поиску 50x50; new-menu.js пишет
   display:block в style - отсюда !important. ---- */
@media only screen and (max-width: 985px) {

    #topfixx.mh-mob #lefmunuhide.mh-mob-btn,
    #topfixx.mh-mob #new_top_search.mh-mob-btn {
        display: flex !important;
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        float: none;
        padding: 0;
    }

    #topfixx.mh-mob #lefmunuhide.mh-mob-btn {
        border-color: #1b6f9c;
        background: #1b6f9c;
        box-shadow: none;
        color: #fff;
    }

    #lefmunuhide.mh-mob-btn img { display: none; }
    #lefmunuhide .mh-burger,
    #lefmunuhide .mh-burger-x { display: block; }
    #lefmunuhide .mh-burger-x,
    #lefmunuhide.metka .mh-burger { display: none; }
    #lefmunuhide.metka .mh-burger-x { display: block; }

    #new_top_search.mh-mob-btn svg { width: 18px; height: 18px; }

    .mh-mob-text { display: none; }

    /* media.css отодвигал страницу на 66px под прежнюю фиксированную шапку -
       теперь шапка в потоке, отступ не нужен */
    body div.content { margin-top: 0 !important; }
}

/* ---- Мобильный поиск (#top_search_mobil, new_search_mobile_form.tpl.html):
   панель на всю ширину экрана (была 90% плюс отступы и вылезала за край),
   список подсказок js/search.js держит в пределах экрана ---- */
@media only screen and (max-width: 985px) {
    #top_search_mobil_2 { left: 0; right: 0; width: 100%; box-sizing: border-box; align-items: center; gap: 8px; padding: 12px 10px; }
    #top_search_mobil_2 .form_serch-mob { flex: 1 1 auto; min-width: 0; }
}

/* ---- «Ваш город» в шапке и окно «Выберите город» (dz_city.tpl.html,
   js/city.js; город - cookie mm_city, includes/dz_city.php) ---- */
.mh-city { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; margin-left: 14px; color: #123f63; }
.mh-city__ico { display: flex; color: #123f63; }
.mh-city__in { display: flex; flex-direction: column; line-height: 1.2; }
.mh-city__lbl { color: #7d9dad; font-size: 12.5px; }
.mh-city__btn, .mh-mcity__btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: #123f63; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.mh-city__btn:hover, .mh-mcity__btn:hover { color: #0d6efd; }
.mh-city__chev { flex: 0 0 auto; transition: transform .2s; }
.mh-city__btn[aria-expanded="true"] .mh-city__chev { transform: rotate(180deg); }
.mh-city__dlv { align-self: center; margin-left: 6px; padding-left: 16px; border-left: 1px solid #c9dbe7; color: #4a6f8a !important; font-size: 13px; line-height: 34px; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.mh-city__dlv:hover { color: #0d6efd !important; }
.mh-mcity { display: none; }
@media only screen and (max-width: 1380px) { .mh-city__dlv { display: none; } }
@media only screen and (max-width: 1180px) { .mh-city { margin-left: 0; } .mh-city__ico { display: none; } }
@media only screen and (max-width: 985px) {
    .mh-mcity { margin-top: 58px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; border-bottom: 1px solid #e2edf4; background: #f5fafd; }
    .mh-mcity__btn { font-size: 14px; font-weight: 600; }
    .mh-mcity__btn svg:first-child { width: 15px; height: 18px; }
    .mh-mcity__dlv { color: #4a6f8a !important; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
}

.cty-ov { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100050; display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; background: rgba(13, 35, 56, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s; font-family: "Open Sans", Arial, sans-serif; }
.cty-ov[hidden] { display: none; }
.cty-ov.is-on { opacity: 1; }
.cty-box { position: relative; width: 100%; max-width: 580px; max-height: calc(100vh - 32px); overflow: auto; padding: 26px 28px 24px; box-sizing: border-box; border-radius: 18px; background: #fff; box-shadow: 0 24px 60px rgba(13, 35, 56, .35); color: #123f63; transform: translateY(12px) scale(.98); transition: transform .22s; }
.cty-ov.is-on .cty-box { transform: none; }
.cty-x { position: absolute; top: 18px; right: 18px; display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: none; color: #4a6f8a; cursor: pointer; }
.cty-x:hover { background: #eef5fb; color: #123f63; }
.cty-title { padding-right: 40px; font-size: 24px; font-weight: 700; line-height: 1.2; }
.cty-sub { margin-top: 4px; color: #6b8599; font-size: 14px; }
.cty-search { position: relative; margin-top: 18px; }
.cty-search__ico { position: absolute; left: 15px; top: 50%; margin-top: -10px; color: #4a6f8a; pointer-events: none; }
.cty-input { display: block; width: 100%; height: 50px; padding: 0 14px 0 46px; box-sizing: border-box; border: 1px solid #d6e2ec; border-radius: 12px; background: #f8fbfd; color: #123f63; font: inherit; font-size: 15px; outline: none; }
.cty-input:focus { border-color: #1b6f9c; background: #fff; box-shadow: 0 0 0 3px rgba(27, 111, 156, .15); }
.cty-input.is-err { border-color: #e0393e; box-shadow: 0 0 0 3px rgba(224, 57, 62, .12); }
.cty-sug { position: absolute; left: 0; right: 0; top: 100%; z-index: 2; margin: 4px 0 0; padding: 6px; list-style: none; border: 1px solid #d6e2ec; border-radius: 12px; background: #fff; box-shadow: 0 12px 28px rgba(13, 35, 56, .15); max-height: 240px; overflow: auto; }
.cty-sug[hidden] { display: none; }
.cty-sug li { padding: 9px 12px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.cty-sug li.is-act, .cty-sug li:hover { background: #eef5fb; }
.cty-sug li.cty-sug__none { color: #6b8599; cursor: default; background: none; }
.cty-err { margin-top: 6px; color: #c62828; font-size: 13px; }
.cty-err[hidden] { display: none; }
.cty-now { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: #eaf4fb; font-size: 14px; }
.cty-now__lbl { color: #3d5f78; }
.cty-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border: 1px solid #cfe0ec; border-radius: 999px; background: #fff; color: #123f63; }
.cty-pill b { font-weight: 700; }
.cty-h { margin-top: 18px; font-size: 18px; font-weight: 700; }
.cty-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.cty-pop { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 10px; box-sizing: border-box; border: 1px solid #d6e2ec; border-radius: 10px; background: #fff; color: #123f63; font: inherit; font-size: 14px; line-height: 1.2; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.cty-pop:hover { border-color: #8db8d4; background: #f5fafd; }
.cty-pop.is-on { padding-right: 34px; border-color: #1b6f9c; background: #eaf4fb; font-weight: 600; box-shadow: inset 0 0 0 1px #1b6f9c; }
.cty-pop__ok { position: absolute; right: 10px; top: 50%; display: none; width: 20px; height: 20px; margin-top: -10px; align-items: center; justify-content: center; border-radius: 50%; background: #1b6f9c; }
.cty-pop.is-on .cty-pop__ok { display: flex; }
.cty-help { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: #f1f7fc; color: #3d5f78; font-size: 13.5px; line-height: 1.45; }
.cty-help b { color: #123f63; font-size: 15px; }
.cty-help__ico { display: flex; flex: 0 0 auto; color: #1b6f9c; }
.cty-btns { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; margin-top: 20px; }
.cty-ok, .cty-cancel { height: 50px; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.cty-ok { border: 0; background: linear-gradient(180deg, #2a86bd, #1b6f9c); color: #fff; box-shadow: 0 6px 16px rgba(27, 111, 156, .3); }
.cty-ok:hover { background: linear-gradient(180deg, #2f92cd, #1d78a8); }
.cty-cancel { border: 1px solid #c9dbe7; background: #fff; color: #123f63; }
.cty-cancel:hover { background: #f5fafd; }
html.cty-lock { overflow: hidden; }
@media only screen and (max-width: 560px) {
    .cty-box { padding: 20px 16px 18px; border-radius: 16px; }
    .cty-title { font-size: 20px; }
    .cty-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .cty-btns { grid-template-columns: 1fr; }
}

/* ---- Search in the blue menu bar, wide field (index.tpl.html .mh-search--top).
   The old rules for div.search in style.css / media.css (fixed width,
   margin 30px !important up to 1300px) and the narrow 260px rule above are
   overridden here; on phones (menu bar hidden) the mobile search is used. */
body div.navigation_wrap.mh-nav .search.mh-search--top {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    flex: 0 1 540px;
    width: auto !important;
    min-width: 200px;
    max-width: 540px;
    height: auto;
    margin: 0 0 0 auto !important;
    padding: 0;
    background: none;
    z-index: 130;
}
.mh-search--top .mh-field {
    height: 46px;
    padding: 0 16px;
    border: 1px solid #c9dceb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(18, 63, 99, .05);
}
.mh-search--top .mh-field:hover { border-color: #9cc3dd; box-shadow: 0 2px 10px rgba(18, 63, 99, .08); }
.mh-search--top .mh-field:focus-within { border-color: #1b6f9c; box-shadow: 0 0 0 3px rgba(27, 111, 156, .14); }
.mh-search--top .mh-field-ico svg { width: 18px; height: 18px; }
.mh-search--top .mh-field-input input { font-size: 15px; }
@media only screen and (max-width: 1180px) {
    body div.navigation_wrap.mh-nav .search.mh-search--top { flex-basis: 300px; min-width: 170px; }
}

/* ---- Search hints (js/search.js): bigger photos, thin scrollbar */
.search-dropdown { max-height: 460px; scrollbar-width: thin; scrollbar-color: #c3dcea transparent; }
.search-dropdown .sd-item { padding: 8px 12px; gap: 12px; }
.search-dropdown .sd-img { flex: 0 0 76px; width: 76px; height: 76px; border-radius: 8px; background: #fff; }
.search-dropdown::-webkit-scrollbar { width: 4px; }
.search-dropdown::-webkit-scrollbar-thumb { background: #c3dcea; border-radius: 2px; }
.search-dropdown::-webkit-scrollbar-track { background: transparent; }
@media only screen and (max-width: 640px) {
    .search-dropdown .sd-img { flex-basis: 64px; width: 64px; height: 64px; }
}
/* the menu bar centers its text - hints keep their own alignment */
.search-dropdown .sd-info { text-align: left; }
.search-dropdown .sd-price-wrap { text-align: right; }

/* cart window: "Kupit v 1 klik" and the checkout-page variant (js/cart-drawer.js) */
.crd-1click {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
    border: 1.5px solid #0d6efd;
    border-radius: 10px;
    background: #fff;
    color: #0d6efd;
    font: 700 14.5px Arial, Helvetica, sans-serif;
    cursor: pointer;
}
.crd-1click[hidden] { display: none; }
.crd-1click:hover { background: #eef5ff; }
.crd.is-empty .crd-1click { display: none; }
button.crd-go { width: 100%; border: 0; cursor: pointer; font-family: Arial, Helvetica, sans-serif; }
.crd--order button.crd-go {
    display: flex; align-items: center; justify-content: center; min-height: 50px; border-radius: 10px;
    background: linear-gradient(180deg, #2a82ff 0%, #0d6efd 100%); color: #fff; font-size: 16px; font-weight: 700;
    box-shadow: 0 8px 18px rgba(13, 110, 253, .28);
}
.crd--order.is-empty button.crd-go { display: flex; }

/* cart window and "added to cart": the configuration text in full, not cut to 2 lines */
.crd-opts,
.mh-toast-popts { display: block; overflow: visible; -webkit-line-clamp: unset; overflow-wrap: anywhere; }

/* drop-down lists (product options, cart, checkout): the thinnest scrollbar in
   the opened list. Chrome 121+ and Firefox take scrollbar-width/-color from the
   select for its list; older Chrome - ::-webkit-scrollbar */
select { scrollbar-width: thin; scrollbar-color: #c3d2df transparent; }
select::-webkit-scrollbar { width: 4px; height: 4px; }
select::-webkit-scrollbar-track { background: transparent; }
select::-webkit-scrollbar-thumb { background: #c3d2df; border-radius: 2px; }
