/* ============================================
   SEARCH OVERLAY
   ============================================ */
/* Search Toggle - reset background ereditato */
#searchToggle {
  background: transparent;
  border: none;
  padding: 0;
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: rgba(65, 53, 29, 0.95);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay-inner {
  width: 100%;
  padding-top: 120px;
}

.search-overlay-form {
  display: flex;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
  gap: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 40px;
  padding: 6px 6px 6px 28px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.search-overlay-form:focus-within {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
}

.search-overlay-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 300;
  padding: 14px 0;
  letter-spacing: 0.3px;
}

.search-overlay-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
}

.search-overlay-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: #B17136;
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.15s ease;
}

.search-overlay-submit:hover {
  background: #E49954;
  transform: scale(1.05);
}

.search-overlay-close {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.search-overlay-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

body.search-overlay-open {
  overflow: hidden;
}

/* Responsive search */
@media (max-width: 1024px) {
  .search-overlay-form {
    max-width: 600px;
  }
  .search-overlay-input {
    font-size: 18px;
    padding: 12px 0;
  }
}

@media (max-width: 767px) {
  .search-overlay-inner {
    padding: 100px 20px 0;
  }
  .search-overlay-form {
    max-width: 100%;
    padding: 4px 4px 4px 20px;
    border-radius: 30px;
  }
  .search-overlay-input {
    font-size: 16px;
    padding: 10px 0;
  }
  .search-overlay-submit {
    width: 44px;
    height: 44px;
  }
  .search-overlay-close {
    top: 20px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}

/* ============================================
   ACCESSIBILITY - Focus States (WCAG 2.1 AA)
   ============================================ */

/* Global focus-visible outline for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 2px solid #B17136;
  outline-offset: 2px;
}

/* Quantity +/- buttons focus */
.qty-btn:focus-visible {
  outline: 2px solid #B17136;
  outline-offset: -2px;
  border-radius: 4px;
}

/* Seleziona l'intera scrollbar */
::-webkit-scrollbar {
  width: 8px;
  background: #eeeeee;
}

/* Sfondo della "traccia" (dietro il thumb) */
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0);
}

/* La parte che si muove (thumb) */
::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.4);
}

/* Thumb al passaggio del mouse */
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.6);
}

/* L'angolo in basso a destra */
::-webkit-scrollbar-corner {
  background: rgba(0, 0, 0, 0);
}

/* ============================================
   FILTERS - Mobile Optimized Scroll UX
   ============================================ */

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Subcategory pills - hide scrollbar on mobile */
.subcategory-filters > div::-webkit-scrollbar,
.subcategory-filters-l3 > div::-webkit-scrollbar {
  display: none;
}

/* Scroll fade indicator - gradiente destro che indica contenuto scrollabile */
@media (max-width: 767px) {
  .subcategory-filters,
  .subcategory-filters-l3 {
    position: relative;
  }
  .subcategory-filters::after,
  .subcategory-filters-l3::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: calc(100% - 8px); /* esclude padding-bottom scrollbar */
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.9));
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s ease;
  }
  .subcategory-filters.scroll-end::after,
  .subcategory-filters-l3.scroll-end::after {
    opacity: 0;
  }
}

/* Custom select - nascondi completamente l'arrow nativo */
.filter-select,
.blog-filter-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: none !important;
}

/* Per Safari iOS - hack per nascondere l'arrow */
.filter-select::-ms-expand,
.blog-filter-select::-ms-expand {
  display: none !important;
}

/* Filter container with fade indicators */
.product-filters,
.blog-filters-container {
  position: relative;
}

/* Fade gradient on edges to indicate more content - Mobile only */
@media (max-width: 767px) {
  /* Scroll snap for better mobile experience */
  .product-filters > div,
  .blog-filters-container > div {
    scroll-snap-type: x proximity;
    scroll-padding: 20px;
  }

  .filter-btn,
  .blog-filter-btn {
    scroll-snap-align: start;
  }
}

/* Touch feedback enhancement */
.filter-btn:active,
.blog-filter-btn:active {
  transform: scale(0.95);
}

.blog-filter-btn {
  border: 0px solid black;
}

/* Product filters - no border */
.category-pill,
.category-pill-select {
  border: 0 !important;
}

/* ============================================
   MOBILE MENU - Fullscreen Overlay Style
   ============================================ */

/* Mobile Sticky Navbar - Solo quando ha classe is-sticky */
@media (max-width: 1023px) {
  #navbar-top.is-sticky {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    margin-bottom: 0 !important;
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 9998;
    animation: slideDown 0.3s ease-out forwards;
  }

  @keyframes slideDown {
    from {
      transform: translateY(-100%);
      opacity: 0.8;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  /* Animazione uscita - slide up */
  #navbar-top.is-sticky-leaving {
    animation: slideUp 0.25s ease-in forwards;
  }

  @keyframes slideUp {
    from {
      transform: translateY(0);
      opacity: 1;
    }
    to {
      transform: translateY(-100%);
      opacity: 0.8;
    }
  }

  /* Sticky navbar = arancio-dark (come topbar) */
  #navbar-top.is-sticky.navbar-dark,
  #navbar-top.is-sticky.navbar-light {
    background-color: var(--col-arancio-dark);
  }

  /* Sticky navbar: logo e hamburger sempre bianchi */
  #navbar-top.is-sticky .hamburger-line {
    background-color: white !important;
  }

  #navbar-top.is-sticky .site-logo-img {
    filter: brightness(0) invert(1) !important;
  }

  /* Placeholder per mantenere lo spazio quando navbar diventa fixed */
  .navbar-placeholder {
    display: none;
  }

  .navbar-placeholder.active {
    display: block;
  }
}

/* Hamburger Button */
.hamburger-btn {
  background: transparent;
  border: none;
  z-index: 10001;
  outline: none !important;
}

.hamburger-btn:focus,
.hamburger-btn:active,
.hamburger-btn:hover {
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

.hamburger-btn:focus-visible {
  outline: 2px solid var(--col-verde);
  outline-offset: 2px;
  border-radius: 4px;
}

.hamburger-line {
  background-color: white;
}

.navbar-light .hamburger-line {
  background-color: #41351D;
}

/* Mobile ecommerce icons in navbar - adapt to navbar mode */
.navbar-dark .navbar-mobile-icon {
  filter: none;
}
.navbar-light .navbar-mobile-icon {
  filter: brightness(0) saturate(100%) invert(18%) sepia(15%) saturate(1500%) hue-rotate(15deg) brightness(95%) contrast(90%);
}
/* Quando il menu mobile è aperto le icone diventano scure */
body.menu-open .navbar-mobile-icon {
  filter: brightness(0) saturate(100%);
}

/* When menu is open - hamburger always black (on light bg) */
.menu-opened .hamburger-line,
body.menu-open .hamburger-line {
  background-color: black !important;
}

/* Logo when menu open - make it black */
#navbar-top.menu-opened .site-logo-img {
  filter: brightness(0) !important;
}

/* Menu Items Styling */
#menu-overlay nav a,
#menu-overlay nav .menu-item > a {
  color: white;
  font-size: 24px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  padding: 6px 0;
}

/* Schermi molto piccoli (< 360px) */
@media (max-width: 359px) {
  #menu-overlay nav a,
  #menu-overlay nav .menu-item > a {
    font-size: 20px;
    padding: 5px 0;
  }
}

/* Tablet e su */
@media (min-width: 640px) {
  #menu-overlay nav a,
  #menu-overlay nav .menu-item > a {
    font-size: 32px;
    padding: 8px 0;
  }
}

@media (min-width: 768px) {
  #menu-overlay nav a,
  #menu-overlay nav .menu-item > a {
    font-size: 38px;
  }
}

#menu-overlay nav a:hover,
#menu-overlay nav .menu-item > a:hover {
  opacity: 0.8;
}

/* Prevent body scroll when menu is open */
html.menu-open,
body.menu-open {
  overflow: hidden !important;
  height: 100% !important;
}

/* Navbar fixed position when menu open - override sticky */
body.menu-open #navbar-top {
  position: fixed !important;
  top: 105px !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 10000 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-top: 15px !important;
  transform: none !important;
  animation: none !important;
}

body.menu-open #topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
}

/* Ensure button is above overlay */
body.menu-open #menu-button {
  position: relative;
  z-index: 10002;
}

@media (max-height: 600px) {
  #menu-overlay nav a,
  #menu-overlay nav .menu-item > a {
    font-size: 22px;
    padding: 5px 0;
  }

  #menu-overlay .menu-overlay-content {
    padding-top: 80px;
    padding-bottom: 40px;
  }
}

/* Utility classes per prodotto.php */
.border-bottom-black {
  border-bottom: 1px solid black;
}

/* ============================================
   SPLIDE CAROUSEL - Related Products
   ============================================ */

/* Fallback: show products as grid if Splide not initialized */
.product-carousel:not(.is-initialized) .splide__list {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .product-carousel:not(.is-initialized) .splide__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .product-carousel:not(.is-initialized) .splide__list {
    grid-template-columns: 1fr;
  }
}

/* Force track visibility when initialized */
.product-carousel .splide__track {
  overflow: visible;
}

.product-carousel.splide.is-initialized .splide__track {
  overflow: hidden !important;
  width: 100% !important;
  text-align: center !important;
}

.product-carousel .splide__list {
  display: flex !important;
  width: 100% !important;
  justify-content: center !important;
}

.product-carousel .splide__slide {
  flex-shrink: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Container per frecce sotto centrali */
.product-carousel.splide {
  position: relative;
  padding-bottom: 70px;
  overflow: visible;
}

/* Gradienti laterali per coprire il taglio netto */
.product-carousel.splide::before,
.product-carousel.splide::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 70px; /* Altezza delle frecce */
  width: 40px;
  z-index: 5;
  pointer-events: none;
}

@media (max-width: 640px) {
  .product-carousel.splide::before,
  .product-carousel.splide::after {
    display: none;
  }
}

.product-carousel.splide::before {
  left: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
}

.product-carousel.splide::after {
  right: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
}

@media (max-width: 1024px) {
  .product-carousel.splide::before,
  .product-carousel.splide::after {
    width: 60px;
  }
}

@media (max-width: 640px) {
  .product-carousel.splide::before,
  .product-carousel.splide::after {
    width: 40px;
  }
}

.product-carousel .splide__arrows {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  z-index: 10;
}

.splide__arrow {
  position: static !important;
  background: white !important;
  opacity: 1 !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}

/* Freccia sinistra punta a sinistra */
.splide__arrow--prev,
.product-carousel .splide__arrow--prev,
#related-products-carousel .splide__arrow--prev,
body.single-product .splide__arrow--prev {
  transform: none !important;
}
.splide__arrow--prev svg,
.product-carousel .splide__arrow--prev svg,
#related-products-carousel .splide__arrow--prev svg,
body.single-product .splide__arrow--prev svg {
  transform: rotate(180deg) !important;
}

/* Freccia destra punta a destra */
.splide__arrow--next,
.product-carousel .splide__arrow--next,
#related-products-carousel .splide__arrow--next,
body.single-product .splide__arrow--next {
  transform: none !important;
}
.splide__arrow--next svg,
.product-carousel .splide__arrow--next svg,
#related-products-carousel .splide__arrow--next svg,
body.single-product .splide__arrow--next svg {
  transform: rotate(0deg) !important;
}

.splide__arrow svg {
  fill: #6E8C63 !important;
  width: 20px !important;
  height: 20px !important;
}

.splide__arrow:hover {
  background: #eeeeee !important;
}

.splide__slide {
  padding: 0 0 20px;
}

/* Carousel Slides - Let Splide calculate width, but ensure left alignment */
.product-carousel.is-initialized .splide__slide {
  flex-shrink: 0 !important;
}

/* Ensure track and list are left-aligned */
.product-carousel.is-initialized .splide__track {
  justify-content: flex-start !important;
}

.product-carousel.is-initialized .splide__list {
  justify-content: flex-start !important;
}

/* Carousel Product Cards - Same as Grid */
.product-carousel .carousel-product-card,
.product-carousel .product {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  position: relative !important;
  width: 100% !important;
}

.product-carousel .carousel-product-card > a:first-of-type,
.product-carousel .product > a:first-of-type {
  display: block !important;
  position: relative !important;
}

.product-carousel .carousel-product-card > a:first-of-type > div,
.product-carousel .product > a:first-of-type > div,
.product-carousel .carousel-product-card .attachment-woocommerce_thumbnail,
.product-carousel .product .attachment-woocommerce_thumbnail {
  margin-bottom: 20px !important;
  padding: 35px !important;
  background: #F8F8F8 !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 75px 0 75px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Carousel product images - force visibility */
.product-carousel .carousel-product-card img,
.product-carousel .product img,
.product-carousel .splide__slide img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  min-width: 50px !important;
  min-height: 50px !important;
  object-fit: contain !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Image container in carousel */
.product-carousel .splide__slide .bg-\[\#F8F8F8\],
.product-carousel .carousel-product-card > a > div {
  background: #F8F8F8 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 200px !important;
  width: 100% !important;
}

/* Filtro per convertire icone in arancione dark (#B17136) */
.icon-orange-dark {
  filter: invert(45%) sepia(52%) saturate(749%) hue-rotate(346deg) brightness(89%) contrast(90%);
}

/* ============================================
   CTA MENU - Stile pulsante per voce menu
   ============================================ */

/* Desktop menu - CTA button style */
.navbar-menu .cta-menu a,
.navbar-menu a.cta-menu,
.menu-item.cta-menu > a {
  background-color: var(--col-verde) !important;
  color: white !important;
  padding: 5px 24px !important;
  border-radius: 9999px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  font-size: 13px !important;
  letter-spacing: 0.5px;
  transition: all 0.3s ease !important;
  display: inline-block !important;
}

.navbar-menu .cta-menu a:hover,
.navbar-menu a.cta-menu:hover,
.menu-item.cta-menu > a:hover {
  background-color: #5a7a50 !important;
  transform: translateY(-2px);
}

/* Mobile menu - CTA button style */
#menu-overlay .cta-menu a,
#menu-overlay a.cta-menu,
#menu-overlay .menu-item.cta-menu > a {
  background-color: var(--col-verde) !important;
  color: white !important;
  padding: 16px 32px !important;
  border-radius: 9999px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  font-size: 14px !important;
  letter-spacing: 0.5px;
  display: inline-block !important;
  margin-top: 20px;
  transition: all 0.3s ease !important;
}

#menu-overlay .cta-menu a:hover,
#menu-overlay a.cta-menu:hover,
#menu-overlay .menu-item.cta-menu > a:hover {
  background-color: #5a7a50 !important;
}

/* ============================================
   DESKTOP DROPDOWN MENU
   ============================================ */

.navbar-dropdown-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: -20px;
}

.navbar-link .navbar-chevron {
  display: inline-block;
  margin-left: 5px;
  transition: transform 0.2s ease;
  vertical-align: middle;
}

.navbar-dropdown-wrapper:hover .navbar-chevron {
  transform: rotate(180deg);
}

.navbar-dropdown {
  position: absolute;
  top: calc(100% - 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 220px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  padding: 12px 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 50;
}

.navbar-dropdown-wrapper:hover .navbar-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.navbar-dropdown-link {
  display: block;
  padding: 10px 24px;
  color: #41351D;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.navbar-dropdown-link:hover {
  background: #f8f5f0;
  color: #B17136;
}

/* Ensure dropdown links are always dark text regardless of navbar mode */
.navbar-dark .navbar-dropdown-link,
.navbar-light .navbar-dropdown-link {
  color: #41351D;
}

.navbar-dark .navbar-dropdown-link:hover,
.navbar-light .navbar-dropdown-link:hover {
  color: #B17136;
}

/* Sticky navbar dropdown adjustments */
#navbar-top.is-sticky .navbar-dropdown-link {
  color: #41351D;
}

