/*
 Theme Name: Red Stone Child
 Template: storefront
 Description: Child theme di Storefront per Red Stone — header con mega-dropdown + sidebar shop stile GSW
 Version: 4.9.1
 Author: Red Stone
*/

/* ============================================
   VARIABILI TEMA (colori brand)
   ============================================ */
:root {
  --rs-primary: #C0182A;     /* rosso principale */
  --rs-primary-rgb: 192,24,42;
  --rs-dark: #820000;        /* bordeaux scuro */
  --rs-ink: #1a1a1a;         /* testo / fondo scuro */
}

/* ============================================
   FULL WIDTH
   ============================================ */
.col-full {
  max-width: 100% !important;
  padding-left: 30px !important;
  padding-right: 30px !important;
}

/* ============================================
   HEADER — Sticky (posizione gestita da JS)
   ============================================ */
.site-header, #masthead,
header.site-header, header#masthead {
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  border: none !important;
  border-bottom: 2px solid var(--rs-dark) !important;
  box-shadow: none !important;
}
.site-header > .col-full, #masthead > .col-full,
header > .col-full, header.site-header > .col-full {
  padding: 0 !important;
  margin: 0 !important;
}
.rs-header-row {
  display: flex !important;
  align-items: flex-end !important;
  flex-wrap: nowrap !important;
  padding: 10px 30px 0 30px;
  gap: 0;
  position: relative;
}
.rs-header-spacer { flex: 1; order: 3; }

/* Logo */
.rs-header-row .site-branding {
  flex-shrink: 0;
  margin: 0 24px 0 0 !important;
  padding: 0 0 10px 0 !important;
  max-width: none !important;
  width: auto !important;
  order: 1;
}
.site-branding img, .custom-logo {
  max-height: 55px !important;
  max-width: 260px !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
}

/* ============================================
   MENU — LIVELLO 1 (tab principali)
   ============================================ */
.rs-header-row > ul.menu,
.rs-header-row > ul.nav-menu {
  display: flex !important;
  flex-direction: row !important;
  visibility: visible !important;
  opacity: 1 !important;
  max-height: none !important;
  overflow: visible !important;
  gap: 4px !important;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
  align-items: flex-end !important;
  flex-wrap: nowrap !important;
  flex-shrink: 0;
  order: 2;
}
.rs-header-row > ul.menu > li {
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  float: none !important;
  position: static !important;
}
.rs-header-row > ul.menu > li > a {
  display: inline-block !important;
  padding: 9px 20px !important;
  margin-bottom: -2px !important;
  border: 2px solid transparent !important;
  border-radius: 10px 10px 0 0 !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  color: #666 !important;
  background: transparent !important;
  transition: all 0.15s ease !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
}
.rs-header-row > ul.menu > li > a:hover,
.rs-header-row > ul.menu > li.rs-hover > a {
  color: var(--rs-dark) !important;
  border-color: var(--rs-dark) !important;
  border-bottom-color: #fff !important;
  background: #fdf0f0 !important;
}
/* Tab attiva L1 (pagina corrente) */
.rs-header-row > ul.menu > li.rs-active-tab > a {
  color: #fff !important;
  border-color: var(--rs-dark) !important;
  border-bottom-color: var(--rs-dark) !important;
  background: var(--rs-dark) !important;
  font-weight: 700 !important;
}
.rs-header-row > ul.menu > li.rs-active-tab.rs-hover > a {
  background: var(--rs-dark) !important;
  color: #fff !important;
  border-bottom-color: var(--rs-dark) !important;
}
/* Frecce submenu L1 */
.rs-header-row > ul.menu > li.menu-item-has-children > a::after {
  content: " ▾" !important;
  display: inline !important;
  font-size: 0.7rem !important;
  opacity: 0.7 !important;
  margin-left: 2px !important;
}
/* Hamburger nascosto desktop */
button.menu-toggle, .menu-toggle { display: none !important; }

/* ============================================
   MEGA-DROPDOWN (L2 + L3 in colonne)
   ============================================ */
