/* Negozio (/web/shop) — tema scuro coerente con il sito (Fase 2, passo 2).
   Scope: pagine che contengono #productsGrid. Il rosso viene dai token --color-primary-*;
   il rosso come testo usa la tinta 400 (contrasto >= 4.5:1 sul nero). */
body:has(:is(#productsGrid,#shopFlow)){
  --s-bg:#0b0b0c;--s-surface:#141417;--s-card:#18181c;--s-line:rgba(255,255,255,.10);
  --s-text:#f5f5f6;--s-muted:rgba(255,255,255,.72);--s-subtle:rgba(255,255,255,.55);
  background:var(--s-bg) !important;color:var(--s-text);
}
html body:has(:is(#productsGrid,#shopFlow)) .container-fluid{padding-top:28px;padding-bottom:48px;max-width:1400px}
/* Titoli e testo */
html body:has(:is(#productsGrid,#shopFlow)) h1,html body:has(:is(#productsGrid,#shopFlow)) h2,html body:has(:is(#productsGrid,#shopFlow)) h4,html body:has(:is(#productsGrid,#shopFlow)) h5{
  color:#fff !important;-webkit-text-fill-color:#fff !important;letter-spacing:-0.01em !important;
  text-transform:none !important;background:none !important;text-shadow:none !important;
}
html body:has(:is(#productsGrid,#shopFlow)) h2{font-size:1.5rem !important;font-weight:700 !important}
html body:has(:is(#productsGrid,#shopFlow)) h2 .text-muted{color:var(--s-subtle) !important;font-weight:500}
html body:has(:is(#productsGrid,#shopFlow)) .text-muted,html body:has(:is(#productsGrid,#shopFlow)) .card-text{color:var(--s-muted) !important}
html body:has(:is(#productsGrid,#shopFlow)) .text-dark{color:#fff !important}
html body:has(:is(#productsGrid,#shopFlow)) .container-fluid span.me-2{color:var(--s-muted)}
/* Barra laterale categorie */
html body:has(:is(#productsGrid,#shopFlow)) .card{
  background:var(--s-surface) !important;border:1px solid var(--s-line) !important;border-radius:12px !important;box-shadow:none !important;color:var(--s-text);
}
html body:has(:is(#productsGrid,#shopFlow)) .card-header{
  background:none !important;background-image:none !important;border:0 !important;border-bottom:1px solid var(--s-line) !important;
  color:#fff !important;padding:16px 18px !important;border-radius:12px 12px 0 0 !important;
}
html body:has(:is(#productsGrid,#shopFlow)) .card-header h5{font-size:1.0625rem !important;font-weight:700 !important}
html body:has(:is(#productsGrid,#shopFlow)) .card-body{background:none !important;color:var(--s-text)}
html body:has(:is(#productsGrid,#shopFlow)) .form-check{padding-left:2rem;margin-bottom:6px}
html body:has(:is(#productsGrid,#shopFlow)) .form-check-input{
  width:1.15rem;height:1.15rem;margin-top:.2rem;margin-left:-2rem;background-color:var(--s-bg);border:1px solid rgba(255,255,255,.35);
}
html body:has(:is(#productsGrid,#shopFlow)) .form-check-input:checked{background-color:var(--color-primary-500,#c7081b);border-color:var(--color-primary-500,#c7081b)}
html body:has(:is(#productsGrid,#shopFlow)) .form-check-input:focus{box-shadow:0 0 0 3px rgba(var(--color-primary-400-rgb,220,80,96),.35);border-color:var(--color-primary-400,#dc5060)}
html body:has(:is(#productsGrid,#shopFlow)) .form-check-label{color:var(--s-muted);font-size:.9375rem;cursor:pointer}
/* Ricerca e ordinamento */
html body:has(:is(#productsGrid,#shopFlow)) .search-bar-wrapper{
  background:var(--s-surface) !important;border:1px solid var(--s-line) !important;border-radius:12px !important;box-shadow:none !important;padding:16px !important;
}
html body:has(:is(#productsGrid,#shopFlow)) .search-bar-wrapper .form-control,
html body:has(:is(#productsGrid,#shopFlow)) .sort-wrapper .form-select{
  background-color:var(--s-bg) !important;color:var(--s-text) !important;border:1px solid var(--s-line) !important;border-radius:8px !important;box-shadow:none !important;
}
html body:has(:is(#productsGrid,#shopFlow)) .search-bar-wrapper .form-control::placeholder{color:var(--s-subtle)}
html body:has(:is(#productsGrid,#shopFlow)) .search-bar-wrapper .form-control:focus,
html body:has(:is(#productsGrid,#shopFlow)) .sort-wrapper .form-select:focus{
  border-color:var(--color-primary-400,#dc5060) !important;box-shadow:0 0 0 3px rgba(var(--color-primary-400-rgb,220,80,96),.25) !important;
}
html body:has(:is(#productsGrid,#shopFlow)) .sort-wrapper .form-select{
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}
html body:has(:is(#productsGrid,#shopFlow)) .sort-wrapper .form-select option{background:var(--s-surface);color:var(--s-text)}
/* Pulsanti: pieni, piatti, raggio 8 */
html body:has(:is(#productsGrid,#shopFlow)) .btn{
  border-radius:8px !important;font-weight:600 !important;box-shadow:none !important;min-height:40px;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  transition:background-color .2s ease,border-color .2s ease,color .2s ease !important;
}
html body:has(:is(#productsGrid,#shopFlow)) .btn-danger,html body:has(:is(#productsGrid,#shopFlow)) .btn-search{
  background:var(--color-primary-500,#c7081b) !important;background-image:none !important;border:1px solid var(--color-primary-500,#c7081b) !important;color:#fff !important;
}
html body:has(:is(#productsGrid,#shopFlow)) .btn-danger:hover,html body:has(:is(#productsGrid,#shopFlow)) .btn-search:hover{
  background:var(--color-primary-600,#a50616) !important;border-color:var(--color-primary-600,#a50616) !important;
}
html body:has(:is(#productsGrid,#shopFlow)) .btn-outline-danger{
  background:transparent !important;border:1px solid var(--color-primary-400,#dc5060) !important;color:var(--color-primary-400,#dc5060) !important;
}
html body:has(:is(#productsGrid,#shopFlow)) .btn-outline-danger:hover{background:rgba(var(--color-primary-400-rgb,220,80,96),.12) !important;color:#fff !important}
html body:has(:is(#productsGrid,#shopFlow)) .btn-outline-secondary{background:transparent !important;border:1px solid var(--s-line) !important;color:var(--s-muted) !important}
html body:has(:is(#productsGrid,#shopFlow)) .btn-success{background:rgba(34,160,80,.16) !important;border:1px solid rgba(34,160,80,.45) !important;color:#6fdc94 !important}
html body:has(:is(#productsGrid,#shopFlow)) .btn-warning,html body:has(:is(#productsGrid,#shopFlow)) .btn-secondary{
  background:rgba(255,255,255,.06) !important;border:1px solid var(--s-line) !important;color:var(--s-subtle) !important;
}
html body:has(:is(#productsGrid,#shopFlow)) .btn:focus-visible,html body:has(:is(#productsGrid,#shopFlow)) a:focus-visible,html body:has(:is(#productsGrid,#shopFlow)) .form-check-input:focus-visible{
  outline:3px solid var(--color-primary-400,#dc5060) !important;outline-offset:3px !important;
}
/* Schede prodotto */
html body:has(:is(#productsGrid,#shopFlow)) .product-card{transition:border-color .2s ease !important}
html body:has(:is(#productsGrid,#shopFlow)) .product-card:hover{transform:none !important;box-shadow:none !important;border-color:rgba(var(--color-primary-400-rgb,220,80,96),.6) !important}
html body:has(:is(#productsGrid,#shopFlow)) .product-card .image-container{background:#fff !important;border-radius:12px 12px 0 0 !important;overflow:hidden}
html body:has(:is(#productsGrid,#shopFlow)) .product-card .card-title{font-size:1.0625rem !important;line-height:1.35 !important;font-weight:600 !important;margin-bottom:8px}
html body:has(:is(#productsGrid,#shopFlow)) .product-card .card-title a{color:#fff !important}
html body:has(:is(#productsGrid,#shopFlow)) .product-card .card-title a:hover{color:var(--color-primary-400,#dc5060) !important}
html body:has(:is(#productsGrid,#shopFlow)) .product-card .fw-bold{color:#fff;font-size:1.0625rem}
html body:has(:is(#productsGrid,#shopFlow)) .product-card .text-success{color:#6fdc94 !important}
html body:has(:is(#productsGrid,#shopFlow)) .discount-badge{
  background:var(--color-primary-500,#c7081b) !important;background-image:none !important;border-radius:6px !important;box-shadow:none !important;font-weight:700;
}
html body:has(:is(#productsGrid,#shopFlow)) .badge{border-radius:6px !important;font-weight:600;padding:5px 9px}
html body:has(:is(#productsGrid,#shopFlow)) .badge.bg-success{background:rgba(34,160,80,.92) !important}
html body:has(:is(#productsGrid,#shopFlow)) .badge.bg-danger{background:rgba(11,11,12,.8) !important;border:1px solid var(--s-line)}
/* Paginazione */
html body:has(:is(#productsGrid,#shopFlow)) .pagination .page-link{
  background:var(--s-surface) !important;border:1px solid var(--s-line) !important;color:var(--s-muted) !important;border-radius:8px !important;
  min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;margin:0 3px;
}
html body:has(:is(#productsGrid,#shopFlow)) .pagination .page-item.active .page-link{
  background:var(--color-primary-500,#c7081b) !important;border-color:var(--color-primary-500,#c7081b) !important;color:#fff !important;
}
html body:has(:is(#productsGrid,#shopFlow)) .pagination .page-item.disabled .page-link{opacity:.5}
html body:has(:is(#productsGrid,#shopFlow)) nav p.small,html body:has(:is(#productsGrid,#shopFlow)) .pagination ~ p{color:var(--s-subtle)}
@media (max-width:767px){
  html body:has(:is(#productsGrid,#shopFlow)) .container-fluid{padding-left:16px;padding-right:16px}
}
@media (prefers-reduced-motion:reduce){
  html body:has(:is(#productsGrid,#shopFlow)) .btn,html body:has(:is(#productsGrid,#shopFlow)) .product-card{transition:none !important}
}
/* --- 2a passata --- */
html body:has(:is(#productsGrid,#shopFlow)) .search-bar-wrapper .btn-search{white-space:nowrap;padding-left:12px;padding-right:12px}
html body:has(:is(#productsGrid,#shopFlow)) .product-card .btn{font-size:.8125rem;padding:8px 10px;line-height:1.25}
@media (max-width:991px){
  html body:has(:is(#productsGrid,#shopFlow)) .col-lg-3 > .card{margin-bottom:16px}
}
/* La traduzione italiana di «Products» e' in minuscolo: maiuscola iniziale */
html body:has(:is(#productsGrid,#shopFlow)) .container-fluid h2::first-letter{text-transform:uppercase}
/* ===== Carrello ===== */
html body:has(#shopFlow) .container-fluid#shopFlow{padding-top:28px;padding-bottom:56px;max-width:1280px}
html body:has(#shopFlow) h1{font-size:clamp(1.75rem,3.4vw,2.25rem) !important;font-weight:700 !important}
html body:has(#shopFlow) h3{color:#fff !important;-webkit-text-fill-color:#fff !important}
html body:has(#shopFlow) h6{color:#fff !important;-webkit-text-fill-color:#fff !important;font-weight:600 !important;text-transform:none !important;letter-spacing:0 !important}
html body:has(#shopFlow) .border-bottom{border-color:var(--s-line) !important}
html body:has(#shopFlow) hr{border-color:var(--s-line) !important;opacity:1}
html body:has(#shopFlow) .btn-primary{
  background:var(--color-primary-500,#c7081b) !important;border:1px solid var(--color-primary-500,#c7081b) !important;color:#fff !important;
}
html body:has(#shopFlow) .btn-primary:hover{background:var(--color-primary-600,#a50616) !important;border-color:var(--color-primary-600,#a50616) !important}
html body:has(#shopFlow) .form-control{background:var(--s-bg) !important;color:var(--s-text) !important;border:1px solid var(--s-line) !important;border-radius:8px !important}
html body:has(#shopFlow) .btn-group > .btn{border-radius:8px !important}
html body:has(#shopFlow) .cart-item img{background:#fff;border-radius:8px !important}
html body:has(#shopFlow) .fa-shopping-cart.text-muted{color:var(--s-subtle) !important}
html body:has(#shopFlow) .text-success{color:#6fdc94 !important}
html body:has(#shopFlow) .card.sticky-top{top:96px !important}
html body:has(#shopFlow) strong,html body:has(#shopFlow) .fw-bold{color:#fff}
