*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { overflow-x: clip; }
body {
    overflow-x: clip;
    max-width: 100%;
    padding-top: clamp(56px, 6vw, 100px);
}
@media (min-width: 901px) {
    body { padding-top: 0; }
}

.full_menu {
    position: sticky;
    top: 0; left: 0; right: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    width: 100%;
}

.top_menu {
    z-index: 1001;
    box-shadow: 1px 5px 20px rgba(107, 45, 78, 0.22);
    background: linear-gradient(135deg, #F2D9E0 0%, #E8C4CF 50%, #D4A0B5 100%);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 clamp(8px, 2vw, 40px);
    min-height: clamp(56px, 6vw, 100px);
}

.topstart_menu,
.topend_menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(10px, 1.5vw, 28px);
    margin: clamp(8px, 1.2vw, 20px) clamp(8px, 1.5vw, 24px);
}
.topstart_menu { justify-self: start; }
.topend_menu   { justify-self: end; }

.topmenu_logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-self: center;
    grid-column: 2;
}

.burger_start svg,
.search_start > svg,
.wishlist_end svg,
.shop_end svg,
.account_end svg,
.basket_end > svg {
    width: clamp(32px, 3.5vw, 70px);
    height: clamp(32px, 3.5vw, 70px);
    display: block;
}
.topmenu_logo svg {
    width: clamp(160px, 20vw, 420px);
    height: auto;
}

.icon-svg {
    shape-rendering: geometricPrecision;
    text-rendering: geometricPrecision;
    image-rendering: optimizeQuality;
    fill-rule: evenodd;
    clip-rule: evenodd;
}
.wishlist_end .icon-svg,
.shop_end .icon-svg,
.account_end .icon-svg,
.basket_end .icon-svg {
    transform: scale(0.85);
    transform-origin: center;
}
.svg_2{
    fill: #6B2D4E;
    stroke: #6B2D4E;
    stroke-width: 6;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
}
.svg, .animate{
    fill: transparent;
    stroke: #6B2D4E;
    stroke-width: 2;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
}