.rs-header-row > ul.menu > li > ul {
  display: none !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 100% !important;
  z-index: 9998 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 24px 30px !important;
  background: #fff !important;
  border-bottom: 2px solid var(--rs-dark) !important;
  border-radius: 0 !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.08) !important;
  list-style: none !important;
  /* layout: colonne multiple */
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  gap: 18px 30px !important;
}
/* Apri mega su hover o click-open */
.rs-header-row > ul.menu > li:hover > ul,
.rs-header-row > ul.menu > li.rs-hover > ul,
.rs-header-row > ul.menu > li.rs-open > ul {
  display: grid !important;
}
/* Ogni item L2 diventa una colonna */
.rs-header-row > ul.menu > li > ul > li {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  width: auto !important;
  break-inside: avoid;
}
.rs-header-row > ul.menu > li > ul > li > a {
  display: block !important;
  padding: 6px 0 8px 0 !important;
  margin: 0 0 6px 0 !important;
  border: none !important;
  border-bottom: 2px solid #e8e0dc !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--rs-dark) !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  text-decoration: none !important;
  white-space: normal !important;
  transition: color 0.15s ease !important;
}
.rs-header-row > ul.menu > li > ul > li > a:hover {
  color: #5a0000 !important;
  background: transparent !important;
}
/* CTA speciale (Crea Targa / Crea Medaglietta) */
.rs-header-row > ul.menu > li > ul > li.rs-menu-cta > a {
  background: var(--rs-dark) !important;
  color: #fff !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  border-bottom: none !important;
  margin-bottom: 8px !important;
  text-align: center !important;
}
.rs-header-row > ul.menu > li > ul > li.rs-menu-cta > a:hover {
  background: #5a0000 !important;
  color: #fff !important;
}
/* L3 visibile sotto L2, lista verticale */
.rs-header-row > ul.menu > li > ul > li > ul {
  display: block !important;
  position: static !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  list-style: none !important;
}
.rs-header-row > ul.menu > li > ul > li > ul > li {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}
.rs-header-row > ul.menu > li > ul > li > ul > li > a {
  display: block !important;
  padding: 4px 0 !important;
  color: #555 !important;
  font-size: 0.8rem !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  background: transparent !important;
  border: none !important;
  text-decoration: none !important;
  transition: color 0.12s ease !important;
}
.rs-header-row > ul.menu > li > ul > li > ul > li > a:hover,
.rs-header-row > ul.menu > li > ul > li > ul > li.current-menu-item > a {
  color: var(--rs-dark) !important;
  background: transparent !important;
  padding-left: 4px !important;
}
/* L4 (se presente) — rientrata ulteriormente */
.rs-header-row > ul.menu > li > ul > li > ul > li > ul {
  display: block !important;
  position: static !important;
  margin: 2px 0 4px 12px !important;
  padding: 0 !important;
  list-style: none !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-left: 2px solid #e8e0dc !important;
  padding-left: 10px !important;
}
.rs-header-row > ul.menu > li > ul > li > ul > li > ul > li > a {
  display: block !important;
  padding: 3px 0 !important;
  color: #777 !important;
  font-size: 0.75rem !important;
  font-weight: 400 !important;
  text-decoration: none !important;
}
.rs-header-row > ul.menu > li > ul > li > ul > li > ul > li > a:hover {
  color: var(--rs-dark) !important;
}
/* Freccine submenu nel mega disattivate (livelli sono già visibili) */
.rs-header-row > ul.menu > li > ul li.menu-item-has-children > a::after {
  display: none !important;
}

/* ============================================
   RICERCA + CARRELLO
   ============================================ */