#navbar-top.is-sticky .navbar-dropdown-link:hover {
  color: #B17136;
}

/* ============================================
   MOBILE SUBMENU (ACCORDION)
   ============================================ */

.mobile-menu-item-wrapper {
  width: 100%;
}

.mobile-submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.mobile-submenu-toggle .mobile-chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.mobile-submenu-toggle[aria-expanded="true"] .mobile-chevron {
  transform: rotate(180deg);
}

.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-submenu.is-open {
  max-height: 300px;
}

.mobile-submenu a {
  display: block;
  padding: 8px 0 8px 20px;
  color: #B17136;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.mobile-submenu a:hover {
  opacity: 0.7;
}

/* ============================================
   WOOCOMMERCE VARIATION SWATCHES - Stile prodotto.php
   ============================================ */

/* Container variazioni */
body.single-product .variations ul.variable-items-wrapper,
body.single-product ul.variable-items-wrapper.button-variable-items-wrapper,
body .wvs-style-squared.variable-items-wrapper,
.variable-items-wrapper.button-variable-items-wrapper {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Singolo bottone variazione - Alta specificità */
body.single-product .variable-items-wrapper li.variable-item,
body .wvs-style-squared li.variable-item.button-variable-item,
ul.variable-items-wrapper li.button-variable-item,
.variable-items-wrapper .variable-item.button-variable-item,
body.single-product .woocommerce li.variable-item,
.woocommerce .variations li.variable-item,
li.variable-item.button-variable-item,
.wvs-style-squared li {
  border: 1px solid #B17136 !important;
  border-color: #B17136 !important;
  border-style: solid !important;
  border-width: 1px !important;
  border-radius: 9999px !important;
  -webkit-border-radius: 9999px !important;
  padding: 10px 20px !important;
  background: white !important;
  background-color: white !important;
  color: black !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  font-family: Poppins, system-ui, sans-serif !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  margin: 0 !important;
  min-width: auto !important;
  width: auto !important;
  height: auto !important;
  line-height: normal !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  outline: none !important;
}

/* Hover state */
body.single-product .variable-items-wrapper li.variable-item:hover,
body .wvs-style-squared li.variable-item:hover,
.variable-items-wrapper .variable-item.button-variable-item:hover,
.wvs-style-squared li:hover,
li.variable-item.button-variable-item:hover {
  background: #B17136 !important;
  background-color: #B17136 !important;
  color: white !important;
  border-color: #B17136 !important;
}

/* Selected/Active state */
body.single-product .variable-items-wrapper li.variable-item.selected,
body .wvs-style-squared li.variable-item.selected,
ul.variable-items-wrapper li.button-variable-item.selected,
.variable-items-wrapper .variable-item.button-variable-item.selected,
.wvs-style-squared li.selected,
li.variable-item.button-variable-item.selected,
li.variable-item.selected {
  background: #B17136 !important;
  background-color: #B17136 !important;
  color: white !important;
  border-color: #B17136 !important;
}

/* Remove default plugin styling */
body.single-product .variable-item .variable-item-contents,
body .wvs-style-squared .variable-item-contents,
.variable-items-wrapper .variable-item-contents {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: auto !important;
  min-width: auto !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.single-product .variable-item .variable-item-span,
body .wvs-style-squared .variable-item-span,
.variable-items-wrapper .variable-item-span {
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  color: inherit !important;
}

/* Nascondi tooltip delle confezioni */
li.button-variable-item[data-wvstooltip]::before,
li.variable-item.button-variable-item[data-wvstooltip]::before,
li.button-variable-item[data-wvstooltip]::after,
li.variable-item.button-variable-item[data-wvstooltip]::after {
  display: none !important;
  content: none !important;
}

/* ============================================
   CONTACT FORM 7 - Dark Box Styling
   ============================================ */
.molino-cf7-dark-box .wpcf7 {
  font-family: Poppins, system-ui, sans-serif;
}

.molino-cf7-dark-box .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.molino-cf7-dark-box .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* Label sopra ai datepicker del form Recesso/Resi (CF7 non li mostra
   di default; il placeholder dei <input type="date"> non e' affidabile
   cross-browser, su Chrome mostra "gg/mm/aaaa"). Inietto via ::before
   sul wrapper. */
.molino-cf7-dark-box .wpcf7-form-control-wrap[data-name="data_ordine"]::before,
.molino-cf7-dark-box .wpcf7-form-control-wrap[data-name="data_consegna"]::before {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}

.molino-cf7-dark-box .wpcf7-form-control-wrap[data-name="data_ordine"]::before {
  content: "Data dell'ordine";
}

.molino-cf7-dark-box .wpcf7-form-control-wrap[data-name="data_consegna"]::before {
  content: "Data di consegna (inizio dei 14 giorni per il recesso)";
}

.molino-cf7-dark-box input[type="text"],
.molino-cf7-dark-box input[type="email"],
.molino-cf7-dark-box input[type="tel"],
.molino-cf7-dark-box input[type="url"],
.molino-cf7-dark-box input[type="number"],
.molino-cf7-dark-box input[type="date"],
.molino-cf7-dark-box input[type="time"],
.molino-cf7-dark-box input[type="datetime-local"],
.molino-cf7-dark-box select {
  width: 100%;
  padding: 24px 15px;
  border-radius: 10px;
  background: white;
  border: 1px solid rgba(0,0,0,0.1);
  color: #41351D;
  font-size: 14px;
  font-family: Poppins, system-ui, sans-serif;
  transition: border-color 0.2s;
  box-sizing: border-box;
  height: auto;
  line-height: 1.2;
}

/* Date input: icona calendario coerente e cursore pointer */
.molino-cf7-dark-box input[type="date"] {
  color-scheme: light;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  min-height: 70px;
}

.molino-cf7-dark-box input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  filter: invert(20%) sepia(20%) saturate(800%) hue-rotate(2deg);
}

.molino-cf7-dark-box input[type="date"]:hover::-webkit-calendar-picker-indicator {
  opacity: 1;
}

.molino-cf7-dark-box input::placeholder,
.molino-cf7-dark-box textarea::placeholder {
  color: rgba(65,53,29,0.5);
}

.molino-cf7-dark-box input:focus,
.molino-cf7-dark-box textarea:focus,
.molino-cf7-dark-box select:focus {
  outline: none;
  border-color: #B17136;
}

.molino-cf7-dark-box textarea {
  width: 100%;
  padding: 24px 15px;
  border-radius: 10px;
  background: white;
  border: 1px solid rgba(0,0,0,0.1);
  color: #41351D;
  font-size: 14px;
  font-family: Poppins, system-ui, sans-serif;
  resize: none;
  height: 150px;
  box-sizing: border-box;
  margin-top: 22px;
}

.molino-cf7-dark-box .wpcf7-list-item {
  margin: 0;
}

.molino-cf7-dark-box .wpcf7-list-item label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255,255,255,0.9);
  font-size: 12px;
}

.molino-cf7-dark-box .wpcf7-list-item input[type="checkbox"] {
  width: auto;
  height: auto;
  margin-top: 3px;
}

.molino-cf7-dark-box .wpcf7-list-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border: 2px solid #fff; /* bordo del cerchio */
  border-radius: 50%;
  margin-right: 8px;
  position: relative;
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
}

/* Cerchio pieno interno quando è selezionato */
.molino-cf7-dark-box .wpcf7-list-item input[type="checkbox"]:checked::after {
  content: "";
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.molino-cf7-dark-box .wpcf7-not-valid-tip {
  margin-top: 4px;
  font-size: 12px;
  color: #e49953;
}

.molino-cf7-dark-box .btn-richiesta p {
  display: flex;
  justify-content: justify-between;
  flex-direction: row-reverse;
  align-items: center;
}

#form-contatto .informativa,
#form-recesso .informativa {
  padding: 20px 0px;
}

#form-contatto .campi p,
#form-recesso .campi p {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#form-contatto br,
#form-recesso br {
  display: none;
}

/* Recesso: textarea con altezza più contenuta */
#form-recesso .campi textarea {
  height: 110px;
}

/* Recesso: submit grande, centrato e full-width */
#form-recesso .btn-richiesta {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

#form-recesso .btn-richiesta p {
  width: 100%;
  margin: 0;
  display: block;
}

.molino-cf7-dark-box #form-recesso .wpcf7-submit,
.molino-cf7-dark-box #form-recesso input[type="submit"] {
  width: 100%;
  padding: 22px 25px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.molino-cf7-dark-box input[type="submit"],
.molino-cf7-dark-box .wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 25px;
  background: #B17136;
  color: white;
  border: none;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  font-family: Poppins, system-ui, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s;
  width: auto;
  height: auto;
}

.molino-cf7-dark-box input[type="submit"]:hover,
.molino-cf7-dark-box .wpcf7-submit:hover {
  background: #9a5a28;
}

.molino-cf7-dark-box .wpcf7-response-output {
  margin: 20px 0 0;
  padding: 15px !important;
  border-radius: 10px;
  font-size: 14px;
  background: rgba(255,255,255,0.1);
  border: none !important;
  color: white;
}

.molino-cf7-dark-box .wpcf7-mail-sent-ok {
  background: rgba(110,140,99,0.2);
  border-color: #6E8C63;
  color: white;
}

.molino-cf7-dark-box .wpcf7-validation-errors,
.molino-cf7-dark-box .wpcf7-mail-sent-ng {
  background: rgba(220,53,69,0.2);
  border-color: #dc3545;
  color: white;
}

.molino-cf7-dark-box p {
  margin: 0;
}

.molino-cf7-dark-box a {
  color: white;
  text-decoration: underline;
}

/* ============================================
   SINGLE PRODUCT PAGE - Fix Gallery & Layout
   Override Flexslider inline styles
   ============================================ */

/* Gallery container */
.molino-product-gallery-wrapper .woocommerce-product-gallery,
body.single-product .woocommerce-product-gallery {
  width: 100% !important;
  float: none !important;
  margin-bottom: 0px !important;
}

/* VIEWPORT - sfondo grigio, aspect ratio 1:1 */
.molino-product-gallery-wrapper .flex-viewport,
body.single-product .flex-viewport,
.woocommerce-product-gallery .flex-viewport {
  background: #f8f8f8 !important;
  background-color: #f8f8f8 !important;
  aspect-ratio: 1 / 1 !important;
  width: 100% !important;
  height: auto !important;
  min-height: unset !important;
  max-height: unset !important;
  padding: 30px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Wrapper - Flexslider lo gestisce, noi solo sfondo */
.molino-product-gallery-wrapper .woocommerce-product-gallery__wrapper,
body.single-product .woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
  background: transparent !important;
  height: 100% !important;
  align-items: center !important;
}

/* Singola immagine nel carousel - Flexslider usa float:left e width inline */
.molino-product-gallery-wrapper .woocommerce-product-gallery__image,
body.single-product .woocommerce-product-gallery__image,
.woocommerce-product-gallery .woocommerce-product-gallery__image {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
  background: #f8f8f8 !important;
}

/* Single image (no Flexslider) - force 1:1 aspect ratio */
.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:only-child {
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  padding: 30px !important;
}

/* Nascondi tutte le slide tranne quella attiva (solo quando Flexslider è attivo) */
.flex-viewport .woocommerce-product-gallery__image:not(.flex-active-slide) {
  visibility: hidden !important;
  opacity: 0 !important;
}

.flex-viewport .woocommerce-product-gallery__image.flex-active-slide {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Immagine principale - centrata e contenuta */
.molino-product-gallery-wrapper .woocommerce-product-gallery__image img:not(.zoomImg),
body.single-product .woocommerce-product-gallery__image img:not(.zoomImg),
.woocommerce-product-gallery .woocommerce-product-gallery__image img:not(.zoomImg) {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  margin: auto !important;
}

/* Nascondi immagine zoom */
.woocommerce-product-gallery__image .zoomImg {
  display: none !important;
}

/* Immagine cliccabile per aprire lightbox */
.woocommerce-product-gallery__image a {
  cursor: zoom-in;
}

/* ============================================
   PHOTOSWIPE LIGHTBOX - Sfondo grigio chiaro
   ============================================ */
.pswp__bg {
  background: #f0f0f0 !important;
}

.pswp__top-bar {
  background-color: transparent !important;
}

.pswp__button--close,
.pswp__button--zoom,
.pswp__button--fs {
  color: #41351D !important;
  opacity: 0.8 !important;
}

.pswp__button--close:hover,
.pswp__button--zoom:hover,
.pswp__button--fs:hover {
  opacity: 1 !important;
}

.pswp__caption__center {
  color: #41351D !important;
  text-align: center !important;
}

/* Frecce navigazione su sfondo chiaro */
.pswp__button--arrow--left::before,
.pswp__button--arrow--right::before {
  background-color: transparent !important;
}

.pswp__counter {
  color: #41351D !important;
}

/* Inverti icone bianche in scure per sfondo chiaro */
.pswp__button {
  filter: invert(1) !important;
}

/* Nascondi "Svuota" e descrizione variazione (mantenendo visibile la disponibilita') */
.woocommerce-variation-description,
.woocommerce-variation .woocommerce-variation-description,
.reset_variations,
body.single-product .variations .reset_variations,
body.single-product a.reset_variations,
a.reset_variations,
.variations a.reset_variations,
td.value a.reset_variations {
  display: none !important;
}

/* Stock badge (WooCommerce native .stock element) - prodotto semplice e variabile */
.woocommerce-variation-availability { display: block; }
.woocommerce div.product p.stock,
.woocommerce-variation-availability p.stock,
p.stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin: 0 0 15px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid transparent;
}
.woocommerce div.product p.stock.out-of-stock,
.woocommerce-variation-availability p.stock.out-of-stock,
p.stock.out-of-stock {
  color: #b91c1c;
  background-color: #fef2f2;
  border-color: #fecaca;
}
.woocommerce div.product p.stock.in-stock,
.woocommerce-variation-availability p.stock.in-stock,
p.stock.in-stock {
  color: #15803d;
  background-color: #f0fdf4;
  border-color: #bbf7d0;
}
.woocommerce div.product p.stock.available-on-backorder,
.woocommerce-variation-availability p.stock.available-on-backorder,
p.stock.available-on-backorder {
  color: #b45309;
  background-color: #fffbeb;
  border-color: #fde68a;
}

/* Prezzo variazione - stesso stile del prezzo prodotto semplice */
.single_variation_wrap .woocommerce-variation-price,
.woocommerce-variation-price {
  display: block !important;
  margin-bottom: 20px !important;
  margin-top: 10px !important;
}

.woocommerce-variation-price .price {
  font-size: 28px !important;
  font-weight: 700 !important;
  color: #000 !important;
  font-family: Poppins, system-ui, sans-serif !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* Prezzo originale barrato - piccolo e sbiadito */
.woocommerce-variation-price .price del {
  color: #968668 !important;
  font-weight: 400 !important;
  font-size: 12px !important;
  text-decoration: line-through !important;
  opacity: 0.6 !important;
}

/* Prezzo attuale/scontato - stesso colore, leggermente più bold */
.woocommerce-variation-price .price ins {
  text-decoration: none !important;
  font-weight: 600 !important;
  color: #5F4F31 !important;
  font-size: 13px !important;
}

/* Nascondi testo screen-reader nel layout visivo */
.woocommerce-variation-price .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
}

/* ============================================
   SINGLE PRODUCT - Layout Variazioni + Quantità
   Separatori colore: #968668
   ============================================ */

/* Sezione variazioni - full width */
.molino-variation-section {
  width: 100% !important;
  margin-bottom: 30px !important;
  padding-bottom: 30px !important;
  border-bottom: 1px solid #968668 !important;
}

/* Sezione quantità */
.molino-quantity-section {
  margin-bottom: 30px !important;
  padding-bottom: 30px !important;
  border-bottom: 1px solid #968668 !important;
}