.svg  { animation: main_txt     2s ease-in-out forwards; }
.animate { animation: main_txt_par 2s ease-in-out forwards; }
.svg_2  { animation: main_burg    2s ease-in-out forwards; }
@keyframes main_txt {
    0%   { stroke-dashoffset: 600; }
    50%  { fill: transparent; filter: none; }
    100% { stroke-dashoffset: 0; }
}
@keyframes main_txt_par {
    0%   { stroke-dashoffset: 600; }
    40%  { fill: transparent; filter: none; }
    100% { fill: #6B2D4E; stroke-dashoffset: 0; filter: drop-shadow(3px 3px 3px #6B2D4E); }
}
@keyframes main_burg {
    0%   { fill: transparent;stroke-dashoffset: 600; }
    50%  {  fill: #6b2d4e79;filter: none; }
    100% { fill: #6B2D4E;stroke-dashoffset: 0; }
}

.burger_start,
.search_start,
.shop_end,
.account_end,
.basket_end {
    cursor: pointer;
    transform: translateY(0);
    transition: transform 0.3s ease-out;
}
.burger_start:hover,
.search_start:hover,
.shop_end:hover,
.account_end:hover,
.basket_end:hover { transform: translateY(5px); }

.basket_end { position: relative; }
.wishlist_end { position: relative; }
.cart-count {
    position: absolute;
    top: -6px; right: -8px;
    min-width: clamp(16px, 1.4vw, 28px);
    height: clamp(16px, 1.4vw, 28px);
    padding: 0 4px;
    display: flex; align-items: center; justify-content: center;
    background-color: #6B2D4E;
    color: #fff;
    font-size: clamp(9px, 0.8vw, 16px);
    font-weight: 700;
    line-height: 1;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #F2D9E0;
    pointer-events: none;
}

.search_start { position: static; }

.search_backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1140;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.search_backdrop.active {
    display: block;
    opacity: 1;
}

@media (min-width: 901px) {
    .search_panel {
        display: block;
        position: fixed;
        top: clamp(56px, 6vw, 100px);
        left: clamp(8px, 3vw, 40px);
        z-index: 1050;
        width: min(90vw, 860px);
        background: transparent;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-6px);
        transition:
            opacity    0.2s ease,
            transform  0.2s ease,
            visibility 0s linear 0.2s;
    }
    .search_panel.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
        transition:
            opacity   0.2s ease,
            transform 0.2s ease;
    }
}

.search_input_wrap {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px 12px 8px;
}
.search_input {
    width: 100%;
    padding: clamp(8px, 1vw, 16px) clamp(10px, 1.2vw, 20px);
    padding-right: 44px; 
    font-size: clamp(13px, 1.2vw, 20px);
    border: 2px solid #6B2D4E;
    border-radius: 8px;
    outline: none;
    background: #fff;
    transition: box-shadow 0.2s ease;
}
.search_input:focus {
    box-shadow: 0 0 0 3px rgba(107, 45, 78, 0.18);
}

.search_clear_btn {
    display: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    padding: 4px;
    line-height: 1;
    transition: color 0.18s;
}
.search_clear_btn:hover { color: #6B2D4E; }
.search_clear_btn.visible { display: flex; align-items: center; justify-content: center; }
.search_clear_btn svg { width: 16px; height: 16px; display: block; }

.search_results {
    display: none;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
    padding: clamp(10px, 1.2vw, 20px);
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(10px, 1.2vw, 20px);
    max-height: 70vh;
    overflow-y: auto;
}
.search_results.active { display: grid; }

.search_results::-webkit-scrollbar { width: 4px; }
.search_results::-webkit-scrollbar-track { background: transparent; }
.search_results::-webkit-scrollbar-thumb { background: rgba(107, 45, 78, 0.3); border-radius: 2px; }

.search_col { min-width: 0; }
.search_col h4 {
    margin: 0 0 10px;
    font-size: clamp(11px, 0.9vw, 18px);
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6B2D4E;
    border-bottom: 1px solid #F2D9E0;
    padding-bottom: 6px;
}
.search_col_list { display: flex; flex-direction: column; gap: 8px; }
.search_col_list a {
    text-decoration: none;
    color: #333;
    font-size: clamp(12px, 1vw, 18px);
    padding: 2px 0;
    transition: color 0.15s;
}
.search_col_list a:hover { color: #6B2D4E; }
.search_empty { color: #999; font-size: clamp(11px, 0.9vw, 16px); margin: 0; }

.search_product_item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
    padding: 4px 2px;
    transition: background 0.15s;
}
.search_product_item:hover { background: #FAF0F4; }
.search_product_item img,
.search_product_placeholder {
    width: clamp(28px, 2.5vw, 48px);
    height: clamp(28px, 2.5vw, 48px);
    object-fit: cover;
    border-radius: 4px;
    background: #f1f5f9;
    flex-shrink: 0;
}
.search_product_info { display: flex; flex-direction: column; min-width: 0; }
.search_product_name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(12px, 1vw, 18px);
}
.search_product_price {
    font-size: clamp(11px, 0.85vw, 16px);
    color: #6B2D4E;
    font-weight: 600;
}

.search_loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    color: #aaa;
    font-size: 13px;
}
.search_loading.active { display: flex; }
.search_spinner {
    width: 16px; height: 16px;
    border: 2px solid #F2D9E0;
    border-top-color: #6B2D4E;
    border-radius: 50%;
    animation: srSpin 0.6s linear infinite;
}
@keyframes srSpin { to { transform: rotate(360deg); } }

.db-error { color: red; }

@media (max-width: 900px)  { .hide-mobile { display: none !important; } }
@media (min-width: 901px)  { .show-mobile { display: none !important; } }

#bottomMenu {
    --m-bg:     #fdf6f8;
    --m-accent: #6B2D4E;
    --m-text:   #24262b;
    --m-muted:  #5a5a5a;
    --m-border: rgba(107, 45, 78, 0.18);
}

.menu_backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(20, 8, 14, 0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.menu_backdrop.active {
    display: block;
    opacity: 1;
}
@media (min-width: 901px) { .menu_backdrop { display: none !important; } }

@media (max-width: 900px) {
    #bottomMenu {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: clamp(260px, 72vw, 420px);
        max-width: 75vw;
        z-index: 1100;
        display: flex;
        flex-direction: column;
        background: var(--m-bg);
        box-shadow: 6px 0 30px rgba(107, 45, 78, 0.25);
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0 0 clamp(24px, 5vh, 48px);
        gap: 0;

        opacity: 0;
        visibility: hidden;
        transform: translateX(-100%);
        transition:
            opacity   0.35s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
            visibility 0s linear 0.35s;
        pointer-events: none;
    }
    #bottomMenu.active {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        pointer-events: auto;
        transition:
            opacity   0.35s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: clamp(16px, 3vh, 24px) clamp(16px, 4vw, 24px);
        border-bottom: 1px solid var(--m-border);
        background: #fff;
        position: sticky;
        top: 0;
        z-index: 2;
    }
    .drawer-head-title {
        font-size: clamp(16px, 4vw, 20px);
        font-weight: 700;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--m-accent);
    }

    #bottomMenu .menu-close {
        position: static;
        width:  clamp(32px, 8vw, 44px);
        height: clamp(32px, 8vw, 44px);
        display: flex; align-items: center; justify-content: center;
        background: transparent;
        border: none;
        font-size: clamp(20px, 5vw, 30px);
        color: var(--m-text);
        cursor: pointer;
        border-radius: 50%;
        transition: color 0.2s, background 0.2s;
        line-height: 1;
    }
    #bottomMenu .menu-close:hover { color: var(--m-accent); background: rgba(107,45,78,.10); }

    .mobile-icon-row {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: stretch;
        gap: clamp(6px, 2vw, 14px);
        padding: clamp(10px, 2vh, 18px) clamp(12px, 3vw, 20px);
        border-bottom: 1px solid var(--m-border);
    }

    .mobile-menu-icon {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: clamp(4px, 1vh, 8px);
        padding: clamp(8px, 1.6vh, 14px) clamp(6px, 1.6vw, 12px);
        text-decoration: none;
        color: var(--m-text);
        background: rgba(107,45,78,0.05);
        border-radius: clamp(10px, 2vw, 16px);
        border: 1px solid var(--m-border);
        position: relative;
        transition: background 0.2s, transform 0.2s;
    }
    .mobile-menu-icon:hover,
    .mobile-menu-icon:active {
        background: rgba(107,45,78,0.10);
        transform: translateY(-2px);
    }
    .mobile-menu-icon svg {
        width: clamp(24px, 6vw, 36px);
        height: clamp(24px, 6vw, 36px);
    }
    .mobile-icon-label {
        font-size: clamp(9px, 2.4vw, 12px);
        font-weight: 600;
        color: var(--m-text);
        white-space: nowrap;
        letter-spacing: .02em;
    }

    .mobile-menu-icon .cart-count {
        top: -4px; right: -4px;
        box-shadow: 0 0 0 2px var(--m-bg);
    }


    .drawer-nav { width: 100%; }

    .drawer-list {
        list-style: none;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .drawer-item {
        border-bottom: 1px solid var(--m-border);
        width: 100%;
    }


    .drawer-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: clamp(14px, 3vh, 18px) clamp(16px, 4vw, 24px);
        font-size: clamp(14px, 3.6vw, 17px);
        font-weight: 600;
        letter-spacing: .03em;
        color: var(--m-text);
        text-decoration: none;
        text-align: left;
        background: transparent;
        border: none;
        cursor: pointer;
        transition: color 0.2s, background 0.2s;
    }
    .drawer-link:hover { color: var(--m-accent); background: rgba(107,45,78,.05); }
    .drawer-item--accordion.active > .drawer-link { color: var(--m-accent); background: rgba(107,45,78,.06); }
    .drawer-arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--m-accent);
        transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
        flex-shrink: 0;
        margin-left: 8px;
        width: clamp(16px, 4vw, 20px);
        height: clamp(16px, 4vw, 20px);
    }
    .drawer-arrow svg { width: 100%; height: 100%; display: block; }
    .drawer-item--accordion.active > .drawer-link .drawer-arrow { transform: rotate(180deg); }

    .drawer-submenu {
        overflow: hidden;
        max-height: 0;
        background: rgba(107, 45, 78, 0.035);
        transition: max-height 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .drawer-item--accordion.active > .drawer-submenu {
        max-height: 65vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .drawer-item--accordion.active > .drawer-submenu::-webkit-scrollbar {
        width: 3px;
    }
    .drawer-item--accordion.active > .drawer-submenu::-webkit-scrollbar-track {
        background: transparent;
    }
    .drawer-item--accordion.active > .drawer-submenu::-webkit-scrollbar-thumb {
        background: rgba(107, 45, 78, 0.25);
        border-radius: 2px;
    }

    .drawer-cat-list { list-style: none; width: 100%; }
    .drawer-cat-item { border-top: 1px solid var(--m-border); }
    .drawer-cat-item:first-child { border-top: none; }

    .drawer-cat-link,
    .drawer-cat-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: clamp(11px, 2.4vh, 14px) clamp(24px, 6vw, 34px);
        font-size: clamp(13px, 3.3vw, 15.5px);
        font-weight: 500;
        color: var(--m-text);
        text-decoration: none;
        text-align: left;
        background: transparent;
        border: none;
        cursor: pointer;
        transition: color 0.2s, background 0.2s;
    }
    .drawer-cat-link:hover,
    .drawer-cat-toggle:hover { color: var(--m-accent); background: rgba(107,45,78,.06); }
    .drawer-cat-item.active > .drawer-cat-toggle { color: var(--m-accent); }
    .drawer-cat-item.active > .drawer-cat-toggle .drawer-arrow--sm { transform: rotate(180deg); }

    .drawer-subcat-list {
        overflow: hidden;
        max-height: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        background: rgba(107, 45, 78, 0.06);
        transition: max-height 0.34s cubic-bezier(0.22, 1, 0.36, 1);
        grid-auto-rows: max-content;
    }
    .drawer-cat-item.active > .drawer-subcat-list {
        max-height: none;
        overflow: visible;
    }
    .drawer-subcat-list a {
        display: block;
        padding: clamp(9px, 1.8vh, 11px) clamp(34px, 8vw, 46px);
        font-size: clamp(12.5px, 3.2vw, 14.5px);
        color: var(--m-muted);
        text-decoration: none;
        transition: color 0.18s, background 0.18s;
        border-bottom: 1px solid var(--m-border);
        border-right: 1px solid var(--m-border);
    }
    
    /* Ліва колонка (непарні позиції крім першої) - з правим бордером */
    .drawer-subcat-list a:nth-child(odd):not(.drawer-subcat-all) {
        border-right: 1px solid var(--m-border);
    }
    
    /* Права колонка (парні позиції) - без правого бордера */
    .drawer-subcat-list a:nth-child(even) {
        border-right: none;
    }
    
    /* Вилучаємо нижній бордер з останнього елемента в кожній колонці */
    .drawer-subcat-list a:nth-last-child(1),
    .drawer-subcat-list a:nth-last-child(2) {
        border-bottom: none;
    }
    
    .drawer-subcat-list a:hover { 
        color: var(--m-accent); 
        background: rgba(107,45,78,.08); 
    }
    
    /* Кнопка "Усі товари" займає обидві колонки і йде на початку */
    .drawer-subcat-list a.drawer-subcat-all {
        font-weight: 600;
        color: var(--m-accent);
        grid-column: 1 / -1;
        border-right: none;
        border-bottom: 1px solid var(--m-border);
        order: -1;
    }
    
    /* Якщо є інші елементи після "Усі товари" */
    .drawer-subcat-list a.drawer-subcat-all:only-child {
        border-bottom: none;
    }

    .drawer-brand-list {
        list-style: none;
        display: flex;
        flex-direction: column;
        width: 100%;
        max-height: 46vh;
        overflow-y: auto;
    }
    .drawer-brand-list a {
        display: block;
        padding: clamp(10px, 2.2vh, 13px) clamp(24px, 6vw, 34px);
        font-size: clamp(13px, 3.3vw, 15px);
        color: var(--m-text);
        text-decoration: none;
        border-top: 1px solid var(--m-border);
        transition: color 0.18s, background 0.18s;
    }
    .drawer-brand-list li:first-child a { border-top: none; }
    .drawer-brand-list a:hover { color: var(--m-accent); background: rgba(107,45,78,.06); }

    #bottomMenu.active .drawer-item {
        animation: mobFadeUp 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    #bottomMenu.active .drawer-item:nth-child(1) { animation-delay: .03s; }
    #bottomMenu.active .drawer-item:nth-child(2) { animation-delay: .06s; }
    #bottomMenu.active .drawer-item:nth-child(3) { animation-delay: .09s; }
    #bottomMenu.active .drawer-item:nth-child(4) { animation-delay: .12s; }
    #bottomMenu.active .drawer-item:nth-child(5) { animation-delay: .15s; }

    @keyframes mobFadeUp {
        from { opacity: 0; transform: translateX(-10px); }
        to   { opacity: 1; transform: translateX(0); }
    }
}

