/* ============================================================
   QUALITY WHEY — Storefront  (stile flip.ro: verde · bianco)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root{
  --brand:      #06BE6E;
  --brand-dark: #05A15E;
  --brand-soft: #E7F9F0;
  --ink:        #0E1726;
  --muted:      #667085;
  --bg:         #FFFFFF;
  --bg-soft:    #F5F7FA;
  --line:       #E7EBEF;
  --amber:      #FFB020;
  --red:        #E5484D;
  --dark:       #0E1726;
  --header-bg:  #FFFFFF;
  --footer-bg:  #0E1726;
  --footer-text:#CBD2DC;
  --hero-from:  #063D2A;
  --hero-to:    #06BE6E;
  --radius:     16px;
  --radius-sm:  11px;
  --btn-radius: 999px;
  --shadow:     0 1px 2px rgba(16,23,38,.04), 0 6px 20px rgba(16,23,38,.06);
  --shadow-lg:  0 16px 48px rgba(16,23,38,.14);
  --container:  1200px;
  --font:       'Manrope', system-ui, -apple-system, Segoe UI, sans-serif;
}
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{ font-family:var(--font); color:var(--ink); background:var(--bg); font-size:15px; line-height:1.55; -webkit-font-smoothing:antialiased; }
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
h1,h2,h3,h4{ margin:0; font-weight:800; letter-spacing:-.02em; }
.wrap{ max-width:var(--container); margin:0 auto; padding:0 20px; }

/* ---------- Header ---------- */
.site-head{ position:sticky; top:0; z-index:40; background:var(--header-bg); backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
.head-row{ display:flex; align-items:center; gap:20px; height:70px; }
.logo{ font-weight:800; font-size:22px; letter-spacing:-.03em; display:flex; align-items:center; gap:9px; }
.logo .dot{ width:11px; height:11px; border-radius:50%; background:var(--brand); box-shadow:0 0 0 4px var(--brand-soft); }
.logo b{ color:var(--brand); }
.head-search{ flex:1; max-width:520px; position:relative; }
.head-search svg{ position:absolute; left:15px; top:50%; transform:translateY(-50%); width:18px; height:18px; color:var(--muted); }
.head-search input{ width:100%; height:44px; padding:0 16px 0 44px; border:1.5px solid var(--line); border-radius:999px; font-family:inherit; font-size:14px; background:var(--bg-soft); transition:.15s; }
.head-search input:focus{ outline:none; border-color:var(--brand); background:#fff; box-shadow:0 0 0 4px var(--brand-soft); }
.head-actions{ display:flex; align-items:center; gap:8px; }
.icon-btn{ position:relative; width:44px; height:44px; border-radius:999px; display:grid; place-items:center; color:var(--ink); transition:.15s; }
.icon-btn:hover{ background:var(--bg-soft); }
.icon-btn svg{ width:22px; height:22px; }
.cart-badge{ position:absolute; top:4px; right:4px; min-width:18px; height:18px; padding:0 4px; background:var(--brand); color:#fff; border-radius:999px; font-size:11px; font-weight:700; display:grid; place-items:center; }
.menu-btn{ display:none; }

/* ---------- Nav categorie ---------- */
.cat-nav{ border-bottom:1px solid var(--line); background:#fff; }
.cat-nav .wrap{ display:flex; gap:6px; overflow-x:auto; padding-top:8px; padding-bottom:8px; align-items:center; }
.cat-nav a{ white-space:nowrap; padding:8px 16px; border-radius:999px; font-size:13.5px; font-weight:600; color:var(--muted); transition:.15s; }
.cat-nav a:hover{ background:var(--bg-soft); color:var(--ink); }
.cat-nav a.active{ background:var(--brand); color:#fff; }

/* Pastiglie sottocategorie (mostrate sulla pagina categoria/sottocategoria) */
.subcat-pills{ display:flex; gap:8px; flex-wrap:wrap; margin:22px 0 0; }
.subcat-pills a{ display:inline-flex; align-items:center; gap:7px; padding:9px 16px; border-radius:999px; font-size:13.5px; font-weight:600; color:var(--ink); background:var(--bg-soft); border:1.5px solid transparent; transition:.15s; }
.subcat-pills a svg{ width:16px; height:16px; flex:0 0 auto; }
.subcat-pills a img.cat-icon-img{ width:16px; height:16px; flex:0 0 auto; border-radius:4px; object-fit:cover; }
.subcat-pills a:hover{ border-color:var(--brand); }
.subcat-pills a.active{ background:var(--brand); color:#fff; }
/* quando c'è il menu a comparsa (layout "sidebar"), il wrap non deve tagliare il pannello */
.cat-nav:has(.cat-dropdown) .wrap, .cat-nav-dropdown .wrap{ overflow:visible; }

/* Layout "sidebar" (stile marketplace): bottone Categorie con pannello a comparsa */
.cat-dropdown{ position:relative; }
.cat-dropdown-btn{
  display:flex; align-items:center; gap:8px; padding:9px 16px; border-radius:999px;
  font-size:13.5px; font-weight:700; color:#fff; background:var(--ink); border:none; cursor:pointer; transition:.15s;
  position:relative; z-index:81;
}
.cat-dropdown-btn:hover{ background:var(--brand-dark); }
.cat-dropdown-btn svg{ width:16px; height:16px; }
/* quando il pannello è aperto, il bottone "perde" gli angoli inferiori: bottone e pannello
   diventano un'unica forma continua, senza spazio né interruzione visiva (stile eMAG) */
.cat-dropdown:hover .cat-dropdown-btn,
.cat-dropdown.open .cat-dropdown-btn{ border-radius:999px 999px 0 0; }
.cat-dropdown-panel{
  position:absolute; top:100%; left:0; min-width:270px; max-height:70vh; overflow-y:auto;
  background:#fff; border:1px solid var(--line); border-top:none; border-radius:0 14px 14px 14px;
  box-shadow:0 12px 32px rgba(15,23,32,.14);
  padding:8px 0; display:flex; flex-direction:column; opacity:0; visibility:hidden; transform:translateY(-4px);
  transition:.15s; z-index:80;
}
.cat-dropdown:hover .cat-dropdown-panel,
.cat-dropdown.open .cat-dropdown-panel{ opacity:1; visibility:visible; transform:translateY(0); }
.cat-dropdown-panel a{ display:flex; align-items:center; gap:13px; padding:12px 18px; font-size:14.5px; font-weight:500; color:var(--ink); white-space:normal; border-bottom:1px solid var(--line); }
.cat-dropdown-panel a:last-child{ border-bottom:none; }
.cat-dropdown-panel a svg{ width:19px; height:19px; flex:0 0 auto; color:var(--ink); opacity:.62; }
.cat-dropdown-panel a img.cat-icon-img{ width:19px; height:19px; flex:0 0 auto; border-radius:5px; object-fit:cover; }
.cat-dropdown-panel a.active{ background:var(--bg-soft); font-weight:700; }
.cat-dropdown-panel a.active svg{ color:var(--brand); }
.cat-dropdown-panel a:hover{ background:var(--bg-soft); }
.cat-dropdown-panel a.active{ background:var(--brand); color:#fff; }

/* Sidebar statica delle categorie (mostrata in home quando il layout è "sidebar") */
.home-sidebar-layout{ display:grid; grid-template-columns:280px 1fr; gap:26px; align-items:start; }
.cat-sidebar{
  background:#fff; border:1px solid var(--line); border-radius:12px; padding:8px 0;
  position:sticky; top:90px; box-shadow:0 2px 8px rgba(15,23,32,.06), 0 10px 28px rgba(15,23,32,.10);
}
.cat-sidebar .cs-title{ display:none; }
.cat-sidebar a{ display:flex; align-items:center; gap:13px; padding:12px 18px; font-size:14.5px; font-weight:500; color:var(--ink); border-bottom:1px solid var(--line); }
.cat-sidebar a:last-child{ border-bottom:none; }
.cat-sidebar a svg{ width:19px; height:19px; flex:0 0 auto; color:var(--ink); opacity:.62; }
.cat-sidebar a.active{ background:var(--bg-soft); font-weight:700; }
.cat-sidebar a.active svg{ color:var(--brand); }
.cat-sidebar a:hover{ background:var(--bg-soft); }
.cat-sidebar a.active{ background:var(--brand-soft); color:var(--brand-dark); }
.cat-sidebar a .n{ font-size:12px; color:var(--muted); font-weight:600; }
@media (max-width:900px){
  .home-sidebar-layout{ grid-template-columns:1fr; }
  .cat-sidebar{ position:static; }
}

/* Sidebar home con la stessa forma unificata bottone->pannello del dropdown, ma statica
   e in-flow (non fluttuante sopra il contenuto): il banner accanto si restringe di
   conseguenza grazie alla griglia a due colonne, invece di essere coperto.
   La "tab" scura in alto è più stretta (come il bottone Categorie nella nav sopra),
   poi si allarga a tutta larghezza in un unico blocco continuo prima del pannello. */
.cat-sidebar-unified{ position:sticky; top:90px; }
.cat-sidebar-tab{
  display:inline-flex; align-items:center; justify-content:center; padding:11px 14px;
  background:var(--ink); color:#fff; border-radius:14px 14px 0 0; position:relative; z-index:2;
}
.cat-sidebar-tab svg{ width:16px; height:16px; }
.cat-sidebar-step{
  width:100%; height:14px; background:var(--ink); border-radius:0 14px 0 0; margin-top:-1px;
}
.cat-sidebar-unified .cat-sidebar-panel{
  position:static; opacity:1; visibility:visible; transform:none;
  width:100%; min-width:0; max-height:none; border-radius:0 0 14px 14px; margin-top:-1px;
}
@media (max-width:900px){
  /* Su mobile il pannello parte chiuso (altrimenti occupa subito tutto lo schermo):
     si apre al tap sulla tab/step, con una transizione morbida dell'altezza. */
  .cat-sidebar-tab, .cat-sidebar-step{ cursor:pointer; }
  .cat-sidebar-unified .cat-sidebar-panel{
    max-height:0; overflow:hidden; padding-top:0; padding-bottom:0;
    border-width:0 1px; transition:max-height .25s ease, padding .25s ease;
  }
  .cat-sidebar-unified.mobile-open .cat-sidebar-panel{
    max-height:600px; overflow-y:auto; padding-top:8px; padding-bottom:8px; border-width:1px;
  }
}

/* ---------- Buttons ---------- */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:9px; padding:13px 22px; border-radius:var(--btn-radius); font-family:inherit; font-weight:700; font-size:14.5px; border:none; cursor:pointer; transition:.15s; line-height:1; }
.btn svg{ width:18px; height:18px; }
.btn-brand{ background:var(--brand); color:#fff; box-shadow:0 6px 18px rgba(6,190,110,.28); }
.btn-brand:hover{ background:var(--brand-dark); transform:translateY(-1px); }
.btn-dark{ background:var(--dark); color:#fff; }
.btn-dark:hover{ filter:brightness(1.15); }
.btn-ghost{ background:#fff; color:var(--ink); border:1.5px solid var(--line); }
.btn-ghost:hover{ border-color:var(--brand); color:var(--brand-dark); }
.btn-block{ width:100%; }
.btn-lg{ padding:16px 28px; font-size:16px; }
.btn:disabled{ opacity:.5; cursor:not-allowed; transform:none; }

/* ---------- Hero ---------- */
.hero{ margin:24px 0; border-radius:24px; overflow:hidden; position:relative; background:linear-gradient(120deg, var(--hero-from), var(--hero-to)); color:#fff; }
.hero-inner{ display:grid; grid-template-columns:1.1fr .9fr; align-items:center; gap:20px; min-height:320px; }
/* Dimensione zona banner (impostabile in Admin → Banner) */
.hero-h-sm .hero-inner{ min-height:220px; }
.hero-h-md .hero-inner{ min-height:320px; }
.hero-h-lg .hero-inner{ min-height:440px; }
.hero-h-xl .hero-inner{ min-height:580px; }
@media (max-width:640px){
  .hero-h-sm .hero-inner{ min-height:180px; }
  .hero-h-md .hero-inner{ min-height:260px; }
  .hero-h-lg .hero-inner{ min-height:340px; }
  .hero-h-xl .hero-inner{ min-height:420px; }
}
.hero-txt{ padding:52px; }
.hero-txt .eyebrow{ display:inline-flex; align-items:center; gap:7px; background:rgba(255,255,255,.16); padding:6px 14px; border-radius:999px; font-size:12.5px; font-weight:700; letter-spacing:.03em; margin-bottom:16px; }
.hero-txt h1{ font-size:42px; line-height:1.08; margin-bottom:14px; }
.hero-txt p{ font-size:16px; opacity:.92; max-width:420px; margin:0 0 26px; }
.hero.plain{ background:linear-gradient(120deg, var(--hero-from), var(--hero-to)); }
.hero.plain .hero-inner{ grid-template-columns:1fr; }
.promo-banner .hero-inner{ min-height:180px; }
.promo-banner .hero-txt{ padding:36px; }
.promo-banner .hero-txt h2{ font-size:26px !important; }
/* Banner personalizzato da admin: l'immagine copre l'INTERA sezione (non solo metà),
   con un overlay scuro per mantenere il testo leggibile sopra qualsiasi immagine. */
.hero.has-bg{
  background-image: linear-gradient(120deg, rgba(8,14,24,.62), rgba(8,14,24,.32)), var(--hero-bg-desktop);
  background-size: cover; background-position: center;
}
.hero.has-bg .hero-inner{ grid-template-columns:1fr; }
/* Immagini non abbastanza larghe (quadrate/verticali): mostrate intere, senza tagli,
   su un fondo scuro coerente col resto del brand invece di un ritaglio innaturale. */
.hero.has-bg-contain{
  background-color: var(--ink);
  background-image: var(--hero-bg-desktop);
  background-size: contain; background-repeat: no-repeat; background-position: right center;
}
.hero.has-bg-contain .hero-txt{ background:linear-gradient(90deg, var(--ink) 55%, transparent); }
/* Testo nascosto: niente overlay scuro, l'immagine resta ai suoi colori originali
   (l'overlay serviva solo a mantenere leggibile il testo, che qui non c'è). */
.hero.hero-no-text.has-bg{ background-image: var(--hero-bg-desktop); }
.hero.hero-no-text.has-bg-contain{ background-image: var(--hero-bg-desktop); }
@media (max-width:640px){
  .hero.has-bg{ background-image: linear-gradient(120deg, rgba(8,14,24,.62), rgba(8,14,24,.32)), var(--hero-bg-mobile); }
  .hero.has-bg-contain{ background-image: var(--hero-bg-mobile); background-position: center bottom; background-size: contain; }
  .hero.has-bg-contain .hero-txt{ background:linear-gradient(0deg, var(--ink) 55%, transparent); }
  .hero.hero-no-text.has-bg{ background-image: var(--hero-bg-mobile); }
  .hero.hero-no-text.has-bg-contain{ background-image: var(--hero-bg-mobile); }
}

/* ---------- Sezioni ---------- */
.section{ margin:44px 0; }
.section-head{ display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:22px; gap:16px; }
.section-head h2{ font-size:26px; }
.section-head p{ color:var(--muted); margin:4px 0 0; font-size:14px; }
.section-head a{ color:var(--brand-dark); font-weight:700; font-size:14px; white-space:nowrap; }

/* ---------- Griglia prodotti ---------- */
.grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:20px; }
.pcard{ background:#fff; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; transition:.18s; display:flex; flex-direction:column; }
.pcard:hover{ box-shadow:var(--shadow); transform:translateY(-3px); border-color:transparent; }
.pcard .media{ position:relative; aspect-ratio:1/1; background:var(--bg-soft); overflow:hidden; }
.pcard .media img{ width:100%; height:100%; object-fit:cover; transition:.3s; }
.pcard:hover .media img{ transform:scale(1.04); }
.pcard .media .ph{ width:100%; height:100%; display:grid; place-items:center; color:#c8d0d8; }
.pcard .media .ph svg{ width:52px; height:52px; }
.tag{ position:absolute; top:12px; left:12px; background:var(--brand); color:#fff; font-size:11.5px; font-weight:700; padding:5px 11px; border-radius:999px; }
.tag.sale{ background:var(--red); }
.pcard .body{ padding:15px 16px 17px; display:flex; flex-direction:column; flex:1; }
.pcard .brand{ font-size:11.5px; font-weight:700; color:var(--brand-dark); text-transform:uppercase; letter-spacing:.04em; }
.pcard .name{ font-size:15px; font-weight:700; margin:3px 0 8px; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:39px; }
.pcard .price-row{ display:flex; align-items:baseline; gap:8px; margin-top:auto; }
.pcard .price{ font-size:19px; font-weight:800; }
.pcard .price-old{ font-size:13px; color:var(--muted); text-decoration:line-through; }
.pcard .stockline{ font-size:12px; color:var(--muted); margin-top:6px; display:flex; align-items:center; gap:6px; }

/* Card promozionale nella griglia catalogo (gestito da admin -> Menu & sezioni) */
.promo-card{
  background:linear-gradient(160deg, var(--brand-dark), var(--brand));
  color:#fff; border:none; display:flex; align-items:stretch; min-height:100%;
}
.promo-inner{ padding:26px 22px; display:flex; flex-direction:column; justify-content:center; gap:10px; width:100%; }
.promo-eyebrow{ display:inline-block; background:rgba(255,255,255,.18); backdrop-filter:blur(4px); padding:5px 12px; border-radius:999px; font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; width:fit-content; }
.promo-title{ font-size:21px; font-weight:800; line-height:1.25; margin:0; }
.promo-text{ font-size:13.5px; line-height:1.5; opacity:.92; margin:0; }
.promo-btn{ margin-top:8px; background:#fff; color:var(--brand-dark); font-weight:700; padding:10px 18px; border-radius:999px; display:inline-flex; align-items:center; gap:7px; width:fit-content; font-size:13.5px; transition:.15s; }
.promo-btn:hover{ transform:translateX(2px); }
.promo-btn svg{ width:15px; height:15px; }
.pcard .stockline .d{ width:7px; height:7px; border-radius:50%; background:var(--brand); }
.pcard .stockline.out .d{ background:var(--red); }
.pcard .add{ margin-top:12px; }

/* ---------- Categorie tiles ---------- */
.cat-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:16px; }
.cat-tile{ background:var(--bg-soft); border:1px solid var(--line); border-radius:var(--radius); padding:22px 18px; text-align:center; transition:.15s; }
.cat-tile:hover{ background:var(--brand-soft); border-color:var(--brand); }
.cat-tile .ic{ width:52px; height:52px; margin:0 auto 12px; border-radius:14px; background:#fff; display:grid; place-items:center; color:var(--brand); box-shadow:var(--shadow); overflow:hidden; }
.cat-tile .ic svg{ width:26px; height:26px; }
.cat-tile .ic img.cat-icon-img{ width:100%; height:100%; object-fit:cover; border-radius:0; }
.cat-tile .t{ font-weight:700; font-size:14.5px; }
.cat-tile .c{ font-size:12.5px; color:var(--muted); margin-top:2px; }

/* ---------- Trust bar ---------- */
.trust{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin:34px 0; }
.trust .item{ display:flex; gap:13px; align-items:center; padding:18px; background:var(--bg-soft); border-radius:var(--radius); }
.trust .item svg{ width:26px; height:26px; color:var(--brand); flex:0 0 26px; }
.trust .item .t{ font-weight:700; font-size:14px; }
.trust .item .s{ font-size:12.5px; color:var(--muted); }

/* ---------- Product detail ---------- */
.pd{ display:grid; grid-template-columns:1fr 1fr; gap:40px; margin:30px 0; }
.pd-gallery .main{ aspect-ratio:1/1; border-radius:var(--radius); overflow:hidden; background:var(--bg-soft); border:1px solid var(--line); }
.pd-gallery .main img{ width:100%; height:100%; object-fit:cover; }
.pd-gallery .thumbs{ display:flex; gap:10px; margin-top:12px; flex-wrap:wrap; }
.pd-gallery .thumbs img{ width:72px; height:72px; border-radius:10px; object-fit:cover; border:2px solid var(--line); cursor:pointer; }
.pd-gallery .thumbs img.active{ border-color:var(--brand); }
.pd-info .brand{ color:var(--brand-dark); font-weight:700; text-transform:uppercase; letter-spacing:.04em; font-size:13px; }
.pd-info h1{ font-size:30px; margin:6px 0 14px; }
.pd-price{ display:flex; align-items:baseline; gap:12px; margin-bottom:18px; }
.pd-price .now{ font-size:32px; font-weight:800; }
.pd-price .old{ font-size:18px; color:var(--muted); text-decoration:line-through; }
.pd-price .save{ background:var(--brand-soft); color:var(--brand-dark); font-weight:700; font-size:13px; padding:4px 10px; border-radius:999px; }
.pd-meta{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:20px; }
.chip{ background:var(--bg-soft); border:1px solid var(--line); border-radius:999px; padding:7px 14px; font-size:13px; font-weight:600; }
.chip.in{ color:var(--brand-dark); background:var(--brand-soft); border-color:transparent; }
.chip.out{ color:var(--red); }
.pd-desc{ color:#3a4658; margin:18px 0; line-height:1.7; }
.qty{ display:inline-flex; align-items:center; border:1.5px solid var(--line); border-radius:999px; overflow:hidden; }
.qty button{ width:42px; height:46px; border:none; background:#fff; font-size:20px; cursor:pointer; color:var(--ink); }
.qty button:hover{ background:var(--bg-soft); }
.qty input{ width:46px; height:46px; border:none; text-align:center; font-family:inherit; font-weight:700; font-size:16px; }
.pd-buy{ display:flex; gap:12px; align-items:center; margin-top:8px; flex-wrap:wrap; }

/* ---------- Pannello account (tab) ---------- */
.acc-shell{ display:grid; grid-template-columns:220px 1fr; gap:28px; align-items:start; margin-bottom:60px; }
.acc-nav{ display:flex; flex-direction:column; gap:3px; position:sticky; top:90px; background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:10px; }
.acc-nav button{
  display:flex; align-items:center; gap:11px; text-align:left; padding:11px 13px; border-radius:11px;
  border:none; background:transparent; font-family:inherit; font-size:14px; font-weight:600;
  color:var(--muted); cursor:pointer; transition:.15s; width:100%;
}
.acc-nav button svg{ width:17px; height:17px; flex:0 0 auto; }
.acc-nav button:hover{ background:var(--bg-soft); color:var(--ink); }
.acc-nav button.active{ background:var(--brand-soft); color:var(--brand-dark); }
.acc-count{ margin-left:auto; background:var(--brand); color:#fff; font-size:11px; font-weight:800; min-width:19px; height:19px; border-radius:999px; display:grid; place-items:center; padding:0 5px; }
.acc-panel{ display:none; }
.acc-panel.active{ display:block; }
.acc-card{ border:1px solid var(--line); border-radius:14px; padding:16px 18px; margin-bottom:12px; overflow-wrap:break-word; word-break:break-word; }
.acc-card:last-child{ margin-bottom:0; }
.acc-card .reply{ background:var(--bg-soft); border-radius:10px; padding:10px 12px; margin-top:10px; font-size:13px; line-height:1.5; }
.vip-badge{
  display:inline-flex; align-items:center; gap:5px; background:linear-gradient(135deg,#f6c453,#c9962c);
  color:#fff; font-size:11px; font-weight:800; padding:4px 10px; border-radius:999px; letter-spacing:.03em;
  margin-left:10px; vertical-align:middle; position:relative; top:-2px;
}
.vip-badge svg{ width:11px; height:11px; }
@media (max-width:820px){
  .acc-shell{ grid-template-columns:1fr; }
  .acc-nav{ position:static; flex-direction:row; overflow-x:auto; gap:4px; -webkit-overflow-scrolling:touch; }
  .acc-nav button{ white-space:nowrap; width:auto; }
}

/* ---------- Contatta per informazioni (prezzo su richiesta) ---------- */
.tag.tag-info{ background:var(--ink); }
.pcard .price.price-onrequest{ font-size:15.5px; font-weight:700; color:var(--muted); }
.pd-price-onrequest .now.onrequest{ font-size:22px; font-weight:700; color:var(--muted); }
.pd-onrequest-note{ display:flex; align-items:center; gap:9px; margin-top:14px; font-size:13px; color:var(--muted); }
.pd-onrequest-note svg{ width:17px; height:17px; flex:0 0 auto; color:var(--brand); }

/* Modale */
.inquiry-overlay{
  position:fixed; inset:0; z-index:200; display:flex; align-items:center; justify-content:center;
  padding:20px; background:rgba(14,23,38,.5); backdrop-filter:blur(3px);
  opacity:0; visibility:hidden; transition:opacity .2s ease;
}
.inquiry-overlay.open{ opacity:1; visibility:visible; }
.inquiry-modal{
  position:relative; width:100%; max-width:460px; max-height:90vh; overflow-y:auto;
  background:#fff; border-radius:20px; box-shadow:var(--shadow-lg); padding:32px 28px 28px;
  transform:translateY(14px) scale(.98); transition:transform .22s cubic-bezier(.2,.8,.2,1);
}
.inquiry-overlay.open .inquiry-modal{ transform:translateY(0) scale(1); }
.inquiry-close{
  position:absolute; top:16px; right:16px; width:36px; height:36px; border:none; border-radius:999px;
  background:var(--bg-soft); color:var(--ink); display:grid; place-items:center; cursor:pointer; transition:.15s;
}
.inquiry-close:hover{ background:var(--line); }
.inquiry-close svg{ width:16px; height:16px; }
.inquiry-modal h3{ font-size:21px; margin:0 0 6px; padding-right:30px; }
.inquiry-sub{ font-size:13.5px; color:var(--muted); margin:0 0 22px; line-height:1.5; }
.inquiry-hp{ position:absolute; left:-9999px; top:-9999px; width:1px; height:1px; overflow:hidden; }
.inquiry-error{
  background:rgba(229,72,77,.08); color:var(--red); border-radius:11px; padding:11px 14px;
  font-size:13px; font-weight:600; margin:4px 0 16px;
}
.inquiry-submit{ width:100%; margin-top:6px; }
.inquiry-submit.loading{ opacity:.7; pointer-events:none; }
.inquiry-result{ text-align:center; padding:10px 0 4px; }
.inquiry-result-icon{
  width:64px; height:64px; margin:0 auto 18px; border-radius:50%; display:grid; place-items:center;
  background:var(--brand-soft); color:var(--brand-dark);
}
.inquiry-result-icon.err{ background:rgba(229,72,77,.1); color:var(--red); }
.inquiry-result-icon svg{ width:28px; height:28px; }
.inquiry-result h3{ margin-bottom:8px; }
.inquiry-result p{ color:var(--muted); font-size:14px; line-height:1.55; margin:0 0 22px; }
@media (max-width:480px){
  .inquiry-modal{ padding:26px 20px 22px; border-radius:16px; }
  .inquiry-modal .field-row{ grid-template-columns:1fr; gap:0; }
}

/* ---------- Cart / Checkout ---------- */
.page-title{ font-size:30px; margin:28px 0 6px; }
.page-sub{ color:var(--muted); margin:0 0 24px; }
.layout{ display:grid; grid-template-columns:1fr 380px; gap:28px; align-items:start; margin-bottom:60px; }
.panel{ background:#fff; border:1px solid var(--line); border-radius:var(--radius); }
.panel-head{ padding:18px 22px; border-bottom:1px solid var(--line); font-weight:800; font-size:16px; }
.panel-body{ padding:22px; }
.cart-row{ display:flex; gap:16px; padding:18px 22px; border-bottom:1px solid var(--line); align-items:center; }
.cart-row:last-child{ border-bottom:none; }
.cart-row .thumb{ width:76px; height:76px; border-radius:12px; object-fit:cover; background:var(--bg-soft); border:1px solid var(--line); flex:0 0 76px; }
.cart-row .info{ flex:1; min-width:0; }
.cart-row .info .n{ font-weight:700; }
.cart-row .info .b{ font-size:12.5px; color:var(--muted); }
.cart-row .price{ font-weight:800; white-space:nowrap; }
.link-danger{ color:var(--red); font-size:13px; font-weight:600; background:none; border:none; cursor:pointer; padding:0; }
.summary .line{ display:flex; justify-content:space-between; padding:7px 0; font-size:14.5px; }
.summary .line.total{ border-top:1px solid var(--line); margin-top:8px; padding-top:14px; font-weight:800; font-size:19px; }
.summary .muted{ color:var(--muted); }

/* form */
.field{ margin-bottom:16px; }
.field label{ display:block; font-size:13px; font-weight:700; margin-bottom:7px; }
.field input, .field select, .field textarea{ width:100%; padding:12px 14px; border:1.5px solid var(--line); border-radius:11px; font-family:inherit; font-size:14.5px; background:#fff; }
.field input:focus, .field select:focus, .field textarea:focus{ outline:none; border-color:var(--brand); box-shadow:0 0 0 4px var(--brand-soft); }
.field-row{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }

/* pay methods */
.pay-opt{ display:flex; gap:13px; align-items:flex-start; padding:16px; border:1.5px solid var(--line); border-radius:12px; cursor:pointer; margin-bottom:12px; transition:.15s; }
.pay-opt:hover{ border-color:var(--brand); }
.pay-opt.sel{ border-color:var(--brand); background:var(--brand-soft); }
.pay-opt input{ margin-top:3px; accent-color:var(--brand); width:18px; height:18px; }
.pay-opt .t{ font-weight:700; }
.pay-opt .d{ font-size:13px; color:var(--muted); }
.pay-opt .ico{ margin-left:auto; color:var(--brand-dark); }
.pay-opt .ico svg{ width:22px; height:22px; }

/* order complete */
.done-box{ max-width:640px; margin:50px auto; text-align:center; }
.done-box .check{ width:76px; height:76px; margin:0 auto 20px; border-radius:50%; background:var(--brand-soft); display:grid; place-items:center; color:var(--brand); }
.done-box .check svg{ width:38px; height:38px; }
.pay-instr{ text-align:left; background:var(--bg-soft); border:1px solid var(--line); border-radius:var(--radius); padding:22px; margin-top:24px; }
.pay-instr .kv{ display:flex; justify-content:space-between; gap:14px; padding:9px 0; border-bottom:1px dashed var(--line); font-size:14px; }
.pay-instr .kv:last-child{ border-bottom:none; }
.pay-instr .kv b{ font-family:ui-monospace, monospace; word-break:break-all; text-align:right; }

/* empty */
.empty{ text-align:center; padding:60px 20px; color:var(--muted); }
.empty svg{ width:56px; height:56px; margin-bottom:14px; color:var(--line); }
.empty h3{ font-size:22px; color:var(--ink); margin-bottom:8px; }

/* flash */
.notice{ padding:13px 18px; border-radius:12px; font-size:14px; font-weight:600; margin:16px 0; }
.notice.ok{ background:var(--brand-soft); color:var(--brand-dark); }
.notice.err{ background:#FDECEC; color:var(--red); }

/* footer */
.site-foot{ background:var(--footer-bg); color:var(--footer-text); margin-top:60px; }
.foot-grid{ display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:30px; padding:48px 0 34px; }
.foot-grid h4{ color:#fff; font-size:15px; margin-bottom:14px; }
.foot-grid a{ display:block; padding:5px 0; color:#9aa4b2; font-size:14px; }
.foot-grid a:hover{ color:#fff; }
.foot-logo{ font-size:22px; font-weight:800; color:#fff; margin-bottom:10px; }
.foot-logo b{ color:var(--brand); }
.foot-bottom{ border-top:1px solid rgba(255,255,255,.1); padding:20px 0; font-size:13px; color:#9aa4b2; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; }

/* responsive */
/* ---------- RESPONSIVE ---------- */
html, body{ overflow-x:hidden; max-width:100%; }
.table-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }

/* Tablet */
@media (max-width:900px){
  .hero-inner, .pd, .layout{ grid-template-columns:1fr; }
  .hero-img{ display:none; }
  .hero-txt{ padding:36px; }
  .hero-txt h1{ font-size:32px; }
  .trust{ grid-template-columns:1fr 1fr; }
  .foot-grid{ grid-template-columns:1fr 1fr; }
  .layout .summary{ position:static !important; }
  .head-actions .btn-brand{ display:none; }   /* basta l'icona carrello */
}

/* Telefono: header su due righe, ricerca a tutta larghezza */
@media (max-width:640px){
  .wrap{ padding:0 14px; }
  .head-row{ flex-wrap:wrap; height:auto; gap:12px; padding:12px 0; }
  .logo{ order:1; }
  .head-actions{ order:2; margin-left:auto; }
  .head-search{ order:3; flex:1 0 100%; max-width:none; display:block; }
  .cat-nav .wrap{ gap:6px; }
  .trust{ grid-template-columns:1fr 1fr; gap:10px; }
  .foot-grid{ grid-template-columns:1fr 1fr; gap:22px; }
  .grid{ grid-template-columns:repeat(2,1fr); gap:12px; }
  .hero-txt{ padding:26px 22px; }
  .hero-txt h1{ font-size:27px; }
  .section{ margin:30px 0; }
  .section-head h2{ font-size:22px; }
  .panel-body{ padding:16px; }
  .pd-gallery{ gap:10px; }
  .cart-row{ gap:10px; }
  .cart-row .thumb{ width:64px; height:64px; }
  h1.page-title{ font-size:24px; }
}

/* Telefono piccolo */
@media (max-width:400px){
  .wrap{ padding:0 11px; }
  .grid{ gap:10px; }
  .foot-grid{ grid-template-columns:1fr; }
  .trust{ grid-template-columns:1fr; }
  .hero-txt h1{ font-size:24px; }
  .head-actions{ gap:4px; }
}

:focus-visible{ outline:2px solid var(--brand); outline-offset:2px; }
@media (prefers-reduced-motion:reduce){ *{ animation:none!important; transition:none!important; } }

/* Barra promo */
.promo-bar{ text-align:center; font-size:13px; font-weight:600; padding:9px 16px; }
.promo-bar a{ text-decoration:none; }
.promo-bar a:hover{ text-decoration:underline; }
/* Social footer */
.foot-social{ display:flex; gap:10px; margin-top:14px; }
.foot-social a{ width:38px; height:38px; border-radius:10px; display:grid; place-items:center; background:rgba(255,255,255,.08); color:#fff; padding:0; transition:.15s; }
.foot-social a:hover{ background:var(--brand); }
.foot-social svg{ width:18px; height:18px; }

/* Selettore recensione a stelle */
.star-input{ display:inline-flex; flex-direction:row-reverse; justify-content:flex-end; gap:2px; font-size:28px; line-height:1; }
.star-input input{ display:none; }
.star-input label{ color:#E0E4EA; cursor:pointer; transition:color .1s; }
.star-input input:checked ~ label{ color:#FFB020; }
.star-input label:hover, .star-input label:hover ~ label{ color:#FFD98A; }

/* Pulsante wishlist su card */
.pcard{ position:relative; }
.wish-btn{ position:absolute; top:10px; right:10px; z-index:3; }
.wish-btn button{ width:36px; height:36px; border-radius:50%; border:none; background:rgba(255,255,255,.9); box-shadow:0 2px 8px rgba(16,23,38,.12); cursor:pointer; display:grid; place-items:center; color:#98a2b3; transition:.15s; }
.wish-btn button:hover{ color:var(--red); transform:scale(1.08); }
.wish-btn button svg{ width:18px; height:18px; }
.wish-btn button.on{ color:var(--red); }
.wish-btn button.on svg{ fill:var(--red); }

/* Selettore varianti (pillole) */
.var-pill{ position:relative; display:inline-flex; align-items:center; cursor:pointer; }
.var-pill input{ position:absolute; opacity:0; inset:0; cursor:pointer; }
.var-pill span{ display:inline-block; padding:9px 15px; border:1.5px solid var(--line); border-radius:11px; font-size:13.5px; font-weight:600; transition:.12s; background:#fff; }
.var-pill input:checked + span{ border-color:var(--brand); background:var(--brand-soft); color:var(--brand-dark); }
.var-pill.out span{ opacity:.5; text-decoration:line-through; cursor:not-allowed; }
.var-pill:hover span{ border-color:var(--brand); }

/* Tabella specifiche prodotto */
.spec-table{ width:100%; border-collapse:collapse; font-size:14px; }
.spec-table tr{ border-bottom:1px solid var(--line); }
.spec-table tr:last-child{ border-bottom:none; }
.spec-table th{ text-align:left; padding:13px 22px; width:38%; color:var(--muted); font-weight:600; background:var(--bg-soft); }
.spec-table td{ padding:13px 22px; font-weight:600; }
@media (max-width:560px){ .spec-table th, .spec-table td{ padding:11px 14px; } }

/* Box download prodotti digitali */
.dl-box{ text-align:left; border:1.5px solid var(--brand); background:var(--brand-soft); border-radius:14px; padding:18px 20px; margin:18px 0; }
.dl-box h3{ display:flex; align-items:center; gap:8px; font-size:16px; margin:0 0 12px; color:var(--brand-dark); }
.dl-item{ padding:12px 0; border-top:1px solid rgba(0,0,0,.06); display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.dl-item:first-of-type{ border-top:none; }
.dl-name{ font-weight:700; flex:1 1 auto; }
.dl-note{ flex:1 1 100%; font-size:13px; color:var(--muted); background:#fff; border-radius:8px; padding:8px 12px; white-space:pre-line; }
