/* ==========================================================================
   BG-Parfum.com Mobile UX & Category Improvements (PrestaShop 1.7 / 8)
   Палитра: Златисто #b89569 | Бордо #b23b3b | Топло кремаво #fbf9f6
   ========================================================================== */

:root {
  --bgpm-accent: #b89569;
  --bgpm-accent-dark: #9c7a50;
  --bgpm-accent-soft: #f8f3ec;
  --bgpm-price: #b23b3b;
  --bgpm-border: #e8e1d7;
  --bgpm-text: #2c2826;
  --bgpm-muted: #6e6862;
  --bgpm-bg-card: #ffffff;
}

/* ==========================================================================
   1. ОПИСАНИЕ НА КАТЕГОРИЯТА НАЙ-ОТДОЛУ (ДЕСКТОП + МОБИЛЕН)
   ========================================================================== */

html.bgpm-ux-desc-bottom body#category #js-product-list-header #category-description {
  display: none !important;
}

html.bgpm-ux-desc-bottom body#category #js-product-list-header .block-category {
  min-height: auto !important;
  padding: 14px 18px !important;
  margin-bottom: 14px !important;
  border-radius: 10px;
}

html.bgpm-ux-desc-bottom body#category #js-product-list-header .block-category h1.h1 {
  margin: 0 !important;
  line-height: 1.25;
}

html.bgpm-ux-desc-bottom body#category #js-product-list-header .block-category-inner:empty {
  display: none !important;
}

.bgpm-category-description-bottom {
  margin-top: 28px !important;
  margin-bottom: 16px !important;
  padding: 22px 24px !important;
  background: var(--bgpm-bg-card) !important;
  border: 1px solid var(--bgpm-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
  color: var(--bgpm-text);
  font-size: 14px;
  line-height: 1.65;
}

.bgpm-category-description-bottom #category-description {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #444 !important;
}

.bgpm-category-description-bottom h2,
.bgpm-category-description-bottom h3 {
  color: var(--bgpm-text);
  font-weight: 700;
  margin-top: 1.1em;
  margin-bottom: 0.5em;
  line-height: 1.35;
}

.bgpm-category-description-bottom h2:first-child,
.bgpm-category-description-bottom h3:first-child,
.bgpm-category-description-bottom p:first-child {
  margin-top: 0;
}

.bgpm-category-description-bottom ul,
.bgpm-category-description-bottom ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

@media (max-width: 767px) {
  .bgpm-category-description-bottom {
    margin-top: 20px !important;
    padding: 16px !important;
    font-size: 13.5px;
  }
}

/* ==========================================================================
   2. УЕДНАКВЯВАНЕ НА БУТОНИТЕ „ДОБАВИ“ В ЗЛАТИСТОТО НА BG-PARFUM
   ========================================================================== */

