/* ---------------------------------------------------------------
   sidebar.css - left menu of mmoscal
   Linked from index.tpl.html AFTER head.tpl.html, so it loads after
   style.css and wins the cascade without fighting the @import chain.
   Off-canvas behaviour on mobile (#sidenav_menu left/-350px/fixed)
   is NOT touched - it stays in media.css.
   --------------------------------------------------------------- */

div.sidenav .module {
    background: #fff !important;
    border: 1px solid #a0d3eb !important;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

div.sidenav > .header_left {
    background: none;
    border: 1px solid #a0d3eb !important;
    border-bottom: 0 !important;
    border-radius: 8px 8px 0 0;
}

div.sidenav > .header_left + .module {
    border-top: 0 !important;
    border-radius: 0 0 8px 8px;
}

/* ---- frosted glass headers -------------------------------------- */

div.sidenav .header_left,
div.sidenav .header_left2,
div.sidenav .header_left3 {
    background: rgba(166, 213, 234, .6) !important;
    -webkit-backdrop-filter: blur(14px) saturate(170%);
    backdrop-filter: blur(14px) saturate(170%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
}

div.sidenav .header_left2,
div.sidenav .header_left3 {
    border: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, .75) !important;
    border-bottom: 1px solid rgba(255, 255, 255, .75) !important;
}

div.sidenav .header_right,
div.sidenav .header_right2,
div.sidenav .header_right3 {
    position: relative;
    background: none !important;
    text-align: center;
    padding: 9px 12px;
}

div.sidenav .header_right h3,
div.sidenav .header_right2 h3,
div.sidenav .header_right3 h3 {
    margin: 0;
    padding: 0;
    color: #0d678a !important;
    font: normal 15px "Open Sans", Arial, sans-serif;
    line-height: 20px;
    text-shadow: none;
}

/* ---- list rows --------------------------------------------------- */

div.sidenav ul {
    margin: 0;
    padding: 0;
}

div.sidenav li {
    margin: 0 !important;
    border-bottom: 1px solid #e3eef4 !important;
}

div.sidenav li:last-child {
    border-bottom: 0 !important;
}

div.sidenav li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px !important;
    background: none !important;
    color: #14384a !important;
    font-size: 13px;
    line-height: 1.35;
    text-decoration: none;
}

div.sidenav li a:before {
    content: "";
    flex: 0 0 7px;
    width: 0;
    height: 0;
    border: 4px solid transparent;
    border-left-color: #7fb4cc;
}

/* style.css:1149 puts an inset glow and an underline on both hover and
   .active - both are reset here, otherwise the old blue halo stays. */

div.sidenav li a:hover {
    background: #f2f9fc !important;
    color: #0e66ad !important;
    text-decoration: none !important;
    box-shadow: inset 3px 0 0 #cfe4ef !important;
}

div.sidenav li a.active,
div.sidenav li a#standardsmall_menu {
    background: #e6f2f9 !important;
    color: #0e66ad !important;
    font-weight: 500;
    text-decoration: none !important;
    box-shadow: inset 3px 0 0 #2a7ba4 !important;
}

div.sidenav li a.active:hover,
div.sidenav li a#standardsmall_menu:hover {
    background: #dcedf6 !important;
    box-shadow: inset 3px 0 0 #2a7ba4 !important;
}

/* ---- sale plate --------------------------------------------------- */

div.sidenav #pasprodawa {
    text-align: center;
}

div.sidenav #pasprodawa a.pasprodlink {
    display: block;
    padding: 11px 12px;
    color: #b8791a !important;
    font-size: 14px;
    font-weight: 500;
    text-shadow: none !important;
    text-decoration: none;
}

div.sidenav #pasprodawa a.pasprodlink:hover {
    background: #fdf6e8;
}

/* ---- collapsible modules ------------------------------------------ */

div.sidenav .module.sn-fold .header_left2 {
    cursor: pointer;
}

div.sidenav .module.sn-fold .header_right2:after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    margin-top: -2px;
    border: 5px solid transparent;
    border-top-color: #0d678a;
}

div.sidenav .module.sn-fold.sn-closed .header_right2:after {
    margin-top: -5px;
    border-top-color: transparent;
    border-left-color: #0d678a;
}

div.sidenav .module.sn-fold.sn-closed .module_content {
    display: none;
}

/* ---- delivery block ------------------------------------------------ */

.dl-phones {
    padding: 11px 12px 9px;
    border-bottom: 1px solid #e3eef4;
}

.dl-phone {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 3px 0;
    color: #14384a !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.dl-phone svg {
    flex: 0 0 13px;
    fill: #5f99b4;
}

.dl-phone:hover {
    color: #0e66ad !important;
    text-decoration: none;
}

