/* ===== NOVA PREMIUM FILTERS - FRONTEND STYLES (v2.1.4) ===== */

.nova-filters-container{ margin:0 0 20px; }

/* Barra filtri principale */
.nova-main-filters-bar{
  background:rgba(255,255,255,.8);
  backdrop-filter:blur(20px);
  border:1px solid rgba(255,255,255,.6);
  border-radius:20px;
  padding:12px 16px;
  margin-bottom:20px;
  box-shadow:0 8px 32px rgba(139,69,19,.12);
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; position:relative; z-index:3;
}

/* Toggle mobile */
.nova-filters-toggle{
  display:none; align-items:center; gap:8px;
  background:linear-gradient(135deg,#4a7c59 0%,#2c5530 100%);
  color:#fff; border:0; border-radius:12px; padding:10px 14px; font-weight:700; cursor:pointer; box-shadow:0 4px 15px rgba(74,124,89,.3);
}
.nova-filters-toggle:hover{ transform:translateY(-1px); }

/* Inline desktop */
.nova-filters-inline{ display:flex; align-items:center; gap:12px; flex:1; }

/* Dropdown generico + sottocategorie */
.nova-filter-dropdown{ position:relative; }
.nova-filter-dropdown-toggle{
  background:#fff; border:2px solid #e8e4dc; border-radius:10px; padding:10px 12px; color:#2c5530; font-weight:600; cursor:pointer; display:flex; align-items:center; gap:8px; min-width:150px;
}
.nova-filter-dropdown-toggle:hover{ border-color:#4a7c59; box-shadow:0 2px 8px rgba(74,124,89,.2); }
.nova-filter-dropdown-content{
  position:absolute; top:100%; left:0; right:auto; min-width:220px;
  background:#fff; border:1px solid #e8e4dc; border-radius:10px; padding:12px; margin-top:6px; box-shadow:0 8px 25px rgba(0,0,0,.15); z-index:1000; display:none; max-height:280px; overflow:auto;
}
.nova-subcats-dropdown .nova-filter-dropdown-content a.nova-subcat-link{
  display:block; padding:8px 8px; border-radius:8px; color:#2c5530; text-decoration:none; font-weight:600;
}
.nova-subcats-dropdown .nova-filter-dropdown-content a.nova-subcat-link:hover{ background:#f3f8f4; }

/* Checkbox opzioni */
.nova-filter-checkbox{ display:flex; align-items:center; gap:8px; padding:6px 0; cursor:pointer; }
.nova-checkbox-custom{ width:18px; height:18px; border:2px solid #e8e4dc; border-radius:4px; position:relative; }
.nova-filter-checkbox input:checked + .nova-checkbox-custom{ background:#4a7c59; border-color:#4a7c59; }
.nova-filter-checkbox input:checked + .nova-checkbox-custom::after{
  content:''; position:absolute; left:4px; top:1px; width:6px; height:10px; border:solid #fff; border-width:0 2px 2px 0; transform:rotate(45deg);
}

/* Ricerca */
.nova-search-filter{ position:relative; flex:1; max-width:320px; }
.nova-search-input{ width:100%; padding:10px 40px 10px 12px; border:2px solid #e8e4dc; border-radius:10px; font-size:14px; }
.nova-search-input:focus{ outline:none; border-color:#4a7c59; box-shadow:0 0 0 3px rgba(74,124,89,.1); }
.nova-icon-search{ position:absolute; right:12px; top:50%; transform:translateY(-50%); opacity:.6; }

/* Filtri attivi */
.nova-active-filters{ display:flex; align-items:center; gap:8px; font-size:.9em; color:#666; }
.nova-active-count{ background:#4a7c59; color:#fff; border-radius:12px; padding:4px 8px; font-weight:700; }
.nova-clear-filters{ background:none; border:1px solid #e8e4dc; border-radius:6px; padding:4px 8px; color:#666; cursor:pointer; }
.nova-clear-filters:hover{ border-color:#ff6b6b; color:#ff6b6b; }

/* Sidebar mobile (slide da destra) */
.nova-mobile-sidebar{
  position:fixed; top:0; right:-100%; width:86%; max-width:420px; height:100vh;
  background:#fff; z-index:9999; box-shadow:-6px 0 24px rgba(0,0,0,.18); transition:right .28s ease;
}
.nova-mobile-sidebar[aria-hidden="false"]{ right:0; }
body.nova-sidebar-open{ overflow:hidden; }

.nova-sidebar-content{ display:flex; flex-direction:column; height:100%; }
.nova-sidebar-header{ display:flex; align-items:center; justify-content:space-between; padding:16px; border-bottom:1px solid #e8e4dc; background:#f7f6f3; }
.nova-sidebar-header h3{ margin:0; color:#2c5530; font-weight:700; }
.nova-sidebar-close{ background:none; border:0; font-size:22px; cursor:pointer; }

.nova-sidebar-body{ flex:1; overflow:auto; padding:16px; }
.nova-sidebar-footer{ padding:14px 16px; border-top:1px solid #e8e4dc; display:flex; gap:10px; }
.nova-sidebar-footer .button{ flex:1; padding:10px; border-radius:10px; font-weight:700; }
.nova-apply-filters{ background:linear-gradient(135deg,#4a7c59,#2c5530); color:#fff; border:0; }
.nova-reset-filters{ background:#f8f6f2; color:#666; border:1px solid #e8e4dc; }

/* Gruppi mobile */
.nova-mobile-filter-group{ margin-bottom:18px; }
.nova-filter-group-title{ color:#2c5530; font-size:1.05em; font-weight:700; margin:0 0 10px; padding-bottom:6px; border-bottom:1px solid #e8e4dc; cursor:pointer; }

/* CHIUSI di default (accordion) */
.nova-mobile-filter-group .nova-filter-options{ display:none; }
.nova-mobile-filter-group.is-open .nova-filter-options{ display:flex; }

/* Layout interno opzioni */
.nova-filter-options{ flex-direction:column; gap:8px; }
.nova-mobile-checkbox{ display:flex; align-items:center; gap:8px; padding:6px 0; cursor:pointer; }
.nova-mobile-checkbox-custom{ width:20px; height:20px; border:2px solid #e8e4dc; border-radius:4px; position:relative; }
.nova-mobile-checkbox input:checked + .nova-mobile-checkbox-custom{ background:#4a7c59; border-color:#4a7c59; }
.nova-mobile-checkbox input:checked + .nova-mobile-checkbox-custom::after{
  content:''; position:absolute; left:5px; top:2px; width:6px; height:10px; border:solid #fff; border-width:0 2px 2px 0; transform:rotate(45deg);
}

/* === 2 COLONNE sui gruppi lunghi (mobile) === */
.nova-filter-options.nova-two-cols{
  column-count:2;
  column-gap:14px;
}
.nova-filter-options.nova-two-cols > label{
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

/* Stati */
.nova-loading{ opacity:.6; pointer-events:none; }

/* Responsive */
@media (max-width:1023px){
  .nova-filters-toggle{ display:flex; }
  .nova-filters-inline{ display:none; }
}
@media (max-width:480px){
  .nova-main-filters-bar{ flex-direction:column; align-items:stretch; }
  .nova-active-filters{ justify-content:flex-end; }
}

/* Icone minime */
.nova-icon-filter::before { content: "⚙️"; }
.nova-icon-chevron::before { content: "▼"; font-size: .7em; }
.nova-icon-search::before { content: "🔍"; }
.nova-icon-close::before { content: "✕"; }

/* Stato loading su .products */
.products.nova-loading { opacity: .6; pointer-events: none; transition: opacity .2s; }

/* Link sottocategorie nel dropdown (placeholder) */
.nova-filter-dropdown .nova-subcat-link { display:block; padding:6px 0; text-decoration:none; }