html.bgpm-ux-brand-buttons .btn-primary.add-to-cart,
html.bgpm-ux-brand-buttons form.hiaddtocart .btn-primary {
  background-color: var(--bgpm-accent) !important;
  border-color: var(--bgpm-accent) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-radius: 7px !important;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

html.bgpm-ux-brand-buttons .btn-primary.add-to-cart:hover,
html.bgpm-ux-brand-buttons form.hiaddtocart .btn-primary:hover {
  background-color: var(--bgpm-accent-dark) !important;
  border-color: var(--bgpm-accent-dark) !important;
}

/* Златиста рамка на активната миниатюра на продуктовата страница (вместо синя #2fb5d2) */
html.bgpm-ux-brand-buttons .product-images > li.thumb-container > .thumb.selected,
html.bgpm-ux-brand-buttons .product-images > li.thumb-container > .thumb:hover {
  border: 2px solid var(--bgpm-accent) !important;
  border-radius: 6px;
}

/* По-четлив златист цвят на надзаглавието „СЕЛЕКТИВНА ПАРФЮМЕРИЯ“ */
html.bgpm-ux-modern-header .spalno-pre-title {
  color: #9e794c !important;
}

/* ==========================================================================
   2.5. МОДЕРЕН КОМПАКТЕН МОБИЛЕН ХЕДЪР + 1-РЕДОВ БУТИКОВ ДЕСКТОП ХЕДЪР
   ========================================================================== */

.bgpm-desktop-nav {
  display: none;
}

@media (min-width: 768px) {
  .bgpm-mobile-menu-btn {
    display: none !important;
  }

  /* Чист бял бутиков десктоп хедър (вместо #ffffee жълто и 5 реда текст) */
  html.bgpm-ux-modern-desktop #header {
    background: #ffffff !important;
    box-shadow: 0 3px 16px rgba(44, 40, 38, 0.06) !important;
    position: relative;
    z-index: 20;
  }

  html.bgpm-ux-modern-desktop #wrapper {
    background: #faf8f5 !important;
  }

  html.bgpm-ux-modern-desktop #header .header-nav {
    background: #faf8f5 !important;
    border-bottom: 1px solid #eee7dd !important;
    max-height: none !important;
    padding: 4px 0 !important;
  }

  html.bgpm-ux-modern-desktop #header .header-top {
    background: #ffffff !important;
    padding: 14px 0 !important;
  }

  html.bgpm-ux-modern-desktop #header .header-top > .container > .row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 20px;
  }

  html.bgpm-ux-modern-desktop #header #_desktop_logo {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 240px !important;
    padding-top: 0 !important;
  }

  html.bgpm-ux-modern-desktop #header #_desktop_logo img.logo {
    max-height: 46px !important;
    width: auto !important;
  }

  html.bgpm-ux-modern-desktop #header .header-top-right {
    flex: 1 1 auto !important;
    width: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding-top: 0 !important;
  }

  /* Видима, модерна пил-търсачка на десктоп (вместо невидимата лупа) */
  html.bgpm-ux-modern-desktop #header #search_widget {
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 !important;
    float: none !important;
    overflow: visible !important;
    height: auto !important;
  }

  html.bgpm-ux-modern-desktop #header #search_widget form {
    position: relative !important;
    width: 100% !important;
  }

  html.bgpm-ux-modern-desktop #header #search_widget form input[type="text"],
  html.bgpm-ux-modern-desktop #header #search_widget input.ui-autocomplete-input {
    width: 100% !important;
    height: 44px !important;
    padding: 10px 18px 10px 44px !important;
    border-radius: 999px !important;
    background: #f6f4f0 !important;
    border: 1.5px solid #dfd7cb !important;
    color: var(--bgpm-text) !important;
    font-size: 14px !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  }

  html.bgpm-ux-modern-desktop #header #search_widget form input[type="text"]::placeholder {
    color: #7c756d !important;
    opacity: 1 !important;
  }

  html.bgpm-ux-modern-desktop #header #search_widget form input[type="text"]:focus {
    background: #ffffff !important;
    border-color: var(--bgpm-accent) !important;
    box-shadow: 0 0 0 3px rgba(184, 149, 105, 0.18) !important;
  }

  html.bgpm-ux-modern-desktop #header #search_widget form i.material-icons,
  html.bgpm-ux-modern-desktop #header #search_widget form .search {
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 20px !important;
    color: #706961 !important;
    pointer-events: none;
  }

  /* Десктоп количка в златисто вместо неоново синьо #2fb5d2 */
  html.bgpm-ux-modern-desktop #_desktop_cart .blockcart {
    background: #f3ede4 !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
    height: auto !important;
    margin-left: 10px !important;
  }

  html.bgpm-ux-modern-desktop #_desktop_cart .blockcart .header,
  html.bgpm-ux-modern-desktop #_desktop_cart .blockcart .header a,
  html.bgpm-ux-modern-desktop #_desktop_cart .blockcart i.material-icons,
  html.bgpm-ux-modern-desktop #_desktop_cart .blockcart span {
    color: var(--bgpm-text) !important;
    font-weight: 600 !important;
  }

  html.bgpm-ux-modern-desktop #_desktop_cart .blockcart.active {
    background: var(--bgpm-accent) !important;
  }

  html.bgpm-ux-modern-desktop #_desktop_cart .blockcart.active .header,
  html.bgpm-ux-modern-desktop #_desktop_cart .blockcart.active .header a,
  html.bgpm-ux-modern-desktop #_desktop_cart .blockcart.active i.material-icons,
  html.bgpm-ux-modern-desktop #_desktop_cart .blockcart.active span {
    color: #ffffff !important;
  }

  /* Скриваме стария 5-редов блок #block_top_menu на десктоп щом 1-редовата навигация се монтира */
  html.bgpm-ux-modern-desktop #block_top_menu.bgpm-desktop-menu-replaced {
    display: none !important;
  }

  /* Нова 1-редова бутикова навигация (#bgpm-desktop-nav) */
  html.bgpm-ux-modern-desktop .bgpm-desktop-nav {
    display: block !important;
    background: #ffffff;
    border-top: 1px solid #f0eae1;
    border-bottom: 1px solid #ebe3d8;
  }

  .bgpm-dnav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .bgpm-dnav-item {
    position: relative;
    margin: 0;
    padding: 0;
  }

  .bgpm-dnav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 13px 16px;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--bgpm-text) !important;
    text-decoration: none !important;
    white-space: nowrap;
    position: relative;
    transition: color 0.16s ease;
  }

  .bgpm-dnav-link::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 2.5px;
    background: var(--bgpm-accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
  }

  .bgpm-dnav-item:hover > .bgpm-dnav-link,
  .bgpm-dnav-link.is-active {
    color: var(--bgpm-accent-dark) !important;
  }

  .bgpm-dnav-item:hover > .bgpm-dnav-link::after,
  .bgpm-dnav-link.is-active::after {
    transform: scaleX(1);
  }

  .bgpm-dnav-chev {
    color: var(--bgpm-accent);
    transition: transform 0.2s ease;
    vertical-align: middle;
  }

  .bgpm-dnav-item:hover > .bgpm-dnav-link .bgpm-dnav-chev {
    transform: rotate(180deg);
  }

  /* Елегантно падащо меню при hover */
  .bgpm-dnav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 6px);
    min-width: 230px;
    background: #ffffff;
    border: 1px solid #ebe3d8;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(44, 40, 38, 0.13);
    padding: 8px;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 999;
  }

  .bgpm-dnav-dropdown.is-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(175px, 1fr));
    gap: 2px 8px;
    min-width: 390px;
  }

  .bgpm-dnav-item:hover > .bgpm-dnav-dropdown,
  .bgpm-dnav-item:focus-within > .bgpm-dnav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }

  .bgpm-dnav-dropdown li {
    margin: 0;
    padding: 0;
  }

  .bgpm-dnav-dropdown li a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--bgpm-text) !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.14s ease, color 0.14s ease;
  }

  .bgpm-dnav-dropdown li a:hover,
  .bgpm-dnav-dropdown li a.is-active {
    background: var(--bgpm-accent-soft);
    color: var(--bgpm-accent-dark) !important;
    font-weight: 600;
  }
}

