/* Multi Project — tema vetrina. I colori del cliente arrivano da :root (--primary, --accent) nell'head. */
:root {
  --primary: #1f2937; --accent: #f59e0b;
  --ink: #111827; --muted: #6b7280; --line: #e5e7eb; --bg: #fff; --soft: #f7f7f8;
  --on-primary: #fff; --radius: 12px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.06);
  --wrap: 1200px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.2rem); }
h2 { font-size: 1.35rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 20px; padding-bottom: 56px; min-height: 60vh; }
.muted { color: var(--muted); } .small { font-size: .9rem; } .err { color: #b91c1c; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* bottoni */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; background: var(--primary); color: var(--on-primary); transition: filter .15s, transform .1s; }
.btn:hover { filter: brightness(1.1); } .btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); color: #111; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--big { padding: 14px 26px; font-size: 1.05rem; }
.btn--sm { padding: 7px 12px; font-size: .9rem; }
.btn--block { display: flex; width: 100%; margin-top: 10px; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

/* header */
.hdr { background: var(--primary); color: var(--on-primary); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.hdr__top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 20px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: inherit; min-width: 0; }
.brand__logo { height: 44px; width: auto; max-width: 200px; object-fit: contain; }
.brand__name { font-weight: 800; font-size: 1.35rem; letter-spacing: -.01em; white-space: nowrap; }
.brand__tag { font-size: .72rem; opacity: .8; }
.search { display: flex; max-width: 560px; width: 100%; background: #fff; border-radius: 10px; overflow: hidden; }
.search input { flex: 1; border: 0; padding: 10px 14px; font: inherit; min-width: 0; color: var(--ink); }
.search input:focus { outline: none; }
.search button { border: 0; background: var(--accent); color: #111; padding: 0 14px; cursor: pointer; display: flex; align-items: center; }
.hdr__tools { display: flex; gap: 6px; }
.tool { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: inherit; position: relative; font-size: .95rem; }
.tool:hover { background: rgba(255,255,255,.12); }
.tool__count { position: absolute; top: 2px; left: 24px; background: var(--accent); color: #111; font-size: .7rem; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 999px; padding: 0 5px; }
.nav { border-top: 1px solid rgba(255,255,255,.15); }
.nav__toggle { display: none; background: none; border: 0; color: inherit; font: inherit; font-weight: 600; padding: 10px 0; cursor: pointer; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav__list::-webkit-scrollbar { display: none; }
.nav__list a { display: block; padding: 10px 12px; text-decoration: none; white-space: nowrap; font-size: .93rem; opacity: .9; border-bottom: 3px solid transparent; }
.nav__list a:hover, .nav__list a.on { opacity: 1; border-bottom-color: var(--accent); }
@media (max-width: 760px) {
  .hdr__top { grid-template-columns: 1fr auto; }
  .search { grid-column: 1 / -1; max-width: none; }
  .tool span { display: none; } .tool__count { left: 22px; }
  .nav__toggle { display: block; }
  .nav__list { display: none; flex-direction: column; padding-bottom: 8px; }
  .nav__list.open { display: flex; }
  .nav__list a { border-bottom: 0; padding: 8px 4px; }
}

/* home */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; background: var(--soft); border-radius: 18px; padding: clamp(20px, 4vw, 48px); margin-bottom: 36px; }
.hero__lead { font-size: 1.1rem; color: var(--muted); max-width: 52ch; }
.hero__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero__img img { margin: 0 auto; max-height: 360px; width: auto; mix-blend-mode: multiply; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .hero__img { display: none; } }
.section { margin: 36px 0; }
.section__title { font-size: 1.4rem; margin-bottom: 16px; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; text-align: center; font-weight: 600; font-size: .95rem; transition: box-shadow .15s, border-color .15s; }
.cat:hover { box-shadow: var(--shadow); border-color: var(--accent); }
.cat img { width: 90px; height: 90px; object-fit: contain; mix-blend-mode: multiply; }
.cat small { color: var(--muted); font-weight: 400; }
.usp { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.usp__item { display: flex; flex-direction: column; padding: 16px 18px; border-left: 4px solid var(--accent); background: var(--soft); border-radius: 0 10px 10px 0; }
.usp__item span { color: var(--muted); font-size: .92rem; }

/* card prodotto */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
@media (max-width: 520px) { .grid-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; background: #fff; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__img { aspect-ratio: 1; background: #fff; display: flex; align-items: center; justify-content: center; padding: 10px; }
.card__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.card__body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.card__brand { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.card__title { font-size: .98rem; font-weight: 600; margin: 0; line-height: 1.3; }
.card__meta { color: var(--muted); font-size: .82rem; }
.card__price { margin-top: 6px; font-size: .95rem; } .card__price b { font-size: 1.1rem; }

/* listing */
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; } .crumbs a { color: inherit; }
.listing { display: grid; grid-template-columns: 240px 1fr; gap: 28px; }
.listing__title { font-size: 1.5rem; }
.filters h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 6px; }
.flist { list-style: none; margin: 0; padding: 0; }
.flist a { display: flex; justify-content: space-between; padding: 5px 8px; border-radius: 6px; text-decoration: none; font-size: .95rem; }
.flist a:hover, .flist a.on { background: var(--soft); font-weight: 600; }
.flist small { color: var(--muted); font-weight: 400; }
.listing__bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.filters__toggle { display: none; }
.sort select { margin-left: 6px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 28px; }
.pager a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 600; }
.empty { background: var(--soft); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); }
@media (max-width: 860px) {
  .listing { grid-template-columns: 1fr; }
  .filters { display: none; } .filters.open { display: block; }
  .filters__toggle { display: inline-flex; }
  .listing__bar { order: -1; }
}

/* scheda prodotto */
.prod { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.prod__main { border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 16px; background: #fff; }
.prod__main img { max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.prod__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.prod__thumbs button { border: 2px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; flex: 0 0 auto; }
.prod__thumbs button.on { border-color: var(--accent); }
.prod__thumbs img { width: 64px; height: 64px; object-fit: contain; }
.prod__brand { color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; }
.prod__title { font-size: 1.6rem; margin-bottom: 4px; }
.prod__price { margin: 16px 0; font-size: 1.1rem; } .prod__price b { font-size: 1.8rem; color: var(--ink); }
.opt { margin: 16px 0; } .opt__label { font-weight: 600; margin-bottom: 8px; }
.opt--row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; max-height: 148px; overflow-y: auto; padding: 2px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d1d5db; cursor: pointer; padding: 0; position: relative; }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 3px var(--accent); }
.swatch.is-out { opacity: .35; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.size { min-width: 52px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.size[aria-checked="true"] { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.size.is-out { color: #bbb; border-style: dashed; cursor: not-allowed; text-decoration: line-through; }
.size.is-order { border-style: dashed; }
.opt__stock { margin-top: 8px; font-size: .92rem; color: var(--muted); }
.qty { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 42px; border: 0; background: var(--soft); font-size: 1.2rem; cursor: pointer; }
.qty input { width: 64px; border: 0; text-align: center; font: inherit; font-weight: 600; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty--sm button { width: 32px; } .qty--sm input { width: 48px; }
.msg { margin-top: 10px; padding: 10px 14px; border-radius: 8px; background: #ecfdf5; color: #065f46; font-weight: 600; }
.msg.is-err { background: #fef2f2; color: #991b1b; }
.prod__note { margin-top: 14px; font-size: .92rem; }
.prod__usp { list-style: none; padding: 0; margin: 20px 0 0; border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); font-size: .92rem; }
.prod__usp li::before { content: "✓ "; color: #059669; font-weight: 700; }
.prod__desc { grid-column: 1 / -1; max-width: 800px; }
.prod__desc h4 { margin: 16px 0 6px; font-size: 1rem; } .prod__desc ul { margin: 0; padding-left: 20px; color: #374151; }
@media (max-width: 760px) { .prod { grid-template-columns: 1fr; gap: 20px; } }

/* carrello e cassa */
.cartpage, .checkout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
@media (max-width: 860px) { .cartpage, .checkout { grid-template-columns: 1fr; } }
.cline { display: grid; grid-template-columns: 80px 1fr auto auto auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cline__img img { width: 80px; height: 80px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; }
.cline__name { font-weight: 600; text-decoration: none; }
.cline__info { font-size: .92rem; min-width: 0; }
.cline__total { font-weight: 700; white-space: nowrap; }
.cline__del { border: 0; background: none; font-size: 1.4rem; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.cline__del:hover { color: #b91c1c; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #ccc; vertical-align: -1px; margin-right: 4px; }
@media (max-width: 560px) { .cline { grid-template-columns: 64px 1fr auto; } .cline__total { grid-column: 2; } .cline__del { grid-column: 3; grid-row: 1; } .cline__img img { width: 64px; height: 64px; } }
.summary { background: var(--soft); border-radius: var(--radius); padding: 20px; position: sticky; top: 130px; }
.summary__row { display: flex; justify-content: space-between; padding: 6px 0; }
.summary__row--tot { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-size: 1.15rem; }
.summary__items { list-style: none; margin: 0 0 10px; padding: 0; font-size: .92rem; }
.summary__items li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; background: #fff; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 12px; }
.row.narrow { grid-template-columns: 110px 1fr 90px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; } label small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=number], textarea, select { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font: inherit; }
input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); border-color: var(--accent); }
.pay { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px; margin-bottom: 10px; cursor: pointer; font-weight: 400; }
.pay:has(input:checked) { border-color: var(--primary); background: var(--soft); }
.pay input { margin-top: 4px; } .pay small { display: block; color: var(--muted); }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin-top: 12px; }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; }
.alert--err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; } .alert--err ul { margin: 0; padding-left: 18px; }
.alert--ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }

/* grazie & pagine */
.thanks { max-width: 720px; margin: 0 auto; }
.thanks__head { text-align: center; margin-bottom: 24px; }
.thanks__icon { width: 64px; height: 64px; border-radius: 50%; background: #059669; color: #fff; font-size: 2rem; line-height: 64px; margin: 0 auto 12px; }
.page { max-width: 760px; } .page__body { line-height: 1.7; } .page__body h3 { margin-top: 24px; }

/* footer */
.ftr { background: #111827; color: #d1d5db; margin-top: 40px; font-size: .92rem; }
.ftr__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding-top: 36px; padding-bottom: 24px; }
.ftr h3 { color: #fff; font-size: 1rem; margin-bottom: 8px; } .ftr p { margin: 4px 0; } .ftr a { color: #e5e7eb; }
.ftr__bottom { border-top: 1px solid #1f2937; padding-top: 14px; padding-bottom: 20px; color: #9ca3af; font-size: .85rem; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #111827; color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); opacity: 0; transition: .25s; z-index: 90; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast a { color: var(--accent); font-weight: 700; margin-left: 8px; }