@media (max-width: 900px) {

    .search_panel {
        display: flex;          
        flex-direction: column;
        position: fixed;
        top: clamp(56px, 6vw, 100px);
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        z-index: 1150; 
        background: #fff;
        overflow: hidden;
        transform: translateY(105%); 
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition:
            transform  0.32s cubic-bezier(0.22, 1, 0.36, 1),
            opacity    0.25s ease,
            visibility 0s linear 0.32s;
    }
    .search_panel.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition:
            transform  0.32s cubic-bezier(0.22, 1, 0.36, 1),
            opacity    0.25s ease;
    }

    .search_input_wrap {
        display: flex;
        align-items: center;
        gap: 0;
        padding: 10px 10px 10px 14px;
        border-bottom: 1px solid #E8D5DE;
        flex-shrink: 0;
        flex: unset;
    }
    .search_panel_header {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        padding: 0;
        border-bottom: none;
        background: transparent;
    }
    .search_panel_header .search_cancel_btn {
        display: flex;
    }
    .search_input {
        flex: 1;
        width: 100%;
        padding: 13px 44px 13px 16px;
        font-size: 16px; 
        border: 2px solid #6B2D4E;
        border-radius: 12px;
        outline: none;
        background: #fff;
        transition: box-shadow 0.2s ease;
    }
    .search_input:focus {
        box-shadow: 0 0 0 3px rgba(107, 45, 78, 0.18);
    }

    .search_cancel_btn {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        padding: 8px 4px;
        background: none;
        border: none;
        cursor: pointer;
        color: #6B2D4E;
        font-size: 15px;
        font-weight: 600;
        white-space: nowrap;
        transition: opacity 0.18s;
    }
    .search_cancel_btn:active { opacity: 0.6; }

    .search_panel_body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 0;
    }
    .search_panel_body::-webkit-scrollbar { display: none; }

    .search_results {
        display: none;
        margin-top: 0;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        grid-template-columns: 1fr;
        gap: 0;
        max-height: none;
        overflow-y: visible;
    }
    .search_results.active { display: grid; }

    .search_col {
        padding: 16px 16px 12px;
        border-bottom: 1px solid #E8D5DE;
    }
    .search_col:last-child { border-bottom: none; }

    .search_col h4 {
        margin: 0 0 12px;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: #6B2D4E;
        border-bottom: none;
        padding-bottom: 0;
    }

    .search_col_list { gap: 0; }
    .search_col_list a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 8px;
        font-size: 15px;
        border-bottom: 1px solid #F7EEF2;
        border-radius: 0;
        color: #24262b;
        text-decoration: none;
    }
    .search_col_list a::after {
        content: '';
        display: block;
        width: 7px;
        height: 7px;
        border-right: 2px solid #ccc;
        border-top: 2px solid #ccc;
        transform: rotate(45deg);
        flex-shrink: 0;
        margin-left: 8px;
    }
    .search_col_list a:last-child { border-bottom: none; }
    .search_col_list a:active { background: #FAF0F4; }

    .search_product_item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 8px;
        border-bottom: 1px solid #F7EEF2;
        border-radius: 0;
        text-decoration: none;
        color: inherit;
    }
    .search_product_item:last-child { border-bottom: none; }
    .search_product_item:active { background: #FAF0F4; }

    .search_product_item img,
    .search_product_placeholder {
        width: 54px;
        height: 54px;
        border-radius: 8px;
        object-fit: cover;
        background: #f1f5f9;
        flex-shrink: 0;
    }
    .search_product_info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }
    .search_product_name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 15px;
        font-weight: 500;
        color: #24262b;
    }
    .search_product_price {
        font-size: 14px;
        color: #6B2D4E;
        font-weight: 700;
    }

    .search_product_item::after {
        content: '';
        display: block;
        width: 8px;
        height: 8px;
        border-right: 2px solid #ccc;
        border-top: 2px solid #ccc;
        transform: rotate(45deg);
        flex-shrink: 0;
        margin-left: auto;
    }

    .search_empty {
        font-size: 14px;
        color: #999;
        padding: 4px 8px 8px;
    }
    .search_loading {
        padding: 24px;
        font-size: 14px;
    }

} 

