/* ====== Titolo categoria più piccolo ====== */
.woocommerce-products-header__title.page-title{
  font-size: 36px !important;
  line-height: 1.15;
  margin-bottom: 12px;
}

/* ====== GRID: 2 / 3 / 4 / 5 colonne, reset tema ====== */
.nvc-shop-grid-wrap ul.products{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(220px,1fr));
  gap:12px; /* era 24px → 12px richiesto */
  list-style:none;
  padding:0!important; margin:0!important; width:100%;
  align-items:stretch;
}
.nvc-shop-grid-wrap ul.products::before,
.nvc-shop-grid-wrap ul.products::after{content:none!important;display:none!important;}
.nvc-shop-grid-wrap ul.products li.product{
  float:none!important; width:auto!important; max-width:none!important;
  margin:0!important; clear:none!important;
}
.nvc-shop-grid-wrap ul.products li.product[style]{width:auto!important;margin:0!important;}

@media (min-width:768px){  .nvc-shop-grid-wrap ul.products{grid-template-columns:repeat(3,minmax(220px,1fr));} }
@media (min-width:1024px){ .nvc-shop-grid-wrap ul.products{grid-template-columns:repeat(4,minmax(220px,1fr));} }
@media (min-width:1360px){ .nvc-shop-grid-wrap ul.products{grid-template-columns:repeat(5,minmax(220px,1fr));} }

/* ====== CARD ====== */
.nvc-card{
  background:#fff;
  border-radius:16px;
  box-shadow:0 8px 20px rgba(0,0,0,.06);
  overflow:hidden;
  transition:transform .15s, box-shadow .15s;
  display:flex; flex-direction:column;
}
.nvc-card:hover{ transform:translateY(-2px); box-shadow:0 12px 28px rgba(0,0,0,.09); }

/* immagine */
.nvc-card__thumb{ position:relative; display:block; background:#fafafa; aspect-ratio:4/3; }
.nvc-card__img{ width:100%; height:100%; object-fit:contain!important; display:block; }

/* badge sconto */
.nvc-badge-sale{
  position:absolute; top:12px; left:12px;
  background:#0f3d2e; color:#fff;
  font-weight:700; font-size:.85rem; line-height:1;
  padding:8px 10px; border-radius:10px;
}

/* corpo card */
.nvc-card__body{ display:flex; flex-direction:column; padding:14px 14px 12px; min-height:180px; }
.nvc-card__title{ font-size:12px; line-height:1.35; margin:0 0 6px; font-weight:800; }
.nvc-card__title a{ color:inherit; text-decoration:none; }
.nvc-card__meta{ margin-bottom:6px; } /* stelle più vicine al titolo */
.nvc-card__meta .star-rating{ font-size:14px; height:auto; }

/* spaziatore equal height */
.nvc-card__spacer{ flex:1 1 auto; }

/* footer: prezzo a sx + icona a dx con gap ridotto */
.nvc-card__footer{
  display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:4px;
}
.nvc-card__price .price{ font-weight:800; font-size:1rem; }
.nvc-card__price .price del{ opacity:.55; margin-right:6px; }

/* bottone solo icona (quadrato, verde, arrotondato) */
.nvc-icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px;
  background:#1e7f5b; color:#fff; border:none;
  border-radius:12px; text-decoration:none;
  transition:transform .12s ease, filter .12s ease;
}
.nvc-icon-btn:hover{ filter:brightness(0.95); transform:translateY(-1px); color:#fff; }
.nvc-icon-btn .fas{ font-size:18px; line-height:1; color:#fff; }

/* testo solo per screen reader */
.sr-only{
  position:absolute!important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); border:0;
}

/* paginazione AJAX: pulsante al centro */
.nvc-pagination-center{ display:flex; justify-content:center; margin-top:22px; }
.nvc-load-more{
  background:#0f3d2e; color:#fff; border:0; border-radius:12px;
  padding:10px 16px; font-weight:700; cursor:pointer;
}
.nvc-load-more[disabled]{ opacity:.6; cursor:default; }

/* ====== Titolo categoria ridotto ====== */
.woocommerce-products-header__title.page-title{
  font-size: 36px !important;
  line-height: 1.15;
  margin-bottom: 12px;
}

/* ====== GRID PRODOTTI (2/3/4/5) ====== */
.nvc-shop-grid-wrap ul.products{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(220px,1fr));
  gap:12px;
  list-style:none; padding:0!important; margin:0!important; width:100%;
  align-items:stretch;
}
.nvc-shop-grid-wrap ul.products::before,
.nvc-shop-grid-wrap ul.products::after{content:none!important;display:none!important;}
.nvc-shop-grid-wrap ul.products li.product{float:none!important;width:auto!important;max-width:none!important;margin:0!important;clear:none!important; padding:1px !important;}
.nvc-shop-grid-wrap ul.products li.product[style]{width:auto!important;margin:0!important;}