.dl-row {
    padding: 9px 12px;
    border-bottom: 1px solid #e3eef4;
}

.dl-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.dl-place {
    color: #14384a;
    font-size: 12.5px;
    line-height: 1.4;
}

.dl-price {
    color: #0e66ad;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.dl-note {
    margin-top: 3px;
    color: #7d9dad;
    font-size: 11.5px;
    line-height: 1.4;
}

.dl-term {
    padding: 10px 12px;
    border-bottom: 1px solid #e3eef4;
    background: #f7fbfd;
    color: #14384a;
    font-size: 12.5px;
    line-height: 1.5;
}

.dl-term b {
    color: #b8791a;
}

.dl-more {
    display: block;
    padding: 10px 12px;
    color: #0e66ad !important;
    font-size: 12.5px;
    text-align: center;
    text-decoration: none;
}

.dl-more:hover {
    background: #f2f9fc;
}


/* ---- decorative strip after the last module ----------------------- */
/* style.css:1157 draws sidenav_bottom_left_bg.jpg, 4px tall. Not needed. */

div.sidenav .sidenav_bottom_left,
div.sidenav .sidenav_bottom_right {
    display: none !important;
}

/* ---- "recently viewed" block -------------------------------------- */
/* The inline <style> printed by last_view.php sits later in the document
   than this file, so every rule here needs !important to win. */

div.sidenav .last_vi {
    width: auto !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 1px solid #a0d3eb !important;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

/* trig.css:1364 turns .prosmotrennietovari into a 90%-wide flex row, which
   is why the header inside it stopped short of the card edge. */

div.sidenav .last_vi .prosmotrennietovari {
    display: block !important;
    width: auto !important;
    height: auto !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 0 12px !important;
    text-align: center !important;
}

div.sidenav .last_vi h4 {
    margin: 0 !important;
    padding: 9px 12px !important;
    text-align: center !important;
    background: rgba(166, 213, 234, .6);
    -webkit-backdrop-filter: blur(14px) saturate(170%);
    backdrop-filter: blur(14px) saturate(170%);
    border-bottom: 1px solid rgba(255, 255, 255, .75);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
    color: #0d678a !important;
    font: normal 15px "Open Sans", Arial, sans-serif;
    line-height: 20px;
}

div.sidenav .last_vi h4 strong {
    font-weight: normal;
}

div.sidenav .last_vi .item2.prosmotr {
    float: none !important;
    display: block !important;
    width: auto !important;
    max-width: none;
    margin: 14px 14px 0 !important;
    padding: 0 !important;
    text-align: center !important;
}

div.sidenav .last_vi .image_prosmotr {
    display: block !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* photos fill the column width (4:3), like the product cards */
div.sidenav .last_vi .item2.prosmotr img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    margin: 0 auto !important;
    border: 1px solid #cfe4ef !important;
    border-radius: 8px;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}

div.sidenav .last_vi .item2.prosmotr a:hover img {
    box-shadow: 0 6px 16px rgba(20, 56, 74, .12);
}

div.sidenav .last_vi .name7,
div.sidenav .last_vi .price1 {
    padding: 0 10px !important;
    margin-top: 7px !important;
    text-align: center !important;
}

div.sidenav .last_vi .name7 a {
    color: #14384a !important;
    font-size: 14px;
    text-decoration: none;
}

div.sidenav .last_vi .name7 a:hover {
    color: #0e66ad !important;
}

div.sidenav .last_vi .price1 {
    color: #0e66ad !important;
    font-size: 15px;
    font-weight: 600;
}

/* ---- dropdown catalog panel (#top_menu_clik) ----------------------- */
/* trig.css:2546 pins it to height 682px with a permanent scrollbar.
   Height now follows the content and stops at the viewport. */

/* top and max-height are set by top-menu.js when the panel is opened,
   because they depend on where the sticky navigation bar currently is. */

#top_menu_clik {
    height: auto !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #a0d3eb #f2f9fc;
    border-radius: 8px;
}

#top_menu_clik::-webkit-scrollbar {
    width: 6px;
}

#top_menu_clik::-webkit-scrollbar-track {
    background: #f2f9fc;
}

#top_menu_clik::-webkit-scrollbar-thumb {
    background: #a0d3eb;
    border-radius: 3px;
}

#top_menu_clik::-webkit-scrollbar-thumb:hover {
    background: #7fb4cc;
}

/* ---- delivery block: wide layout is the DEFAULT ---------------------
   The same markup is printed on /dostavka.html and inside the left menu.
   Page styles are unscoped so they apply whatever the page wrapper is
   called; the compact variant is scoped to div.sidenav, which is the one
   container we know for sure.
   --------------------------------------------------------------------- */