@media (min-width: 901px) {

    #bottomMenu { display: none !important; }
    .mobile-icon-row { display: none !important; }

    .search_cancel_btn   { display: none !important; }
    .search_hints        { display: none !important; }
    .search_panel_header { display: none !important; }
    .search_panel_body   { display: block; overflow: visible; }
    .search_input_wrap {
        padding: 0;
        border-bottom: none;
        flex: unset;
        display: block;
    }
    .search_input {
        width: 100%;
        padding: clamp(8px, 1vw, 16px) clamp(10px, 1.2vw, 20px);
        padding-right: 44px;
        font-size: clamp(13px, 1.2vw, 20px);
        border-radius: 8px;
    }

    .desktop-cat-bar {
        position: sticky;
        top: 0;
        left: 0; right: 0;
        z-index: 998;
        background: linear-gradient(135deg, #FBF0F3 0%, #fff 100%);
        box-shadow: 0 3px 18px rgba(107, 45, 78, 0.10);
        border-bottom: 2px solid rgba(107, 45, 78, 0.12);
        border-radius: 0 0 14px 14px;
        height: clamp(42px, 4.5vw, 62px);
        opacity: 1;
        overflow: visible;
        transition:
            height     0.32s cubic-bezier(0.22, 1, 0.36, 1),
            opacity    0.28s cubic-bezier(0.22, 1, 0.36, 1),
            box-shadow 0.28s ease;
        display: flex;
        align-items: stretch;
    }
    .desktop-cat-bar.bar-hidden {
        height: 0;
        opacity: 0;
        box-shadow: none;
        pointer-events: none;
        overflow: hidden;
    }

    .dc-scroll-btn {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: clamp(28px, 2.6vw, 44px);
        background: transparent;
        border: none;
        cursor: pointer;
        color: #6B2D4E;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s, background 0.18s;
        z-index: 2;
        position: relative;
    }
    .dc-scroll-btn.visible {
        opacity: 1;
        pointer-events: auto;
    }
    .dc-scroll-btn:hover { background: rgba(107, 45, 78, 0.07); }
    .dc-scroll-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

    .dc-scroll-btn-left::after {
        content: '';
        position: absolute;
        top: 0; bottom: 0;
        left: 100%;
        width: 32px;
        background: linear-gradient(to right, rgba(255,240,246,0.85), transparent);
        pointer-events: none;
        z-index: 1;
    }
    .dc-scroll-btn-right::before {
        content: '';
        position: absolute;
        top: 0; bottom: 0;
        right: 100%;
        width: 32px;
        background: linear-gradient(to left, rgba(255,240,246,0.85), transparent);
        pointer-events: none;
        z-index: 1;
    }

    .dc-cat-scroll {
        flex: 1;
        overflow-x: auto;
        overflow-y: clip;     
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-behavior: smooth;
    }
    .dc-cat-scroll::-webkit-scrollbar { display: none; }


    .dc-cat-list {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start; 
        align-items: stretch;
        list-style: none;
        padding: 0 clamp(4px, 1vw, 16px);
        gap: 0;
        margin: 0 auto;            
        width: max-content;      
        min-width: 100%;
        height: 100%;
    }

    .dc-cat-item { position: relative; flex-shrink: 0; }

    .dc-cat-link {
        display: flex;
        align-items: center;
        gap: 5px;
        height: 100%;
        padding: 0 clamp(8px, 1.1vw, 20px);
        font-size: clamp(10px, 0.82vw, 14px);
        font-weight: 700;
        letter-spacing: .04em;
        text-transform: uppercase;
        text-decoration: none;
        white-space: nowrap;
        color: #3d1a2b;
        border-bottom: 3px solid transparent;
        transition: color 0.18s, border-color 0.18s, background 0.18s;
    }
    .dc-cat-item:hover > .dc-cat-link,
    .dc-cat-item.open  > .dc-cat-link {
        color: #6B2D4E;
        border-bottom-color: #6B2D4E;
        background: rgba(107, 45, 78, 0.05);
    }

    .dc-cat-arrow {
        display: inline-block;
        width: 13px; height: 13px;
        flex-shrink: 0;
        transition: transform 0.22s ease;
        color: inherit;
    }
    .dc-cat-arrow svg { width: 100%; height: 100%; display: block; }
    .dc-cat-item.open .dc-cat-arrow { transform: rotate(180deg); }

    .dc-dropdown {
        position: fixed;     
        top: 0; left: 0;  
        min-width: clamp(150px, 15vw, 260px);
        background: #fff;
        border-radius: 14px;
        box-shadow: 0 10px 32px rgba(107, 45, 78, 0.16), 0 2px 8px rgba(0,0,0,.06);
        border: 1px solid rgba(107, 45, 78, 0.15);
        padding: clamp(6px, 0.5vw, 10px) 0;
        z-index: 1200;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-6px);
        transition:
            opacity   0.2s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
            visibility 0s linear 0.2s;
    }
    .dc-cat-item.open .dc-dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
        transition:
            opacity   0.2s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .dc-dropdown::before {
        content: '';
        position: absolute;
        top: -8px; left: 50%;
        transform: translateX(-50%);
        border: 8px solid transparent;
        border-top: none;
        border-bottom-color: rgba(107, 45, 78, 0.15);
    }
    .dc-dropdown::after {
        content: '';
        position: absolute;
        top: -6px; left: 50%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-top: none;
        border-bottom-color: #fff;
    }

    .dc-sub-list { list-style: none; margin: 0; padding: 0; }
    .dc-sub-list li { margin: 0; }
    .dc-sub-list a {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: clamp(7px, 0.6vw, 11px) clamp(14px, 1.4vw, 22px);
        font-size: clamp(11px, 0.82vw, 14px);
        color: #4a1a2e;
        text-decoration: none;
        white-space: nowrap;
        transition: background 0.15s, color 0.15s, padding-left 0.15s;
    }
    .dc-sub-list a::before {
        content: '';
        display: inline-block;
        width: 5px; height: 5px;
        border-radius: 50%;
        background: #6B2D4E;
        opacity: 0;
        flex-shrink: 0;
        transition: opacity 0.15s;
    }
    .dc-sub-list a:hover {
        background: linear-gradient(to right, rgba(107,45,78,.07), transparent);
        color: #6B2D4E;
        padding-left: clamp(20px, 2vw, 30px);
    }
    .dc-sub-list a:hover::before { opacity: 1; }
}