/* Button wrapper */
/* .molino-button-wrapper {
  display: block !important;
  padding-bottom: 30px !important;
  margin-bottom: 30px !important;
  border-bottom: 1px solid #968668 !important;
} */

/* Fix: rimuovi border da quantity quando è dentro button-wrapper */
.molino-button-wrapper .molino-quantity-section {
  margin-bottom: 20px !important;
  padding-bottom: 0 !important;
  border-bottom: none !important;
}

/* Single product - tutti i separatori */
body.single-product .border-bottom-black {
  border-bottom-color: #968668 !important;
}

/* ============================================
   WOOCOMMERCE - "Formato" label più piccolo
   ============================================ */
body.single-product .variations label[for="pa_formato"],
body.single-product .variations th.label label,
body.single-product .variations_form label[for^="pa_"],
.woocommerce .variations label {
  font-size: 13px !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #5F4F31 !important;
  margin-bottom: 5px !important;
  display: block !important;
}

/* Nascondi completamente la riga "Formato" se già c'è "Scegli la confezione" */
body.single-product .variations tr th.label,
body.single-product .variations_form .variations th,
body.single-product table.variations th.label {
  display: none !important;
}

body.single-product .variations tr td.value,
body.single-product .variations_form .variations td,
body.single-product table.variations td.value {
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
}

body.single-product table.variations,
body.single-product .variations_form table.variations {
  display: block !important;
  width: 100% !important;
}

body.single-product table.variations tr,
body.single-product .variations_form table.variations tr {
  display: block !important;
  width: 100% !important;
}

/* ============================================
   SINGLE PRODUCT - Cart form margin reset
   ============================================ */
.woocommerce div.product form.cart {
  margin-bottom: 0 !important;
}

/* ============================================
   SIMPLE PRODUCT - Force vertical layout
   Il form per prodotti semplici deve avere layout verticale
   (quantità sopra, pulsante sotto)
   ============================================ */
.woocommerce div.product form.cart:not(.variations_form) {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

.woocommerce div.product form.cart:not(.variations_form) .molino-simple-quantity-row {
  width: 100% !important;
  margin-bottom: 0 !important;
}

.woocommerce div.product form.cart:not(.variations_form) .molino-button-wrapper {
  width: 100% !important;
  margin-top: 20px !important;
}

/* ============================================
   SINGLE PRODUCT - Add to Cart Button styling
   Opzione A: Sotto la quantità (non full-width)
   ============================================ */
body.single-product .single_add_to_cart_button,
body.single-product button.single_add_to_cart_button {
  background-color: #6E8C63 !important;
  color: white !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 16px 40px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  font-family: Poppins, system-ui, sans-serif !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

body.single-product .single_add_to_cart_button:hover {
  background-color: #5a7852 !important;
}

/* ============================================
   SINGLE PRODUCT - Quantity selector styling
   ============================================ */
body.single-product .quantity {
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid #B17136 !important;
  border-radius: 9999px !important;
  background: white !important;
  overflow: hidden !important;
  height: 48px;
}

body.single-product .quantity .qty,
body.single-product .quantity input[type="number"] {
  width: 80px !important;
  height: 38px !important;
  border: none !important;
  text-align: center !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  font-family: Poppins, system-ui, sans-serif !important;
  background: transparent !important;
  -moz-appearance: textfield !important;
}

body.single-product .quantity input::-webkit-outer-spin-button,
body.single-product .quantity input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

/* Custom +/- buttons for WooCommerce quantity */
body.single-product .quantity .plus,
body.single-product .quantity .minus {
  width: 50px !important;
  height: 33px !important;
  background: transparent !important;
  border: none !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  color: black !important;
}

body.single-product .quantity .plus:hover,
body.single-product .quantity .minus:hover {
  background: rgba(177, 113, 54, 0.1) !important;
}

/* ============================================
   SINGLE PRODUCT - Custom Gallery Thumbnails
   ============================================ */

/* Thumbnail container */
.molino-product-gallery-wrapper #thumbnailContainer {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #968668 transparent;
}

.molino-product-gallery-wrapper #thumbnailContainer::-webkit-scrollbar {
  height: 6px;
}

.molino-product-gallery-wrapper #thumbnailContainer::-webkit-scrollbar-thumb {
  background-color: #968668;
  border-radius: 3px;
}

/* Thumbnail wrapper */
.molino-product-gallery-wrapper #thumbnailWrapper {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

/* Individual thumbnail item - CSS fallback for JS sizing */
.molino-product-gallery-wrapper .thumbnail-item {
  flex: 0 0 calc(25% - 12px); /* 4 items with gap */
  min-width: 80px;
  max-width: 120px;
}

@media (max-width: 768px) {
  .molino-product-gallery-wrapper .thumbnail-item {
    flex: 0 0 calc(33.333% - 10px); /* 3 items on tablet */
  }
}

@media (max-width: 480px) {
  .molino-product-gallery-wrapper .thumbnail-item {
    flex: 0 0 calc(25% - 12px); /* Keep 4 on mobile */
    min-width: 60px;
  }
}

.molino-product-gallery-wrapper .thumbnail-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f8f8f8;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: border-color 0.3s ease;
  cursor: pointer;
  padding: 8px;
  box-sizing: border-box;
}

.molino-product-gallery-wrapper .thumbnail-item img:hover,
.molino-product-gallery-wrapper .thumbnail-item img.active {
  border-color: #4a7c59 !important;
}

/* ============================================
   SINGLE PRODUCT - Label "Scegli la confezione"
   ============================================ */
.molino-variation-label {
  display: block !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  margin-bottom: 10px !important;
  color: #41351D !important;
  font-family: Poppins, system-ui, sans-serif !important;
}

/* ============================================
   WOOCOMMERCE NOTICES - Stile tema Molino Latina
   Sfondo full-width, contenuto in container
   ============================================ */
.woocommerce-notices-wrapper {
  position: relative !important;
  z-index: 100 !important;
  margin-bottom: 0 !important;
  width: 100% !important;
}

/* Wrapper con sfondo full-width */
.woocommerce-notices-wrapper:has(.woocommerce-message) {
  background-color: rgba(110, 140, 99, 0.15) !important;
}

.woocommerce-notices-wrapper:has(.woocommerce-info) {
  background-color: rgba(228, 153, 84, 0.15) !important;
}

.woocommerce-notices-wrapper:has(.woocommerce-error) {
  background-color: rgba(220, 53, 69, 0.15) !important;
}

.woocommerce-message:after {
  display: none !important;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  outline: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  border-radius: 0 !important;
  font-family: Poppins, system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  width: 100% !important;
  max-width: 1240px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 15px 20px !important;
  background: transparent !important;
  color: #41351D !important;
}

.woocommerce-message::before {
  display: none !important;
}

.woocommerce-info::before {
  display: none !important;
}

/* Error message */
.woocommerce-error {
  list-style: none !important;
}

.woocommerce-error::before {
  display: none !important;
}

/* Button inside notice - estrema destra */
.woocommerce-message .button,
.woocommerce-message a.button,
.woocommerce-message .wc-forward,
.woocommerce-info .button,
.woocommerce-info a.button,
.woocommerce-error .button,
.woocommerce-error a.button {
  background-color: #6E8C63 !important;
  color: white !important;
  padding: 10px 24px !important;
  border-radius: 9999px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  transition: all 0.2s ease !important;
  display: inline-block !important;
  cursor: pointer !important;
  border: none !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
  white-space: nowrap !important;
}

.woocommerce-message .button:hover,
.woocommerce-message a.button:hover,
.woocommerce-message .wc-forward:hover,
.woocommerce-info .button:hover,
.woocommerce-error .button:hover {
  background-color: #5a7852 !important;
}

/* Links inside notice */
.woocommerce-message a:not(.button),
.woocommerce-info a:not(.button),
.woocommerce-error a:not(.button) {
  color: #41351D !important;
  text-decoration: underline !important;
}

/* Mobile optimization for notices - Toast/Snackbar style */
@media (max-width: 767px) {
  .woocommerce-notices-wrapper {
    position: fixed !important;
    bottom: 20px !important;
    left: 15px !important;
    right: 15px !important;
    top: auto !important;
    margin: 0 !important;
    z-index: 9999 !important;
    width: auto !important;
    pointer-events: none;
  }

  .woocommerce-notices-wrapper:has(.woocommerce-message),
  .woocommerce-notices-wrapper:has(.woocommerce-info),
  .woocommerce-notices-wrapper:has(.woocommerce-error) {
    background: transparent !important;
  }

  /* Toast style notification */
  .woocommerce-message,
  .woocommerce-info,
  .woocommerce-error {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-align: left !important;
    padding: 14px 16px !important;
    font-size: 14px !important;
    gap: 12px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    pointer-events: auto;
    animation: toastSlideUp 0.3s ease-out;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .woocommerce-message {
    background: #6E8C63 !important;
    color: white !important;
  }

  .woocommerce-info {
    background: #E49954 !important;
    color: white !important;
  }

  .woocommerce-error {
    background: #dc3545 !important;
    color: white !important;
  }

  .woocommerce-message,
  .woocommerce-info {
    font-weight: 500 !important;
    line-height: 1.4 !important;
  }

  /* Button compact on mobile toast */
  .woocommerce-message .button,
  .woocommerce-message a.button,
  .woocommerce-message .wc-forward,
  .woocommerce-info .button,
  .woocommerce-error .button {
    background: rgba(255,255,255,0.2) !important;
    color: white !important;
    padding: 8px 14px !important;
    font-size: 12px !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    margin-left: 0 !important;
    width: auto !important;
    text-align: center !important;
  }

  .woocommerce-message .button:hover,
  .woocommerce-message a.button:hover,
  .woocommerce-message .wc-forward:hover {
    background: rgba(255,255,255,0.35) !important;
  }

  /* Close button for toast */
  .woocommerce-message .toast-close,
  .woocommerce-info .toast-close,
  .woocommerce-error .toast-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
    line-height: 1;
  }

  /* Toast fade out animation */
  .woocommerce-notices-wrapper.toast-hiding .woocommerce-message,
  .woocommerce-notices-wrapper.toast-hiding .woocommerce-info,
  .woocommerce-notices-wrapper.toast-hiding .woocommerce-error {
    animation: toastSlideDown 0.3s ease-in forwards;
  }
}

/* Toast animations */
@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastSlideDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(30px);
  }
}

/* ============================================
   WOOCOMMERCE MY ACCOUNT - Design UX Molino Latina
   ============================================ */

/* Container principale */
body.woocommerce-account .woocommerce {
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 0 0px !important;
}

/* Layout a due colonne */
body.woocommerce-account .woocommerce-MyAccount-navigation {
  width: 250px !important;
  float: left !important;
  padding-right: 40px !important;
}

body.woocommerce-account .woocommerce-MyAccount-content {
  width: calc(100% - 290px) !important;
  float: right !important;
}

/* Navigazione Account - Stile Molino */
.woocommerce-MyAccount-navigation ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #f8f8f8 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}

.woocommerce-MyAccount-navigation ul li {
  margin: 0 !important;
  border-bottom: 1px solid #e5e5e5 !important;
}

.woocommerce-MyAccount-navigation ul li:last-child {
  border-bottom: none !important;
}

