/* Custom code goes here - paste your css code below in line 3 */

/* Brand Search Widget Styles */
.brand-search-widget {
  background: #fff;
  border: 2px solid #B81F17;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.brand-search-widget .brand-search-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin: 0 0 15px 0;
  padding: 0;
  text-transform: uppercase;
}

.brand-search-widget .form-group {
  margin-bottom: 15px;
}

.brand-search-widget label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
  font-size: 14px;
}

.brand-search-widget label small {
  font-weight: 400;
  color: #999;
  font-style: italic;
}

.brand-search-widget .form-control {
  width: 100%;
  padding: 10px 12px;
  border: #ddd;
  border-radius: 3px;
  font-size: 14px;
  background-color: #fff;
  transition: border-color 0.3s ease;
}

.brand-search-widget .form-control:focus {
  border-color: #B81F17;
  outline: none;
  box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.1);
}

.brand-search-widget .form-control:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}

.brand-search-widget .brand-search-btn {
  width: 100%;
  padding: 12px;
  background-color: #B81F17;
  color: #fff;
  border: none;
  border-radius: 3px;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.brand-search-widget .brand-search-btn:hover:not(:disabled) {
  background-color: #b71c1c;
}

.brand-search-widget .brand-search-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.brand-search-widget .material-icons {
  font-size: 20px;
}

/* Stock Button Styles */
.btn-stock-info {
  background-color: #28a745 !important;
  color: #fff !important;
  border: none;
  padding: 10px 20px;
  margin-left: 10px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.4;
  transition: background-color 0.3s ease;
}

.btn-stock-info:hover {
  background-color: #218838 !important;
}

.btn-stock-info .stock-label {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
}

.btn-stock-info .stock-quantity {
  font-size: 14px;
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .btn-stock-info {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
  }
}

/* Brand Filter Checkbox Styles - Style tonerteck.it EXACT */

/* Titre H3 style tonerteck.it */
#search_filters_brands h3.brand-filter-title {
  margin: 0 0 10px 0;
  padding: 0 0 10px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  text-transform: none;
}

#search_filters_brands h3.brand-filter-title .txt {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

#search_filters_brands h3.brand-filter-title a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
}

#search_filters_brands h3.brand-filter-title a:hover {
  color: #B81F17;
  text-decoration: none;
}

#search_filters_brands .li_FiltriTecnici {
  margin-top: 10px;
}

#search_filters_brands .check-group {
  position: relative;
}

#search_filters_brands .check-group.Compatto .List {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 10px;
  max-height: none;
}

#search_filters_brands .check-group.Compatto.collapsed .List > div:nth-child(n+11) {
  display: none;
}

#search_filters_brands .check-group .List > div {
  display: block;
}

#search_filters_brands .check-group .List > div.full-wd {
  grid-column: 1 / -1;
}

#search_filters_brands .check-group label.option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 3px 0;
  margin: 0;
  font-size: 14px;
  color: #333;
  line-height: 1.3;
  position: relative;
}

#search_filters_brands .check-group label.option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
  margin: 0;
}

#search_filters_brands .check-group label.option .checkbox {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1px solid #ccc;
  background-color: #fff;
  margin-right: 8px;
  flex-shrink: 0;
  border-radius: 2px;
  transition: all 0.2s ease;
}

#search_filters_brands .check-group label.option input[type="checkbox"]:checked ~ .checkbox {
  background-color: #28a745;
  border-color: #28a745;
}

#search_filters_brands .check-group label.option input[type="checkbox"]:checked ~ .checkbox:after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

#search_filters_brands .check-group label.option .TxtVal {
  font-size: 14px;
  color: #333;
  user-select: none;
}

#search_filters_brands .check-group label.option:hover .TxtVal {
  color: #000;
}

#search_filters_brands .btnAction_CkGroup {
  display: block;
  margin-top: 10px;
  cursor: pointer;
}

#search_filters_brands .btnAction_CkGroup .mostrapiu,
#search_filters_brands .btnAction_CkGroup .mostrameno {
  color: #333;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
  user-select: none;
}

#search_filters_brands .btnAction_CkGroup .mostrapiu:hover,
#search_filters_brands .btnAction_CkGroup .mostrameno:hover {
  color: #000;
  text-decoration: none;
}