@media (max-width: 767px) {
  /* Изчистен бял хедър вместо жълтия фон и излишните отстояния */
  html.bgpm-ux-modern-header #header {
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 0 !important;
  }

  html.bgpm-ux-modern-header #header .header-nav {
    background: #ffffff !important;
    border-bottom: 1px solid #f0ebe4 !important;
    min-height: 52px !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  html.bgpm-ux-modern-header #header .header-nav .mobile {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    padding: 5px 10px !important;
    width: 100% !important;
  }

  /* Компактна икона ☰ до логото (като в Tshop.bg) */
  html.bgpm-ux-modern-header .bgpm-mobile-menu-btn {
    order: 1;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #ece5db;
    border-radius: 9px;
    background: #faf8f5;
    color: var(--bgpm-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }

  html.bgpm-ux-modern-header .bgpm-mobile-menu-btn[aria-expanded="true"] {
    background: var(--bgpm-accent);
    border-color: var(--bgpm-accent);
    color: #ffffff;
  }

  html.bgpm-ux-modern-header #_mobile_logo {
    order: 2;
    flex: 1 1 auto !important;
    text-align: left !important;
    padding: 0 4px !important;
    margin: 0 !important;
    max-width: none !important;
    width: auto !important;
    display: flex !important;
    align-items: center !important;
  }

  html.bgpm-ux-modern-header #_mobile_logo h1,
  html.bgpm-ux-modern-header #_mobile_logo a {
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  html.bgpm-ux-modern-header #_mobile_logo img.logo {
    max-height: 34px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  html.bgpm-ux-modern-header #_mobile_user_info {
    order: 3;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
  }

  html.bgpm-ux-modern-header #_mobile_user_info .user-info {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* При логнат клиент скриваме дублиращия линк „Изход“ в хедъра на мобилен (има го в Моят профил) */
  html.bgpm-ux-modern-header #_mobile_user_info .user-info a.logout {
    display: none !important;
  }

  html.bgpm-ux-modern-header #_mobile_user_info .user-info a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 6px !important;
    margin: 0 !important;
    color: var(--bgpm-text) !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    border-radius: 9px;
  }

  html.bgpm-ux-modern-header #_mobile_user_info .user-info a.account {
    background: var(--bgpm-accent-soft) !important;
    color: var(--bgpm-accent-dark) !important;
  }

  html.bgpm-ux-modern-header #_mobile_user_info .user-info a.account span {
    display: none !important;
  }

  html.bgpm-ux-modern-header #_mobile_cart {
    order: 4;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
  }

  html.bgpm-ux-modern-header #_mobile_cart .blockcart {
    background: #f4efe8 !important;
    border: 1px solid #e2d9cb !important;
    border-radius: 9px !important;
    padding: 0 10px !important;
    margin: 0 !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    opacity: 1 !important;
  }

  html.bgpm-ux-modern-header #_mobile_cart .blockcart .header,
  html.bgpm-ux-modern-header #_mobile_cart .blockcart .header a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--bgpm-text) !important;
    text-decoration: none !important;
    opacity: 1 !important;
  }

  html.bgpm-ux-modern-header #_mobile_cart .blockcart i.material-icons,
  html.bgpm-ux-modern-header #_mobile_cart .blockcart .cart-products-count {
    color: var(--bgpm-text) !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    opacity: 1 !important;
  }

  html.bgpm-ux-modern-header #_mobile_cart .blockcart i.material-icons {
    font-size: 20px !important;
  }

  /* Когато в количката има продукти — златист бутон с ясна бяла икона и брой */
  html.bgpm-ux-modern-header #_mobile_cart .blockcart.active {
    background: var(--bgpm-accent) !important;
    border-color: var(--bgpm-accent) !important;
  }

  html.bgpm-ux-modern-header #_mobile_cart .blockcart.active .header,
  html.bgpm-ux-modern-header #_mobile_cart .blockcart.active .header a,
  html.bgpm-ux-modern-header #_mobile_cart .blockcart.active i.material-icons,
  html.bgpm-ux-modern-header #_mobile_cart .blockcart.active .cart-products-count {
    color: #ffffff !important;
  }

  /* Компактен ред 2: изчистена търсачка с видима рамка (без голямата жълта лента МЕНЮ) */
  html.bgpm-ux-modern-header #header .header-top {
    background: #ffffff !important;
    padding: 8px 0 10px !important;
    margin: 0 !important;
  }

  html.bgpm-ux-modern-header #header .header-top-right {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  html.bgpm-ux-modern-header #header #search_widget {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  html.bgpm-ux-modern-header #header #search_widget form {
    position: relative !important;
    width: 100% !important;
    margin: 0 !important;
  }

  html.bgpm-ux-modern-header #header #search_widget form input[type="text"],
  html.bgpm-ux-modern-header #header #search_widget input.ui-autocomplete-input {
    width: 100% !important;
    height: 40px !important;
    padding: 8px 16px 8px 42px !important;
    border-radius: 999px !important;
    background: #f6f4f0 !important;
    border: 1.5px solid #dfd7cb !important;
    color: var(--bgpm-text) !important;
    font-size: 14px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
  }

  html.bgpm-ux-modern-header #header #search_widget form input[type="text"]::placeholder {
    color: #7c756d !important;
    opacity: 1 !important;
  }

  html.bgpm-ux-modern-header #header #search_widget form input[type="text"]:focus {
    background: #ffffff !important;
    border-color: var(--bgpm-accent) !important;
    box-shadow: 0 0 0 3px rgba(184, 149, 105, 0.16) !important;
  }

  html.bgpm-ux-modern-header #header #search_widget form i.material-icons,
  html.bgpm-ux-modern-header #header #search_widget form .search {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 20px !important;
    color: #706961 !important;
    pointer-events: none;
  }

  /* Скриваме старата голяма жълта/бежова лента „МЕНЮ“ (вече се отваря от ☰ горе) */
  html.bgpm-ux-modern-header #header #block_top_menu {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html.bgpm-ux-modern-header #header #block_top_menu .cat-title {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  /* Изчистен стил на падащото меню при натискане на ☰ */
  html.bgpm-ux-modern-header #header #block_top_menu ul.sf-menu.menu-content.bgpm-menu-force-open {
    display: block !important;
  }

  html.bgpm-ux-modern-header #header #block_top_menu ul.sf-menu.menu-content {
    margin: 8px 0 2px !important;
    padding: 6px 0 !important;
    background: #ffffff !important;
    border: 1px solid var(--bgpm-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.09) !important;
    list-style: none !important;
  }

  html.bgpm-ux-modern-header #header #block_top_menu ul.sf-menu.menu-content > li {
    float: none !important;
    width: 100% !important;
    border-bottom: 1px solid #f3eee8 !important;
    margin: 0 !important;
  }

  html.bgpm-ux-modern-header #header #block_top_menu ul.sf-menu.menu-content > li:last-child {
    border-bottom: 0 !important;
  }

  html.bgpm-ux-modern-header #header #block_top_menu ul.sf-menu.menu-content > li > a {
    display: block !important;
    padding: 11px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--bgpm-text) !important;
    background: transparent !important;
    border: 0 !important;
    text-transform: none !important;
  }

  /* Премахване на голямата празна бяла дупка под хедъра */
  html.bgpm-ux-modern-header #wrapper {
    background: #faf8f5 !important;
    padding-top: 10px !important;
  }

  html.bgpm-ux-modern-header #wrapper .breadcrumb {
    margin: 0 0 8px 0 !important;
    padding: 2px 0 !important;
  }

  html.bgpm-ux-modern-header .spalno-featured-section,
  html.bgpm-ux-modern-header .spalno-specials-section {
    margin-top: 4px !important;
  }
}