.woocommerce-MyAccount-navigation ul li a {
  display: block !important;
  padding: 16px 24px !important;
  color: #41351D !important;
  font-family: Poppins, system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

.woocommerce-MyAccount-navigation ul li a:hover {
  background: #6E8C63 !important;
  color: white !important;
}

.woocommerce-MyAccount-navigation ul li.is-active a {
  background: #6E8C63 !important;
  color: white !important;
  font-weight: 600 !important;
}

/* Titoli sezioni - dimensioni coerenti */
body.woocommerce-account h2 {
  font-family: Poppins, system-ui, sans-serif !important;
  color: #41351D !important;
  margin-bottom: 20px !important;
  font-size: 20px !important;
  font-weight: 600 !important;
}

body.woocommerce-account h3 {
  font-family: Poppins, system-ui, sans-serif !important;
  color: #41351D !important;
  margin-bottom: 15px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

/* Paragrafi e testo generale My Account */
body.woocommerce-account .woocommerce-MyAccount-content p {
  font-family: Poppins, system-ui, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #41351D !important;
}

/* Testi informativi piccoli (privacy, etc.) */
body.woocommerce-account .lost_password,
body.woocommerce-account .privacy-policy-text,
body.woocommerce-account .woocommerce-privacy-policy-text,
body.woocommerce-account .woocommerce-form__label-for-checkbox {
  font-size: 12px !important;
  line-height: 1.5 !important;
}

body.woocommerce-account .lost_password a {
  font-size: 12px !important;
}

/* Dettagli Account - Edit form */
body.woocommerce-account .woocommerce-EditAccountForm label {
  font-size: 14px !important;
}

body.woocommerce-account .woocommerce-EditAccountForm input {
  font-size: 14px !important;
}

body.woocommerce-account .woocommerce-EditAccountForm fieldset legend {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #41351D !important;
  margin-bottom: 15px !important;
}

/* Form Login/Register */
body.woocommerce-account .woocommerce-form-login,
body.woocommerce-account .woocommerce-form-register {
  background: #f8f8f8 !important;
  padding: 40px !important;
  border-radius: 20px !important;
  border: none !important;
}

body.woocommerce-account .woocommerce-form-row {
  margin-bottom: 20px !important;
}

body.woocommerce-account .woocommerce-form-row label {
  display: block !important;
  font-family: Poppins, system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #41351D !important;
  margin-bottom: 8px !important;
}

body.woocommerce-account .woocommerce-form-row input[type="text"],
body.woocommerce-account .woocommerce-form-row input[type="email"],
body.woocommerce-account .woocommerce-form-row input[type="password"] {
  width: 100% !important;
  height: 50px !important;
  padding: 0 20px !important;
  border: 1px solid #968668 !important;
  border-radius: 9999px !important;
  font-family: Poppins, system-ui, sans-serif !important;
  font-size: 14px !important;
  color: #41351D !important;
  background: white !important;
  transition: border-color 0.2s !important;
}

body.woocommerce-account .woocommerce-form-row input:focus {
  outline: none !important;
  border-color: #6E8C63 !important;
}

/* Bottoni Account */
body.woocommerce-account .woocommerce-button,
body.woocommerce-account button[type="submit"],
body.woocommerce-account .button {
  background: #6E8C63 !important;
  color: white !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 14px 32px !important;
  font-family: Poppins, system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

body.woocommerce-account .woocommerce-button:hover,
body.woocommerce-account button[type="submit"]:hover,
body.woocommerce-account .button:hover {
  background: #5a7852 !important;
}

/* Remember me checkbox */
body.woocommerce-account .woocommerce-form-login__rememberme {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 20px !important;
}

/* Link Lost Password */
body.woocommerce-account .woocommerce-LostPassword a {
  color: #B17136 !important;
  font-size: 14px !important;
  text-decoration: none !important;
}

body.woocommerce-account .woocommerce-LostPassword a:hover {
  text-decoration: underline !important;
}

/* Tabelle ordini */
body.woocommerce-account .woocommerce-orders-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-family: Poppins, system-ui, sans-serif !important;
}

body.woocommerce-account .woocommerce-orders-table th {
  background: #f8f8f8 !important;
  padding: 15px 20px !important;
  text-align: left !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #41351D !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

body.woocommerce-account .woocommerce-orders-table td {
  padding: 20px !important;
  border-bottom: 1px solid #e5e5e5 !important;
  font-size: 14px !important;
  color: #41351D !important;
}

body.woocommerce-account .woocommerce-orders-table .button {
  padding: 10px 20px !important;
  font-size: 12px !important;
}

/* Indirizzi */
body.woocommerce-account .woocommerce-Addresses {
  display: flex !important;
  gap: 30px !important;
  flex-wrap: wrap !important;
}

body.woocommerce-account .woocommerce-Address {
  flex: 1 !important;
  min-width: 280px !important;
  background: #f8f8f8 !important;
  padding: 25px !important;
  border-radius: 16px !important;
}

body.woocommerce-account .woocommerce-Address-title h3 {
  font-size: 15px !important;
  font-weight: 600 !important;
  margin-bottom: 12px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid #968668 !important;
}

/* Edit address page - titoli e testi */
body.woocommerce-account .woocommerce-address-fields h3,
body.woocommerce-account .u-columns h2,
body.woocommerce-account .u-columns h3,
body.woocommerce-account .col-1 h2,
body.woocommerce-account .col-2 h2 {
  font-size: 16px !important;
  font-weight: 600 !important;
  margin-bottom: 15px !important;
}

body.woocommerce-account .woocommerce-Address .add-new-address-link,
body.woocommerce-account .woocommerce-Address a.add {
  font-size: 13px !important;
  color: #B17136 !important;
  font-weight: 500 !important;
}

body.woocommerce-account .woocommerce-Address p {
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #5F4F31 !important;
  margin: 0 !important;
}

body.woocommerce-account address {
  font-style: normal !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
  color: #41351D !important;
}

/* Responsive Account */
@media (max-width: 768px) {
  body.woocommerce-account .woocommerce-MyAccount-navigation,
  body.woocommerce-account .woocommerce-MyAccount-content {
    width: 100% !important;
    float: none !important;
    padding-right: 0 !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation {
    margin-bottom: 30px !important;
  }

  body.woocommerce-account .woocommerce-Addresses {
    flex-direction: column !important;
  }
}

/* ============================================
   WOOCOMMERCE SHOP PAGE - Grid & Filtri
   ============================================ */

/* Container Shop - NO padding-top, lo spacer è nel template */
body.post-type-archive-product .site-main,
body.tax-product_cat .site-main {
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
}

/* Nascondi elementi non necessari */
body.post-type-archive-product .woocommerce-result-count,
body.tax-product_cat .woocommerce-result-count {
  display: none !important;
}

/* Filtri categoria - Stile pills */
.woocommerce-widget-layered-nav-list,
.product-categories {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 40px 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  justify-content: center !important;
}

.woocommerce-widget-layered-nav-list li,
.product-categories li {
  margin: 0 !important;
}

.woocommerce-widget-layered-nav-list li a,
.product-categories li a {
  display: inline-block !important;
  padding: 10px 24px !important;
  border: 1px solid #968668 !important;
  border-radius: 9999px !important;
  font-family: Poppins, system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #41351D !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  background: white !important;
}

.woocommerce-widget-layered-nav-list li a:hover,
.product-categories li a:hover,
.woocommerce-widget-layered-nav-list li.chosen a,
.product-categories li.current-cat a {
  background: #6E8C63 !important;
  color: white !important;
  border-color: #6E8C63 !important;
}

/* Nascondi conteggio prodotti */
.woocommerce-widget-layered-nav-list li .count,
.product-categories li .count {
  display: none !important;
}

/* Ordinamento dropdown */
.woocommerce-ordering {
  margin-bottom: 30px !important;
  text-align: right !important;
}

.woocommerce-ordering select {
  padding: 12px 40px 12px 20px !important;
  border: 1px solid #968668 !important;
  border-radius: 9999px !important;
  font-family: Poppins, system-ui, sans-serif !important;
  font-size: 14px !important;
  color: #41351D !important;
  background: white !important;
  cursor: pointer !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2341351D' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
}

/* ============================================
   GRIGLIA PRODOTTI - Override Parent Theme
   ============================================ */

/* Reset griglia */
body.post-type-archive-product ul.products,
body.tax-product_cat ul.products,
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  row-gap: 90px !important;
  column-gap: 20px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

/* Rimuovi pseudo-elementi che potrebbero occupare celle grid */
body.post-type-archive-product ul.products::before,
body.post-type-archive-product ul.products::after,
body.tax-product_cat ul.products::before,
body.tax-product_cat ul.products::after,
.woocommerce ul.products::before,
.woocommerce ul.products::after {
  display: none !important;
  content: none !important;
}

@media (max-width: 1024px) {
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products,
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products,
  .woocommerce ul.products {
    grid-template-columns: 1fr !important;
    row-gap: 60px !important;
  }
}

/* Card prodotto */
body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product,
.woocommerce ul.products li.product {
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  width: 100% !important;
}

/* Container immagine - il div dentro il primo link */
body.post-type-archive-product ul.products li.product .bg-\[\#F8F8F8\],
body.tax-product_cat ul.products li.product .bg-\[\#F8F8F8\],
.woocommerce ul.products li.product .bg-\[\#F8F8F8\],
body.post-type-archive-product ul.products li.product > a > div,
body.tax-product_cat ul.products li.product > a > div,
.woocommerce ul.products li.product > a > div {
  margin-bottom: 20px !important;
  padding: 35px !important;
  background: #F8F8F8 !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 75px 0 75px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Immagine prodotto */
body.post-type-archive-product ul.products li.product img,
body.tax-product_cat ul.products li.product img,
.woocommerce ul.products li.product img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
}

/* Link immagine */
body.post-type-archive-product ul.products li.product > a:first-of-type,
body.tax-product_cat ul.products li.product > a:first-of-type,
.woocommerce ul.products li.product > a:first-of-type {
  display: block !important;
  text-decoration: none !important;
  width: 100% !important;
}

/* Titolo prodotto */
body.post-type-archive-product ul.products li.product h3,
body.tax-product_cat ul.products li.product h3,
.woocommerce ul.products li.product h3 {
  font-size: 14px !important;
  font-weight: 600 !important;
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
  color: #41351D !important;
}

body.post-type-archive-product ul.products li.product > a:nth-of-type(2),
body.tax-product_cat ul.products li.product > a:nth-of-type(2),
.woocommerce ul.products li.product > a:nth-of-type(2) {
  text-decoration: none !important;
}

/* Prezzo */
body.post-type-archive-product ul.products li.product > p,
body.tax-product_cat ul.products li.product > p,
.woocommerce ul.products li.product > p {
  font-size: 14px !important;
  font-weight: 400 !important;
  margin: 0 0 15px 0 !important;
  color: #41351D !important;
}

/* CTA Link */
body.post-type-archive-product ul.products li.product > a:last-of-type,
body.tax-product_cat ul.products li.product > a:last-of-type,
.woocommerce ul.products li.product > a:last-of-type {
  margin-top: auto !important;
  color: #516A48 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
  text-underline-offset: 10px !important;
  text-decoration-thickness: 2px !important;
  text-decoration-color: #516A48 !important;
}

body.post-type-archive-product ul.products li.product > a:last-of-type:hover,
body.tax-product_cat ul.products li.product > a:last-of-type:hover,
.woocommerce ul.products li.product > a:last-of-type:hover {
  opacity: 0.8 !important;
}

/* ============================================
   BADGE SALDO/ESAURITO
   ============================================ */

/* Badge Saldo - Verde */
body.post-type-archive-product ul.products li.product .onsale,
body.tax-product_cat ul.products li.product .onsale,
.woocommerce ul.products li.product .onsale,
.woocommerce span.onsale {
  position: absolute !important;
  top: 15px !important;
  left: 15px !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  width: fit-content !important;
  max-width: fit-content !important;
  height: auto !important;
  background: #6E8C63 !important;
  color: white !important;
  padding: 6px 14px !important;
  border-radius: 9999px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  z-index: 10 !important;
  min-width: auto !important;
  min-height: auto !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  display: inline-block !important;
  box-sizing: border-box !important;
}

/* Badge Esaurito - Rosso */
body.post-type-archive-product ul.products li.product.outofstock .onsale,
body.tax-product_cat ul.products li.product.outofstock .onsale,
.woocommerce ul.products li.product.outofstock .onsale,
.woocommerce span.onsale.sold-out,
.onsale.sold-out {
  background: #A3492E !important;
}

/* Container immagine deve essere position relative per il badge */
body.post-type-archive-product ul.products li.product > a:first-of-type,
body.tax-product_cat ul.products li.product > a:first-of-type,
.woocommerce ul.products li.product > a:first-of-type {
  position: relative !important;
}

/* ============================================
   RATING STARS
   ============================================ */
body.post-type-archive-product ul.products li.product .star-rating,
body.tax-product_cat ul.products li.product .star-rating,
.woocommerce ul.products li.product .star-rating {
  display: flex !important;
  gap: 2px !important;
  margin-bottom: 8px !important;
  font-size: 12px !important;
  color: #B17136 !important;
}

.woocommerce ul.products li.product .star-rating::before {
  color: #E3C4A7 !important;
}

/* ============================================
   PREZZO SCONTATO
   ============================================ */
body.post-type-archive-product ul.products li.product .price del,
body.tax-product_cat ul.products li.product .price del,
.woocommerce ul.products li.product .price del {
  color: #968668 !important;
  font-size: 13px !important;
  opacity: 0.8 !important;
  margin-right: 8px !important;
}

body.post-type-archive-product ul.products li.product .price ins,
body.tax-product_cat ul.products li.product .price ins,
.woocommerce ul.products li.product .price ins {
  text-decoration: none !important;
  color: #6E8C63 !important;
  font-weight: 500 !important;
}

.price-element-single-product ins {
  text-decoration: none !important;
}

/* ============================================
   PRODOTTO ESAURITO - CTA DISABILITATO
   ============================================ */
body.post-type-archive-product ul.products li.product.outofstock > a:last-of-type,
body.tax-product_cat ul.products li.product.outofstock > a:last-of-type,
.woocommerce ul.products li.product.outofstock > a:last-of-type {
  color: #A3492E !important;
  text-decoration-color: #A3492E !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  pointer-events: none !important;
}

/* WooCommerce loop title (h2 con hook) */
body.post-type-archive-product ul.products li.product h2.woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product h2.woocommerce-loop-product__title,
.woocommerce ul.products li.product h2.woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 14px !important;
  font-weight: 600 !important;
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
  color: #41351D !important;
}

/* WooCommerce price container */
body.post-type-archive-product ul.products li.product .price,
body.tax-product_cat ul.products li.product .price,
.woocommerce ul.products li.product .price {
  font-size: 14px !important;
  margin: 0 0 15px 0 !important;
  color: #41351D !important;
  display: block !important;
}

/* WooCommerce add to cart button (styled as link) */
body.post-type-archive-product ul.products li.product .button,
body.tax-product_cat ul.products li.product .button,
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product a.added_to_cart {
  margin-top: auto !important;
  color: #516A48 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
  text-underline-offset: 10px !important;
  text-decoration-thickness: 2px !important;
  text-decoration-color: #516A48 !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  cursor: pointer !important;
  display: inline-block !important;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .add_to_cart_button:hover {
  opacity: 0.8 !important;
}

/* "Vedi carrello" link */
.woocommerce ul.products li.product a.added_to_cart {
  margin-left: 15px !important;
  color: #B17136 !important;
  text-decoration-color: #B17136 !important;
}

/* Loading state */
.woocommerce ul.products li.product .button.loading {
  opacity: 0.6 !important;
  pointer-events: none !important;
}

/* Added state checkmark */
.woocommerce ul.products li.product .button.added::after {
  content: " ✓" !important;
  color: #6E8C63 !important;
}

/* ============================================
   NO PRODUCTS FOUND - CENTRATO
   ============================================ */
.woocommerce-no-products-found {
  width: 100% !important;
  text-align: center !important;
  padding: 80px 20px !important;
}

.woocommerce-no-products-found .woocommerce-info {
  display: inline-block !important;
  text-align: center !important;
  font-size: 16px !important;
  color: #41351D !important;
  background: #F8F8F8 !important;
  padding: 30px 50px !important;
  border-radius: 10px !important;
  border: none !important;
  margin: 0 auto !important;
}

/* Single product page - notice full width */
body.single-product .woocommerce-notices-wrapper {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Rimuovi bordo dopo variazioni (solo dopo quantità e tasto) */
.molino-product-gallery-wrapper + div .woocommerce-variation::after,
.single_variation::after {
  display: none !important;
}

/* Thumbs gallery - SENZA sfondo grigio */
.molino-product-gallery-wrapper .flex-control-thumbs,
body.single-product .flex-control-thumbs {
  display: flex !important;
  gap: 8px !important;
  margin-top: 20px !important;
  list-style: none !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
}

.molino-product-gallery-wrapper .flex-control-thumbs li,
body.single-product .flex-control-thumbs li {
  flex: 1 !important;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.molino-product-gallery-wrapper .flex-control-thumbs li img,
body.single-product .flex-control-thumbs li img {
  border-radius: 0 !important;
}


.molino-product-gallery-wrapper .flex-control-thumbs li img,
body.single-product .flex-control-thumbs li img {
  width: 100% !important;
  aspect-ratio: 1 !important;
  object-fit: contain !important;
  cursor: pointer !important;
  background: #f8f8f8 !important;
  border: 2px solid transparent !important;
  border-radius: 0px !important;
  transition: all 0.3s !important;
}

/* ============================================
   WOOCOMMERCE - Tipografia ridotta
   Tutte le pagine WC hanno elementi più piccoli
   rispetto al tema principale
   ============================================ */

/* Titoli H1, H2, H3 più compatti */
body.woocommerce-page h1:not(.st-h1),
body.woocommerce-page h2:not(.st-h1):not(.st-h2),
body.woocommerce-page h3:not(.st-h3),
body.woocommerce-cart h1,
body.woocommerce-cart h2,
body.woocommerce-checkout h1,
body.woocommerce-checkout h2,
body.woocommerce-account h1,
body.woocommerce-account h2,
body.single-product h1:not(.product_title),
body.single-product h2,
body.post-type-archive-product h1:not(.st-h1),
body.post-type-archive-product h2,
body.tax-product_cat h1:not(.st-h1):not([class*="st-text-"]),
body.tax-product_cat h2:not(.st-h2):not([class*="st-text-"]) {
  font-family: Poppins, system-ui, sans-serif !important;
  color: #41351D !important;
}

/* ===========================================
   FOOTER PROTECTION
   Prevent ALL WooCommerce/page-level styles
   from leaking into the footer.
   This ensures identical footer on every page.
   Two zones: colored section (white text) and
   bottom section .bg-white (dark text).
   =========================================== */

/* --- Colored section: all text white --- */
#site-footer > div:not(.bg-white) h1,
#site-footer > div:not(.bg-white) h2,
#site-footer > div:not(.bg-white) h3,
#site-footer > div:not(.bg-white) h4 {
  font-family: Poppins, system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: white !important;
  margin-top: 0 !important;
  margin-bottom: 5px !important;
  text-transform: uppercase;
  letter-spacing: normal;
  line-height: 1.4 !important;
}

#site-footer > div:not(.bg-white) p,
#site-footer > div:not(.bg-white) a,
#site-footer > div:not(.bg-white) span,
#site-footer > div:not(.bg-white) li,
#site-footer > div:not(.bg-white) address,
#site-footer > div:not(.bg-white) label {
  color: white !important;
  font-family: Poppins, system-ui, sans-serif !important;
}

/* --- Bottom white section: dark text --- */
#site-footer > .bg-white h1,
#site-footer > .bg-white h2,
#site-footer > .bg-white h3,
#site-footer > .bg-white h4 {
  font-family: Poppins, system-ui, sans-serif !important;
  color: #41351D !important;
  margin-top: 0 !important;
}

#site-footer > .bg-white p {
  font-family: Poppins, system-ui, sans-serif !important;
  color: rgba(0, 0, 0, 0.75) !important;
  line-height: 1.6 !important;
}

#site-footer > .bg-white a {
  font-family: Poppins, system-ui, sans-serif !important;
  color: rgba(0, 0, 0, 0.75) !important;
  text-decoration: none !important;
}

#site-footer > .bg-white a:hover {
  opacity: 0.8 !important;
}

/* H1 WooCommerce - più piccolo */
body.woocommerce-cart h1,
body.woocommerce-checkout h1,
body.woocommerce-account h1 {
  font-size: 28px !important;
  font-weight: 600 !important;
  margin-bottom: 25px !important;
}

/* H2 WooCommerce - più piccolo */
body.woocommerce-cart h2,
body.woocommerce-checkout h2,
body.woocommerce-account h2,
body.single-product h2,
body.post-type-archive-product h2:not(.st-h1):not(.st-h2),
body.tax-product_cat h2 {
  font-size: 22px !important;
  font-weight: 600 !important;
  margin-bottom: 20px !important;
}

/* H3 WooCommerce */
body.woocommerce-cart h3,
body.woocommerce-checkout h3,
body.woocommerce-account h3,
body.single-product h3,
body.post-type-archive-product h3,
body.tax-product_cat h3 {
  font-size: 18px !important;
  font-weight: 600 !important;
  margin-bottom: 15px !important;
}

/* H3 Titoli prodotti in griglie e carousel - override */
.carousel-product-card h3,
.molino-product-card h3,
.product-carousel h3,
body.single-product .carousel-product-card h3,
body.post-type-archive-product .molino-product-card h3,
body.tax-product_cat .molino-product-card h3 {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #41351D !important;
  margin-bottom: 5px !important;
  line-height: 1.4em !important;
}

/* Paragrafi e testo più contenuto */
body.woocommerce-cart p,
body.woocommerce-checkout p,
body.woocommerce-account p:not(.woocommerce-form-row),
body.single-product .product_meta,
body.single-product .woocommerce-product-details__short-description p {
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #41351D !important;
}

/* Labels più piccole */
body.woocommerce-cart label,
body.woocommerce-checkout label,
body.woocommerce-account label {
  font-size: 13px !important;
  font-weight: 600 !important;
}

/* Tabelle WooCommerce - font più contenuto */
body.woocommerce-cart table th,
body.woocommerce-checkout table th,
.woocommerce table.shop_table th {
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

body.woocommerce-cart table td,
body.woocommerce-checkout table td,
.woocommerce table.shop_table td {
  font-size: 14px !important;
}

/* Titolo prodotto nella pagina singola */
body.single-product .product_title {
  font-size: 28px !important;
  font-weight: 700 !important;
}

/* Prezzo pagina prodotto */
body.single-product .price {
  font-size: 24px !important;
}

/* Responsive - ancora più piccolo su mobile */
@media (max-width: 768px) {
  body.woocommerce-cart h1,
  body.woocommerce-checkout h1,
  body.woocommerce-account h1 {
    font-size: 24px !important;
  }

  body.woocommerce-cart h2,
  body.woocommerce-checkout h2,
  body.woocommerce-account h2,
  body.single-product h2 {
    font-size: 20px !important;
  }

  body.single-product .product_title {
    font-size: 24px !important;
  }

  body.single-product .price {
    font-size: 20px !important;
  }
}

/* ============================================
   WOOCOMMERCE CART & CHECKOUT - Solo stili visivi
   Mantiene layout default WooCommerce
   ============================================ */

/* === TIPOGRAFIA GLOBALE === */
.wc-block-cart,
.wc-block-checkout,
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
  font-family: 'Poppins', sans-serif !important;
  color: #41351D !important;
  font-size: 14px !important;
}

/* Titoli principali (Totale carrello, ecc.) */
.wc-block-cart h2,
.wc-block-checkout h2,
.wc-block-cart__totals-title {
  font-family: 'Poppins', sans-serif !important;
  color: #41351D !important;
  font-weight: 600 !important;
  font-size: 18px !important;
}

/* Titolo sidebar (Totale carrello) */
.wc-block-cart__sidebar h2,
.wc-block-cart__totals-title {
  font-size: 16px !important;
}

/* === PULSANTI PRIMARI (VERDE) === */
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
.wc-block-components-button {
  background-color: #6E8C63 !important;
  color: white !important;
  border: none !important;
  border-radius: 9999px !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  transition: background-color 0.3s ease !important;
}

.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover,
.wc-block-components-button:hover {
  background-color: #516A48 !important;
}

/* === PULSANTE COUPON (ARANCIONE - secondario) === */
.wc-block-components-totals-coupon__button {
  background-color: #B17136 !important;
  color: white !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}

.wc-block-components-totals-coupon__button:hover {
  background-color: #8a5628 !important;
}

/* === LINK PRODOTTO === */
.wc-block-components-product-name {
  font-family: 'Poppins', sans-serif !important;
  color: #41351D !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.wc-block-components-product-name:hover {
  color: #B17136 !important;
}

/* === PREZZI === */
.wc-block-components-product-price,
.wc-block-formatted-money-amount,
.wc-block-components-totals-item__value {
  color: #41351D !important;
  font-weight: 600 !important;
  font-family: 'Poppins', sans-serif !important;
}

/* Totale finale - verde */
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  color: #6E8C63 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

/* === INPUT E FORM === */
.wc-block-components-text-input input,
.wc-block-components-totals-coupon input {
  border: 1px solid #968668 !important;
  border-radius: 8px !important;
  font-family: 'Poppins', sans-serif !important;
  color: #41351D !important;
}

.wc-block-components-text-input input:focus,
.wc-block-components-totals-coupon input:focus {
  border-color: #6E8C63 !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(110, 140, 99, 0.2) !important;
}

.wc-block-components-text-input label {
  color: #5F4F31 !important;
  font-family: 'Poppins', sans-serif !important;
}

/* === QUANTITÀ === */
.wc-block-components-quantity-selector {
  border: 1px solid #968668 !important;
  border-radius: 8px !important;
}

.wc-block-components-quantity-selector input {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600 !important;
  color: #41351D !important;
}

.wc-block-components-quantity-selector button:hover {
  background-color: #6E8C63 !important;
  color: white !important;
}

/* === LINK RIMUOVI === */
.wc-block-components-product-details__remove-link {
  color: #B17136 !important;
  text-decoration: underline !important;
}

.wc-block-components-product-details__remove-link:hover {
  color: #8a5628 !important;
}

/* === IMMAGINI PRODOTTO === */
.wc-block-components-product-image img {
  border-radius: 0 30px 0 30px !important;
  background-color: #F8F8F8 !important;
}

/* === SIDEBAR TOTALI === */
.wc-block-cart__totals-wrapper {
  background-color: #F8F8F8 !important;
  border-radius: 16px !important;
}

/* === LABELS E TESTO === */
.wc-block-components-totals-item__label,
.wc-block-components-radio-control__label {
  color: #5F4F31 !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 13px !important;
}

/* Subtotale, Tariffa, etc. - labels dei totali */
.wc-block-components-totals-item {
  font-size: 13px !important;
}

.wc-block-components-totals-item__value {
  font-size: 14px !important;
}

/* Totale stimato - footer più importante */
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
  font-size: 14px !important;
  font-weight: 600 !important;
}

/* === TESTI INFORMATIVI / LEGAL (12px) === */
/* Privacy, Termini, avvisi checkout */
.wc-block-checkout__terms,
.wc-block-components-checkbox__label,
.wc-block-checkout__policies,
.wc-block-checkout__actions-policies,
.wc-block-components-privacy-policy-text,
.wc-block-components-checkbox__mark + span,
.wc-block-checkout__form .wc-block-components-checkbox p,
.wc-block-checkout__form .wc-block-components-privacy-policy-text p,
.wc-block-components-address-card__address-row,
.woocommerce-privacy-policy-text,
.woocommerce-terms-and-conditions-checkbox-text,
.woocommerce form.login .lost_password,
.woocommerce form.register .privacy-policy-text,
.woocommerce-form__label-for-checkbox,
.wc-block-checkout__actions .wc-block-components-checkbox__label {
  font-size: 12px !important;
  line-height: 1.5 !important;
}

/* Link nei testi informativi */
.wc-block-checkout__terms a,
.wc-block-components-checkbox__label a,
.wc-block-components-privacy-policy-text a,
.woocommerce-privacy-policy-text a {
  font-size: 12px !important;
  color: #6E8C63 !important;
}

/* Coupon toggle link */
.wc-block-components-totals-coupon-link,
.wc-block-components-panel__button {
  font-size: 13px !important;
}

/* === NOTICE/AVVISI === */
.wc-block-components-notice-banner {
  border-radius: 8px !important;
  font-family: 'Poppins', sans-serif !important;
}

.wc-block-components-notice-banner--success {
  border-color: #6E8C63 !important;
}

/* === CHECKBOX (Termini, "Usa stesso indirizzo", ecc.) === */
/* Wrapper label flex per allineare box + testo */
.wc-block-components-checkbox {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  position: relative !important;
  cursor: pointer !important;
}

/* Box visibile del checkbox */
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  flex: 0 0 auto !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  background-color: #ffffff !important;
  border: 1.5px solid #968668 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  position: relative !important;
  display: inline-block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: border-color 0.2s, background-color 0.2s !important;
}

.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:hover {
  border-color: #6E8C63 !important;
}

.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:focus {
  outline: 2px solid rgba(110, 140, 99, 0.35) !important;
  outline-offset: 2px !important;
  border-color: #6E8C63 !important;
}

.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked {
  background-color: #6E8C63 !important;
  border-color: #6E8C63 !important;
}

/* SVG spunta sopra al box */
.wc-block-components-checkbox .wc-block-components-checkbox__mark {
  position: absolute !important;
  top: 50% !important;
  left: 0 !important;
  width: 20px !important;
  height: 20px !important;
  transform: translateY(-50%) !important;
  fill: #ffffff !important;
  pointer-events: none !important;
  padding: 3px !important;
  box-sizing: border-box !important;
}

/* La spunta è visibile solo quando il checkbox è selezionato */
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:not(:checked) + .wc-block-components-checkbox__mark {
  visibility: hidden !important;
}

.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked + .wc-block-components-checkbox__mark {
  visibility: visible !important;
}

/* === EXPRESS PAYMENT (PayPal/Apple Pay/Google Pay in alto) === */
.wp-block-woocommerce-checkout-express-payment-block,
.wc-block-components-express-payment {
  background-color: #F8F8F8 !important;
  border-radius: 12px !important;
  padding: 20px !important;
  margin-bottom: 24px !important;
}

.wc-block-components-express-payment__title-container {
  margin-bottom: 14px !important;
}

.wc-block-components-express-payment__title {
  font-size: 13px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: #5F4F31 !important;
}

.wc-block-components-express-payment__event-buttons {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.wc-block-components-express-payment__event-buttons > li {
  width: 100% !important;
  margin: 0 !important;
  list-style: none !important;
}

.wc-block-components-express-payment__event-buttons > li button,
.wc-block-components-express-payment__event-buttons > li iframe,
.wc-block-components-express-payment__event-buttons > li > * {
  width: 100% !important;
  min-height: 48px !important;
  border-radius: 8px !important;
}

/* Divisore "OPPURE" sotto pagamenti rapidi */
.wc-block-components-express-payment-continue-rule {
  margin: 18px 0 !important;
  font-size: 12px !important;
  color: #5F4F31 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
}

/* Mobile: padding ridotto e pulsanti più compatti */
@media (max-width: 600px) {
  .wp-block-woocommerce-checkout-express-payment-block,
  .wc-block-components-express-payment {
    padding: 14px !important;
    margin-bottom: 18px !important;
    border-radius: 10px !important;
  }

  .wc-block-components-express-payment__title {
    font-size: 12px !important;
  }

  .wc-block-components-express-payment__event-buttons > li button,
  .wc-block-components-express-payment__event-buttons > li iframe,
  .wc-block-components-express-payment__event-buttons > li > * {
    min-height: 44px !important;
  }

  /* Checkbox un filo più grandi su mobile per tap target */
  .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
    width: 22px !important;
    height: 22px !important;
  }

  .wc-block-components-checkbox .wc-block-components-checkbox__mark {
    width: 22px !important;
    height: 22px !important;
  }
}

/* === CARRELLO VUOTO === */
/* Pulsante "Torna allo Shop" e simili dentro empty-cart-block:
   alcune specificità di WC Blocks rendevano il testo scuro su sfondo scuro.
   Forziamo bianco su arancio brand. */
.wp-block-woocommerce-empty-cart-block .wp-block-button__link,
.wp-block-woocommerce-empty-cart-block .wp-block-button__link.wp-element-button,
.wc-block-cart__empty-cart .wp-block-button__link,
.wc-block-cart__empty-cart__title + .wp-block-buttons .wp-block-button__link {
  background-color: #B17136 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 14px 32px !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  text-transform: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color 0.2s ease !important;
}

.wp-block-woocommerce-empty-cart-block .wp-block-button__link:hover,
.wp-block-woocommerce-empty-cart-block .wp-block-button__link.wp-element-button:hover,
.wc-block-cart__empty-cart .wp-block-button__link:hover {
  background-color: #8a5628 !important;
  color: #ffffff !important;
}

/* Titolo "Il tuo carrello è vuoto" */
.wc-block-cart__empty-cart__title,
.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title {
  color: #41351D !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600 !important;
  margin-bottom: 24px !important;
}

/* === CARRELLO CLASSIC (fallback) === */
.woocommerce-cart-form .shop_table th {
  color: #41351D !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600 !important;
  border-bottom: 2px solid #968668 !important;
}

.woocommerce-cart-form .shop_table td {
  border-bottom: 1px solid #E5E5E5 !important;
}

/* ============================================
   PRODUCT GRID - Gestito da Tailwind
   Vedi template-parts/product-grid.php
   ============================================ */

/* ============================================
   WOOCOMMERCE STORE NOTICE
   Avviso negozio (demo store, comunicazioni)
   ============================================ */

/* Store notice - posizionato in alto sopra la topbar */
.woocommerce-store-notice,
p.woocommerce-store-notice.demo_store {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 12px 50px !important;
  background-color: #6E8C63 !important;
  color: white !important;
  text-align: center !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  z-index: 99999 !important;
}

/* Nascondi il link testuale "Ignora" */
.woocommerce-store-notice a[data-notice-dismiss],
p.woocommerce-store-notice.demo_store a {
  position: absolute !important;
  right: 15px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 28px !important;
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255,255,255,0.15) !important;
  border-radius: 50% !important;
  text-decoration: none !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0 !important;
  color: transparent !important;
  transition: background 0.2s !important;
}

