:root{
  --under-navbar: #14523f;
  --menu-bg: #ffffff;
  --menu-hover: color-mix(in srgb, var(--menu-bg) 85%, var(--under-navbar) 15%);
  --main-color: #14523f;
  --table-border: #333e48;
}

html{
  font-size: 1rem;
}
html,body{
  height: 100%;
}

body *,
body *::before,
body *::after {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: #333e48;
  background: #f5f7f8;
  margin: 0;
}

body a {
  color: #1f6f5c;
  text-decoration: none;
}

body a:hover {
  color: #14523f;
}

body h1,
body h2,
body h3,
body h4,
body h5,
body h6 {
  font-weight: 600;
  color: #212b33;
  line-height: 1.3;
}

ul{
  margin: 0;
}

li{
  list-style: none;
}

button, input[type=submit], .button {
  color: #ffffff;
  background-color: #14524f;
  font-size: 16px;
  border: 0;
  border-radius: 10px;
  padding: 8px 16px;
  cursor: pointer;
  &:hover{
  color: #ffffff;
  background-color: #1f6f5c;
  }
}

table{
  text-align: left;
  width: 100%;
  border: 0 solid;
  border-collapse: collapse;
  margin: 2rem 0;

  tr{
    border-bottom: thin solid var(--table-border);
  }

  th,td{
    padding: 1.42rem;
  }

  thead{
    font-weight: var(--bold-weight);

  }
}

.under-navbar{
  background: var(--under-navbar);
  color: #f5f7f8;
}

.under-navbar .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dropdown-toggle{
  cursor: pointer;
}

.under-navbar li{
  position: relative;
}

.under-navbar .container > ul{
  padding: 0;
}

.departments-menu-toggle{
  display: none;
}

.under-navbar .departments-menu-dropdown{
  display: none;
}

.under-navbar .departments-menu-toggle:checked ~ .departments-menu-dropdown{
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 260px;
  margin: 0;
  padding: 0.5rem 0;
  background: var(--menu-bg);
  color: #333e48;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  border-radius: 6px;
}

.under-navbar .departments-menu-toggle:checked ~ .departments-menu-backdrop{
  display: block;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: transparent;
  cursor: pointer;
}

.under-navbar .departments-menu-dropdown a{
  display: block;
  padding: 0.5rem 1rem;
  color: #1f6f5c;
}

.under-navbar .departments-menu-dropdown a:hover{
  background: var(--menu-hover);
}

/* ===== Panier : bouton toujours visible + menu dropdown ===== */
.navbar-mini-cart{
  position: relative;
  display: inline-flex;
  align-items: center;
}

.navbar-mini-cart > .fa-shopping-cart,
.navbar-mini-cart > a#basket{
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.6rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  border-radius: 6px;
}

.navbar-mini-cart > .fa-shopping-cart:hover,
.navbar-mini-cart > a#basket:hover{
  background: var(--menu-hover);
  color: inherit;
}

.navbar-mini-cart .dropdown-menu-mini-cart{
  display: none;
  min-width: 320px;
  padding: 0.75rem 1rem;
  background: var(--menu-bg);
  color: #333e48;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.navbar-mini-cart:hover .dropdown-menu-mini-cart,
.navbar-mini-cart:focus-within .dropdown-menu-mini-cart{
  display: block;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
}

.navbar-mini-cart .dropdown-menu-mini-cart > ul{
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.navbar-mini-cart .dropdown-menu-mini-cart li{
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-mini-cart .dropdown-menu-mini-cart .quantity{
  color: #667085;
}
.flex-container{
  display: flex;
  gap: 1rem;
  flex-direction: column;
}
#menu-secondary-nav{
  padding: 0;
}

.header_message p{
  margin: 0;
}

/* Page show des familles : le menu (#sidebar) est à gauche du contenu (#primary).
   La page index n'a pas la classe body.left-sidebar et n'est pas affectée. */
#content .container{
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

#content .container > .woocommerce-breadcrumb{
  flex-basis: 100%;
  margin: 0;
}

#sidebar{
  order: 1;
  flex: 0 0 270px;
  width: 270px;
  float: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Cartes arrondies, même design que les blocs de la page index */
#sidebar > aside{
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #e3e8ea;
  border-radius: 10px;
}

/* Bloc illustration + résumé de la famille */
#sidebar > aside img{
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

#sidebar > aside p{
  margin: 10px 0 0;
  color: #5b6b76;
}

/* Menu vertical (même composant que la page index) */
#sidebar .vertical-menu{
  background: transparent;
}

/* Bloc offre spéciale */
#sidebar #woocommerce_products-2 .widget-title{
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 12px;
  padding: 0 0 10px;
  border-bottom: 1px solid #eef1f2;
  color: #212b33;
}