/* ==========================================================================
   3. ГЛОБАЛНИ И МОБИЛНИ ПОПРАВКИ (ДУБЛИРАНО МЕНЮ, СКРОЛ, АКОРДЕОН КАТЕГОРИИ)
   ========================================================================== */

/* Премахване на дублираната бяла 3-черта икона долу вдясно на бутона МЕНЮ */
html.bgpm-ux-compact-mobile .sf-contener .cat-title::after,
html.bgpm-ux-compact-mobile .sf-contener .cat-title:after {
  display: none !important;
  content: none !important;
  background-image: none !important;
}

/* Оправяне на чекбоксовете във филтрите */
html.bgpm-ux-compact-mobile #search_filters .custom-checkbox {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  vertical-align: middle;
}

html.bgpm-ux-compact-mobile #search_filters .custom-checkbox input[type="checkbox"] + span {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  flex: 0 0 18px !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 1 !important;
}

html.bgpm-ux-compact-mobile #search_filters .facet .facet-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 767px) {
  /* Премахване на хоризонталния overflow (542px на 390px екран) */
  html.bgpm-ux-compact-mobile,
  html.bgpm-ux-compact-mobile body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  html.bgpm-ux-compact-mobile #header,
  html.bgpm-ux-compact-mobile #wrapper,
  html.bgpm-ux-compact-mobile #footer,
  html.bgpm-ux-compact-mobile #main,
  html.bgpm-ux-compact-mobile #header .container,
  html.bgpm-ux-compact-mobile #wrapper .container {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Акордеон „Категории“ (отменя display:none от custom.css на bg-parfum.com) */
  html.bgpm-ux-compact-mobile body#category #left-column .block-categories,
  html.bgpm-ux-compact-mobile #left-column .block-categories.bgpm-cat-accordion {
    display: block !important;
    padding: 0 !important;
    margin-bottom: 10px !important;
    background: #ffffff !important;
    border: 1px solid var(--bgpm-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035) !important;
    overflow: hidden;
  }

  html.bgpm-ux-compact-mobile #left-column .block-categories:not(.is-open) > ul.category-top-menu {
    display: none !important;
  }

  html.bgpm-ux-compact-mobile #left-column .block-categories.is-open > ul.category-top-menu {
    display: block !important;
    padding: 8px 14px 14px !important;
    margin: 0 !important;
    border-top: 1px solid #f0eae1;
  }

  html.bgpm-ux-compact-mobile .bgpm-cat-menu-toggle {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    background: #ffffff;
    color: var(--bgpm-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
  }

  html.bgpm-ux-compact-mobile .bgpm-cat-menu-toggle:hover,
  html.bgpm-ux-compact-mobile .bgpm-cat-menu-toggle[aria-expanded="true"] {
    background: #faf8f5;
  }

  html.bgpm-ux-compact-mobile .bgpm-cat-menu-toggle-left {
    display: inline-flex;
    align-items: center;
    gap: 9px;
  }

  html.bgpm-ux-compact-mobile .bgpm-cat-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bgpm-accent);
  }

  html.bgpm-ux-compact-mobile .bgpm-cat-menu-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--bgpm-text);
  }

  html.bgpm-ux-compact-mobile .bgpm-cat-menu-toggle-right {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  html.bgpm-ux-compact-mobile .bgpm-cat-menu-hint {
    font-size: 12px;
    font-weight: 600;
    color: var(--bgpm-accent-dark);
    background: var(--bgpm-accent-soft);
    padding: 3px 9px;
    border-radius: 999px;
  }

  html.bgpm-ux-compact-mobile .bgpm-cat-menu-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bgpm-accent-dark);
    transition: transform 0.2s ease;
  }

  html.bgpm-ux-compact-mobile .bgpm-cat-menu-toggle[aria-expanded="true"] .bgpm-cat-menu-chevron {
    transform: rotate(180deg);
  }

  html.bgpm-ux-compact-mobile body#category #left-column {
    margin-bottom: 0 !important;
  }

  /* Компактен хляб и заглавие на категорията */
  html.bgpm-ux-compact-mobile #wrapper .breadcrumb {
    margin-bottom: 8px !important;
    padding: 4px 0 !important;
    font-size: 12.5px;
  }

  html.bgpm-ux-compact-mobile body#category #js-product-list-header .block-category {
    padding: 12px !important;
    margin-bottom: 12px !important;
    background: #fff !important;
    border: 1px solid var(--bgpm-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035) !important;
  }

  html.bgpm-ux-compact-mobile body#category #js-product-list-header .block-category h1.h1 {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    color: var(--bgpm-text) !important;
    margin: 0 !important;
  }

  /* Обединени 2-колонни подкатегории (ако категорията има #subcategories) */
  html.bgpm-ux-compact-mobile #subcategories.bgpm-subcats-replaced {
    display: none !important;
  }

  .bgpm-cat-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .bgpm-cat-subcount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--bgpm-accent-soft);
    color: var(--bgpm-accent-dark);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .bgpm-cat-subcats {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0eae1;
  }

  .bgpm-subcat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .bgpm-subcat-grid.is-collapsed {
    display: none;
  }

  .bgpm-subcat-tile {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 42px;
    padding: 8px 10px !important;
    border-radius: 9px !important;
    background: #faf8f5 !important;
    border: 1px solid #e7dfd4 !important;
    color: var(--bgpm-text) !important;
    text-decoration: none !important;
    text-transform: none !important;
    box-sizing: border-box;
  }

  .bgpm-subcat-tile.is-extra-hidden {
    display: none !important;
  }

  .bgpm-subcat-tile-text {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
  }

  .bgpm-subcat-tile-arrow {
    font-size: 17px;
    line-height: 1;
    color: var(--bgpm-accent);
    flex-shrink: 0;
    font-weight: 600;
  }

  .bgpm-subcat-toggle {
    width: 100%;
    margin-top: 9px;
    min-height: 38px;
    padding: 7px 12px;
    border-radius: 9px;
    border: 1px solid #dcd3c6;
    background: #ffffff;
    color: var(--bgpm-accent-dark);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
  }

  .bgpm-subcat-toggle.bgpm-subcat-accordion-btn {
    margin-top: 0;
    justify-content: space-between;
    background: #faf8f5;
    color: var(--bgpm-text);
    min-height: 42px;
    font-size: 14px;
  }

  .bgpm-subcat-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: var(--bgpm-accent-dark);
    transition: transform 0.2s ease;
  }

  .bgpm-subcat-toggle[aria-expanded="true"] .bgpm-subcat-toggle-icon {
    transform: rotate(180deg);
  }

  /* Лента за сортиране + златист бутон ФИЛТЪР */
  html.bgpm-ux-compact-mobile #js-product-list-top {
    margin-bottom: 12px !important;
    padding: 6px 0 !important;
  }

  html.bgpm-ux-compact-mobile #search_filter_toggler {
    border-radius: 8px !important;
    background: var(--bgpm-accent) !important;
    border-color: var(--bgpm-accent) !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
  }
}

