/* Layout Scorrimento: come gli store delle app. File orizzontali di schede che si scorrono col dito o con le frecce,
   storie grandi in apertura, categorie a schede e una galleria a nastro nella scheda prodotto. */
:root {
  --canvas: #EDEDEA; --surface: #FFFFFF; --soft: #F3F3F0; --ink: #141414; --primary: #141414; --on-primary: #FFFFFF; --accent: #FF5B36; --on-accent: #141414;
  --ok: #1F8A4F; --warn: #B7791F; --f-d: "Bricolage Grotesque", "Segoe UI", sans-serif; --f-b: Figtree, "Segoe UI", sans-serif; --f-i: "Instrument Serif", Georgia, serif;
  --dw: 700; --ls-d: -.04em; --r: 22px; --r-sm: 12px; --r-xl: 30px; --pill: 999px; --shadow: none; --shadow-pop: 0 24px 60px -20px rgb(0 0 0 / .35); --mock-bg: #141414; --mock-fg: #FFFFFF;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --canvas: #0E0E0F; --surface: #18181A; --soft: #222225; --ink: #F2F2EF; --primary: #F2F2EF; --on-primary: #141414; --mock-bg: #F2F2EF; --mock-fg: #141414; color-scheme: dark; } }
:root[data-theme="dark"] { --canvas: #0E0E0F; --surface: #18181A; --soft: #222225; --ink: #F2F2EF; --primary: #F2F2EF; --on-primary: #141414; --mock-bg: #F2F2EF; --mock-fg: #141414; color-scheme: dark; }
:root { --muted: color-mix(in oklab, var(--ink) 55%, var(--canvas)); --line: color-mix(in oklab, var(--ink) 12%, var(--canvas)); --pad: max(24px, calc((100vw - 1400px) / 2)); }
body { font-size: 15px; overflow-x: hidden; }
.pad { padding-left: var(--pad); padding-right: var(--pad); }
.btn { height: 50px; }
.btn.acc { background: var(--accent); color: var(--on-accent); }
.k { font-size: 13px; font-weight: 600; color: var(--muted); }

/* testata */
.hdr { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: color-mix(in oklab, var(--canvas) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.hdr .r1 { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; height: 70px; }
.logo { font-family: var(--f-d); font-weight: 700; font-size: 28px; letter-spacing: -.05em; }
.logo span { color: var(--acc-t, var(--accent)); }
.sq { justify-self: center; width: min(560px, 100%); height: 48px; border-radius: var(--pill); background: var(--surface); display: flex; align-items: center; gap: 10px; padding: 0 18px; color: var(--muted); text-align: left; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.hdr .r { display: flex; gap: 8px; align-items: center; }
.hdr .ct { height: 48px; padding: 0 8px 0 18px; border-radius: var(--pill); background: var(--primary); color: var(--on-primary); display: inline-flex; gap: 10px; align-items: center; font-weight: 600; }
.hdr .ct b { min-width: 32px; height: 32px; border-radius: 16px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 12px; }
.tabs::-webkit-scrollbar { display: none; }
/* da desktop il menu in testata sta su una riga: le voci che non ci stanno vanno a capo e restano nascoste (tutte nel Catalogo); più stretto scorre */
@media (min-width: 961px) { .tabs { flex-wrap: wrap; row-gap: 30px; height: 58px; overflow: hidden; } }
.tabs button, .tabs a { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px 0 8px; border-radius: var(--pill); background: var(--surface); font-weight: 600; white-space: nowrap; flex: none; box-shadow: var(--shadow); }
.tabs button i, .tabs a i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); }
.tabs button i svg.i, .tabs a i svg.i { width: 17px; height: 17px; }
.tabs button[aria-current="true"], .tabs a[aria-current="true"] { background: var(--primary); color: var(--on-primary); }
.tabs button[aria-current="true"] i, .tabs a[aria-current="true"] i { background: var(--accent); color: var(--on-accent); }

/* file orizzontali */
.sec { margin-top: 44px; }
.sh { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 16px; }
.sh h2 { margin: 0; font-size: clamp(26px, 2.6vw, 40px); line-height: 1; }
.sh p { margin: 6px 0 0; color: var(--muted); }
.sh .ar { display: flex; gap: 6px; }
.sh .ar button { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--pad); padding: 4px var(--pad) 10px; scrollbar-width: none; scroll-behavior: smooth; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex: none; scroll-snap-align: start; }

/* storie in apertura */
.story { position: relative; width: min(1080px, 82vw); height: 560px; border-radius: var(--r-xl); overflow: hidden; color: #FFFFFF; text-align: left; box-shadow: var(--shadow); }
.story > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(0 0 0 / .62), rgb(0 0 0 / .1) 60%); }
.story .tx { position: absolute; z-index: 1; left: 44px; bottom: 44px; right: 44px; display: grid; gap: 14px; justify-items: start; max-width: 560px; }
.story h1, .story h2 { margin: 0; font-size: clamp(40px, 4.6vw, 76px); line-height: .95; }
.story p { margin: 0; opacity: .9; font-size: 17px; }
.story .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.story .chip { background: var(--accent); color: var(--on-accent); }
.story.solid { background: var(--accent); color: var(--on-accent); }
.story.solid::after { display: none; }
.story.solid .big { position: absolute; right: 40px; top: 20px; font-family: var(--f-d); font-weight: 700; font-size: clamp(140px, 20vw, 300px); line-height: .9; letter-spacing: -.07em; }

/* card prodotto */
.pc { position: relative; width: 270px; display: grid; gap: 12px; align-content: start; }
.pc .im { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.pc .im img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.pc:hover .im img { transform: scale(1.05); }
.pc .tag { position: absolute; left: 12px; top: 12px; z-index: 2; }
.pc .fav { position: absolute; z-index: 2; right: 12px; top: 12px; width: 38px; height: 38px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.pc .fav svg.i { width: 17px; height: 17px; }
.pc .fav[aria-pressed="true"] { color: var(--acc-t, var(--accent)); }
.pc .fav[aria-pressed="true"] svg.i { fill: currentColor; }
.pc .add { position: absolute; z-index: 2; right: 12px; bottom: 12px; width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; transition: transform .2s; }
.pc .add:hover { transform: scale(1.08); }
.pc .open { position: absolute; inset: 0; z-index: 1; }
.pc .bd { display: grid; gap: 2px; padding: 0 4px; }
.pc .nm { font-weight: 600; font-size: 15.5px; line-height: 1.25; }
.pc .ln { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.pc .price { color: var(--ink); font-size: 15px; }
.pc.sm { width: 220px; }

/* categorie a schede */
.dept { border-radius: var(--r-xl); background: var(--surface); padding: 26px 0 18px; box-shadow: var(--shadow); }
.dept .sh, .dept .seg { margin-left: 26px; margin-right: 26px; }
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; }
.seg button { height: 40px; padding: 0 16px; border-radius: var(--pill); background: var(--soft); font-weight: 600; font-size: 14px; white-space: nowrap; flex: none; }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.dept .rail { padding-left: 26px; padding-right: 26px; scroll-padding-left: 26px; }
.coll { position: relative; width: 420px; height: 300px; border-radius: var(--r); overflow: hidden; color: #FFFFFF; text-align: left; }
.coll img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.coll:hover img { transform: scale(1.05); }
.coll::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(0 0 0 / .65)); }
.coll span { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 18px; display: grid; gap: 4px; }
.coll b { font-family: var(--f-d); font-size: 26px; letter-spacing: -.03em; line-height: 1.05; }
.coll small { opacity: .85; }
.usp { width: 300px; border-radius: var(--r); background: var(--surface); padding: 22px; display: grid; gap: 30px; font-size: 14px; color: var(--muted); box-shadow: var(--shadow); }
.usp i { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.usp b { display: block; color: var(--ink); font-size: 17px; }
.news { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; border-radius: var(--r-xl); background: var(--primary); color: var(--on-primary); padding: 40px; }
.news h3 { margin: 0; font-size: clamp(28px, 2.8vw, 42px); line-height: 1.02; }
.news p { margin: 8px 0 0; opacity: .75; }
.news form { display: flex; gap: 6px; padding: 6px; border-radius: var(--pill); background: color-mix(in oklab, var(--on-primary) 12%, transparent); }
.news input { flex: 1; min-width: 0; border: 0; outline: none; background: none; padding-left: 16px; color: inherit; }
.news .btn { height: 46px; }
.foot { margin-top: 60px; padding-block: 36px 30px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 24px; font-size: 14px; }
.foot p { margin: 8px 0 0; color: var(--muted); max-width: 40ch; }
.foot h4 { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot .bot { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }

/* categoria */
.ch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; margin-top: 18px; }
.pad > .subcats { margin-top: 18px; }
.ch h1 { margin: 0; font-size: clamp(40px, 5vw, 80px); line-height: .95; }
.ch p { margin: 10px 0 0; color: var(--muted); max-width: 60ch; }
.crumb { display: flex; gap: 6px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.fchips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 18px 4px; }
.fchips button { height: 42px; padding: 0 16px; border-radius: var(--pill); background: var(--surface); font-weight: 600; font-size: 14px; white-space: nowrap; flex: none; display: inline-flex; gap: 8px; align-items: center; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.fchips button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.fchips .sep { width: 1px; background: var(--line); flex: none; }
.fpanel { margin-top: 12px; border-radius: var(--r); background: var(--surface); padding: 4px 24px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; box-shadow: var(--shadow); }
.fpanel .fg { border-bottom: 0; }
.cg { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 14px; }
.cg .pc { width: auto; }
.cpro { border-radius: var(--r); background: var(--accent); color: var(--on-accent); padding: 26px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; aspect-ratio: 3 / 4; }
.cpro b { font-family: var(--f-d); font-size: 30px; letter-spacing: -.03em; line-height: 1; }
.cpro .big { font-family: var(--f-d); font-size: 90px; font-weight: 700; letter-spacing: -.07em; line-height: .8; }
.more { display: flex; justify-content: center; margin-top: 30px; }

/* prodotto */
.strip { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px var(--pad) 10px; scroll-padding-left: var(--pad); scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.thw > .strip { margin: 0; padding: 12px var(--pad) 10px; scroll-padding: 0 var(--pad); scroll-snap-type: x mandatory; scrollbar-width: none; }
.strip ~ .thw-go { width: 44px; height: 44px; }
.strip ~ .thw-pv { left: calc(var(--pad) + 10px); }
.strip ~ .thw-nx { right: calc(var(--pad) + 10px); }
.strip button { flex: none; height: min(62vh, 620px); aspect-ratio: 4 / 5; border-radius: var(--r-xl); overflow: hidden; scroll-snap-align: start; background: var(--surface); position: relative; }
.strip button img { width: 100%; height: 100%; object-fit: cover; }
.strip button.zoom img { transform: scale(1.8); transform-origin: 50% 40%; }
.strip button[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: -3px; }
.strip .n { position: absolute; left: 14px; bottom: 14px; height: 28px; padding: 0 12px; border-radius: var(--pill); background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 600; display: grid; place-items: center; }
.pw { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; margin-top: 26px; align-items: start; }
.pw h1 { margin: 6px 0 14px; font-size: clamp(38px, 4vw, 64px); line-height: .96; }
.pw .l { color: var(--muted); font-size: 16.5px; margin: 0 0 22px; max-width: 58ch; }
.pw .opts2 { display: grid; gap: 22px; }
.pw .sizes button { border-radius: var(--pill); }
.buy { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 140px); border-radius: var(--r-xl); background: var(--surface); padding: 26px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.buy .pr { font-family: var(--f-d); font-weight: 700; font-size: 42px; letter-spacing: -.04em; line-height: 1; }
.buy .omni { margin: -10px 0 0; font-size: 12.5px; color: var(--muted); }
.buy .row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.buy .step { background: var(--soft); box-shadow: none; }
.buy .row .btn { height: 56px; width: 100%; }
.buy .ln2 { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; font-size: 13.5px; padding-top: 14px; border-top: 1px solid var(--line); }
.buy .ln2 small { display: block; color: var(--muted); }
.spc { width: 230px; min-height: 150px; border-radius: var(--r); background: var(--surface); padding: 20px; display: grid; align-content: space-between; gap: 18px; box-shadow: var(--shadow); }
.spc small { color: var(--muted); font-size: 13px; }
.spc b { font-family: var(--f-d); font-size: 21px; letter-spacing: -.02em; line-height: 1.1; }
.kit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 14px; align-items: end; }
.kit .pc { width: auto; }
.kit .pc .im { aspect-ratio: 1; }
.kit .tot { display: grid; gap: 10px; padding-bottom: 50px; }
.kit .tot b { font-family: var(--f-d); font-size: 34px; letter-spacing: -.03em; }
.drawer header h3 { font-family: var(--f-d); letter-spacing: -.03em; }

@media (max-width: 960px) {
  :root { --pad: 16px; }
  .hdr .r1 { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; height: 62px; }
  .sq span { display: none; }
  .sq { width: 48px; padding: 0; justify-content: center; justify-self: end; }
  .story { height: 470px; width: 86vw; }
  .story .tx { left: 22px; right: 22px; bottom: 26px; }
  .story p { font-size: 15px; }
  .news { grid-template-columns: minmax(0, 1fr); padding: 26px; }
  .pw { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .buy { position: static; }
  .fpanel { grid-template-columns: 1fr 1fr; }
  .kit { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kit .tot { grid-column: 1 / -1; padding-bottom: 0; grid-template-columns: auto auto; justify-content: space-between; align-items: center; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > div:first-child { grid-column: 1 / -1; }
  .sh .ar { display: none; }
}
@media (max-width: 560px) {
  .hdr .ct .tx { display: none; }
  .hdr .ct { padding-left: 14px; }
  .pc { width: 200px; }
  .pc.sm { width: 170px; }
  .coll { width: 280px; height: 220px; }
  .usp { width: 240px; }
  .story h1, .story h2 { font-size: 36px; }
  .story.solid .big { font-size: 120px; right: 16px; }
  .cg { grid-template-columns: 1fr 1fr; gap: 22px 10px; }
  .cpro { aspect-ratio: auto; grid-column: 1 / -1; }
  .fpanel { grid-template-columns: minmax(0, 1fr); }
  .strip button { height: 440px; }
  .kit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kit .tot { grid-template-columns: minmax(0, 1fr) auto; }
  .kit .pc:nth-child(3) { display: none; }
  .ch { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .pc .ln { flex-direction: column; gap: 2px; }
  .pc .ln .avail { white-space: nowrap; }
}

/* riga delle sottocategorie staccata da filtri e risultati (Marco 31/10) */
#app .subcats { margin-bottom: 22px; }
