/*
Theme Name: Betheme Child
Theme URI: https://themes.muffingroup.com/betheme
Author: Muffin group
Author URI: https://muffingroup.com
Description: Child Theme for Betheme
Template: betheme
Version: 2.0.2
*/

/* =================================================
   FORCE MENU WC DANS LE HEADER (DOM EXACT)
================================================== */

/* conteneur exact du widget */
body > div > header div.widget_product_categories {
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* UL principal */
body > div > header div.widget_product_categories > ul.product-categories {
  display: flex !important;
  flex-direction: row !important;
  gap: 40px !important;
  align-items: center !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* LI niveau 1 */
body > div > header div.widget_product_categories > ul.product-categories > li {
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* LIENS niveau 1 */
body > div > header div.widget_product_categories > ul.product-categories > li > a {
  display: inline-block !important;
  white-space: nowrap !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  color: #222 !important;
  text-decoration: none !important;
}

/* SUPPRESSION DES MARKERS */
body > div > header div.widget_product_categories li::marker {
  content: "" !important;
}

/* ================================
   DROPDOWN
================================ */

body > div > header div.widget_product_categories ul.children {
  position: absolute !important;
  top: calc(100% + 12px) !important;
  left: 0 !important;
  min-width: 260px !important;
  background: #fff !important;
  padding: 18px 20px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.12) !important;
  display: none !important;
  z-index: 999999 !important;
}

/* hover */
body > div > header
div.widget_product_categories > ul.product-categories > li:hover > ul.children {
  display: block !important;
}

/* items dropdown */
body > div > header div.widget_product_categories ul.children li {
  margin: 0 0 10px 0 !important;
}

/* liens dropdown */
body > div > header div.widget_product_categories ul.children a {
  font-size: 14px !important;
  color: #222 !important;
  text-decoration: none !important;
}
/* ================================
   STABILISATION MENU HEADER WC
================================ */

/* assure une zone hover confortable */
body > div > header
div.widget_product_categories > ul.product-categories > li {
  padding: 12px 0;
}

/* empêche le dropdown de se barrer */
body > div > header
div.widget_product_categories > ul.product-categories > li > ul.children {
  top: 100%;
  margin-top: 10px;
}

/* évite le flicker quand on passe de l'item au dropdown */
body > div > header
div.widget_product_categories > ul.product-categories > li::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 10px;
}

/* largeur propre */
body > div > header
div.widget_product_categories ul.children {
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

/* enlève les puces résiduelles si navigateur chelou */
body > div > header
div.widget_product_categories ul,
body > div > header
div.widget_product_categories li {
  list-style: none !important;
}
/* =================================================
   FIX DEFINITIF DROPDOWN BETHEME
================================================== */

/* IMPORTANT : le header ne doit PAS couper le dropdown */
body > div > header,
body > div > header * {
  overflow: visible !important;
}

/* base */
body > div > header
div.widget_product_categories > ul.product-categories > li {
  position: relative !important;
}

/* dropdown */
body > div > header
div.widget_product_categories ul.children {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  margin-top: 0 !important;
  display: none !important;
  z-index: 999999 !important;
}

/* OUVERTURE SI :
   - hover sur le LI
   - OU hover sur le dropdown lui-même
*/
body > div > header
div.widget_product_categories > ul.product-categories > li:hover > ul.children,
body > div > header
div.widget_product_categories ul.children:hover {
  display: block !important;
}

/* sécurité pointer-events */
body > div > header
div.widget_product_categories ul.children {
  pointer-events: auto !important;
}

/* Enlève le fond beige du menu catégories dans le header */
#mfn-header-template ul.product-categories {
  background: transparent !important;
}
/* =================================================
   METTRE "MARQUES" SUR LA MÊME LIGNE QUE LES CATÉGORIES
================================================== */

.header-categories-menu {
  display: flex;
  align-items: center;
  gap: 40px;
}

/* le widget Woo ne doit plus être block */
.header-categories-menu .widget_product_categories {
  display: contents;
}

/* marques = item inline */
.header-extra-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-extra-links li {
  display: inline-block;
}
/* Page Marques: logos uniformes et alignes */
.page-id-679 .widget_berocket_product_brand_widget .brcs_slider_brands_container {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 26px 34px;
  align-items: start;
}

.page-id-679 .widget_berocket_product_brand_widget .br_widget_brand_element_slider {
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}

.page-id-679 .widget_berocket_product_brand_widget .brand_slider_image a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 10px;
}

.page-id-679 .widget_berocket_product_brand_widget .brand_slider_image a img {
  width: 220px;
  height: 80px;
  object-fit: contain !important;
  display: block;
  margin: 0 auto !important;
}

.page-id-679 .widget_berocket_product_brand_widget .brand_slider_image a > span {
  display: block;
  line-height: 1.35;
}

@media (max-width: 959px) {
  .page-id-679 .widget_berocket_product_brand_widget .brcs_slider_brands_container {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 22px 20px;
  }

  .page-id-679 .widget_berocket_product_brand_widget .brand_slider_image a img {
    width: 180px;
    height: 66px;
  }
}

.woocommerce ul.products li.product .mg-loop-brand{
  min-height:18px;
  margin:6px 0 8px;
}

.woocommerce ul.products li.product .mg-loop-brand img{
  height:30px !important;
  max-width:150px !important;
  width:auto;
  object-fit:contain;
}

/* Fiche produit: logo marque x2 */
.single-product .mg-brand{
  display:flex;
  align-items:center;
  margin:0 0 16px;
  min-height:78px;
}

.single-product .mg-brand img{
  height:72px;
  width:auto;
  max-width:520px;
  object-fit:contain;
  display:block;
}


/* Enleve l'espace sous le logo marque */
.single-product .mcb-item-column-inner .column_attr{
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.single-product .mg-brand{
  margin: 0 !important;
  line-height: 1 !important;
  min-height: 0 !important;
}

.single-product .mg-brand img{
  display: block;
  margin: 0 !important;
}

/* Bloc marque (colonne x4s1etlwk) */
.single-product .mcb-wrap-8rg3g1s5s .mcb-item-x4s1etlwk .column_attr{
  padding: 0 !important;
  margin: 0 !important;
}



/* Supprime le trait automatique des widgets dans le menu header */
.header-categories-menu .widget::after,
.header-categories-menu .widget_product_categories::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
}