/* Responsive - 1 column on mobile */
@media (max-width: 768px) {
  #search_filters_brands .check-group.Compatto .List {
    grid-template-columns: 1fr;
  }
}

/* GESMART 17-02-2026 === PS Main Menu (ps_mainmenu) - Font size categorie === */

/* Desktop - livello 1 (categorie principali) */
#_desktop_top_menu .top-menu a[data-depth="0"]{
  font-size: 16px !important;
  line-height: 1.2;
}

/* Desktop - livello 2 */
#_desktop_top_menu .top-menu a[data-depth="1"]{
  font-size: 12px !important;
}

/* Desktop - livello 3 */
#_desktop_top_menu .top-menu a[data-depth="2"]{
  font-size: 12px !important;
}

/* Mobile */
#_mobile_top_menu .top-menu a[data-depth="0"]{ font-size: 16px !important; }
#_mobile_top_menu .top-menu a[data-depth="1"]{ font-size: 14px !important; }
#_mobile_top_menu .top-menu a[data-depth="2"]{ font-size: 13px !important; }


/* =========================================================
   ps_mainmenu (desktop):
   - 1° livello centrato
   - dropdown auto-width
   - 3° livello a destra
   - 2 colonne SOLO se >10 voci (richiede :has)
   ========================================================= */
@media (min-width: 992px) {

  /* 1° livello centrato nella barra */
  #_desktop_top_menu .top-menu[data-depth="0"]{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex-wrap: wrap; /* se le voci sono tante, vanno a capo restando centrate */
  }

  /* riferimento per i submenu */
  #_desktop_top_menu .top-menu li.category {
    position: relative;
  }

  /* pannello submenu (sia 2° che 3° livello) */
  #_desktop_top_menu .top-menu li.category > a + .collapse {
    position: absolute !important;
    display: none;
    z-index: 9999;

    /* width che si adatta al contenuto */
    width: max-content;
    min-width: 320px;
    max-width: calc(100vw - 40px);

    height: auto !important;
    overflow: visible !important;
  }

  /* mostra su hover (desktop) */
  #_desktop_top_menu .top-menu li.category:hover > a + .collapse {
    display: block !important;
  }

  /* 2° livello: sotto al 1° livello */
  #_desktop_top_menu .top-menu li.category > a[data-depth="0"] + .collapse {
    top: 100% !important;
    left: 0 !important;
    margin-left: 0 !important;
  }

  /* 3° livello: a destra del 2° livello */
  #_desktop_top_menu .top-menu li.category > a[data-depth="1"] + .collapse {
    top: 0 !important;
    left: 100% !important;
    margin-left: 0 !important;
  }

  /* neutralizza .container dentro i dropdown */
  #_desktop_top_menu .top-menu li.category > a + .collapse > ul.top-menu.container {
    width: auto !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
  }

  /* 2° livello: resta su 1 riga */
  #_desktop_top_menu .top-menu a[data-depth="1"] {
    white-space: nowrap;
  }

  /* --- 3° livello: base 1 colonna --- */
  #_desktop_top_menu .top-menu li.category > a[data-depth="1"] + .collapse > ul.top-menu.container[data-depth="2"] {
    column-count: 1;
    column-gap: 12px;
    column-fill: auto;
    max-height: none;
    overflow-y: visible;
  }

  /* --- 3° livello: 2 colonne SOLO se ci sono almeno 11 voci --- */
  #_desktop_top_menu .top-menu li.category > a[data-depth="1"] + .collapse > ul.top-menu.container[data-depth="2"]:has(> li:nth-child(11)) {
    column-count: 2;
    column-gap: 12px;
    max-height: calc(15 * 26px);
    overflow-y: auto;
  }

  /* 3° livello: consenti a capo + più spazio verticale quando va a capo */
  #_desktop_top_menu .top-menu li.category > a[data-depth="1"] + .collapse > ul.top-menu.container[data-depth="2"] a[data-depth="2"] {
    white-space: normal !important;
    display: block;
    line-height: 1.35;
    padding: 6px 10px 6px 0;
  }

  /* evita che un elemento venga spezzato tra colonne */
  #_desktop_top_menu .top-menu li.category > a[data-depth="1"] + .collapse > ul.top-menu.container[data-depth="2"] > li {
    break-inside: avoid-column;
    -webkit-column-break-inside: avoid;
    margin-bottom: 2px;
  }

} /* ✅ CHIUSURA @media (min-width: 992px) */