/* X icon via pseudo-element */
.woocommerce-store-notice a[data-notice-dismiss]::before,
.woocommerce-store-notice a[data-notice-dismiss]::after,
p.woocommerce-store-notice.demo_store a::before,
p.woocommerce-store-notice.demo_store a::after {
  content: '' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 12px !important;
  height: 2px !important;
  background: white !important;
  border-radius: 1px !important;
}

.woocommerce-store-notice a[data-notice-dismiss]::before,
p.woocommerce-store-notice.demo_store a::before {
  transform: translate(-50%, -50%) rotate(45deg) !important;
}

.woocommerce-store-notice a[data-notice-dismiss]::after,
p.woocommerce-store-notice.demo_store a::after {
  transform: translate(-50%, -50%) rotate(-45deg) !important;
}

.woocommerce-store-notice a[data-notice-dismiss]:hover,
p.woocommerce-store-notice.demo_store a:hover {
  background: rgba(255,255,255,0.3) !important;
}

/* ============================================
   SHOP TOOLBAR
   Barra strumenti sopra griglia prodotti
   ============================================ */

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-bottom: 0px;
  flex-wrap: wrap;
  gap: 16px;
}

.toolbar-left {
  display: flex;
  align-items: center;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

/* Filter Toggle Button */
.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid #968668;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #41351D;
  padding: 10px 16px;
  min-height: 44px;
  transition: all 0.2s ease;
}