.dl-page {
    max-width: 900px;
}

.dl-page .dl-phones {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 26px;
    margin-bottom: 18px;
    padding: 14px 18px;
    border: 1px solid #a0d3eb;
    border-bottom: 1px solid #a0d3eb;
    border-radius: 8px;
    background: #f7fbfd;
}

.dl-page .dl-phone {
    font-size: 18px;
}

.dl-page .dl-phone svg {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
}

.dl-page .dl-rows {
    border: 1px solid #a0d3eb;
    border-radius: 8px;
    overflow: hidden;
}

.dl-page .dl-row {
    padding: 14px 18px;
}

.dl-page .dl-row:last-child {
    border-bottom: 0;
}

.dl-page .dl-row:nth-child(odd) {
    background: #fbfdfe;
}

.dl-page .dl-place {
    font-size: 16px;
}

.dl-page .dl-price {
    font-size: 19px;
}

.dl-page .dl-note {
    margin-top: 5px;
    font-size: 13.5px;
}

.dl-page .dl-term {
    margin-top: 18px;
    padding: 14px 18px;
    border: 1px solid #a0d3eb;
    border-bottom: 1px solid #a0d3eb;
    border-radius: 8px;
    font-size: 15.5px;
}

.dl-page .dl-h2 {
    margin: 28px 0 10px;
    padding: 0;
    color: #0d678a;
    font-size: 22px;
    font-weight: normal;
    line-height: 1.3;
}

.dl-page .dl-text {
    margin: 0 0 16px;
    padding: 0;
    color: #14384a;
    font-size: 16px;
    line-height: 1.6;
    text-indent: 0;
}

.dl-page .dl-tk {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.dl-page .dl-tk-item {
    padding: 9px 18px;
    border: 1px solid #a0d3eb;
    border-radius: 20px;
    background: #f7fbfd;
    color: #14384a;
    font-size: 15px;
}

.dl-page .dl-more {
    display: inline-block;
    margin-top: 4px;
    padding: 12px 24px;
    border: 1px solid #a0d3eb;
    border-radius: 8px;
    background: #f7fbfd;
    font-size: 15px;
    text-align: left;
}

.dl-page .dl-more:hover {
    background: #eef7fb;
}

/* ---- delivery block: compact variant inside the left menu ------------ */

div.sidenav .dl-page {
    max-width: none;
}

div.sidenav .dl-page .dl-only-page {
    display: none;
}

div.sidenav .dl-page .dl-phones {
    display: block;
    margin: 0;
    padding: 11px 12px 9px;
    border: 0;
    border-bottom: 1px solid #e3eef4;
    border-radius: 0;
    background: none;
}

div.sidenav .dl-page .dl-phone {
    font-size: 14px;
}

div.sidenav .dl-page .dl-phone svg {
    flex: 0 0 13px;
    width: 13px;
    height: 13px;
}

div.sidenav .dl-page .dl-rows {
    border: 0;
    border-radius: 0;
}

div.sidenav .dl-page .dl-row {
    padding: 9px 12px;
}

div.sidenav .dl-page .dl-row:nth-child(odd) {
    background: none;
}

div.sidenav .dl-page .dl-place {
    font-size: 12.5px;
}

div.sidenav .dl-page .dl-price {
    font-size: 13px;
}

div.sidenav .dl-page .dl-note {
    margin-top: 3px;
    font-size: 11.5px;
}

div.sidenav .dl-page .dl-term {
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #e3eef4;
    border-radius: 0;
    font-size: 12.5px;
}

div.sidenav .dl-page .dl-more {
    display: block;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 0;
    background: none;
    font-size: 12.5px;
    text-align: center;
}

div.sidenav .dl-page .dl-more:hover {
    background: #f2f9fc;
}

/* ---- delivery block: page on small screens --------------------------- */

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

    .dl-page .dl-phones {
        display: block;
        padding: 12px 14px;
    }

    .dl-page .dl-phone {
        font-size: 17px;
        padding: 5px 0;
    }

    .dl-page .dl-row {
        padding: 12px 14px;
    }

    .dl-page .dl-top {
        display: block;
    }

    .dl-page .dl-price {
        display: block;
        margin-top: 4px;
    }

    .dl-page .dl-place {
        font-size: 15px;
    }

    .dl-page .dl-h2 {
        font-size: 19px;
    }

    .dl-page .dl-more {
        display: block;
        text-align: center;
    }
}

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

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

    div.sidenav li a {
        padding: 13px 14px !important;
        font-size: 14px;
    }

    div.sidenav .header_right h3,
    div.sidenav .header_right2 h3,
    div.sidenav .header_right3 h3 {
        font-size: 16px;
    }

    div.sidenav .header_right,
    div.sidenav .header_right2,
    div.sidenav .header_right3 {
        padding: 12px 14px;
    }

    .dl-phone {
        font-size: 16px;
        padding: 6px 0;
    }

    .dl-row {
        padding: 12px 14px;
    }

    .dl-place {
        font-size: 13.5px;
    }
}