@media (max-width: 480px) {
    .top_menu { padding: 0 8px; }
    .topstart_menu, .topend_menu { gap: 8px; margin: 8px 6px; }
    .topmenu_logo svg { width: clamp(120px, 38vw, 180px); }
}

@media (min-width: 481px) and (max-width: 900px) {
    .search_input { font-size: 17px; }
    .search_product_item img,
    .search_product_placeholder { width: 60px; height: 60px; }
    .search_results { grid-template-columns: 1fr; }
}

@media (min-width: 901px) and (max-width: 1440px) {
}

@media (min-width: 1441px) and (max-width: 2560px) {
    .top_menu { min-height: clamp(80px, 5.5vw, 120px); }
}

@media (min-width: 2561px) and (max-width: 3840px) {
    .top_menu { min-height: clamp(100px, 4.5vw, 180px); }
    .cart-count { top: -10px; right: -12px; }
    .search_panel { max-width: 1600px; }
    .search_results { gap: 24px; padding: 24px; }
}

@media (min-width: 3841px) {
    .top_menu {
        min-height: clamp(140px, 3.5vw, 260px);
        padding: 0 clamp(40px, 4vw, 120px);
    }
    .topstart_menu, .topend_menu {
        gap: clamp(28px, 2.5vw, 80px);
        margin: clamp(20px, 1.5vw, 50px) clamp(20px, 2vw, 60px);
    }
    .cart-count { top: -14px; right: -16px; font-size: clamp(16px, 0.7vw, 32px); }
    .search_panel { max-width: 2800px; top: clamp(120px, 4vw, 240px); }
    .search_results { gap: 40px; padding: 40px; border-radius: 20px; }
    .search_input { border-radius: 14px; border-width: 3px; }
}