.rs-header-row .site-search {
  flex-shrink: 0; margin: 0 0 8px 0 !important; padding: 0 !important; order: 4;
}
.site-search .widget_product_search form { margin: 0 !important; display: flex; align-items: center; }
.site-search input[type="search"],
.widget_product_search input[type="search"] {
  border-radius: 20px 0 0 20px !important; border: 1.5px solid #e0ddd8 !important;
  border-right: none !important; padding: 6px 14px 6px 34px !important; font-size: .78rem !important;
  width: 140px; transition: width .25s ease;
}
.site-search input[type="search"]:focus { border-color: var(--rs-dark) !important; box-shadow: none !important; outline: none; width: 200px; }
.site-search button, .widget_product_search button {
  border-radius: 0 20px 20px 0 !important; background: var(--rs-dark) !important;
  border: 1.5px solid var(--rs-dark) !important; color: #fff !important;
  padding: 6px 12px !important; font-size: .78rem !important; cursor: pointer;
}
/* Nasconde il mini-cart dropdown nativo (usiamo la sidebar) */
.site-header-cart .widget_shopping_cart { display: none !important; }

/* ============================================
   ACCOUNT ICON
   ============================================ */
.rs-account-icon {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  margin: 0 0 8px 16px !important;
  text-decoration: none !important;
  color: #444 !important;
  flex-shrink: 0;
  order: 5;
  transition: color 0.15s ease;
}
.rs-account-icon:hover { color: var(--rs-dark) !important; }
.rs-account-icon svg { display: block; stroke: currentColor; }
.rs-account-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
  max-width: 70px;
  text-align: center;
  line-height: 1.3;
}

/* Badge "Listino B2B" o "Listino Cliente" */
.rs-listino-badge {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 3px;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--rs-primary);
  color: #fff !important;
  white-space: nowrap;
  line-height: 1.2;
  transition: all .15s ease;
}
.rs-account-icon.rs-account-b2b .rs-listino-badge {
  background: #2d5a27;
}
.rs-listino-badge[data-rs-switch] {
  cursor: pointer;
  position: relative;
  padding-right: 18px;
}
.rs-listino-badge[data-rs-switch]::after {
  content: "⇄";
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  opacity: 0.8;
}
.rs-listino-badge[data-rs-switch]:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* Cart con icona SVG */
.rs-header-row ul.site-header-cart { order: 6 !important; }
.site-header-cart .cart-contents {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
  text-decoration: none !important;
  color: #444 !important;
  font-size: 0 !important;
  transition: color 0.15s ease !important;
}
.site-header-cart .cart-contents:hover { color: var(--rs-dark) !important; }
.rs-cart-svg { display: block; line-height: 0; }
.rs-cart-svg svg { stroke: currentColor; display: block; }
.site-header-cart .cart-contents .amount { display: none !important; }
.site-header-cart .count {
  font-size: 0.7rem !important;
  background: var(--rs-primary) !important;
  color: #fff !important;
  border-radius: 10px !important;
  padding: 1px 7px !important;
  white-space: nowrap !important;
  font-weight: 700 !important;
}

/* ============================================
   BREADCRUMB — sfondo var(--rs-dark), posizione da JS
   ============================================ */
.storefront-breadcrumb, div.storefront-breadcrumb {
  margin: 0 !important;
  padding: 0 !important;
  background: var(--rs-dark) !important;
  border: none !important;
  display: block !important;
  visibility: visible !important;
}
.storefront-breadcrumb .col-full {
  margin: 0 !important; padding: 3px 30px !important;
  background: transparent !important; border: none !important; max-width: 100% !important;
}
.woocommerce-breadcrumb { margin: 0 !important; padding: 0 !important; font-size: .82rem !important; color: #fff !important; }
.woocommerce-breadcrumb a { color: rgba(255,255,255,.8) !important; text-decoration: none; }
.woocommerce-breadcrumb a:hover { color: #fff !important; text-decoration: underline; }

/* ============================================
   CONTENUTO
   ============================================ */
#main, .site-main { padding-top: 42px !important; }

/* ============================================
   SIDEBAR SHOP — Dark industrial, coerente con homepage
   ============================================ */
body.rs-has-shop-sidebar .content-area,
body.rs-has-shop-sidebar #primary {
  width: 100% !important;
  float: none !important;
  margin-left: 0 !important;
}
/* Offset contenuto rispetto alla sidebar fissa — CSS puro, cross-browser */
@media (min-width: 961px) {
  body.rs-has-shop-sidebar #content,
  body.rs-has-shop-sidebar .site-content {
    padding-left: 240px !important;
  }
  body.rs-has-shop-sidebar #primary,
  body.rs-has-shop-sidebar .content-area {
    width: 100% !important;
    margin-left: 0 !important;
    float: none !important;
  }
}
/* sidebar: fixed panel dal header al footer — top settato da JS */
#rs-shop-sidebar {
  display: none;
  position: fixed;
  left: 0;
  top: 0; /* override da JS */
  bottom: 0;
  width: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 9997;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  line-height: 1.35;
  /* scrollbar custom */
  scrollbar-width: thin;
  scrollbar-color: var(--rs-primary) var(--rs-ink);
}
#rs-shop-sidebar::-webkit-scrollbar { width: 4px; }
#rs-shop-sidebar::-webkit-scrollbar-track { background: var(--rs-ink); }
#rs-shop-sidebar::-webkit-scrollbar-thumb { background: var(--rs-primary); border-radius: 2px; }
body.rs-has-shop-sidebar #rs-shop-sidebar {
  display: block;
}
.rs-shop-sidebar-inner {
  background: #fff;
  border-right: 1px solid #e0dbd5;
  border-radius: 0;
  overflow: hidden;
  min-height: 100%;
}