/* ---- services module (Nashi uslugi) --------------------------------
   Replaces three old .dostavka_rf plates that used float+90% width and
   fell out of the sidebar grid. Markup: index.tpl.html, .module > ul.svc-list
   Rules below are written against div.sidenav li a from line 83, which
   adds a triangle bullet and 9px padding - both are cancelled here.
   -------------------------------------------------------------------- */

div.sidenav .svc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

div.sidenav li.svc-item {
    border-bottom: 1px solid #e6f3f9 !important;
}

div.sidenav li.svc-item:last-child {
    border-bottom: 0 !important;
}

div.sidenav li.svc-item a.svc-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px !important;
    color: #123f63 !important;
    font-size: 14px;
    line-height: 1.25;
}

div.sidenav li.svc-item a.svc-link:before {
    content: none !important;
    display: none !important;
}

div.sidenav li.svc-item a.svc-link:hover {
    background: #f2f9fc !important;
    color: #1b6f9c !important;
    box-shadow: inset 3px 0 0 #cfe4ef !important;
}

.svc-thumb {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 6px;
    border: 1px solid #cfe6f3;
    background: #f7fbfd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #2585b4;
}

.svc-thumb svg { display: block; }

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

.svc-text { min-width: 0; }

.svc-name {
    display: block;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.25;
}

.svc-sub {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.3;
    color: #7a99a9;
}

.svc-arrow {
    margin-left: auto;
    flex: 0 0 auto;
    color: #a0d3eb;
    line-height: 0;
}

.svc-link:hover .svc-arrow { color: #2585b4; }

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

    div.sidenav li.svc-item a.svc-link {
        padding: 12px 14px !important;
    }

    .svc-name { font-size: 15px; }
    .svc-sub  { font-size: 13px; }
}

/* Category icons in the "Catalog" menu instead of the arrow
   (category_tree.tpl.html, core_functions/dz_cat_menu_functions.php) */
div.sidenav li a.cm-has-ico:before { display: none; }
div.sidenav li a.cm-has-ico { gap: 10px; }
div.sidenav .cm-ico { flex: 0 0 26px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #eef6fa; color: #2a7ba4; transition: background .15s, color .15s; }
div.sidenav .cm-ico svg, div.sidenav .cm-ico img { display: block; width: 18px; height: 18px; object-fit: contain; }
div.sidenav .cm-ico--none { background: none; }
div.sidenav li a:hover .cm-ico { background: #dcedf6; color: #0e66ad; }
div.sidenav li a.active .cm-ico, div.sidenav li a#standardsmall_menu .cm-ico { background: #2a7ba4; color: #fff; }

/* Mobile "Catalog" menu (#sidenav_menu.bounce, up to 985px): bigger text and
   icons; the close button is visible as soon as the menu opens - before, it was
   shown only by one of the open handlers (swipe.js), the burger in the mobile
   header opened the menu without it. */
@media only screen and (max-width: 985px) {
    #sidenav_menu.bounce div.header_left { height: 56px; padding-right: 56px; padding-left: 56px; }
    #sidenav_menu.bounce div.header_right h3 { font-size: 20px !important; }
    #sidenav_menu.bounce li a { font-size: 17px !important; padding: 12px 16px !important; gap: 12px; }
    #sidenav_menu.bounce li a.cm-has-ico { gap: 14px; }
    #sidenav_menu.bounce .cm-ico { flex-basis: 34px; width: 34px; height: 34px; border-radius: 10px; }
    #sidenav_menu.bounce .cm-ico svg, #sidenav_menu.bounce .cm-ico img { width: 22px; height: 22px; }
    #sidenav_menu.bounce #btn-close_sidenav_menu {
        display: flex !important;
        align-items: center;
        justify-content: center;
        /* sticky inside the scrolling menu: on its header row and stays in
           view while the list scrolls; the menu itself may start below the
           fixed mobile header (top: 54px from new-menu.js) */
        position: sticky;
        top: 8px;
        margin: 8px 10px -48px auto;
        z-index: 5;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 1px solid #a0d3eb;
        border-radius: 10px;
        background: #fff;
        color: #123d60;
        box-shadow: 0 2px 8px rgba(18, 61, 96, .15);
        cursor: pointer;
    }
    #sidenav_menu.bounce #btn-close_sidenav_menu svg { width: 18px; height: 18px; }
}