@media (min-width: 768px) {
  .bgpm-cat-subcats,
  .bgpm-cat-subcount,
  .bgpm-cat-menu-toggle {
    display: none !important;
  }
}

/* ==========================================================================
   4. ПО 2 ПРОДУКТА НА РЕД НА МОБИЛЕН (ИЗРАВНЕНИ КАРТИ + HIADDTOCART)
   ========================================================================== */

@media (max-width: 767px) {
  html.bgpm-ux-two-col #js-product-list .products.row,
  html.bgpm-ux-two-col #js-product-list .products {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -5px !important;
    margin-right: -5px !important;
    width: auto !important;
  }

  html.bgpm-ux-two-col #js-product-list .products > .js-product.product,
  html.bgpm-ux-two-col #js-product-list .products > .product,
  html.bgpm-ux-two-col #js-product-list .products > div {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    margin-bottom: 10px !important;
    box-sizing: border-box !important;
    display: flex !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html.bgpm-ux-two-col #js-product-list .product-miniature {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html.bgpm-ux-two-col #js-product-list .product-miniature .thumbnail-container {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #fff !important;
    border: 1px solid #ede8e3 !important;
    border-radius: 11px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.04) !important;
  }

  html.bgpm-ux-two-col #js-product-list .product-miniature .thumbnail-container > * {
    border: 0 !important;
    box-shadow: none !important;
  }

  html.bgpm-ux-two-col #js-product-list .product-miniature .thumbnail-top {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    padding: 8px 8px 4px !important;
    background: #ffffff !important;
    flex-shrink: 0;
  }

  html.bgpm-ux-two-col #js-product-list .product-miniature a.product-thumbnail {
    display: block !important;
    width: 100% !important;
    height: auto !important;
  }

  html.bgpm-ux-two-col #js-product-list .product-miniature .product-thumbnail img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
  }

  html.bgpm-ux-two-col #js-product-list .product-miniature .product-description {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 6px 8px 10px !important;
    background: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    flex: 1 1 auto !important;
    text-align: center !important;
  }

  html.bgpm-ux-two-col #js-product-list .product-miniature .product-title {
    margin: 0 0 6px !important;
    padding: 0 !important;
    font-size: 12.5px !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    min-height: 33px;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    text-overflow: ellipsis;
    text-transform: none !important;
  }

  html.bgpm-ux-two-col #js-product-list .product-miniature .product-title a {
    color: var(--bgpm-text) !important;
    font-size: inherit !important;
    line-height: inherit !important;
  }

  html.bgpm-ux-two-col #js-product-list .product-miniature .product-price-and-shipping {
    margin-top: auto !important;
    margin-bottom: 6px !important;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    line-height: 1.2;
  }

  html.bgpm-ux-two-col #js-product-list .product-miniature .product-price-and-shipping .price {
    font-size: 14.5px !important;
    font-weight: 800 !important;
    color: var(--bgpm-price) !important;
  }

  html.bgpm-ux-two-col #js-product-list .product-miniature .product-price-and-shipping .regular-price {
    font-size: 12px !important;
    color: #8c8c8c !important;
  }

  /* Подредена форма hiaddtocart вътре в 2-колонната мобилна карта */
  html.bgpm-ux-two-col #js-product-list form.hiaddtocart {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    margin: 4px 0 0 !important;
    width: 100% !important;
  }

  html.bgpm-ux-two-col #js-product-list form.hiaddtocart input.hi-quantity {
    width: 38px !important;
    min-width: 34px !important;
    height: 34px !important;
    padding: 2px 4px !important;
    text-align: center !important;
    font-size: 12.5px !important;
    border-radius: 7px !important;
    border: 1px solid var(--bgpm-border) !important;
  }

  html.bgpm-ux-two-col #js-product-list form.hiaddtocart .btn.add-to-cart {
    flex: 1 1 auto !important;
    height: 34px !important;
    padding: 4px 6px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }

  html.bgpm-ux-two-col #js-product-list .product-miniature .highlighted-informations {
    display: none !important;
  }
}