@media (prefers-reduced-motion: reduce) {
    #bottomMenu, .menu_backdrop,
    .drawer-link, .drawer-cat-link, .drawer-cat-toggle,
    .burger_start, .search_start, .shop_end,
    .account_end, .basket_end, .mobile-menu-icon,
    .drawer-item, .drawer-submenu, .drawer-subcat-list, .drawer-arrow,
    .search_panel, .search_backdrop {
        transition: none !important;
        animation: none !important;
    }
}

/* ===== FIXED MOBILE MENU HEADER + ALL BRANDS ===== */
@media (max-width: 900px) {
    #bottomMenu {
        display: flex;
        flex-direction: column;
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
        padding-bottom: 0;
    }

    /* Верхній блок "МЕНЮ ×" не рухається */
    #bottomMenu .drawer-head {
        position: relative;
        top: auto;
        z-index: 10;
        flex: 0 0 auto;
        flex-shrink: 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* Ряд іконок теж залишається на місці */
    #bottomMenu .mobile-icon-row {
        flex: 0 0 auto;
        flex-shrink: 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* Прокручується тільки список меню */
    #bottomMenu .drawer-nav {
        display: block;
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-bottom: 24px;
        box-sizing: border-box;
    }

    #bottomMenu .drawer-brand-list {
        max-height: none;
        overflow: visible;
    }

    /* Кнопка "Усі бренди" зверху списку брендів */
    #bottomMenu .drawer-brand-all {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
        padding: clamp(13px, 3vh, 17px) clamp(16px, 4vw, 24px);
        font-size: clamp(14px, 3.6vw, 17px);
        font-weight: 700;
        letter-spacing: .03em;
        color: var(--m-accent);
        text-decoration: none;
        background: rgba(107, 45, 78, 0.08);
        border-bottom: 1px solid var(--m-border);
        transition: background .2s, color .2s;
    }

    #bottomMenu .drawer-brand-all:hover,
    #bottomMenu .drawer-brand-all:active {
        color: var(--m-accent);
        background: rgba(107, 45, 78, 0.14);
    }
}