.filter-toggle-btn:hover {
  color: #B17136;
  border-color: #B17136;
  background: #faf7f3;
}

.filter-toggle-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* Badge conteggio filtri attivi */
.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #B17136;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  line-height: 1;
}

/* Products Per Page */
.products-per-page {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.per-page-title {
  color: #41351D;
  font-weight: 500;
}

.per-page-options {
  display: flex;
  align-items: center;
}

.per-page-link {
  color: #968668;
  text-decoration: none;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s ease;
}

.per-page-link:hover {
  color: #41351D;
}

.per-page-link.active {
  color: #41351D;
  font-weight: 600;
}

.per-page-separator {
  color: #C9BCA4;
  font-size: 14px;
}

/* Grid View Icons */
.shop-view {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-toolbar .view-btn,
.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none !important;
  border: none !important;
  cursor: pointer;
  transition: opacity 0.2s ease;
  padding: 0;
}

.shop-toolbar .view-btn svg,
.view-btn svg {
  width: 22px;
  height: 22px;
  fill: #C9BCA4;
  transition: fill 0.2s ease;
}

.shop-toolbar .view-btn:hover svg,
.view-btn:hover svg {
  fill: #968668;
}

.shop-toolbar .view-btn.active svg,
.view-btn.active svg {
  fill: #41351D;
}

/* Order By Dropdown */
.order-by-wrapper {
  position: relative;
}

.shop-toolbar .order-by-wrapper .order-by-select,
.order-by-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid #41351D !important;
  border-radius: 0 !important;
  padding: 8px 35px 8px 0 !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #41351D !important;
  cursor: pointer;
  min-width: 200px;
  transition: border-color 0.2s ease;
  box-shadow: none !important;
}

.shop-toolbar .order-by-wrapper .order-by-select:focus,
.order-by-select:focus {
  outline: none !important;
  border-bottom-color: #B17136 !important;
}

.shop-toolbar .order-by-wrapper::after,
.order-by-wrapper::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #41351D;
  pointer-events: none;
}

/* Toolbar Responsive */
@media (max-width: 768px) {
  .shop-toolbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }

  .toolbar-right {
    gap: 15px;
  }

  .products-per-page,
  .shop-view {
    display: none !important;
  }

  .order-by-select {
    min-width: 160px;
    font-size: 13px;
  }
}

/* ============================================
   FILTER DRAWER
   Sidebar laterale filtri prodotto
   ============================================ */

.filter-drawer-content {
  overflow-x: hidden;
}

.filter-drawer-content {
  overflow-x: hidden;
}

/* Overlay */
.filter-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.filter-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Drawer Container */
.filter-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height — gestisce barra indirizzo mobile */
  background: #fff;
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

/* Il form deve propagare il layout flex del drawer */
.filter-drawer-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0; /* Permette al flex item di shrinkare sotto la content height */
  overflow: hidden;
}

.filter-drawer.active {
  transform: translateX(0);
}

/* Body scroll lock quando drawer aperto */
body.filter-drawer-open {
  overflow: hidden;
}

/* Header */
.filter-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #E5E5E5;
  flex-shrink: 0;
  background: #b17136;
  border-bottom-right-radius: 50px;
}

.filter-drawer-header .filter-drawer-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.filter-drawer-header #filterClose svg {
  color: white;
}

.filter-drawer-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #41351D;
  transition: all 0.2s ease;
  border-radius: 50%;
}

.filter-drawer-close:hover {
  color: #B17136;
  background: rgba(255,255,255,0.1);
}

.filter-drawer-close svg {
  width: 24px;
  height: 24px;
}

/* Content Area — scrollabile, occupa tutto lo spazio tra header e footer */
.filter-drawer-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
  -webkit-overflow-scrolling: touch;
}

/* Filter Sections (fieldset reset for accessibility) */
fieldset.filter-section {
  border: none;
  padding: 0;
  min-width: 0;
}

.filter-section {
  margin-bottom: 24px;
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #78694B;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

/* Category Pills */
.filter-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-category-btn {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  border: 1px solid #d5cbbe;
  border-radius: 20px;
  background: transparent;
  color: #41351D;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-category-btn:hover {
  border-color: #41351D;
  background: #f9f9f9;
}

.filter-category-btn.active {
  background: #41351D;
  border-color: #41351D;
  color: white;
}

.filter-category-btn .filter-count {
  opacity: 0.7;
  margin-left: 4px;
}

/* Price Filter */
.filter-price-range {
  padding: 10px 0;
}

.price-inputs {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.price-input-group {
  flex: 1;
}

.price-input-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #968668;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-input-group input {
  width: 80%;
  padding: 12px 15px;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  color: #41351D;
  transition: border-color 0.2s ease;
  height: 30px !important;
}

.price-input-group input:focus {
  outline: none;
  border-color: #B17136;
}

/* Price Slider Track */
.price-slider {
  position: relative;
  height: 6px;
  background: #E5E5E5;
  border-radius: 3px;
  margin-top: 10px;
}

.price-slider-track {
  position: absolute;
  height: 100%;
  background: #6E8C63;
  border-radius: 3px;
  left: 0;
  right: 0;
}

/* Checkbox Filters */
.filter-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.filter-checkbox input {
  display: none;
}

.filter-checkbox-mark {
  width: 20px;
  height: 20px;
  border: 2px solid #968668;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.filter-checkbox input:checked + .filter-checkbox-mark {
  background: #6E8C63;
  border-color: #6E8C63;
}

.filter-checkbox-mark svg {
  width: 12px;
  height: 12px;
  stroke: white;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.filter-checkbox input:checked + .filter-checkbox-mark svg {
  opacity: 1;
}

.filter-checkbox-label {
  font-size: 14px;
  color: #41351D;
}

.filter-checkbox-count {
  font-size: 13px;
  color: #968668;
  margin-left: auto;
}

/* Dropdown Filter */
.filter-dropdown {
  position: relative;
}

.filter-select {
  width: 100%;
  padding: 12px 40px 12px 15px;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  color: #41351D;
  background: white;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2341351D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}

.filter-select:focus {
  outline: none;
  border-color: #B17136;
}

/* Footer Buttons — sempre visibile in fondo al drawer grazie a flex layout */
.filter-drawer-footer {
  padding: 14px 24px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  background: #fff;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}

.filter-btn-reset {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  background: transparent;
  border: 1px solid #41351D;
  border-radius: 24px;
  color: #41351D;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn-reset:hover {
  background: #41351D;
  color: white;
}

.filter-btn-apply {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  background: #6E8C63;
  border: 1px solid #6E8C63;
  border-radius: 24px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn-apply:hover {
  background: #516A48;
  border-color: #516A48;
}

/* Filter Drawer Responsive - Mobile Full Width */
@media (max-width: 767px) {
  .filter-drawer {
    max-width: 100%;
  }

  .filter-drawer-header {
    padding: 20px;
  }

  .filter-drawer-title {
    font-size: 16px;
  }

  .filter-drawer-close {
    width: 44px;
    height: 44px;
  }

  .filter-drawer-close svg {
    width: 22px;
    height: 22px;
  }

  .filter-drawer-content {
    padding: 20px;
  }

  /* Reduce section spacing on mobile */
  .filter-section {
    margin-bottom: 20px;
  }

  /* Touch targets for category pills */
  .filter-category-btn {
    padding: 8px 14px;
    font-size: 12px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Checkbox tap area */
  .filter-checkbox {
    padding: 6px 0;
    min-height: 40px;
  }

  .filter-checkbox-mark {
    width: 20px;
    height: 20px;
  }

  .filter-checkbox-label {
    font-size: 13px;
  }

  /* Price inputs */
  .price-input-group input {
    padding: 10px 14px;
    font-size: 16px; /* Prevents iOS zoom on focus */
    min-height: 44px;
  }

  .price-input-group label {
    font-size: 12px;
  }

  /* Select dropdown */
  .filter-select {
    padding: 10px 36px 10px 14px;
    font-size: 16px;
    min-height: 44px;
  }

  /* Footer buttons */
  .filter-drawer-footer {
    padding: 12px 20px;
    gap: 10px;
  }

  .filter-btn-reset,
  .filter-btn-apply {
    padding: 10px 16px;
    font-size: 13px;
    min-height: 44px;
  }
}

/* Extra small devices */
@media (max-width: 375px) {
  .filter-drawer-header {
    padding: 12px 16px;
  }

  .filter-drawer-content {
    padding: 16px;
  }

  .filter-drawer-footer {
    padding: 10px 16px;
  }

  .filter-category-btn {
    padding: 6px 12px;
    font-size: 11px;
    min-height: 36px;
  }
}

/* Active Filters Summary (opzionale) */
.active-filters-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f5f5f5;
  border-radius: 20px;
  font-size: 12px;
  color: #41351D;
}

.active-filter-tag button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  color: #968668;
}

.active-filter-tag button:hover {
  color: #A3492E;
}

/* ============================================
   ACTIVE FILTERS CONTAINER (Woodmart Style)
   ============================================ */
.active-filters-container {
  margin-bottom: 20px;
}

.reset-all-filters {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: transparent;
  border: 1px solid #d5cbbe;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
  color: #41351D;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reset-all-filters:hover {
  background: #A3492E;
  border-color: #A3492E;
  color: white;
}

.reset-all-filters svg {
  stroke: currentColor;
}

.active-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px 4px 10px;
  background: #f5f0e8;
  border: 1px solid #d5cbbe;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
  color: #41351D;
  transition: all 0.2s ease;
  line-height: 1.3;
}

.filter-tag:hover {
  background: #ebe5da;
  border-color: #968668;
}

.filter-tag-label {
  font-weight: 400;
  opacity: 0.6;
}

.filter-tag-value {
  font-weight: 600;
}

.filter-tag-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin: -4px -2px -4px 0;
  color: #968668;
  transition: color 0.2s ease;
  min-width: 28px;
  min-height: 28px;
}

.filter-tag-remove:hover {
  color: #A3492E;
}

.filter-tag-remove svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  stroke-width: 2.5;
}