/* Header — dark come la sezione numeri della homepage */
.rs-shop-sidebar-title {
  margin: 0;
  padding: 6px 16px;
  position: relative;
  background-color: var(--rs-ink);
  background-image:
    linear-gradient(rgba(var(--rs-primary-rgb),.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--rs-primary-rgb),.12) 1px, transparent 1px);
  background-size: 20px 20px;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rs-shop-sidebar-title::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='3' y1='6' x2='21' y2='6'/><line x1='3' y1='12' x2='21' y2='12'/><line x1='3' y1='18' x2='21' y2='18'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.8;
}
/* Linea rossa in fondo all'header */
.rs-shop-sidebar-title::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--rs-dark), var(--rs-primary));
}

/* Lista */
.rs-shop-sidebar ul { list-style: none; margin: 0; padding: 0; }
.rs-shop-sidebar li { margin: 0; padding: 0; border-bottom: 1px solid #f0ebe5; }
.rs-shop-sidebar li:last-child { border-bottom: none; }

/* Riga categoria */
.rs-shop-sidebar .rs-cat-row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
}
.rs-shop-sidebar .rs-cat-row > a {
  flex: 1;
  display: block;
  padding: 10px 14px;
  color: #2a2a2a;
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.12s ease, background 0.12s ease;
  border-left: 3px solid transparent;
}
.rs-shop-sidebar .rs-cat-row > a:hover {
  color: var(--rs-primary);
  background: #fdf8f7;
}

/* Toggle chevron */
.rs-shop-sidebar .rs-cat-toggle {
  flex-shrink: 0;
  width: 32px;
  background: transparent;
  border: none;
  border-left: 1px solid #f0ebe5;
  color: #bbb;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.rs-shop-sidebar .rs-cat-toggle:hover {
  background: #fdf0f0;
  color: var(--rs-primary);
}
.rs-shop-sidebar .rs-cat-toggle::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  margin-left: -2px;
}
.rs-shop-sidebar li.rs-expanded > .rs-cat-row > .rs-cat-toggle::before {
  transform: rotate(45deg);
  margin-left: 0;
  margin-top: -3px;
}