#sidebar #woocommerce_products-2 ul.product_list_widget{
  list-style: none;
  margin: 0;
  padding: 0;
}

#sidebar #woocommerce_products-2 ul.product_list_widget > li{
  margin: 0;
  padding: 0;
}

#sidebar #woocommerce_products-2 img{
  width: 100%;
  height: auto;
  border-radius: 8px;
}

#sidebar #woocommerce_products-2 .product-title{
  display: block;
  margin: 8px 0 4px;
  font-size: 1.07rem;
  font-weight: 600;
  color: #212b33;
}

#sidebar #woocommerce_products-2 .electro-price{
  font-weight: 600;
  color: #212b33;
}

#sidebar #woocommerce_products-2 .electro-price ins{
  text-decoration: none;
}

#sidebar #woocommerce_products-2 .electro-price del{
  color: #9aa7ae;
  font-weight: normal;
}

#primary{
  order: 2;
  flex: 1 1 0;
  min-width: 0;
  float: none;
  margin: 0;
}

/* Contenu principal : bloc arrondi */
#main section{
  margin: 0;
  padding: 18px 18px 20px;
  background: #ffffff;
  border: 1px solid #e3e8ea;
  border-radius: 10px;
}

#main section header{
  margin: 0 0 16px;
  padding: 0 0 12px;
  border-bottom: 1px solid #eef1f2;
}

#main section header .h1{
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
  color: #212b33;
}

/* Grille de produits : chaque produit a sa propre carte arrondie */
body.left-sidebar #main ul.products{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

body.left-sidebar #main ul.products .product{
  display: flex;
  margin: 0;
}

body.left-sidebar #main ul.products .product-outer{
  flex: 1 1 auto;
  height: auto !important;
  min-height: 0;
}

body.left-sidebar #main ul.products .product-inner{
  position: static;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  width: 100%;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e3e8ea;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(33, 43, 51, 0.05);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

body.left-sidebar #main ul.products .product:hover .product-inner{
  border-color: #bcd8cf;
  box-shadow: 0 8px 20px rgba(33, 43, 51, 0.12);
}

body.left-sidebar #main ul.products .product h3{
  font-size: 1.07rem;
  font-weight: 600;
  margin: 0 0 8px;
  min-height: 38px;
  color: #212b33;
  line-height: 1.4;
}

body.left-sidebar #main ul.products .product h3 a{
  color: inherit;
}

body.left-sidebar #main ul.products .product-thumbnail{
  height: 150px;
  background: #f5f7f8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body.left-sidebar #main ul.products .product-thumbnail img{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

body.left-sidebar #main ul.products .price-add-to-cart{
  height: auto;
  margin-top: 10px;
  clear: both;
}

body.left-sidebar #main ul.products .price-add-to-cart .price{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.left-sidebar #main ul.products .price-add-to-cart .electro-price{
  float: none;
  width: auto;
  white-space: nowrap;
}

body.left-sidebar #main ul.products .price-add-to-cart .electro-price del{
  color: #9aa7ae;
  font-weight: normal;
}

/* Pagination sous la grille */
body.left-sidebar #main .pagination{
  margin: 18px 0 0;
}

@media (max-width: 991px) {
  body.left-sidebar #main ul.products{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  body.left-sidebar #content .container{
    flex-direction: column;
  }

  body.left-sidebar #sidebar{
    flex-basis: auto;
    width: 100%;
  }

  body.left-sidebar #main ul.products{
    grid-template-columns: 1fr;
  }
}

.default-box{
  background: #ffffff;
  border: 1px solid #e3e8ea;
  border-radius: 10px;
  padding: 16px 18px 20px;
}

.single-product-wrapper{
  display: flex;
  gap: 1rem;
  .product-images-wrapper{
    flex: 1 0 0;
    /* min-width: 0; */
    img{
      width: 100%;
    }
  }
  .summary{
    flex: 2 0 0;
  }
}

.tabs {
	position: relative;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
}
.tabs > label {
	order: 1;
	display: inline-block;
    background-color: #ffffff;
    line-height: 50px;
    box-sizing: border-box;
    margin: 0;
    padding: 0 20px 0 20px;
    font-weight: bold;
    border-bottom: 1px solid var(--main-color);
}
.tabs > input[type="radio"] {
	display4d4d4d;
}
.tabs > input[type="radio"] {
	display: none;
}
.tabs > input[type="radio"]:checked + label {
	background-color: #ffffff;
    color: #4d4d4d;
    border-bottom: 5px solid var(--main-color);
}
.tabs > input[type="radio"]:checked + label + div {
	display: block;
}
.tabs > div {
	order: 2;
	display: none;
    box-sizing: border-box;
    width: 100%;
    padding: 15px;
    color: #1a1a1a;
    height: 100%;
}

.single-product #primary{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
