/* ==========================================================================
   BG-Parfum - Модернизирано меню и стилове по модела на Спално Бельо
   Цвят: #b89569 (Златист фирмен цвят на BG Parfum)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ДЕСКТОП: Странично меню с категории в лявата колона (с ефект при посочване)
   -------------------------------------------------------------------------- */
.block-categories {
    background: #ffffff !important;
    border: 1px solid #ede8e3 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
    padding: 16px !important;
    margin-bottom: 24px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
}

.block-categories .category-top-menu > li > a.text-uppercase {
    display: block !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    color: #888888 !important;
    padding: 0 6px 10px 6px !important;
    border-bottom: 2px solid #b89569 !important;
    margin-bottom: 8px !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
}

.block-categories .category-top-menu > li > a.text-uppercase:hover {
    color: #b89569 !important;
}

.block-categories .category-sub-menu {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.block-categories .category-sub-menu li[data-depth="0"] {
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
}

.block-categories .category-sub-menu li[data-depth="0"] > a {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #2b2b2b !important;
    padding: 10px 34px 10px 14px !important;
    border-bottom: 1px solid #f2f2f2 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.22s ease !important;
}

/* Ефектът при отиване с мишката: плавно плъзгане, златист фон и сянка */
.block-categories .category-sub-menu li[data-depth="0"] > a:hover,
.block-categories .category-sub-menu li[data-depth="0"].active > a {
    background: #b89569 !important;
    color: #ffffff !important;
    border-color: #b89569 !important;
    box-shadow: 0 4px 12px rgba(184, 149, 105, 0.28) !important;
    transform: translateX(4px) !important;
}

.block-categories .category-sub-menu li[data-depth="0"]:hover .collapse-icons,
.block-categories .category-sub-menu li[data-depth="0"]:hover .collapse-icons i {
    color: #ffffff !important;
}

.block-categories .category-sub-menu li[data-depth="0"] .collapse-icons {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 26px !important;
    height: 26px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #888888 !important;
    z-index: 2 !important;
    transition: color 0.2s ease !important;
}

.block-categories .category-sub-menu li[data-depth="0"] .collapse-icons i {
    font-size: 18px !important;
    line-height: 1 !important;
}

/* --------------------------------------------------------------------------
   2. ДЕСКТОП: Горно хоризонтално меню
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    #block_top_menu .sf-menu > li > a {
        font-weight: 700 !important;
        padding: 10px 14px !important;
        border-radius: 6px !important;
        transition: all 0.2s ease !important;
    }
    #block_top_menu .sf-menu > li > a:hover {
        color: #b89569 !important;
        background: rgba(184, 149, 105, 0.08) !important;
    }
}

/* --------------------------------------------------------------------------
   3. МОБИЛНА ВЕРСИЯ: Бутон за меню и подредено падащо меню
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    /* Скриване на старите проблемни три чертички от хедъра */
    #menu-icon {
        display: none !important;
    }
    #mobile_top_menu_wrapper {
        display: none !important;
    }

    /* Скриване на второто дублиращо се меню от лявата колона на мобилни */
    #left-column .block-categories {
        display: none !important;
    }

    /* Модерен бутон "МЕНЮ" точно под търсачката */
    .sf-contener .cat-title {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-height: 44px !important;
        background: #b89569 !important;
        color: #ffffff !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        letter-spacing: 0.8px !important;
        text-transform: uppercase !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        margin: 10px 0 12px 0 !important;
        padding: 0 16px !important;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12) !important;
        transition: all 0.2s ease !important;
        position: relative !important;
        z-index: 10 !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .sf-contener .cat-title:hover {
        opacity: 0.95 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 14px rgba(184, 149, 105, 0.35) !important;
    }

    .sf-contener .cat-title:before {
        content: "\2630" !important;
        font-size: 20px !important;
        line-height: 1 !important;
        margin-right: 10px !important;
        color: #ffffff !important;
    }

    .sf-contener .cat-title.active:before {
        content: "\2715" !important;
    }

    /* Падащо мобилно меню с категории */
    #block_top_menu ul.sf-menu,
    #block_top_menu .sf-menu,
    .sf-menu.menu-content {
        display: none !important;
        background: #ffffff !important;
        border: 1px solid #ede8e3 !important;
        border-radius: 10px !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1) !important;
        margin: 8px 0 16px 0 !important;
        padding: 6px 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        list-style: none !important;
    }

    /* Отворено състояние */
    #block_top_menu ul.sf-menu.menu-open,
    #block_top_menu .sf-menu.menu-open,
    .sf-menu.menu-content.menu-open,
    .sf-contener .cat-title.active ~ ul.menu-content,
    .sf-contener .cat-title.active + ul.menu-content {
        display: block !important;
    }

    .sf-menu.menu-content > li {
        display: block !important;
        border-bottom: 1px solid #f5f5f5 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .sf-menu.menu-content > li:last-child {
        border-bottom: none !important;
    }

    /* Стил и ефект при посочване на категориите в мобилното меню */
    .sf-menu.menu-content > li > a {
        display: block !important;
        padding: 12px 18px !important;
        margin: 2px 6px !important;
        color: #222222 !important;
        font-size: 14.5px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        border-radius: 6px !important;
        transition: all 0.2s ease !important;
    }

    .sf-menu.menu-content > li > a:hover {
        background: #b89569 !important;
        color: #ffffff !important;
        box-shadow: 0 3px 10px rgba(184, 149, 105, 0.25) !important;
        transform: translateX(4px) !important;
    }

    #block_top_menu .sf-menu > li:first-child > ul.menu-mobile,
    #block_top_menu .sf-menu > li:first-child > ul,
    #block_top_menu .sf-menu > li:first-child > span.menu-mobile-grover {
        display: none !important;
    }

    /* --------------------------------------------------------------------------
       4. МОБИЛНА ВЕРСИЯ: Продукти подредени точно по 2 на ред (2 колони)
       -------------------------------------------------------------------------- */
    #products .products,
    #js-product-list .products,
    .products.row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin-left: -5px !important;
        margin-right: -5px !important;
    }

    #products .products > div,
    #js-product-list .products > div,
    #products .products > article,
    #js-product-list .products > article,
    #products .js-product,
    #js-product-list .js-product,
    .products.row > div,
    .products.row > article,
    .products.row > .product {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
        padding-left: 5px !important;
        padding-right: 5px !important;
        box-sizing: border-box !important;
        margin-bottom: 12px !important;
    }

    .product-miniature,
    .js-product-miniature {
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 10px !important;
        border-radius: 8px !important;
        background: #ffffff !important;
        border: 1px solid #f0f0f0 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        box-sizing: border-box !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    }

    .product-miniature:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(184, 149, 105, 0.18) !important;
    }

    .product-miniature .thumbnail-container,
    .product-miniature .product-thumbnail {
        width: 100% !important;
        margin-bottom: 8px !important;
        text-align: center !important;
    }

    .product-miniature .product-thumbnail img {
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        border-radius: 6px !important;
    }

    .product-miniature .product-title,
    .product-miniature .product-title a {
        font-size: 13px !important;
        line-height: 1.3 !important;
        font-weight: 600 !important;
        color: #2b2b2b !important;
        margin-bottom: 6px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .product-miniature .product-price-and-shipping {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #b89569 !important;
        margin-top: auto !important;
    }
}