/* ==========================================================================
   5. БЪРЗ ФИЛТЪР „ПРОИЗВОДИТЕЛИ / МАРКИ“ НАЙ-ОТГОРЕ
   ========================================================================== */

.bgpm-quick-brands {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--bgpm-border);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035);
}

@media (min-width: 768px) {
  html.bgpm-ux-brand-filter:not(.bgpm-ux-brand-filter-desktop) .bgpm-quick-brands {
    display: none !important;
  }
}

.bgpm-qb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.bgpm-qb-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bgpm-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.bgpm-qb-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bgpm-accent-soft);
  color: var(--bgpm-accent-dark);
  font-size: 11px;
  font-weight: 700;
}

.bgpm-qb-clear-all {
  background: transparent;
  border: 0;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bgpm-price);
  cursor: pointer;
}

.bgpm-qb-trigger {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1.5px solid #ddd4c7;
  border-radius: 9px;
  background: #faf8f5;
  color: var(--bgpm-text);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.bgpm-qb-trigger:hover,
.bgpm-qb-trigger[aria-expanded="true"] {
  border-color: var(--bgpm-accent);
  background: #ffffff;
}

.bgpm-qb-trigger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}

.bgpm-qb-chevron {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--bgpm-accent-dark);
  transition: transform 0.2s ease;
}