/* Sottolivelli */
.rs-shop-sidebar li > ul { display: none; background: #faf7f5; border-top: 1px solid #f0ebe5; }
.rs-shop-sidebar li.rs-expanded > ul { display: block; }

/* Rientro progressivo */
.rs-shop-sidebar li li > .rs-cat-row > a { padding-left: 26px; font-size: 0.8rem; }
.rs-shop-sidebar li li li > .rs-cat-row > a { padding-left: 40px; font-size: 0.78rem; }
.rs-shop-sidebar li li li li > .rs-cat-row > a { padding-left: 54px; font-size: 0.76rem; }

/* Categoria corrente — border-left rosso come accento */
.rs-shop-sidebar li.rs-current > .rs-cat-row > a,
.rs-shop-sidebar li.rs-current > .rs-cat-row > .rs-cat-label {
  border-left-color: var(--rs-primary);
  color: var(--rs-dark);
  font-weight: 700;
  background: #fdf8f7;
  padding-left: 11px;
}
.rs-shop-sidebar li li.rs-current > .rs-cat-row > a { padding-left: 23px; }
.rs-shop-sidebar li li li.rs-current > .rs-cat-row > a { padding-left: 37px; }

/* Antenati */
.rs-shop-sidebar li.rs-ancestor > .rs-cat-row > a,
.rs-shop-sidebar li.rs-ancestor > .rs-cat-row > .rs-cat-label {
  color: var(--rs-dark);
  font-weight: 600;
}

/* Label non-linkabile */
.rs-shop-sidebar .rs-cat-label {
  display: block;
  padding: 10px 14px;
  font-size: 0.83rem;
  font-weight: 600;
  color: #2a2a2a;
  cursor: default;
  border-left: 3px solid transparent;
}

/* "Tutti i prodotti" in cima */
.rs-shop-sidebar-all {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #faf8f7;
  color: var(--rs-ink);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.3px;
  text-decoration: none;
  border-bottom: 1px solid #e8e3de;
  border-left: 3px solid var(--rs-primary);
  transition: background 0.15s ease, color 0.15s ease;
}
.rs-shop-sidebar-all::before { content: none; }
.rs-shop-sidebar-all::after {
  content: "→";
  margin-left: auto;
  color: var(--rs-primary);
  font-size: 0.9rem;
  transition: transform 0.15s ease;
}
.rs-shop-sidebar-all:hover {
  background: #fdf0f0;
  color: var(--rs-dark);
}
.rs-shop-sidebar-all:hover::after { transform: translateX(3px); }

/* Mobile: sidebar mai visibile */
@media (max-width: 960px) {
  body.rs-has-shop-sidebar .content-area,
  body.rs-has-shop-sidebar #primary {
    width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
  }
  #rs-shop-sidebar { display: none !important; }
}

/* CTA nella sidebar (es. "Crea Targa", "Crea Medaglietta") */
.rs-shop-sidebar li.rs-sidebar-cta {
  border-bottom: none;
  padding: 8px;
}
.rs-shop-sidebar li.rs-sidebar-cta > .rs-cat-row > a {
  background: var(--rs-primary) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  border-radius: 4px !important;
  padding: 9px 12px !important;
  text-align: center !important;
  white-space: normal !important;
  border-left: none !important;
  transition: background 0.15s ease !important;
}
.rs-shop-sidebar li.rs-sidebar-cta > .rs-cat-row > a:hover {
  background: var(--rs-dark) !important;
  color: #fff !important;
}

/* ============================================
   SIDEBAR WIDGET
   ============================================ */
.widget-area { margin-top: 0 !important; }
.widget { margin-bottom: 0 !important; }
.widget-title, .widgettitle {
  font-size: .85rem !important; text-transform: uppercase; letter-spacing: .5px;
  color: #333; padding-bottom: 8px; border-bottom: 2px solid var(--rs-primary); margin-bottom: 12px !important;
}

/* ============================================
   LINK & BOTTONI
   ============================================ */