@media (min-width:768px){  .nvc-shop-grid-wrap ul.products{grid-template-columns:repeat(3,minmax(220px,1fr));} }
@media (min-width:1024px){ .nvc-shop-grid-wrap ul.products{grid-template-columns:repeat(4,minmax(220px,1fr));} }
@media (min-width:1360px){ .nvc-shop-grid-wrap ul.products{grid-template-columns:repeat(5,minmax(220px,1fr));} }

/* ====== CARD PRODOTTO ====== */
.nvc-card{ background:#fff; border-radius:16px; box-shadow:0 8px 20px rgba(0,0,0,.06); overflow:hidden; transition:transform .15s, box-shadow .15s; display:flex; flex-direction:column; }
.nvc-card:hover{ transform:translateY(-2px); box-shadow:0 12px 28px rgba(0,0,0,.09); }
.nvc-card__thumb{ position:relative; display:block; background:#fafafa; aspect-ratio:4/3; }
.nvc-card__img{ width:100%; height:100%; object-fit:contain!important; display:block; }
.nvc-badge-sale{ position:absolute; top:12px; left:12px; background:#0f3d2e; color:#fff; font-weight:700; font-size:.85rem; line-height:1; padding:8px 10px; border-radius:10px; }
.nvc-card__body{ display:flex; flex-direction:column; padding:14px 14px 12px; min-height:180px; }
.nvc-card__title{ font-size:12px; line-height:1.35; margin:0 0 6px; font-weight:800; }
.nvc-card__title a{ color:inherit; text-decoration:none; }
.nvc-card__meta{ margin-bottom:6px; }
.nvc-card__meta .star-rating{ font-size:14px; height:auto; }
.nvc-card__spacer{ flex:1 1 auto; }
.nvc-card__footer{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:4px; }
.nvc-card__price .price{ font-weight:800; font-size:1rem; }
.nvc-card__price .price del{ opacity:.55; margin-right:6px; }
.nvc-icon-btn{ display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; background:#1e7f5b; color:#fff; border:none; border-radius:12px; text-decoration:none; transition:transform .12s ease, filter .12s ease; }
.nvc-icon-btn:hover{ filter:brightness(0.95); transform:translateY(-1px); color:#fff; }
.nvc-icon-btn .fas{ font-size:18px; line-height:1; color:#fff; }
.sr-only{ position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* ====== PAGINAZIONE AJAX ====== */
.nvc-pagination-center{ display:flex; justify-content:center; margin-top:22px; }
.nvc-load-more{ background:#0f3d2e; color:#fff; border:0; border-radius:12px; padding:10px 16px; font-weight:700; cursor:pointer; }
.nvc-load-more[disabled]{ opacity:.6; cursor:default; }

/* ====== SOTTOCATEGORIE (toggle + 8 colonne desktop) ====== */
.nvc-subcats-wrap{ background:#f4f5ff; border-radius:18px; padding:12px; margin:10px 0 18px; }
.nvc-subcats-toggle{
  display:inline-flex; align-items:center; gap:8px;
  background:#0f3d2e; color:#fff; border:0; border-radius:12px;
  padding:8px 14px; font-weight:700; cursor:pointer;
}
.nvc-subcats-toggle .fas{ font-size:14px; }
.nvc-subcats-wrap .nvc-subcats-panel{ margin-top:12px; }

/* Griglia sottocategorie */
.nvc-subcats-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px; list-style:none; margin:0; padding:0;
}
@media (min-width:768px){  .nvc-subcats-grid{grid-template-columns:repeat(4,minmax(0,1fr));} }   /* tablet */
@media (min-width:1024px){ .nvc-subcats-grid{grid-template-columns:repeat(6,minmax(0,1fr));} }   /* laptop */
@media (min-width:1360px){ .nvc-subcats-grid{grid-template-columns:repeat(8,minmax(0,1fr));} }   /* desktop 8 colonne */

.nvc-subcat-card{ background:#fff; border-radius:14px; box-shadow:0 4px 12px rgba(0,0,0,.05); overflow:hidden; }
.nvc-subcat__inner{ display:flex; flex-direction:column; align-items:center; justify-content:center; padding:16px 10px; text-decoration:none; }
.nvc-subcat__icon{ width:56px; height:56px; display:flex; align-items:center; justify-content:center; margin-bottom:8px; }
.nvc-subcat__img{ max-width:100%; max-height:56px; object-fit:contain; display:block; }
.nvc-subcat__img--placeholder{ width:56px; height:56px; background:#f2f2f2; border-radius:12px; }
.nvc-subcat__title{ font-size:13px; font-weight:700; color:#1b1b1b; text-align:center; }

/* Comportamento toggle:
   - su desktop (>=1024) pannello SEMPRE aperto e bottone nascosto
   - su tablet/mobile (<1024) pannello chiuso di default e apribile con bottone */
@media (min-width:1024px){
  .nvc-subcats-toggle{ display:none; }
  .nvc-subcats-panel{ display:block !important; }
  .nvc-subcats-panel[hidden]{ display:block !important; } /* forza aperto */
}
/* ====== GRID PRODOTTI (mobile: 2 colonne piene, 2px ai lati) ====== */
.nvc-shop-grid-wrap ul.products{
  display:grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2 colonne 50/50 */
  gap:5px;
  list-style:none;
  padding:0 2px !important;  /* max 2px per lato */
  margin:0 !important;
  width:100%;
  align-items:stretch;
  box-sizing:border-box;
}

/* Niente pseudo-elementi del tema */
.nvc-shop-grid-wrap ul.products::before,
.nvc-shop-grid-wrap ul.products::after{
  content:none !important;
  display:none !important;
}

/* Reset totale degli inline style del tema sui <li> */
.nvc-shop-grid-wrap ul.products li.product{
  float:none !important;
  width:auto !important;
  max-width:none !important;
  margin:0 !important;
  clear:none !important;

  /* kill layout JS: */
  position:static !important;
  left:auto !important;
  top:auto !important;
  right:auto !important;
  bottom:auto !important;
  transform:none !important;
  -webkit-transform:none !important;
  translate:none !important;
}

/* Se qualche plugin aggiunge style inline, ignoralo comunque */
.nvc-shop-grid-wrap ul.products li.product[style]{
  width:auto !important;
  margin:0 !important;
  left:auto !important;
  top:auto !important;
  transform:none !important;
}

/* Breakpoint superiori (minmax 220 per non schiacciare) */
@media (min-width:768px){
  .nvc-shop-grid-wrap ul.products{
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}
@media (min-width:1024px){
  .nvc-shop-grid-wrap ul.products{
    grid-template-columns: repeat(4, minmax(220px, 1fr));
  }
}
@media (min-width:1360px){
  .nvc-shop-grid-wrap ul.products{
    grid-template-columns: repeat(5, minmax(220px, 1fr));
  }
}