/* =========================================================
   Pagina prodotto:
   - Nasconde TAB + contenuti "Dettagli del prodotto"
   - Fallback se :has() non è supportato: nasconde almeno il link
   ========================================================= */

/* Nasconde i pannelli */
body#product #product-details,
body#product #data-sheet {
  display: none !important;
}

/* Nasconde il <li> del tab (se :has è supportato) */
body#product .nav-tabs li:has(> a#product-details-tab),
body#product .nav-tabs li:has(> a#data-sheet-tab),
body#product .nav-tabs li:has(> a[href="#product-details"]),
body#product .nav-tabs li:has(> a[href="#data-sheet"]) {
  display: none !important;
}

/* Fallback: se :has non è supportato, nasconde almeno il link del tab */
body#product .nav-tabs a#product-details-tab,
body#product .nav-tabs a#data-sheet-tab,
body#product .nav-tabs a[href="#product-details"],
body#product .nav-tabs a[href="#data-sheet"] {
  display: none !important;
}


/* =========================================================
   Pagina prodotto:
   - Colonne: immagine 40% / info 60% (>=768px)
   ========================================================= */
@media (min-width: 768px) {
  body#product .product_left.col-md-6 {
    width: 40% !important;
    flex: 0 0 40% !important;
    max-width: 40% !important;
  }

  body#product .product_right.col-md-6 {
    width: 60% !important;
    flex: 0 0 60% !important;
    max-width: 60% !important;
  }
.product-brand-logo-top{
  margin-bottom: 8px;
}

.product-brand-logo-top img{
  max-height: 60px;
  width: auto;
  display: block;
}
.product_name {
    margin: 0px;
    padding-bottom: 4px;
}
/* 1) Togli spazio sotto al blocco che contiene Codice/Codice a barre */
.product_right .product-discounts,
.product_right .product-discounts .product-reference_top,
.product_right .product-discounts .product-codes-row,
.product_right .product-discounts .code-item{
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* 2) Togli/limita spazio sopra al logo */
.product_right .product-brand-logo-top{
  margin-top: 2px !important;   /* prova 0px, 2px, 4px */
  padding-top: 0 !important;
}

/* 3) Evita “spazi fantasma” da img inline */
.product_right .product-brand-logo-top img{
  display: block;
}

/* 4) prezzo consigliato barrato 
.prezzo-consigliato-barrato{
  text-decoration: line-through;
  font-size: 1.2em;
}
/* 5) mostra la percentuale di sconto 
.percentuale-sconto{
  margin-left: 10px;
  font-size: 1.2em;
  font-weight: 700;
  color: #d60000;
}*/

/* Manufacturer logo on product page and quickview */
#product_manufacturer .manufacturer-logo {
  max-height: 55px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}
#product_manufacturer .manufacturer-logo-link {
  display: inline-block;
}
#product_manufacturer .manufacturer-name-fallback {
  font-weight: bold;
  vertical-align: middle;
}

/* Brand Filter Checkbox Styles - Style tonerteck.it EXACT */

/* Titre H3 style tonerteck.it */
#search_filters_brands h3.brand-filter-title {
  margin: 0 0 10px 0;
  padding: 0 0 10px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  text-transform: none;
}

#search_filters_brands h3.brand-filter-title .txt {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

#search_filters_brands h3.brand-filter-title a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
}

#search_filters_brands h3.brand-filter-title a:hover {
  color: #009ad0;
  text-decoration: none;
}

#search_filters_brands .li_FiltriTecnici {
  margin-top: 10px;
}

#search_filters_brands .check-group {
  position: relative;
}

#search_filters_brands .check-group.Compatto .List {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 10px;
  max-height: none;
}

#search_filters_brands .check-group.Compatto.collapsed .List > div:nth-child(n+11) {
  display: none;
}

#search_filters_brands .check-group .List > div {
  display: block;
}

#search_filters_brands .check-group .List > div.full-wd {
  grid-column: 1 / -1;
}

#search_filters_brands .check-group label.option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 3px 0;
  margin: 0;
  font-size: 14px;
  color: #333;
  line-height: 1.3;
  position: relative;
}

