/* ==========================================================================
   Layerino — design system
   Colori e forme prese dal logo: arancio pieno, bianco, inchiostro,
   barre arrotondate impilate come strati di stampa.
   ========================================================================== */

:root {
  --orange: #ff5a1f;
  --orange-600: #ec4810;
  --orange-700: #c93a08;
  --orange-100: #ffe6db;
  --orange-50: #fff4ee;
  --ink: #17171f;
  --ink-2: #2e2e39;
  --muted: #6c6a76;
  --line: #ece6e1;
  --line-2: #e0d8d1;
  --bg: #fffaf6;
  --surface: #ffffff;
  --green: #18a058;
  --green-50: #e6f7ee;
  --yellow: #ffb020;
  --blue: #3d6bff;
  --red: #e5383b;

  --font-display: 'Fredoka', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 40px;
  --pill: 999px;
  --shadow-sm: 0 1px 2px rgb(23 23 31 / .06), 0 2px 8px rgb(23 23 31 / .04);
  --shadow-md: 0 6px 24px -6px rgb(23 23 31 / .12), 0 2px 6px rgb(23 23 31 / .04);
  --shadow-lg: 0 24px 60px -18px rgb(23 23 31 / .25);
  --shadow-orange: 0 12px 30px -10px rgb(255 90 31 / .6);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
::selection { background: var(--orange); color: #fff; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
.container--narrow { width: min(860px, 100% - 40px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--tight { padding: clamp(40px, 6vw, 72px) 0; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 60ch; }
.text-orange { color: var(--orange); }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Bottoni (pill come le barre del logo) ---------- */

.btn {
  --btn-bg: var(--ink); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  border: 2px solid transparent; border-radius: var(--pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 700; font-size: 1rem; white-space: nowrap; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn--primary { --btn-bg: var(--orange); box-shadow: var(--shadow-orange); }
.btn--primary:hover { --btn-bg: var(--orange-600); }
.btn--white { --btn-bg: #fff; --btn-fg: var(--ink); box-shadow: var(--shadow-md); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--ghost-light { --btn-bg: transparent; --btn-fg: #fff; border-color: rgb(255 255 255 / .5); }
.btn--ghost-light:hover { border-color: #fff; background: rgb(255 255 255 / .08); }
.btn--danger { --btn-bg: #fff; --btn-fg: var(--red); border-color: #f5c9ca; }
.btn--danger:hover { --btn-bg: var(--red); --btn-fg: #fff; }
.btn--sm { min-height: 42px; padding: 0 20px; font-size: .92rem; }
.btn--xs { min-height: 34px; padding: 0 14px; font-size: .85rem; }
.btn--block { width: 100%; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn.is-loading { pointer-events: none; color: transparent; position: relative; }
.btn.is-loading::after {
  content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid var(--btn-fg); border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Mascotte ---------- */

.mascot .mascot-layers { fill: var(--orange); }
.mascot .mascot-face { fill: var(--ink); }
.mascot--sm { width: 34px; height: auto; }
.mascot--white .mascot-layers { fill: #fff; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgb(255 250 246 / .82);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px -16px rgb(23 23 31 / .3); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.65rem; letter-spacing: -.02em; line-height: 1; padding-bottom: 3px; }
.brand:hover .mascot-layers rect { animation: layer-bounce .5s var(--ease) both; }
.brand:hover .mascot-layers rect:nth-child(2) { animation-delay: .04s; }
.brand:hover .mascot-layers rect:nth-child(3) { animation-delay: .08s; }
.brand:hover .mascot-layers rect:nth-child(4) { animation-delay: .12s; }
.brand:hover .mascot-layers rect:nth-child(5) { animation-delay: .16s; }
.brand:hover .mascot-layers rect:nth-child(6) { animation-delay: .2s; }
@keyframes layer-bounce { 40% { transform: translateY(-24px); } }

.main-nav { display: flex; gap: 6px; margin-right: auto; }
.main-nav a {
  padding: 9px 16px; border-radius: var(--pill); font-weight: 600; color: var(--ink-2);
  transition: background .2s, color .2s;
}
.main-nav a:hover { background: var(--orange-50); color: var(--orange-700); }
.main-nav a[aria-current] { background: var(--ink); color: #fff; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.cart-link {
  position: relative; display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 50%; border: 1.5px solid var(--line-2); background: #fff; transition: border-color .2s, transform .2s;
}
.cart-link:hover, .cart-link[aria-current] { border-color: var(--ink); }
.cart-link.bump { animation: bump .4s var(--ease); }
@keyframes bump { 50% { transform: scale(1.15); } }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: var(--pill); background: var(--orange); color: #fff;
  font-size: .75rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg);
}
.search-toggle {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; padding: 0;
  border: 1.5px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer; transition: border-color .2s;
}
.search-toggle:hover, .search-toggle[aria-expanded='true'] { border-color: var(--ink); }
.home .site-header:not(.is-scrolled) .account-link { background: rgb(255 255 255 / .15); border-color: rgb(255 255 255 / .35); color: #fff; }
.home .site-header:not(.is-scrolled) .search-toggle { background: rgb(255 255 255 / .15); border-color: rgb(255 255 255 / .35); color: #fff; }
.search-panel {
  position: absolute; inset: var(--header-h) 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg); padding: 18px 0 22px; animation: panel-in .2s var(--ease);
}
@keyframes panel-in { from { opacity: 0; transform: translateY(-8px); } }
.search-panel-form, .search-field { position: relative; display: block; }
.search-panel-form svg, .search-field svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-panel-form .input, .search-field .input { padding-left: 50px; }
.search-panel-form .input { min-height: 56px; font-size: 1.05rem; }
.search-suggest ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px; }
.search-suggest li a { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 14px; transition: background .15s; }
.search-suggest li a:hover, .search-suggest li a:focus-visible { background: var(--orange-50); }
.search-suggest img, .search-suggest li a > span:first-child { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--orange-50); }
.search-suggest b { display: block; font-size: .98rem; line-height: 1.25; }
.search-suggest small { color: var(--muted); font-size: .84rem; }
.search-suggest .price { font-size: 1.05rem; }
.search-all { display: inline-flex; gap: 8px; margin-top: 12px; padding: 6px 4px; font-weight: 700; color: var(--orange-700); }
.search-none { margin: 14px 4px 0; color: var(--muted); }
.search-none a { color: var(--orange-700); font-weight: 600; text-decoration: underline; }
.menu-toggle { display: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--ink); cursor: pointer; padding: 0 13px; flex-direction: column; justify-content: center; gap: 4px; }
.menu-toggle span { height: 3px; border-radius: 3px; background: #fff; transition: transform .25s var(--ease), opacity .2s; }
.menu-toggle span:nth-child(1) { width: 14px; margin-left: 3px; }
.menu-toggle span:nth-child(2) { width: 20px; }
.menu-toggle span:nth-child(3) { width: 20px; }
.menu-toggle[aria-expanded='true'] span:nth-child(1) { opacity: 0; }
.menu-toggle[aria-expanded='true'] span:nth-child(2) { transform: translateY(-3.5px) rotate(45deg); }
.menu-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-10.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .hide-mobile { display: none; }
  .header-inner { gap: 12px; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0; padding: 16px 20px 28px;
    flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg); transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .25s var(--ease), opacity .2s;
  }
  .main-nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 14px 18px; font-size: 1.1rem; }
  .brand { margin-right: auto; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden; color: #fff; background: var(--orange);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  margin-top: calc(var(--header-h) * -1); padding-top: var(--header-h);
}
.home .site-header:not(.is-scrolled) { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.home .site-header:not(.is-scrolled) .main-nav a:not([aria-current]) { color: #fff; }
.home .site-header:not(.is-scrolled) .main-nav a:hover { background: rgb(255 255 255 / .16); color: #fff; }
.home .site-header:not(.is-scrolled) .brand .mascot-layers { fill: #fff; }
.home .site-header:not(.is-scrolled) .wordmark { color: #fff; }
.home .site-header:not(.is-scrolled) .btn--primary { --btn-bg: #fff; --btn-fg: var(--ink); box-shadow: none; }
.home .site-header:not(.is-scrolled) .cart-link { background: rgb(255 255 255 / .15); border-color: rgb(255 255 255 / .35); color: #fff; }
.home .site-header:not(.is-scrolled) .cart-count { border-color: var(--orange); background: var(--ink); }
@media (max-width: 860px) {
  .home .site-header:not(.is-scrolled) .main-nav a:not([aria-current]) { color: var(--ink); }
}

.hero-inner {
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px;
  min-height: min(720px, 88vh); padding: 48px 0 96px;
}
.hero h1 { font-size: clamp(2.8rem, 6.4vw, 5.4rem); font-weight: 700; margin-bottom: 22px; }
.hero h1 .underline { position: relative; white-space: nowrap; }
.hero h1 .underline::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: .02em; height: .16em;
  border-radius: var(--pill); background: var(--ink); z-index: -1; transform-origin: left;
  animation: grow-x .8s .9s var(--ease) both;
}
.hero h1 .underline { z-index: 0; }
@keyframes grow-x { from { transform: scaleX(0); } }
.hero .lead { color: rgb(255 255 255 / .9); margin-bottom: 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 40px; font-weight: 600; font-size: .95rem; }
.hero-badges span { display: inline-flex; align-items: center; gap: 8px; }
.hero-badges span::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgb(255 255 255 / .25); }

.hero-art { position: relative; display: grid; place-items: center; }
.hero-art .mascot { width: min(380px, 70vw); filter: drop-shadow(0 30px 40px rgb(120 30 0 / .25)); }
.hero-art .mascot-layers { fill: #fff; }
.hero-art .mascot-layers rect { animation: print-layer .55s var(--ease) both; transform-box: fill-box; transform-origin: center; }
.hero-art .mascot-layers rect:nth-child(6) { animation-delay: .15s; }
.hero-art .mascot-layers rect:nth-child(5) { animation-delay: .3s; }
.hero-art .mascot-layers rect:nth-child(4) { animation-delay: .45s; }
.hero-art .mascot-layers rect:nth-child(3) { animation-delay: .6s; }
.hero-art .mascot-layers rect:nth-child(2) { animation-delay: .75s; }
.hero-art .mascot-layers rect:nth-child(1) { animation-delay: .9s; }
.hero-art .mascot-face { animation: fade-in .4s 1.35s both; }
.hero-art .mascot-face circle { animation: blink 5s 2.5s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes print-layer { from { opacity: 0; transform: translateY(-60px) scaleX(.3); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
.hero-art .nozzle {
  position: absolute; top: -6%; left: 50%; width: 46px; height: 64px; margin-left: -23px;
  background: var(--ink); clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 38% 100%, 0 62%);
  animation: nozzle 1.4s var(--ease) both;
}
@keyframes nozzle {
  0% { transform: translate(-120px, 260px); }
  15% { transform: translate(120px, 260px); }
  30% { transform: translate(-120px, 205px); }
  45% { transform: translate(120px, 150px); }
  60% { transform: translate(-110px, 100px); }
  75% { transform: translate(90px, 45px); }
  90%, 100% { transform: translate(0, -10px); opacity: 0; }
}
.hero-chip {
  position: absolute; display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: var(--pill); background: #fff; color: var(--ink);
  font-weight: 700; font-size: .92rem; box-shadow: var(--shadow-lg); animation: float 6s ease-in-out infinite;
}
.hero-chip small { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; line-height: 1.2; }
.hero-chip .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--orange-100); color: var(--orange-600); font-size: 1rem; }
.hero-chip--a { top: 8%; right: -2%; }
.hero-chip--b { bottom: 10%; left: -4%; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-12px); } }
.hero-stripes { position: absolute; inset: auto -5% -1px -5%; height: 70px; display: flex; flex-direction: column; gap: 10px; opacity: .18; pointer-events: none; }
.hero-stripes i { flex: 1; border-radius: var(--pill); background: #fff; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; padding: 24px 0 80px; gap: 24px; min-height: 0; }
  .hero-art { order: -1; }
  .hero-art .mascot { width: min(230px, 56vw); }
  .hero-chip, .hero-art .nozzle { display: none; }
}

/* ---------- Sezioni home ---------- */

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 44px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head .lead { margin: 12px 0 0; }

.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service {
  position: relative; display: flex; flex-direction: column; padding: 34px; min-height: 340px;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.service:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service h3 { font-size: 1.7rem; margin: 22px 0 10px; }
.service p { color: var(--muted); margin-bottom: 28px; }
.service .link { margin-top: auto; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.service .link .arrow { transition: transform .2s var(--ease); }
.service:hover .link .arrow { transform: translateX(5px); }
.service-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--orange-50); color: var(--orange); }
.service--dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.service--dark p { color: rgb(255 255 255 / .7); }
.service--dark .service-icon { background: rgb(255 255 255 / .1); color: #fff; }
.service--orange { background: var(--orange); color: #fff; border-color: var(--orange); }
.service--orange p { color: rgb(255 255 255 / .85); }
.service--orange .service-icon { background: rgb(255 255 255 / .2); color: #fff; }
.service-deco { position: absolute; right: -40px; bottom: -30px; width: 200px; display: flex; flex-direction: column; gap: 9px; opacity: .08; pointer-events: none; }
.service-deco i { height: 26px; border-radius: var(--pill); background: currentColor; }
.service-deco i:nth-child(1) { margin-left: 50px; }
.service-deco i:nth-child(2) { margin-left: 25px; }
@media (max-width: 900px) { .services { grid-template-columns: 1fr; } .service { min-height: 0; } }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { padding: 28px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); position: relative; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: inline-grid; place-items: center; height: 36px; padding: 0 14px; border-radius: var(--pill);
  background: var(--orange-50); color: var(--orange-600); font-family: var(--font-display); font-weight: 700; margin-bottom: 18px;
}
.step h3 { font-size: 1.2rem; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.materials-band { background: var(--ink); color: #fff; border-radius: var(--r-xl); padding: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: center; }
.materials-band .lead { color: rgb(255 255 255 / .7); }
.material-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.material-pill { padding: 20px 22px; border-radius: var(--r-md); background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .1); }
.material-pill strong { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; display: block; }
.material-pill span { color: rgb(255 255 255 / .65); font-size: .9rem; line-height: 1.45; display: block; margin-top: 4px; }
@media (max-width: 900px) { .materials-band { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .material-list { grid-template-columns: 1fr; } }

.cta-band {
  position: relative; overflow: hidden; border-radius: var(--r-xl); background: var(--orange); color: #fff;
  padding: clamp(44px, 7vw, 88px); display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 10px; max-width: 16ch; }
.cta-band p { margin: 0; color: rgb(255 255 255 / .88); font-size: 1.1rem; }
.cta-band > * { position: relative; }
.cta-band > .hero-stripes { position: absolute; }
.cta-band .hero-stripes { inset: 0 -10% 0 55%; height: auto; flex-direction: column; justify-content: center; gap: 14px; opacity: .14; }
.cta-band .hero-stripes i { flex: 0 0 34px; }

/* ---------- Page header ---------- */

.page-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 4vw, 48px); position: relative; }
.page-hero h1 { margin-bottom: 16px; }
.page-hero .lead { margin: 0; }
.breadcrumb { display: flex; gap: 8px; font-size: .9rem; color: var(--muted); margin-bottom: 22px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--orange-600); }

/* ---------- Prodotti ---------- */

.shop-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, auto); gap: 10px; margin-bottom: 18px; }
.shop-toolbar .select { width: auto; }
.search-field .input { min-height: 52px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.chip:disabled { opacity: .4; cursor: default; }
.chip:disabled:hover { border-color: var(--line-2); }
.shop-status { display: flex; align-items: baseline; gap: 16px; margin-bottom: 22px; color: var(--muted); }
.shop-status p { margin: 0; }
.shop-status b { color: var(--ink); }
.shop-more { display: flex; justify-content: center; margin-top: 40px; }
@media (max-width: 860px) {
  .shop-toolbar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .shop-toolbar .select { width: 100%; min-height: 46px; padding: 10px 40px 10px 14px; font-size: .95rem; background-position: right 14px center; }
  .shop-toolbar .select[name='ordina'] { grid-column: 1 / -1; }
  .shop-toolbar:has(.select[name='materiale'][hidden]) .select[name='ordina'] { grid-column: auto; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px 18px; padding: 2px 20px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .search-panel { position: fixed; padding: 14px 0 18px; max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
  .search-suggest ul { grid-template-columns: 1fr; }
}
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: var(--pill);
  border: 1.5px solid var(--line-2); background: #fff; font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: all .2s;
}
.chip small { color: var(--muted); font-weight: 600; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed='true'] small { color: rgb(255 255 255 / .6); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 26px; }
.product-card { display: flex; flex-direction: column; gap: 14px; }
.product-media-wrap { position: relative; }
.product-media {
  position: relative; display: block; aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; background: var(--orange-50);
}
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.product-card:hover .product-media img { transform: scale(1.05); }
.product-media .badge { position: absolute; top: 14px; left: 14px; }
.quick-add {
  position: absolute; right: 14px; bottom: 14px; width: 50px; height: 50px; border-radius: 50%; border: 0;
  background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer;
  transform: translateY(12px); opacity: 0; transition: all .25s var(--ease); box-shadow: var(--shadow-md);
}
.product-card:hover .quick-add, .quick-add:focus-visible { transform: none; opacity: 1; }
.quick-add:hover { background: var(--orange); }
@media (hover: none) { .quick-add { transform: none; opacity: 1; } }
.product-info { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 0 4px; }
.product-info h3 { font-size: 1.2rem; margin: 0 0 2px; }
.product-info p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.4; }
.price { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; white-space: nowrap; }
.swatches { display: flex; gap: 5px; padding: 0 4px; }
.swatch-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgb(0 0 0 / .1); }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--pill); font-size: .78rem; font-weight: 700; background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.badge--orange { background: var(--orange); color: #fff; }
.badge--green { background: var(--green-50); color: var(--green); box-shadow: none; }
.badge--muted { background: #f1eeeb; color: var(--muted); box-shadow: none; }

.skeleton { border-radius: var(--r-lg); background: linear-gradient(90deg, #f3ede8 25%, #faf6f2 50%, #f3ede8 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty-state { text-align: center; padding: 64px 24px; border: 2px dashed var(--line-2); border-radius: var(--r-lg); color: var(--muted); }
.empty-state .mascot { width: 90px; margin: 0 auto 18px; opacity: .9; }
.empty-state h3 { color: var(--ink); }

/* Dettaglio prodotto */
.product-detail { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: start; padding-bottom: 96px; }
.gallery { position: sticky; top: calc(var(--header-h) + 20px); }
.gallery-main { aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; background: var(--orange-50); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.gallery-thumbs button { width: 84px; height: 84px; padding: 0; border-radius: var(--r-sm); overflow: hidden; border: 2px solid transparent; cursor: pointer; background: var(--orange-50); }
.gallery-thumbs button[aria-current='true'] { border-color: var(--orange); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-panel h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); margin: 14px 0 8px; }
.product-panel .tagline { color: var(--muted); font-size: 1.15rem; margin-bottom: 22px; }
.product-panel .price { font-size: 2rem; display: block; margin-bottom: 28px; }
.product-panel .description { color: var(--ink-2); white-space: pre-line; margin-bottom: 30px; }
.option-label { font-weight: 700; font-size: .92rem; margin-bottom: 10px; display: flex; justify-content: space-between; }
.option-label span { font-weight: 500; color: var(--muted); }
.color-options { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.color-option { position: relative; }
.color-option input { position: absolute; opacity: 0; }
.color-option label { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 8px; border-radius: var(--pill); border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; font-weight: 600; font-size: .92rem; transition: all .15s; }
.color-option label i { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid rgb(0 0 0 / .1); }
.color-option input:checked + label { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.color-option input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 2px; }
.buy-row { display: flex; gap: 12px; margin-bottom: 28px; }
.buy-row .btn { flex: 1; }
.specs { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.specs li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.specs li span:first-child { color: var(--muted); }
.specs li span:last-child { font-weight: 600; text-align: right; }
@media (max-width: 900px) { .product-detail { grid-template-columns: 1fr; } .gallery { position: static; } }

.qty { display: inline-flex; align-items: center; height: 52px; border-radius: var(--pill); border: 1.5px solid var(--line-2); background: #fff; }
.qty button { width: 46px; height: 100%; border: 0; background: none; cursor: pointer; font-size: 1.3rem; font-weight: 600; border-radius: var(--pill); }
.qty button:hover { color: var(--orange); }
.qty input { width: 40px; text-align: center; border: 0; background: none; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty--sm { height: 40px; }
.qty--sm button { width: 36px; font-size: 1.1rem; }
.qty--sm input { width: 30px; }

/* ---------- Form ---------- */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px); }
.card--flat { box-shadow: none; }
.card h2, .card h3 { margin-bottom: 6px; }
.card-sub { color: var(--muted); margin-bottom: 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label, .field .label { font-weight: 700; font-size: .9rem; }
.field label .opt { font-weight: 500; color: var(--muted); }
.field .hint { font-size: .84rem; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 13px 18px; border-radius: 14px;
  border: 1.5px solid var(--line-2); background: #fff; font-size: 1rem;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.select { appearance: none; cursor: pointer; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2317171f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; }
.input:hover, .select:hover, .textarea:hover { border-color: #cfc5bc; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--orange); box-shadow: 0 0 0 4px rgb(255 90 31 / .15); }
.input[aria-invalid='true'] { border-color: var(--red); }
.form-section-title { grid-column: 1 / -1; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin: 14px 0 -4px; display: flex; align-items: center; gap: 10px; }
.form-section-title::before { content: ''; width: 18px; height: 8px; border-radius: var(--pill); background: var(--orange); }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.form-footer small { color: var(--muted); max-width: 46ch; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--orange); margin-top: 2px; flex: none; }

.segmented { display: flex; padding: 5px; border-radius: var(--pill); background: #f3eee9; gap: 4px; }
.segmented button { flex: 1; height: 40px; border: 0; border-radius: var(--pill); background: none; font-weight: 700; cursor: pointer; color: var(--muted); transition: all .2s; font-size: .92rem; }
.segmented button[aria-pressed='true'] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.range { width: 100%; accent-color: var(--orange); height: 28px; cursor: pointer; }
.range-row { display: flex; justify-content: space-between; align-items: baseline; }
.range-row output { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }

.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 36px 24px; border-radius: var(--r-md); border: 2px dashed #e3c8ba; background: var(--orange-50);
  text-align: center; cursor: pointer; transition: all .2s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--orange); background: var(--orange-100); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .dz-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--orange); color: #fff; display: grid; place-items: center; margin-bottom: 6px; box-shadow: var(--shadow-orange); }
.dropzone strong { font-size: 1.05rem; }
.dropzone span { color: var(--muted); font-size: .9rem; }
.file-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 6px; border-radius: var(--pill); background: #fff; border: 1px solid var(--line); font-size: .85rem; font-weight: 600; max-width: 100%; }
.file-chip img, .file-chip .ext { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
.file-chip .ext { display: grid; place-items: center; background: var(--ink); color: #fff; font-size: .62rem; text-transform: uppercase; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.file-chip button { width: 24px; height: 24px; border: 0; border-radius: 50%; background: #f1eeeb; cursor: pointer; font-size: 1rem; line-height: 1; }
.file-chip button:hover { background: var(--red); color: #fff; }

.idea-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.idea-chips button { height: 36px; padding: 0 14px; border-radius: var(--pill); border: 1.5px solid var(--line-2); background: #fff; font-weight: 600; font-size: .88rem; cursor: pointer; }
.idea-chips button:hover { border-color: var(--orange); color: var(--orange-700); background: var(--orange-50); }

/* ---------- Layout a due colonne ---------- */

.split { display: grid; grid-template-columns: 1fr 400px; gap: 28px; align-items: start; padding-bottom: 96px; }
.split > * { min-width: 0; }
.split > aside { position: sticky; top: calc(var(--header-h) + 20px); }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } .split > aside { position: static; } }

.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.info-list li { display: flex; gap: 14px; }
.info-list .num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--font-display); }
.info-list strong { display: block; }
.info-list p { margin: 0; color: var(--muted); font-size: .93rem; }
.aside-card { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 32px; }
.aside-card .info-list p { color: rgb(255 255 255 / .65); }
.aside-card h3 { margin-bottom: 22px; }

/* ---------- Calcolatore ---------- */

.viewer {
  position: relative; aspect-ratio: 16 / 11; border-radius: var(--r-lg); overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #fff 0, #fbeee6 70%);
  border: 1px solid var(--line);
}
.viewer canvas { width: 100% !important; height: 100% !important; }
.viewer-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; }
.viewer-toolbar { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 10px; pointer-events: none; }
.viewer-toolbar > * { pointer-events: auto; }
.viewer-hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font-size: .8rem; color: var(--muted); background: rgb(255 255 255 / .85); padding: 4px 12px; border-radius: var(--pill); white-space: nowrap; }
.model-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 0; }
.stat { padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.stat dt { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
@media (max-width: 640px) { .model-stats { grid-template-columns: 1fr 1fr; } }

.summary { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 30px; }
.summary h3 { font-size: 1.15rem; color: rgb(255 255 255 / .7); font-family: var(--font-body); font-weight: 600; margin-bottom: 4px; }
.summary-total { font-family: var(--font-display); font-weight: 600; font-size: 3.2rem; line-height: 1.1; margin-bottom: 4px; transition: color .3s; }
.summary-total.flash { color: var(--orange); }
.summary-sub { color: rgb(255 255 255 / .6); font-size: .9rem; margin-bottom: 24px; }
.summary-rows { list-style: none; margin: 0 0 24px; padding: 0; }
.summary-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgb(255 255 255 / .1); font-size: .95rem; }
.summary-rows li span:first-child { color: rgb(255 255 255 / .7); display: flex; align-items: center; gap: 10px; }
.summary-rows li span:first-child::before { content: ''; width: 12px; height: 6px; border-radius: var(--pill); background: var(--c, var(--orange)); }
.summary-rows li strong { font-weight: 700; }
.summary-bar { display: flex; height: 12px; border-radius: var(--pill); overflow: hidden; gap: 3px; margin-bottom: 20px; }
.summary-bar i { display: block; border-radius: var(--pill); transition: flex-grow .4s var(--ease); }
.summary .note { font-size: .82rem; color: rgb(255 255 255 / .55); margin: 16px 0 0; }
.summary.is-empty .summary-total { color: rgb(255 255 255 / .3); }
.alert { padding: 14px 18px; border-radius: var(--r-sm); font-size: .92rem; font-weight: 500; display: flex; gap: 10px; align-items: flex-start; }
.alert--warn { background: #fff4dc; color: #8a5800; }
.alert--error { background: #fde8e8; color: #a12325; }
.alert--ok { background: var(--green-50); color: #0e6b3a; }

/* ---------- Carrello ---------- */

.cart-items { display: flex; flex-direction: column; gap: 14px; }
.cart-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.cart-item img { width: 96px; height: 96px; border-radius: var(--r-sm); object-fit: cover; background: var(--orange-50); }
.cart-item h3 { font-size: 1.1rem; margin: 0 0 2px; }
.cart-item .meta { color: var(--muted); font-size: .9rem; margin-bottom: 10px; }
.cart-item > * { min-width: 0; }
.cart-item .right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.link-btn { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .86rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.link-btn:hover { color: var(--red); }
@media (max-width: 560px) { .cart-item { grid-template-columns: 72px 1fr; } .cart-item img { width: 72px; height: 72px; } .cart-item .right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; } }
.free-ship { margin-bottom: 20px; }
.free-ship small { display: block; margin-bottom: 8px; color: rgb(255 255 255 / .75); }
.progress { height: 8px; border-radius: var(--pill); background: rgb(255 255 255 / .12); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--orange); border-radius: var(--pill); transition: width .4s var(--ease); }

/* ---------- Successo ---------- */

.success { text-align: center; padding: 56px 24px; }
.success .mascot { width: 120px; margin: 0 auto 24px; }
.success .mascot-layers rect { animation: print-layer .5s var(--ease) both; transform-box: fill-box; transform-origin: center; }
.success .mascot-layers rect:nth-child(5) { animation-delay: .08s; }
.success .mascot-layers rect:nth-child(4) { animation-delay: .16s; }
.success .mascot-layers rect:nth-child(3) { animation-delay: .24s; }
.success .mascot-layers rect:nth-child(2) { animation-delay: .32s; }
.success .mascot-layers rect:nth-child(1) { animation-delay: .4s; }
.success h2 { margin-bottom: 10px; }
.success p { color: var(--muted); max-width: 46ch; margin: 0 auto 26px; }

/* ---------- Toast ---------- */

.toast-stack { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: calc(100% - 32px); }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; border-radius: var(--pill);
  background: var(--ink); color: #fff; font-weight: 600; font-size: .95rem; box-shadow: var(--shadow-lg);
  animation: toast-in .35s var(--ease) both; pointer-events: auto; max-width: 100%;
}
.toast.is-leaving { animation: toast-out .25s ease both; }
.toast .t-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); flex: none; font-size: .85rem; }
.toast--error .t-icon { background: var(--red); }
.toast a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ---------- Footer ---------- */

.site-footer { margin-top: 40px; background: var(--ink); color: rgb(255 255 255 / .7); padding: 72px 0 28px; border-radius: var(--r-xl) var(--r-xl) 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { color: #fff; font-family: var(--font-body); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 18px; }
.footer-grid a, .footer-grid span { display: block; margin-bottom: 4px; padding: 5px 0; font-size: .95rem; }
.footer-grid a:hover { color: var(--orange); }
.footer-brand p { max-width: 34ch; margin-top: 18px; font-size: .95rem; }
.brand--light .wordmark { color: #fff; }
.brand--light .mascot-layers { fill: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 56px; padding-top: 24px; border-top: 1px solid rgb(255 255 255 / .1); font-size: .88rem; gap: 16px; flex-wrap: wrap; }
.footer-stripes { display: flex; gap: 6px; }
.footer-stripes i { width: 32px; height: 8px; border-radius: var(--pill); background: var(--orange); }
.footer-stripes i:nth-child(2) { width: 22px; opacity: .7; }
.footer-stripes i:nth-child(3) { width: 12px; opacity: .45; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Animazioni di comparsa ---------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Admin
   ========================================================================== */

.admin-body { background: #f6f2ee; }
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--orange); }
.admin-login .card { width: min(420px, 100%); text-align: center; box-shadow: var(--shadow-lg); }
.admin-login .mascot { width: 84px; margin: 0 auto 18px; }
.admin-login form { display: grid; gap: 14px; margin-top: 22px; text-align: left; }

.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-side { background: var(--ink); color: #fff; padding: 26px 18px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; }
.admin-side .brand { margin: 0 10px 30px; }
.admin-side .brand .wordmark { color: #fff; font-size: 1.5rem; }
.admin-side .brand small { font-family: var(--font-body); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: var(--orange); padding: 3px 8px; border-radius: var(--pill); margin-left: 4px; }
.admin-tab { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 0; background: none; color: rgb(255 255 255 / .7); font-weight: 600; cursor: pointer; text-align: left; width: 100%; transition: all .15s; }
.admin-tab:hover { background: rgb(255 255 255 / .06); color: #fff; }
.admin-tab[aria-selected='true'] { background: var(--orange); color: #fff; }
.admin-tab .count { margin-left: auto; min-width: 24px; height: 24px; padding: 0 8px; border-radius: var(--pill); background: rgb(255 255 255 / .15); font-size: .75rem; display: grid; place-items: center; }
.admin-tab[aria-selected='true'] .count { background: rgb(0 0 0 / .2); }
.admin-side .spacer { flex: 1; }
.admin-side a.admin-tab { text-decoration: none; }
.admin-main { padding: 36px clamp(20px, 4vw, 48px) 80px; min-width: 0; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.admin-head h1 { font-size: 2.2rem; margin: 0; }
.admin-mobile-bar { display: none; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 12px; gap: 6px; }
  .admin-side .brand, .admin-side .spacer { display: none; }
  .admin-tab { width: auto; white-space: nowrap; }
}

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: #fff; border-radius: var(--r-md); padding: 22px; border: 1px solid var(--line); }
.stat-card span { color: var(--muted); font-size: .85rem; font-weight: 600; }
.stat-card strong { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 600; margin-top: 4px; }
.stat-card--orange { background: var(--orange); color: #fff; border-color: var(--orange); }
.stat-card--orange span { color: rgb(255 255 255 / .8); }
@media (max-width: 900px) { .stat-cards { grid-template-columns: 1fr 1fr; } }

.table-wrap { background: #fff; border-radius: var(--r-md); border: 1px solid var(--line); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; white-space: nowrap; }
.table td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #fffaf6; }
.table .thumb { max-width: none; width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--orange-50); }
.table .actions { display: flex; gap: 8px; justify-content: flex-end; }
.cell-main { font-weight: 700; }
.cell-sub { color: var(--muted); font-size: .85rem; }

.status { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--pill); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--nuova { background: var(--orange-50); color: var(--orange-700); }
.status--in-lavorazione { background: #e8eeff; color: #2647c9; }
.status--spedita { background: #f3e8ff; color: #7a2bc2; }
.status--completata { background: var(--green-50); color: #0e6b3a; }
.status--annullata { background: #f1eeeb; color: var(--muted); }
.type-pill { display: inline-block; padding: 3px 10px; border-radius: var(--pill); font-size: .75rem; font-weight: 700; background: #f1eeeb; }

.request-list { display: grid; gap: 14px; }
.request { background: #fff; border-radius: var(--r-md); border: 1px solid var(--line); overflow: hidden; }
.request > summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto auto; gap: 16px; align-items: center; padding: 18px 22px; cursor: pointer; }
.request > summary::-webkit-details-marker { display: none; }
.request[open] > summary { border-bottom: 1px solid var(--line); }
.request .r-total { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.request-body { padding: 22px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
.request-body h4 { font-family: var(--font-body); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: .92rem; margin: 0 0 20px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.request-body .desc { white-space: pre-line; background: #faf7f4; padding: 14px 16px; border-radius: var(--r-sm); font-size: .93rem; margin-bottom: 20px; }
.request-files { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.request-files a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--pill); background: var(--ink); color: #fff; font-size: .85rem; font-weight: 600; }
.request-files a:hover { background: var(--orange); }
.request-side { display: grid; gap: 14px; align-content: start; }
@media (max-width: 760px) {
  .request > summary { grid-template-columns: 1fr auto; }
  .request > summary .r-date { display: none; }
  .request-body { grid-template-columns: 1fr; }
}

.modal { border: 0; padding: 0; border-radius: var(--r-lg); width: min(760px, calc(100% - 24px)); max-height: calc(100vh - 40px); box-shadow: var(--shadow-lg); background: var(--bg); }
.modal::backdrop { background: rgb(23 23 31 / .5); backdrop-filter: blur(4px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 28px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 2; }
.modal-head h2 { font-size: 1.6rem; margin: 0; }
.modal-close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #f1eeeb; cursor: pointer; font-size: 1.3rem; }
.modal-body { padding: 26px 28px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 28px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--bg); }

.image-manager { display: flex; flex-wrap: wrap; gap: 12px; }
.image-tile { position: relative; width: 110px; height: 110px; border-radius: var(--r-sm); overflow: hidden; background: var(--orange-50); border: 2px solid transparent; }
.image-tile:first-child { border-color: var(--orange); }
.image-tile img { width: 100%; height: 100%; object-fit: cover; }
.image-tile .tile-actions { position: absolute; inset: auto 6px 6px 6px; display: flex; justify-content: space-between; }
.image-tile button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgb(23 23 31 / .75); color: #fff; cursor: pointer; font-size: .85rem; }
.image-tile button:hover { background: var(--orange); }
.image-tile .cover { position: absolute; top: 6px; left: 6px; font-size: .65rem; font-weight: 700; background: var(--orange); color: #fff; padding: 2px 8px; border-radius: var(--pill); }
.image-add { width: 110px; height: 110px; border-radius: var(--r-sm); border: 2px dashed #e3c8ba; background: var(--orange-50); display: grid; place-items: center; color: var(--orange-600); font-weight: 700; font-size: .85rem; cursor: pointer; position: relative; text-align: center; }
.image-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.settings-grid .card { padding: 28px; }
.settings-grid .wide { grid-column: 1 / -1; }
@media (max-width: 1000px) { .settings-grid { grid-template-columns: 1fr; } }
.rows-editor { display: grid; gap: 10px; }
.rows-editor .row { display: grid; gap: 10px; align-items: end; }
.rows-editor .row--mat { grid-template-columns: .8fr 1fr .8fr .8fr 2fr auto; }
.rows-editor .row--tier { grid-template-columns: 1fr 1fr auto; }
.rows-editor .input { min-height: 44px; padding: 9px 14px; }
.rows-editor label { font-size: .75rem; font-weight: 700; color: var(--muted); display: block; margin-bottom: 4px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; font-size: 1.1rem; }
.icon-btn:hover { border-color: var(--red); color: var(--red); }
@media (max-width: 760px) { .rows-editor .row--mat { grid-template-columns: 1fr 1fr; } }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.toggle input { appearance: none; width: 46px; height: 26px; border-radius: var(--pill); background: #ddd5ce; position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: var(--shadow-sm); }
.toggle input:checked { background: var(--orange); }
.toggle input:checked::after { transform: translateX(20px); }

/* Griglia in evidenza: sempre righe complete */
.product-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .product-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) {
  .product-grid, .product-grid--4 { grid-template-columns: 1fr 1fr; gap: 22px 12px; }
  .product-card { gap: 10px; }
  .product-media { border-radius: 18px; }
  .product-media .badge { top: 8px; left: 8px; height: 22px; padding: 0 8px; font-size: .62rem; }
  .quick-add { width: 40px; height: 40px; right: 8px; bottom: 8px; }
  .quick-add svg { width: 18px; height: 18px; }
  .product-info { flex-direction: column; gap: 2px; padding: 0 2px; }
  .product-info h3 { font-size: .98rem; line-height: 1.25; }
  .product-info p { display: none; }
  .product-info .price { font-size: 1.05rem; }
  .swatches { gap: 4px; padding: 0 2px; }
  .swatch-dot { width: 11px; height: 11px; }
}

/* ---------- Pagamento ---------- */
.pay { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; margin-bottom: 96px; }
.pay-lines { list-style: none; margin: 18px 0 0; padding: 0; }
.pay-lines li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pay-lines small { display: block; color: var(--muted); font-size: .85rem; margin-top: 2px; }
.pay-lines span { font-weight: 700; white-space: nowrap; }
.pay-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 18px; font-weight: 700; }
.pay-total strong { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; }
.pay-buttons { background: #fff; border-radius: var(--r-md, 18px); padding: 16px; min-height: 100px; }
.pay-option { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid rgb(255 255 255 / .15); border-radius: 16px; margin-bottom: 10px; cursor: pointer; transition: border-color .2s, background .2s; }
.pay-option:has(input:checked) { border-color: var(--orange); background: rgb(255 90 31 / .12); }
.pay-option input { accent-color: var(--orange); margin-top: 4px; }
.pay-option strong { display: block; font-size: .95rem; }
.pay-option small { color: rgb(255 255 255 / .6); font-size: .82rem; }
.payment-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--pill); font-size: .75rem; font-weight: 700; white-space: nowrap; background: #f1eeeb; color: var(--muted); }
.payment-badge--pagato { background: var(--green-50); color: #0e6b3a; }
.payment-badge--attesa { background: #fff6d8; color: #8a6200; }
@media (max-width: 860px) { .pay { grid-template-columns: 1fr; } }

/* ---------- Account cliente ---------- */
.account-link {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px 0 12px;
  border-radius: var(--pill); border: 1.5px solid var(--line-2); background: #fff; font-weight: 700; font-size: .92rem;
  transition: border-color .2s;
}
.account-link:hover, .account-link[aria-current] { border-color: var(--ink); }
.account-link.is-logged svg { color: var(--orange); }
@media (max-width: 1100px) {
  .account-link { width: 46px; padding: 0; justify-content: center; }
  .account-link span { display: none; }
}
@media (max-width: 520px) {
  .header-actions { gap: 6px; }
  .search-toggle, .account-link, .cart-link, .menu-toggle { width: 42px; height: 42px; }
  .menu-toggle { padding: 0 11px; }
  .brand { gap: 7px; flex: none; }
  .wordmark { font-size: 1.4rem; }
}

.auth-card { max-width: 520px; margin-inline: auto; }
.auth-form { display: grid; gap: 16px; }
.auth-form[hidden] { display: none; }
.auth-hint { margin: 0; font-size: .86rem; color: var(--muted); text-align: center; }
.auth-hint a { color: var(--orange-700); font-weight: 600; }
.modal--auth { width: min(480px, calc(100% - 24px)); }

.page-hero--account { padding-bottom: 28px; }
.account-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.account-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: var(--pill); font-weight: 700; background: #fff; border: 1.5px solid var(--line); transition: all .2s; }
.account-tabs a:hover { border-color: var(--ink); }
.account-tabs a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.account-tabs .dot, .ticket-row.is-unread::before { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.account-tabs .dot[hidden] { display: none; }
.account-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.account-head h2 { font-size: 1.9rem; margin: 0 0 4px; }
.account-head p { margin: 0; }
.back-link { display: inline-block; margin-bottom: 18px; font-weight: 700; color: var(--muted); }
.back-link:hover { color: var(--ink); }

.order-list { display: grid; gap: 14px; }
.order-card { display: flex; justify-content: space-between; gap: 20px; padding: 22px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.order-meta { font-size: .85rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.order-card h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; margin: 8px 0 12px; }
.order-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.order-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; text-align: right; flex: none; }
.order-total { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
@media (max-width: 600px) {
  .order-card { flex-direction: column; padding: 20px; }
  .order-side { flex-direction: row; align-items: center; flex-wrap: wrap; text-align: left; }
}

.ticket-list { display: grid; gap: 10px; }
.ticket-row { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color .2s; }
.ticket-row:hover { border-color: var(--ink); }
.ticket-row.is-unread { border-color: var(--orange); }
.ticket-row.is-unread::before { content: ''; position: absolute; top: 14px; right: 14px; }
.ticket-text { min-width: 0; }
.ticket-text strong { display: block; }
.ticket-text small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-date { font-size: .85rem; }
.ticket-state { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--pill); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.ticket-state--aperto { background: var(--orange-50); color: var(--orange-700); }
.ticket-state--risposto { background: var(--green-50); color: #0e6b3a; }
.ticket-state--chiuso { background: #f1eeeb; color: var(--muted); }
@media (max-width: 600px) {
  .ticket-row { grid-template-columns: 1fr; gap: 8px; }
  .ticket-row .ticket-state { justify-self: start; }
}

.ticket-view { max-width: 820px; }
.ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ticket-head h2 { font-size: 1.8rem; margin: 0 0 4px; }
.ticket-head p { margin: 0; }
.thread { display: grid; gap: 16px; margin-bottom: 22px; }
.msg { display: flex; gap: 12px; align-items: flex-end; }
.msg--cliente { justify-content: flex-end; }
.msg-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; flex: none; }
.msg-avatar .mascot { width: 24px; }
.msg-avatar .mascot-layers rect { fill: #fff; }
.msg-avatar .mascot-face * { fill: var(--orange); }
.msg-bubble { max-width: min(600px, 85%); padding: 14px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.msg--cliente .msg-bubble { background: var(--ink); color: #fff; border-color: var(--ink); border-bottom-right-radius: 6px; }
.msg--staff .msg-bubble { border-bottom-left-radius: 6px; }
.msg-head { display: flex; gap: 10px; align-items: baseline; font-size: .82rem; margin-bottom: 6px; }
.msg-head span { opacity: .6; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.msg-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.msg-files img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; display: block; }
.msg--cliente .file-chip { color: var(--ink); }
.reply { padding: 22px 24px; }
.dropzone--sm { padding: 18px; flex-direction: row; }
.dropzone--sm strong { font-size: .95rem; }

.profile-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } }

.checkout-as { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--r-sm); background: var(--orange-50); font-size: .92rem; margin-bottom: 22px; }
.checkout-as a { font-weight: 700; color: var(--orange-700); }
@media (max-width: 600px) {
  .account-tabs { flex-wrap: nowrap; overflow-x: auto; margin-inline: -20px; padding-inline: 20px; scrollbar-width: none; }
  .account-tabs a { padding: 9px 15px; white-space: nowrap; font-size: .92rem; }
}
.link-inline { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--orange-700); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.segmented[hidden] { display: none; }

/* Preventivo da telefono: il prezzo resta visibile in basso mentre scegli le opzioni */
.quote-bar { display: none; }
@media (max-width: 980px) {
  .quote-bar {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 12px 12px 22px; border-radius: var(--pill); background: var(--ink); color: #fff; box-shadow: var(--shadow-lg);
    transform: translateY(140%); transition: transform .3s var(--ease);
  }
  .quote-bar.is-visible { transform: none; }
  .quote-bar small { display: block; font-size: .75rem; color: rgb(255 255 255 / .65); }
  .quote-bar strong { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1.1; }
}