a { color: var(--rs-primary); }
a:hover { color: #9a1222; }
button, .button, input[type="submit"], .woocommerce a.button,
.woocommerce button.button, .woocommerce input.button {
  background-color: var(--rs-primary) !important; border-color: var(--rs-primary) !important; color: #fff !important;
  border-radius: 8px !important; text-transform: uppercase; font-weight: 600;
  letter-spacing: .3px; transition: all .2s;
}
button:hover, .button:hover, input[type="submit"]:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover {
  background-color: #9a1222 !important; border-color: #9a1222 !important;
}

/* ============================================
   SHOP
   ============================================ */
.woocommerce ul.products li.product .price { color: var(--rs-primary); font-weight: 600; }
.woocommerce ul.products li.product h2 { font-size: .9rem !important; }
.woocommerce ul.products li.product { margin-bottom: 1.5rem !important; }

/* ============================================
   SINGOLO PRODOTTO
   ============================================ */
.single-product .summary .product_title { font-size: 1.6rem; line-height: 1.2; margin-top: 0 !important; margin-bottom: 10px !important; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer { margin-top: 2rem !important; }

/* ============================================
   DESKTOP — hamburger e drawer nascosti
   ============================================ */
.rs-hamburger { display: none !important; }
#rs-drawer { display: none !important; }

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 768px) {
  .rs-header-row {
    display: flex !important; flex-wrap: nowrap !important;
    align-items: center !important; padding: 10px 16px !important; gap: 0 !important;
  }
  .site-header, #masthead { border-bottom: 1px solid #e8e5e0 !important; }
  .rs-hamburger {
    display: flex !important; order: 1 !important; flex-shrink: 0;
    width: 40px; height: 40px; align-items: center; justify-content: center;
    cursor: pointer; background: var(--rs-dark); border: none; padding: 0; border-radius: 8px;
  }
  .rs-hamburger span,
  .rs-hamburger span::before,
  .rs-hamburger span::after {
    display: block; width: 20px; height: 2px; background: #fff;
    border-radius: 1px; position: relative; transition: all .25s ease;
  }
  .rs-hamburger span::before, .rs-hamburger span::after { content: ""; position: absolute; left: 0; width: 20px; }
  .rs-hamburger span::before { top: -6px; }
  .rs-hamburger span::after  { top: 6px; }
  body.rs-menu-open .rs-hamburger span { background: transparent; }
  body.rs-menu-open .rs-hamburger span::before { top: 0; transform: rotate(45deg);  background: #fff; }
  body.rs-menu-open .rs-hamburger span::after  { top: 0; transform: rotate(-45deg); background: #fff; }
  body.rs-menu-open { overflow: hidden !important; }
  .rs-header-row .site-branding { flex: 1 !important; text-align: center !important; padding: 0 !important; order: 2 !important; }
  .site-branding img, .custom-logo { max-height: 36px !important; margin: 0 auto !important; }
  .rs-header-spacer { display: none !important; }
  .rs-header-row .site-search { display: none !important; }
  .rs-account-icon { display: none !important; }
  .rs-header-row ul.site-header-cart { flex-shrink: 0 !important; order: 3 !important; margin: 0 !important; }
  .site-header-cart .count { font-size: .6rem !important; padding: 0 4px !important; }
  .rs-header-row > ul.menu, .rs-header-row > ul.nav-menu {
    display: none !important; visibility: hidden !important; position: absolute !important; left: -9999px !important;
  }
  .rs-header-row ul.site-header-cart .amount,
  .rs-header-row ul.site-header-cart .cart-contents span:not(.count) { display: none !important; }
  /* DRAWER */
  #rs-drawer {
    display: none !important; position: fixed !important;
    left: 0 !important; right: 0 !important; bottom: 0 !important;
    background: #fff !important; z-index: 99990 !important; overflow: hidden !important;
  }
  body.rs-menu-open #rs-drawer { display: block !important; }
  .rs-drawer-scroll { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .rs-drawer-tabs { display: flex; border-bottom: 2px solid #e8e5e0; background: #fff; position: sticky; top: 0; z-index: 2; }
  .rs-drawer-tab { flex: 1; padding: 14px 16px; text-align: center; font-size: .92rem; font-weight: 600; color: #666; text-transform: capitalize; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all .15s; }
  .rs-drawer-tab.act { color: var(--rs-dark); border-bottom-color: var(--rs-dark); }
  .rs-drawer-panel { display: none; padding: 0; }
  .rs-drawer-panel.act { display: block; }
  .rs-drawer-section-title { padding: 20px 20px 10px; font-size: 1.1rem; font-weight: 700; color: #222; }
  .rs-drawer-items { list-style: none; margin: 0; padding: 0; }
  .rs-drawer-items li { border-bottom: 1px solid #f0eeea; }
  .rs-drawer-items li a { display: flex; align-items: center; padding: 16px 20px; font-size: .95rem; font-weight: 500; color: #333; text-decoration: none; gap: 12px; }
  .rs-drawer-items li a:active { background: #fdf8f8; }
  .rs-drawer-items li.current-menu-item a { color: var(--rs-dark); font-weight: 600; }
  .rs-drawer-items li a::after { content: "\2192"; margin-left: auto; color: #ccc; font-size: 1.1rem; flex-shrink: 0; }
  .rs-drawer-viewall { display: block; padding: 14px 20px; font-size: .85rem; font-weight: 600; color: var(--rs-dark); text-decoration: underline; }
  .rs-drawer-main-items { list-style: none; margin: 0; padding: 0; }
  .rs-drawer-main-items li { border-bottom: 1px solid #f0eeea; }
  .rs-drawer-main-items li a { display: flex; align-items: center; padding: 16px 20px; font-size: .95rem; font-weight: 600; color: #333; text-decoration: none; text-transform: uppercase; letter-spacing: .3px; }
  .rs-drawer-main-items li a::after { content: "\2192"; margin-left: auto; color: #ccc; font-size: 1.1rem; }
  .rs-drawer-main-items li.current-menu-item a { color: var(--rs-dark); }
  .rs-drawer-sep { height: 1px; background: #e8e5e0; margin: 8px 0; }
  .storefront-breadcrumb .col-full { padding: 3px 16px !important; }
  .single-product .product_title,
  .single-product .woocommerce-product-details__short-description,
  .single-product .woocommerce-notices-wrapper,
  .single-product .rs-desc-tabs { max-width: 100% !important; padding-right: 0 !important; }
}

/* ============================================
   GRIGLIA PRODOTTI — fix colonne shortcode
   ============================================ */
.woocommerce ul.products.columns-2 li.product { width: 48% !important; }
.woocommerce ul.products.columns-3 li.product { width: 31% !important; }
.woocommerce ul.products.columns-4 li.product { width: 23% !important; }
.woocommerce ul.products { display: flex !important; flex-wrap: wrap !important; gap: 2% !important; }

/* Mobile: qualsiasi griglia prodotti → 2 colonne */
@media (max-width: 768px) {
  .woocommerce ul.products.columns-2 li.product,
  .woocommerce ul.products.columns-3 li.product,
  .woocommerce ul.products.columns-4 li.product,
  .woocommerce ul.products.columns-5 li.product,
  .woocommerce ul.products.columns-6 li.product {
    width: 48% !important;
  }
  /* product card */
  .woocommerce ul.products li.product h2 { font-size: .82rem !important; }
  .woocommerce ul.products li.product .price { font-size: .82rem; }
  .woocommerce ul.products li.product .button { font-size: .72rem !important; padding: 8px 10px !important; }
  /* single product */
  .woocommerce div.product .woocommerce-tabs ul.tabs li a { font-size: .82rem; padding: 8px 14px; }
  /* loop filter bar */
  .woocommerce-ordering, .woocommerce-result-count { font-size: .82rem; }
}

/* Small phone ≤480px */
@media (max-width: 480px) {
  /* 1 colonna prodotti su schermi molto piccoli */
  .woocommerce ul.products.columns-3 li.product,
  .woocommerce ul.products.columns-4 li.product {
    width: 100% !important;
  }
  .woocommerce ul.products.columns-2 li.product { width: 48% !important; }
  /* bottoni full width */
  .woocommerce .cart .button, .woocommerce #respond input#submit,
  .woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
    width: 100% !important; text-align: center !important; display: block !important;
  }
  /* padding ridotto pagine shop */
  .woocommerce-page .site-main { padding: 0 !important; }
  .col-full { padding-left: 16px !important; padding-right: 16px !important; }
}

/* Fix icona lente ricerca */
.widget_search form:not(.wp-block-search)::before,
.widget_product_search form:not(.wp-block-search)::before {
  top: 0.6em !important;
  left: 1em !important;
}