/* ===== FIX: УСІ ПІДКАТЕГОРІЇ ПОВИННІ ВМІЩАТИСЯ В МЕНЮ ===== */
@media (max-width: 900px) {
    /* Нічого не може вилазити за межі бокового меню */
    #bottomMenu,
    #bottomMenu * {
        box-sizing: border-box;
    }

    #bottomMenu .drawer-list,
    #bottomMenu .drawer-item,
    #bottomMenu .drawer-submenu,
    #bottomMenu .drawer-cat-list,
    #bottomMenu .drawer-cat-item,
    #bottomMenu .drawer-subcat-list {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    /* Дві колонки завжди ділять ширину меню порівну */
    #bottomMenu .drawer-subcat-list {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        overflow-x: hidden;
    }

    /* Довгі назви не розтягують колонку за межі меню */
    #bottomMenu .drawer-subcat-list a {
        min-width: 0;
        max-width: 100%;
        padding-left: clamp(12px, 3vw, 22px);
        padding-right: clamp(12px, 3vw, 22px);
        overflow-wrap: anywhere;
        word-break: break-word;
        white-space: normal;
    }

    /* Також не даємо звичайним пунктам меню вилізти */
    #bottomMenu .drawer-link,
    #bottomMenu .drawer-cat-link,
    #bottomMenu .drawer-cat-toggle,
    #bottomMenu .drawer-brand-list a,
    #bottomMenu .drawer-brand-all {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    /* Якщо категорій дуже багато — скрол тільки всередині нижньої частини */
    #bottomMenu .drawer-nav {
        min-width: 0;
        max-width: 100%;
        overflow-x: hidden;
    }
}