@media (max-width: 767px) {
  /* Mobile: Woodmart style - horizontal scroll con Reset a sinistra */
  .active-filters-container {
    margin-bottom: 15px;
  }

  .active-filters-container > .flex {
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 8px;
    margin-bottom: -8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .active-filters-container > .flex::-webkit-scrollbar {
    display: none;
  }

  .reset-all-filters {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 12px;
    scroll-snap-align: start;
  }

  .active-filter-tags {
    flex-shrink: 0;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .filter-tag {
    flex-shrink: 0;
    padding: 6px 6px 6px 12px;
    font-size: 12px;
    gap: 4px;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .filter-tag-remove {
    padding: 10px;
    margin: -6px -2px -6px 0;
    min-width: 34px;
    min-height: 34px;
  }

  .filter-tag-remove svg {
    width: 14px;
    height: 14px;
  }
}

/* ============================================
   WOOCOMMERCE PAGINATION - Minimal Style
   ============================================ */
.woocommerce-pagination {
  margin-top: 120px;
  margin-bottom: 40px;
}

.woocommerce-pagination ul,
.woocommerce-pagination ul.page-numbers {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px !important;
  list-style: none;
  padding: 0;
  margin: 0;
  border: none !important;
}

.woocommerce-pagination ul li {
  margin: 0 !important;
  margin-right: 4px !important;
  margin-left: 4px !important;
  padding: 0;
  border: none !important;
  list-style: none;
  border-top: none !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
}

.woocommerce-pagination ul li::before,
.woocommerce-pagination ul li::after {
  display: none !important;
  content: none !important;
}

.woocommerce-pagination ul li a::before,
.woocommerce-pagination ul li a::after,
.woocommerce-pagination ul li span::before,
.woocommerce-pagination ul li span::after {
  display: none !important;
  content: none !important;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span,
.woocommerce-pagination ul li a.page-numbers,
.woocommerce-pagination ul li span.page-numbers {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  padding: 0;
  margin: 0 !important;
  font-size: 14px;
  font-weight: 500;
  color: #968668;
  background: #eeeeee;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.woocommerce-pagination ul li a:focus-visible {
  outline: 2px solid var(--col-verde);
  outline-offset: 2px;
}

.woocommerce-pagination ul li a:hover {
  color: #41351D;
  background: #dddddd;
}

/* Current page */
.woocommerce-pagination ul li span.current {
  color: #ffffff !important;
  font-weight: 600;
  position: relative;
  background: #b17136 !important;
}

.woocommerce-pagination ul li span.current::after {
  display: none;
}

/* Previous and Next arrows */
.woocommerce-pagination ul li .prev,
.woocommerce-pagination ul li .next {
  font-weight: 500;
  color: #41351D;
  background: #eeeeee;
}

.woocommerce-pagination ul li .prev:hover,
.woocommerce-pagination ul li .next:hover {
  color: #B17136;
  background: #dddddd;
}

/* Dots */
.woocommerce-pagination ul li span.dots {
  min-width: auto;
  background: transparent;
  border-radius: 0;
  color: #968668;
}

/* Mobile */
@media (max-width: 767px) {
  .woocommerce-pagination {
    margin-top: 120px;
    margin-bottom: 30px;
  }

  .woocommerce-pagination ul li a,
  .woocommerce-pagination ul li span {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    font-size: 13px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* ============================================
   SHOP GRID COLUMNS - Dynamic via JS
   Alta specificità per sovrascrivere Tailwind
   ============================================ */

/* Desktop: sovrascrive qualsiasi altra regola grid */
@media (min-width: 1024px) {
  /* Reset default - tutte le griglie prodotti partono con 4 colonne */
  #product-grid-container ul.products,
  .woocommerce ul.products {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Classi dinamiche per cambio colonne */
  #product-grid-container ul.products.shop-cols-2,
  .woocommerce ul.products.shop-cols-2,
  ul.products.shop-cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  #product-grid-container ul.products.shop-cols-3,
  .woocommerce ul.products.shop-cols-3,
  ul.products.shop-cols-3 {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  #product-grid-container ul.products.shop-cols-4,
  .woocommerce ul.products.shop-cols-4,
  ul.products.shop-cols-4 {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  #product-grid-container ul.products.shop-cols-5,
  .woocommerce ul.products.shop-cols-5,
  ul.products.shop-cols-5 {
    grid-template-columns: repeat(5, 1fr) !important;
  }
}

/* ============================================
   PRODUCT ACCORDION - Single Product Page
   ============================================ */

/* Accordion content formatting */
.accordion-content {
  overflow: hidden;
  transition: max-height 0.4s ease-out, opacity 0.4s ease-out, padding-top 0.4s ease-out, padding-bottom 0.4s ease-out;
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.accordion-content.accordion-open {
  max-height: 5000px;
  opacity: 1;
  padding-top: 10px;
  padding-bottom: 0;
  pointer-events: auto;
}

.accordion-content.accordion-closing {
  transition: max-height 0.25s ease-in, opacity 0.2s ease-in 0.05s, padding-top 0.25s ease-in, padding-bottom 0.25s ease-in;
  pointer-events: none;
}

.accordion-content ul,
.accordion-content ol {
  padding-left: 20px;
  margin-bottom: 10px;
}

.accordion-content li {
  margin-bottom: 5px;
}

.accordion-content strong {
  font-weight: 600;
}

/* Accordion icon rotation */
.accordion-icon {
  transition: transform 0.3s ease-out;
}

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

.woocommerce .woocommerce-ordering {
  margin: 0 !important;
  background: #eeeeee !important;
  border-radius: 9999px !important;
  padding: 6px 16px !important;
}

.woocommerce .woocommerce-ordering select#orderBy {
  border: 0px solid #ffffff !important;
}

/* ============================================
   BLOG ARTICLE STYLES - La Nostra Cucina
   Premium recipe blog UX
   ============================================ */

/* Article wrapper */
.molino-article {
  max-width: 740px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.8;
  color: #41351D;
}

.molino-article p {
  margin-bottom: 1.5em;
}

.molino-article h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: #41351D;
  margin-top: 2.5em;
  margin-bottom: 0.8em;
  line-height: 1.3;
  position: relative;
  padding-bottom: 12px;
}

.molino-article h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: #E49954;
  border-radius: 2px;
}

.molino-article h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #5F4F31;
  margin-top: 2em;
  margin-bottom: 0.6em;
  line-height: 1.4;
}

.molino-article h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #5F4F31;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.molino-article strong {
  color: #41351D;
  font-weight: 600;
}

/* Lead paragraph */
.molino-lead {
  font-size: 20px;
  line-height: 1.7;
  color: #5F4F31;
  border-left: 4px solid #E49954;
  padding-left: 20px;
  margin-bottom: 2em !important;
}

.molino-lead em {
  font-style: italic;
}

/* Recipe Card */
.molino-recipe-card {
  background: linear-gradient(135deg, #faf8f5 0%, #f5f0ea 100%);
  border: 1px solid #e8e0d4;
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 2.5em;
  box-shadow: 0 2px 12px rgba(95, 79, 49, 0.06);
}

.molino-recipe-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.molino-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.molino-badge--category {
  background: #6E8C63;
  color: #fff;
}

.molino-badge--difficulty {
  background: #E49954;
  color: #fff;
}

.molino-badge--medium {
  background: #d4883f;
  color: #fff;
}

.molino-badge--hard {
  background: #B17136;
  color: #fff;
}

.molino-recipe-card__details {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.molino-recipe-card__item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5F4F31;
}

.molino-recipe-card__item svg {
  flex-shrink: 0;
  color: #E49954;
  stroke: #E49954;
}

.molino-recipe-card__item span {
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.4;
}

.molino-recipe-card__item span strong {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a7a5f;
  font-weight: 500;
}

/* Chef tip blockquote */
.molino-chef-tip {
  background: linear-gradient(135deg, #fdf8f3 0%, #faf3ea 100%);
  border: none !important;
  border-left: 4px solid #E49954 !important;
  border-radius: 0 12px 12px 0;
  padding: 24px 28px !important;
  margin: 2em 0 !important;
  font-size: 16px;
  line-height: 1.7;
  color: #5F4F31;
  position: relative;
}

.molino-chef-tip::before {
  content: '\201C';
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 60px;
  color: #E49954;
  opacity: 0.15;
  font-family: Georgia, serif;
  line-height: 1;
}

.molino-chef-tip p {
  margin: 0 !important;
}

.molino-chef-tip strong {
  color: #B17136;
}

/* Ingredients list */
.molino-ingredients {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 2em !important;
  background: #faf8f5;
  border-radius: 12px;
  padding: 24px 28px !important;
}

.molino-ingredients li {
  padding: 10px 0;
  border-bottom: 1px solid #ece6dc;
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.molino-ingredients li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.molino-ingredients li:first-child {
  padding-top: 0;
}

.molino-ingredients li strong {
  color: #B17136;
  font-weight: 700;
  min-width: fit-content;
  margin-right: 6px;
}

/* Preparation steps */
.molino-steps {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 2.5em !important;
  counter-reset: none;
}

.molino-steps > li {
  margin-bottom: 0;
  padding: 0;
}

.molino-steps > li + li {
  margin-top: 4px;
}

.molino-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid #f0ebe4;
}

.molino-steps > li:last-child .molino-step {
  border-bottom: none;
}

.molino-step__number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6E8C63 0%, #5a7a51 100%);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: 0 2px 6px rgba(110, 140, 99, 0.25);
}

.molino-step__content {
  flex: 1;
}

.molino-step__content p {
  margin: 0 !important;
  font-size: 16px;
  line-height: 1.7;
}

/* Product highlight */
.molino-product-highlight {
  background: linear-gradient(135deg, #41351D 0%, #5F4F31 100%);
  color: #f5f0ea;
  border-radius: 16px;
  padding: 32px 36px;
  margin-top: 3em;
  position: relative;
  overflow: hidden;
}

.molino-product-highlight::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(228, 153, 84, 0.1);
}

.molino-product-highlight h3 {
  color: #E49954 !important;
  font-size: 18px;
  margin-top: 0 !important;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.molino-product-highlight p {
  color: #e8e0d4;
  margin-bottom: 0 !important;
  font-size: 16px;
  line-height: 1.7;
}

.molino-product-highlight strong {
  color: #fff;
}

/* Magazine article specifics */
.molino-article--magazine h2::after {
  width: 60px;
}

.molino-toc {
  background: #faf8f5;
  border: 1px solid #e8e0d4;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 2.5em;
}

.molino-toc h3 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a7a5f;
  margin-top: 0 !important;
  margin-bottom: 16px;
}

.molino-toc ol {
  padding-left: 20px;
  margin: 0;
}

.molino-toc li {
  padding: 6px 0;
  font-size: 15px;
  line-height: 1.5;
}

.molino-toc a {
  color: #5F4F31;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.molino-toc a:hover {
  color: #E49954;
  border-bottom-color: #E49954;
}

/* Info box */
.molino-info-box {
  background: #f0f7ed;
  border-left: 4px solid #6E8C63;
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 1.5em 0;
  font-size: 15px;
}

.molino-info-box strong {
  color: #6E8C63;
}

/* Warning box */
.molino-warning-box {
  background: #fdf5ed;
  border-left: 4px solid #E49954;
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 1.5em 0;
  font-size: 15px;
}

/* Data table */
.molino-article table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e8e0d4;
  border-radius: 12px;
  overflow: hidden;
  margin: 1.5em 0;
  font-size: 15px;
}

.molino-article th {
  background: #41351D;
  color: #f5f0ea;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.molino-article td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0ebe4;
}

.molino-article tr:last-child td {
  border-bottom: none;
}

.molino-article tr:nth-child(even) td {
  background: #faf8f5;
}

/* Pull quote */
.molino-pull-quote {
  font-size: 24px;
  font-style: italic;
  color: #5F4F31;
  text-align: center;
  padding: 32px 40px;
  margin: 2em 0;
  border-top: 2px solid #e8e0d4;
  border-bottom: 2px solid #e8e0d4;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .molino-article {
    font-size: 16px;
  }

  .molino-article h2 {
    font-size: 24px;
    margin-top: 2em;
  }

  .molino-article h3 {
    font-size: 20px;
  }

  .molino-lead {
    font-size: 18px;
    padding-left: 16px;
  }

  .molino-recipe-card {
    padding: 20px 22px;
    border-radius: 12px;
  }

  .molino-recipe-card__details {
    gap: 20px;
  }

  .molino-chef-tip {
    padding: 20px 22px !important;
  }

  .molino-ingredients {
    padding: 18px 20px !important;
  }

  .molino-step {
    gap: 14px;
  }

  .molino-step__number {
    min-width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .molino-product-highlight {
    padding: 24px 26px;
    border-radius: 12px;
  }

  .molino-pull-quote {
    font-size: 20px;
    padding: 24px 20px;
  }
}

/* ============================================
   GLOBAL LINK STYLES - Override WordPress blue
   Consistent with brand colors throughout
   ============================================ */

/* Global link color - brown-dark instead of blue */
a {
  color: inherit;
}

/* Content links inside blog posts - verde-dark with underline */
.single-content a,
.molino-article a {
  color: #516A48;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.single-content a:hover,
.molino-article a:hover {
  color: #B17136;
  text-decoration-color: #B17136;
}

/* Category links in post meta (single post) */
.single-content .cat-links a,
article .cat-links a,
.post-categories a,
article .entry-meta a {
  color: #41351D;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.single-content .cat-links a:hover,
article .cat-links a:hover,
.post-categories a:hover,
article .entry-meta a:hover {
  color: #B17136;
}

/* the_category() output links */
.flex.items-center.gap-\[15px\] a {
  color: #41351D !important;
  text-decoration: none !important;
  font-weight: 500;
  transition: color 0.2s ease;
}

.flex.items-center.gap-\[15px\] a:hover {
  color: #B17136 !important;
}

/* Tag links */
.tags-links a,
article a[rel="tag"] {
  color: #5F4F31;
  text-decoration: none;
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid #e8e0d4;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  transition: all 0.2s ease;
}

.tags-links a:hover,
article a[rel="tag"]:hover {
  color: #B17136;
  border-color: #B17136;
  background: #fdf5ed;
}

/* WordPress pagination links */
.nav-links a,
.page-numbers a,
a.page-numbers {
  color: #41351D !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #e8e0d4;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.page-numbers a:hover,
a.page-numbers:hover {
  color: #B17136 !important;
  border-color: #B17136;
  background: #fdf5ed;
}

.nav-links .current,
span.page-numbers.current {
  background: #E49954;
  color: #fff !important;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Comment links */
.comment-content a {
  color: #516A48;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.comment-content a:hover {
  color: #B17136;
}

/* WooCommerce product links - already handled but ensure no blue */
.woocommerce a,
.woocommerce-page a {
  color: inherit;
}

/* Breadcrumb links */
nav[aria-label] ol a {
  text-decoration: none;
}

/* Widget links */
.widget a {
  color: #41351D;
  text-decoration: none;
  transition: color 0.2s ease;
}

.widget a:hover {
  color: #B17136;
}

/* Footer links */
footer a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   ARCHIVE PAGE STYLES
   ============================================ */

/* Archive breadcrumb separator */
nav[aria-label="Breadcrumb"] ol li {
  display: flex;
  align-items: center;
}

/* ============================================
   SR-ONLY - Screen reader only utility
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   GLOBAL FOCUS STATES - Accessibility
   ============================================ */

/* Generic focus ring for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--col-verde);
  outline-offset: 2px;
}

/* Splide arrows */
.splide__arrow:focus-visible {
  outline: 2px solid var(--col-verde);
  outline-offset: 2px;
}

/* Filter buttons */
.filter-toggle-btn:focus-visible,
.filter-btn-reset:focus-visible,
.filter-btn-apply:focus-visible,
.per-page-link:focus-visible,
.blog-filter-btn:focus-visible,
.subcategory-pill:focus-visible,
.subsubcategory-pill:focus-visible,
.filter-tag-remove:focus-visible {
  outline: 2px solid var(--col-verde);
  outline-offset: 2px;
}

/* Accordion buttons */
.accordion-btn:focus-visible {
  outline: 2px solid var(--col-verde);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Template button focus */
.molino-btn:focus-visible {
  outline: 2px solid var(--col-verde);
  outline-offset: 3px;
}

/* Form inputs - 16px on mobile prevents iOS zoom */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="number"],
  input[type="password"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Pagination margin fix */
.woocommerce-pagination {
  margin-top: 60px !important;
}

/* Skip to content - visible on focus */
.sr-only.focus\:not-sr-only:focus {
  position: fixed;
  width: auto;
  height: auto;
  padding: 12px 20px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
}

/* ============================================
   MOBILE USABILITY ENHANCEMENTS
   ============================================ */

/* --- 1.1 Sticky Add-to-Cart Bar (Mobile only) --- */
.molino-sticky-cart {
  display: none;
}

@media (max-width: 767px) {
  .molino-sticky-cart {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 12px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
  }

  .molino-sticky-cart.is-visible {
    transform: translateY(0);
  }

  .molino-sticky-cart__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
  }

  .molino-sticky-cart__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
  }

  .molino-sticky-cart__name {
    font-size: 13px;
    font-weight: 600;
    color: #41351D;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
  }

  .molino-sticky-cart__price {
    font-size: 14px;
    font-weight: 700;
    color: #B17136;
    line-height: 1.3;
  }

  .molino-sticky-cart__price del {
    font-size: 12px;
    color: #999;
  }

  .molino-sticky-cart__btn {
    flex-shrink: 0;
    background: #B17136;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s ease;
    min-height: 44px;
  }

  .molino-sticky-cart__btn:active {
    background: #9a6030;
  }

  /* --- 1.3 Quantity + Button full-width on mobile --- */
  .molino-add-to-cart-section .variations_form .single_add_to_cart_button,
  .molino-add-to-cart-section .cart .single_add_to_cart_button {
    width: 100% !important;
  }

  .molino-add-to-cart-section .cart .quantity,
  .molino-add-to-cart-section .variations_form .woocommerce-variation-add-to-cart .quantity {
    width: 100% !important;
    justify-content: center !important;
    margin-bottom: 12px !important;
  }

  /* --- 1.4 Gallery thumbnails touch-friendly --- */
  .molino-product-gallery-wrapper .flex-control-thumbs li,
  .molino-product-gallery-wrapper .thumbnail-item {
    min-height: 44px;
  }

  .molino-product-gallery-wrapper .flex-control-thumbs {
    gap: 8px !important;
  }

  /* --- 2.2 Mobile submenu links touch targets --- */
  .mobile-submenu a {
    padding: 12px 0 12px 20px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
  }

  /* --- 2.3 Footer navigation links touch targets --- */
  #site-footer nav a,
  #site-footer .flex.flex-col a {
    padding: 10px 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* PayPal Pay Later messaging widget (iniettato via SDK PayPal):
   stacchiamo dal box riepilogo ordine sul checkout. */
body.woocommerce-checkout .message__container,
body.woocommerce-checkout div[data-pp-message],
body.woocommerce-checkout .pp-message,
body.woocommerce-checkout .paypal-installment-message {
  margin-top: 24px;
  margin-bottom: 8px;
}

/* ============================================================================
 * CHECKOUT REDESIGN 2026
 * Solo CSS, opera sui blocchi WooCommerce gia' presenti nella pagina Pagamento.
 * Riferimento: docs/checkout-block-markup.md
 * ============================================================================ */

/* ---------- Container + columns ---------- */
body.woocommerce-checkout .wc-block-checkout,
body.woocommerce-checkout .wp-block-woocommerce-checkout {
  background: transparent !important;
}

body.woocommerce-checkout .wc-block-checkout__main {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

/* Nascondi blocchi vuoti (es. shipping-method/pickup-options se Local Pickup
   non e' abilitato in WooCommerce -> Impostazioni -> Spedizione) per evitare
   card bianche vuote senza contenuto. */
body.woocommerce-checkout [class*="wp-block-woocommerce-checkout-"][class*="-block"]:empty {
  display: none !important;
}

/* ---------- Ogni blocco "step" diventa una card ---------- */
body.woocommerce-checkout .wp-block-woocommerce-checkout-contact-information-block,
body.woocommerce-checkout .wp-block-woocommerce-checkout-shipping-method-block,
body.woocommerce-checkout .wp-block-woocommerce-checkout-pickup-options-block,
body.woocommerce-checkout .wp-block-woocommerce-checkout-shipping-address-block,
body.woocommerce-checkout .wp-block-woocommerce-checkout-billing-address-block,
body.woocommerce-checkout .wp-block-woocommerce-checkout-shipping-methods-block,
body.woocommerce-checkout .wp-block-woocommerce-checkout-payment-block,
body.woocommerce-checkout .wp-block-woocommerce-checkout-additional-information-block,
body.woocommerce-checkout .wp-block-woocommerce-checkout-order-note-block {
  background: #ffffff !important;
  border: 1px solid rgba(95, 79, 49, 0.15) !important;
  border-radius: 12px !important;
  padding: 24px !important;
  box-shadow: 0 1px 3px rgba(95, 79, 49, 0.04) !important;
}

/* Override: se il blocco e' vuoto, non applicare lo stile card (per sicurezza
   nel caso in cui :empty non matchasse per via di whitespace). */
body.woocommerce-checkout .wp-block-woocommerce-checkout-shipping-method-block:not(:has(*)),
body.woocommerce-checkout .wp-block-woocommerce-checkout-pickup-options-block:not(:has(*)) {
  display: none !important;
}

/* Titolo di ciascuna sezione */
body.woocommerce-checkout .wc-block-components-checkout-step__title {
  font-family: 'Poppins', sans-serif !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #41351D !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
}

body.woocommerce-checkout .wc-block-components-checkout-step__description {
  font-size: 13px !important;
  color: #968668 !important;
  margin-top: -8px !important;
  margin-bottom: 14px !important;
}

/* ---------- Form input (con float-label) ---------- */
/* Padding-top maggiorato per lasciare spazio alla floating label sopra
   il valore digitato, evitando sovrapposizione testo/label.
   line-height ridotta per centrare meglio il valore. */
body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-text-input textarea,
body.woocommerce-checkout .wc-block-components-select select,
body.woocommerce-checkout .wc-block-components-combobox input {
  background-color: #fafaf7 !important;
  border: 1.5px solid rgba(95, 79, 49, 0.15) !important;
  border-radius: 8px !important;
  min-height: 56px !important;
  padding: 22px 14px 8px 14px !important;
  /* >=16px evita zoom auto su iOS */
  font-size: 16px !important;
  line-height: 1.2 !important;
  color: #41351D !important;
  box-sizing: border-box !important;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s !important;
}

body.woocommerce-checkout .wc-block-components-text-input textarea {
  min-height: 96px !important;
  padding-top: 26px !important;
}

body.woocommerce-checkout .wc-block-components-text-input input:focus,
body.woocommerce-checkout .wc-block-components-text-input textarea:focus,
body.woocommerce-checkout .wc-block-components-select select:focus,
body.woocommerce-checkout .wc-block-components-combobox input:focus {
  background: #ffffff !important;
  border-color: #6E8C63 !important;
  box-shadow: 0 0 0 3px rgba(110, 140, 99, 0.15) !important;
  outline: none !important;
}

/* Float label: stato "compresso" (sempre in alto, piccola) quando
   il campo è attivo/pieno. Allineata al padding-top dell'input. */
body.woocommerce-checkout .wc-block-components-text-input.is-active label,
body.woocommerce-checkout .wc-block-components-text-input:focus-within label,
body.woocommerce-checkout .wc-block-components-combobox.is-active label,
body.woocommerce-checkout .wc-block-components-combobox:focus-within label,
body.woocommerce-checkout .wc-block-components-select.is-active label,
body.woocommerce-checkout .wc-block-components-select:focus-within label {
  top: 8px !important;
  left: 14px !important;
  transform: none !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #968668 !important;
  line-height: 1 !important;
  padding: 0 !important;
  background: transparent !important;
  letter-spacing: 0.2px !important;
}

/* Float label: stato "vuoto" (al centro come placeholder) */
body.woocommerce-checkout .wc-block-components-text-input:not(.is-active) label,
body.woocommerce-checkout .wc-block-components-combobox:not(.is-active) label,
body.woocommerce-checkout .wc-block-components-select:not(.is-active) label {
  top: 50% !important;
  left: 14px !important;
  transform: translateY(-50%) !important;
  font-size: 14px !important;
  color: #968668 !important;
  background: transparent !important;
  padding: 0 !important;
  line-height: 1 !important;
}

/* ---------- Radio options (Shipping methods / Payment methods) ---------- */
/* Struttura WC Blocks:
   <label.option>
     <input.input type=radio>   <- WC default: position:absolute; left:16px; top:16px
     <div.option-layout>
       <div.label-group>
         <span.label>Titolo</span>
         <span.secondary-label>Prezzo</span>
       </div>
       <div.description-group> (opzionale)
         <span.description>...</span>
       </div>
     </div>
   </label>
   Usiamo CSS GRID per essere a prova di WC defaults: 2 colonne
   (radio | contenuto) con override esplicito di position:absolute. */
body.woocommerce-checkout .wc-block-components-radio-control__option {
  /* Flex (più affidabile del grid per centrare verticalmente quando i
     contenuti hanno line-height variabile, es. PayPal label con icons div) */
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  column-gap: 14px !important;

  width: 100% !important;
  box-sizing: border-box !important;
  border: 1.5px solid rgba(95, 79, 49, 0.15) !important;
  border-radius: 8px !important;
  padding: 14px 16px !important;
  margin: 0 0 10px !important;
  background: #ffffff !important;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s !important;
  cursor: pointer !important;
  position: relative !important;
}

body.woocommerce-checkout .wc-block-components-radio-control__option:last-child {
  margin-bottom: 0 !important;
}

body.woocommerce-checkout .wc-block-components-radio-control__option:hover {
  border-color: #C9BCA4 !important;
}

body.woocommerce-checkout .wc-block-components-radio-control__option-checked,
body.woocommerce-checkout .wc-block-components-radio-control__option--checked,
body.woocommerce-checkout .wc-block-components-radio-control__option--checked-option-highlighted,
body.woocommerce-checkout .wc-block-components-radio-control__option[data-checked="true"],
body.woocommerce-checkout .wc-block-components-radio-control__option:has(input:checked) {
  border-color: #6E8C63 !important;
  background-color: rgba(110, 140, 99, 0.05) !important;
  box-shadow: 0 0 0 1px #6E8C63 !important;
}

/* Radio input: forziamo position:static (WC default è absolute) e lo
   posizioniamo come prima colonna del grid. Disegniamo il radio
   interamente via CSS (appearance:none + background radial-gradient)
   così non dipendiamo dal rendering nativo del browser ne' da pseudo
   di WC che potrebbero disegnare un "checked dot" altrove. */
body.woocommerce-checkout .wc-block-components-radio-control__input,
body.woocommerce-checkout .wc-block-components-radio-control__input[type="radio"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  position: static !important;
  align-self: center !important;
  /* WC applica un transform: translateY(-45%) per centrare l'input
     che ASSUME posizionamento absolute. Visto che noi usiamo static,
     il transform crea un offset di -9px che disallinea il radio col
     testo. Lo annulliamo. */
  transform: none !important;
  -webkit-transform: none !important;
  flex: 0 0 20px !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  cursor: pointer !important;
  background: #ffffff !important;
  border: 1.5px solid #C9BCA4 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  outline: none !important;
  transition: border-color 0.15s, background 0.15s !important;
}

/* Stato checked: radial-gradient disegna il punto verde al centro */
body.woocommerce-checkout .wc-block-components-radio-control__input:checked,
body.woocommerce-checkout .wc-block-components-radio-control__input[type="radio"]:checked {
  border-color: #6E8C63 !important;
  background: radial-gradient(circle, #6E8C63 0 5px, #ffffff 6px 100%) !important;
}

body.woocommerce-checkout .wc-block-components-radio-control__input:focus-visible {
  box-shadow: 0 0 0 3px rgba(110, 140, 99, 0.25) !important;
}

/* Sopprime QUALSIASI pseudo che WooCommerce o altri plugin potrebbero
   disegnare sull'input radio (a volte un secondo "dot" appariva al
   centro della riga su versioni specifiche di WC). */
body.woocommerce-checkout .wc-block-components-radio-control__input::before,
body.woocommerce-checkout .wc-block-components-radio-control__input::after,
body.woocommerce-checkout .wc-block-components-radio-control__option > input[type="radio"]::before,
body.woocommerce-checkout .wc-block-components-radio-control__option > input[type="radio"]::after {
  display: none !important;
  content: none !important;
}

/* Contenuto a destra del radio: occupa il resto della riga flex */
body.woocommerce-checkout .wc-block-components-radio-control__option-layout {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: stretch !important;
  align-self: center !important;
  gap: 4px !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  position: static !important;
}

/* Gruppo label (titolo a sinistra + prezzo/secondary a destra in linea) */
body.woocommerce-checkout .wc-block-components-radio-control__label-group {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 4px 12px !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* Gruppo description (descrizione esplicativa sotto al titolo) */
body.woocommerce-checkout .wc-block-components-radio-control__description-group {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  flex: none !important;
}

body.woocommerce-checkout .wc-block-components-radio-control__label {
  font-weight: 600 !important;
  font-size: 14px !important;
  color: #41351D !important;
  line-height: 1.3 !important;
  /* inline-flex per centrare verticalmente eventuali wrapper interni
     (es. payment-method-icons div che WC inietta nei label di pagamento) */
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-align: left !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

/* Span e wrapper interni del label (es. WC inietta <span>Testo</span>
   dentro al label per le payment methods con icone) */
body.woocommerce-checkout .wc-block-components-radio-control__label > span {
  display: inline-block !important;
  vertical-align: middle !important;
  line-height: 1.3 !important;
}

/* Payment methods icons: nascondiamo i wrapper vuoti per non creare
   spazio fantasma nel layout */
body.woocommerce-checkout .wc-block-components-payment-method-icons:empty {
  display: none !important;
}
body.woocommerce-checkout .wc-block-components-payment-method-icons {
  flex-shrink: 0 !important;
  margin: 0 !important;
  align-items: center !important;
}

/* Secondary-label (prezzo "8,90 €") allineato a destra sulla stessa riga */
body.woocommerce-checkout .wc-block-components-radio-control__secondary-label {
  font-weight: 600 !important;
  color: #41351D !important;
  font-size: 14px !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  text-align: right !important;
  flex: 0 0 auto !important;
  margin-left: auto !important;
}

/* Descrizione (es. "Facendo clic su 'Procedi su PayPal'...") sotto e allineata a sinistra */
body.woocommerce-checkout .wc-block-components-radio-control__description,
body.woocommerce-checkout .wc-block-components-radio-control__secondary-description {
  display: block !important;
  width: 100% !important;
  font-size: 12px !important;
  color: #968668 !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  text-align: left !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ---------- Place Order CTA (Arancio brand, come da mockup) ---------- */
body.woocommerce-checkout .wc-block-components-checkout-place-order-button,
body.woocommerce-checkout .wp-block-woocommerce-checkout-actions-block .wc-block-components-button {
  background-color: #B17136 !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 8px !important;
  padding: 16px 20px !important;
  min-height: 56px !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  width: 100% !important;
  box-shadow: 0 4px 14px rgba(177, 113, 54, 0.3) !important;
  transition: all 0.2s !important;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover,
body.woocommerce-checkout .wp-block-woocommerce-checkout-actions-block .wc-block-components-button:hover {
  background-color: #41351D !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 22px rgba(95, 79, 49, 0.25) !important;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout-actions-block {
  margin-top: 4px !important;
}

/* ---------- Terms + Order note (NON come card piena: solo padding leggero) ---------- */
body.woocommerce-checkout .wp-block-woocommerce-checkout-terms-block {
  padding: 4px 4px !important;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout-order-note-block {
  /* riprende lo stile card delle altre sezioni — gia' gestito sopra */
}

/* ---------- Order Summary (sidebar) ---------- */
body.woocommerce-checkout .wc-block-checkout__sidebar {
  position: sticky !important;
  top: 90px !important;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block {
  background: #ffffff !important;
  border: 1px solid rgba(95, 79, 49, 0.15) !important;
  border-radius: 12px !important;
  padding: 24px !important;
  box-shadow: 0 1px 3px rgba(95, 79, 49, 0.04) !important;
}

/* Sovrascrive il bg #F8F8F8 esistente del totals wrapper sul checkout */
body.woocommerce-checkout .wc-block-cart__totals-wrapper,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-totals-wrapper {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

body.woocommerce-checkout .wc-block-components-order-summary__title,
body.woocommerce-checkout .wc-block-checkout__sidebar h2 {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #41351D !important;
  margin-bottom: 18px !important;
}

/* Singolo item nel riepilogo */
body.woocommerce-checkout .wc-block-components-order-summary-item {
  padding: 10px 0 !important;
  border-bottom: 1px solid rgba(95, 79, 49, 0.08) !important;
}

body.woocommerce-checkout .wc-block-components-order-summary-item:last-child {
  border-bottom: 0 !important;
}

/* Totale finale: piu' grande, arancio per accent */
body.woocommerce-checkout .wc-block-components-totals-footer-item {
  padding-top: 14px !important;
  border-top: 1px solid rgba(95, 79, 49, 0.15) !important;
  margin-top: 8px !important;
}

body.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #41351D !important;
}

body.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #41351D !important;
}

/* Coupon */
body.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-coupon-form-block {
  padding: 14px 0 !important;
  border-bottom: 1px solid rgba(95, 79, 49, 0.08) !important;
  margin-bottom: 14px !important;
}

/* ---------- B2B "Richiedi fattura" - additional checkout fields ---------- */
body.woocommerce-checkout .wp-block-woocommerce-checkout-additional-information-block .wc-block-components-checkout-step__title {
  font-size: 16px !important;
}

/* Quando "Richiedi fattura" e' attivo, separare visivamente i campi B2B */
body.woocommerce-checkout .wc-block-components-checkbox[class*="richiedi-fattura"] {
  padding-bottom: 12px !important;
  margin-bottom: 4px !important;
  border-bottom: 1px solid rgba(95, 79, 49, 0.08) !important;
}

/* ---------- Notice / errori ---------- */
body.woocommerce-checkout .wc-block-components-notice-banner {
  border-radius: 8px !important;
  font-size: 13px !important;
}

/* ---------- RESPONSIVE: TABLET ---------- */
@media (max-width: 960px) {
  body.woocommerce-checkout .wc-block-checkout__sidebar {
    position: static !important;
  }
}

/* ---------- RESPONSIVE: MOBILE ---------- */
@media (max-width: 600px) {
  body.woocommerce-checkout .wc-block-checkout__main {
    gap: 14px !important;
  }

  body.woocommerce-checkout .wp-block-woocommerce-checkout-contact-information-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-shipping-method-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-pickup-options-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-shipping-address-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-billing-address-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-shipping-methods-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-payment-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-additional-information-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-order-note-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block {
    padding: 18px 16px !important;
    border-radius: 10px !important;
  }

  body.woocommerce-checkout .wc-block-components-checkout-step__title {
    font-size: 16px !important;
    margin-bottom: 14px !important;
  }

  body.woocommerce-checkout .wc-block-components-radio-control__option {
    padding: 12px 14px !important;
    column-gap: 12px !important;
  }

  body.woocommerce-checkout .wc-block-components-radio-control__input {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    flex: 0 0 18px !important;
  }

  body.woocommerce-checkout .wc-block-components-radio-control__label,
  body.woocommerce-checkout .wc-block-components-radio-control__secondary-label {
    font-size: 14px !important;
  }

  body.woocommerce-checkout .wc-block-components-radio-control__description,
  body.woocommerce-checkout .wc-block-components-radio-control__secondary-description {
    font-size: 12px !important;
  }

  /* Form input mobile: float-label leggermente più piccola */
  body.woocommerce-checkout .wc-block-components-text-input input,
  body.woocommerce-checkout .wc-block-components-text-input textarea,
  body.woocommerce-checkout .wc-block-components-select select,
  body.woocommerce-checkout .wc-block-components-combobox input {
    min-height: 54px !important;
    padding: 20px 12px 6px 12px !important;
  }

  body.woocommerce-checkout .wc-block-components-text-input.is-active label,
  body.woocommerce-checkout .wc-block-components-text-input:focus-within label,
  body.woocommerce-checkout .wc-block-components-combobox.is-active label,
  body.woocommerce-checkout .wc-block-components-combobox:focus-within label {
    top: 6px !important;
    left: 12px !important;
    font-size: 10px !important;
  }

  body.woocommerce-checkout .wc-block-components-checkout-place-order-button,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-actions-block .wc-block-components-button {
    min-height: 52px !important;
    font-size: 14px !important;
    padding: 14px !important;
    letter-spacing: 0.5px !important;
  }

  body.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-size: 22px !important;
  }
}

/* ---------- RESPONSIVE: MOBILE PICCOLO ---------- */
@media (max-width: 380px) {
  body.woocommerce-checkout .wp-block-woocommerce-checkout-contact-information-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-shipping-method-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-pickup-options-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-shipping-address-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-billing-address-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-shipping-methods-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-payment-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-additional-information-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-order-note-block,
  body.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block {
    padding: 16px 14px !important;
  }
}