.bgpm-qb-trigger[aria-expanded="true"] .bgpm-qb-chevron {
  transform: rotate(180deg);
}

.bgpm-qb-dropdown {
  display: none;
  margin-top: 8px;
  border: 1px solid var(--bgpm-border);
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.bgpm-qb-dropdown.is-open {
  display: block;
}

.bgpm-qb-search-wrap {
  position: relative;
  padding: 8px;
  background: #faf8f5;
  border-bottom: 1px solid #eee8df;
}

.bgpm-qb-search-input {
  width: 100%;
  height: 38px;
  padding: 6px 34px 6px 34px;
  border: 1px solid #d8cfc2;
  border-radius: 8px;
  background: #ffffff;
  font-size: 14px;
  color: var(--bgpm-text);
  outline: none;
  box-sizing: border-box;
}

.bgpm-qb-search-input:focus {
  border-color: var(--bgpm-accent);
  box-shadow: 0 0 0 2px rgba(184, 149, 105, 0.2);
}

.bgpm-qb-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #8c8478;
  pointer-events: none;
}

.bgpm-qb-search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #8c8478;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.bgpm-qb-search-clear.is-visible {
  display: inline-flex;
}

.bgpm-qb-list {
  max-height: 250px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.bgpm-qb-list-item {
  margin: 0;
  padding: 0;
}

.bgpm-qb-option {
  width: 100%;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  color: var(--bgpm-text);
  text-align: left;
  cursor: pointer;
}

.bgpm-qb-option:hover,
.bgpm-qb-option:focus {
  background: var(--bgpm-accent-soft);
  outline: none;
}

.bgpm-qb-option.is-active {
  background: var(--bgpm-accent-soft);
  color: var(--bgpm-accent-dark);
  font-weight: 700;
}

.bgpm-qb-option-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bgpm-qb-check {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #c9bfb1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  font-size: 11px;
  color: #fff;
  background: #fff;
}

.bgpm-qb-option.is-active .bgpm-qb-check {
  background: var(--bgpm-accent);
  border-color: var(--bgpm-accent);
}

.bgpm-qb-option-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bgpm-qb-option-count {
  font-size: 12px;
  color: var(--bgpm-muted);
  flex-shrink: 0;
}

.bgpm-qb-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--bgpm-muted);
}

.bgpm-qb-chips {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: 6px;
  margin-top: 9px;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.bgpm-qb-chips::-webkit-scrollbar {
  display: none;
}

.bgpm-qb-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid #dfd7cb;
  background: #ffffff;
  color: var(--bgpm-text);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.bgpm-qb-chip:hover {
  border-color: var(--bgpm-accent);
  color: var(--bgpm-accent-dark);
}

.bgpm-qb-chip.is-active {
  background: var(--bgpm-accent);
  border-color: var(--bgpm-accent);
  color: #ffffff;
  font-weight: 600;
}

.bgpm-qb-chip-count {
  font-size: 11px;
  opacity: 0.72;
}

.bgpm-qb-loading {
  opacity: 0.55;
  pointer-events: none;
}