#search_filters_brands .check-group label.option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
  margin: 0;
}

#search_filters_brands .check-group label.option .checkbox {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1px solid #ccc;
  background-color: #fff;
  margin-right: 8px;
  flex-shrink: 0;
  border-radius: 2px;
  transition: all 0.2s ease;
}

#search_filters_brands .check-group label.option input[type="checkbox"]:checked ~ .checkbox {
  background-color: #28a745;
  border-color: #28a745;
}

#search_filters_brands .check-group label.option input[type="checkbox"]:checked ~ .checkbox:after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

#search_filters_brands .check-group label.option .TxtVal {
  font-size: 14px;
  color: #333;
  user-select: none;
}

#search_filters_brands .check-group label.option:hover .TxtVal {
  color: #000;
}

#search_filters_brands .btnAction_CkGroup {
  display: block;
  margin-top: 10px;
  cursor: pointer;
}

#search_filters_brands .btnAction_CkGroup .mostrapiu,
#search_filters_brands .btnAction_CkGroup .mostrameno {
  color: #333;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
  user-select: none;
}

#search_filters_brands .btnAction_CkGroup .mostrapiu:hover,
#search_filters_brands .btnAction_CkGroup .mostrameno:hover {
  color: #000;
  text-decoration: none;
}

/* Responsive - 1 column on mobile */
@media (max-width: 768px) {
  #search_filters_brands .check-group.Compatto .List {
    grid-template-columns: 1fr;
  }
}

/* Manufacturer logo in product lists */
.pl_manufacturer .manufacturer-logo {
  max-height: 65px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}
.pl_manufacturer .manufacturer-logo-link {
  display: inline-block;
}
.pl_manufacturer .manufacturer-name-fallback {
  font-weight: bold;
  vertical-align: middle;
}

/* Manufacturer logo on product page and quickview */
#product_manufacturer .manufacturer-logo {
  max-height: 65px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}
#product_manufacturer .manufacturer-logo-link {
  display: inline-block;
}
#product_manufacturer .manufacturer-name-fallback {
  font-weight: bold;
  vertical-align: middle;
}

/* Badge pourcentage de réduction */
.product-discount-badge-corner {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #c8191e;
  color: white;
  padding: 8px 12px;
  font-weight: bold;
  font-size: 16px;
  z-index: 10;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Badge dans les miniatures de produits */
.product-miniature .product-image-container {
  position: relative;
}

.product-miniature .product-discount-badge-corner {
  position: absolute;
  top: 5px;
  right: 5px;
}

/* Badge dans la page produit */
.product-discount .product-discount-badge-corner {
  display: inline-block;
  margin-right: 10px;
  margin-bottom: 10px;
  position: static;
}

/* Badge d'économie (différence entre prix retail et prix actuel) */
.product-flag.savings-amount {
  background: #c8191e;
  color: white;
  padding: 5px 10px;
  font-weight: bold;
  border-radius: 3px;
  display: inline-block;
  margin: 3px;
}

/* Badge Sconto page produit */
.product-savings-badge {
  display: inline-block;
  background: #c8191e;
  color: white;
  padding: 8px 16px;
  font-weight: bold;
  font-size: 16px;
  border-radius: 3px;
  margin-bottom: 10px;
}

/* Prix unitaire retail barré */
.retail-unit-price-strikethrough {
  font-size: 19px;
  color: #000;
  text-decoration: line-through;
  text-decoration-color: #c8191e;
  text-decoration-thickness: 2px;
  margin-top: 5px;
  line-height: 1.4;
  display: block;
}

/* Anciens styles retail-unit-price gardés pour compatibilité */
.retail-unit-price {
  font-size: 13px;
  color: #666;
  margin-top: 5px;
  line-height: 1.4;
}

.retail-unit-price .tax-label {
  font-style: italic;
  color: #888;
}

/* Prix principal */
.price {
  font-size: 25px;
  font-weight: bold;
}

/* Ajustements pour le prix barré */
.regular-price {
  text-decoration: line-through;
  color: #999;
  display: block;
  margin-bottom: 3px;
}

/* Responsive */
@media (max-width: 768px) {
  .product-discount-badge-corner {
    padding: 6px 10px;
    font-size: 14px;
  }
  
  .retail-unit-price {
    font-size: 12px;
  }
}
