/* Configuratore */
.cfg { padding-top: 24px; padding-bottom: 80px; }
.cfg__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }
.cfg__top a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; color: var(--inchiostro); }
.cfg__note { color: var(--testo-2); }
.cfg__grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.cfg__stage-col { flex: 999 1 560px; min-width: 0; background: var(--carta); display: flex; flex-direction: column; position: sticky; top: 88px; }
.cfg__stage-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 28px 16px; }
.cfg__stage-head h1 { margin: 0; font-family: var(--head); font-weight: 400; font-size: clamp(28px, 3vw, 36px); line-height: 1.05; }
.cfg__stage-head .eyebrow { margin-bottom: 6px; letter-spacing: 0.22em; }
.seg { display: flex; border: 1px solid var(--oliva); border-radius: 999px; overflow: hidden; }
.seg button { min-height: 40px; padding: 0 18px; border: 0; cursor: pointer; font-size: 12px; background: transparent; color: var(--inchiostro); }
.seg button[aria-pressed="true"] { background: var(--oliva); color: var(--lino); }
.stage { position: relative; width: 100%; margin: 0 auto; isolation: isolate; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.stage--garment { aspect-ratio: 1 / 1; max-width: 680px; }
.stage--tavola { aspect-ratio: 1600 / 893; }
.stage > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage img { display: block; pointer-events: none; }
.lay-mask { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.lay-mul { mix-blend-mode: multiply; }
.lay-soft { mix-blend-mode: soft-light; background-repeat: repeat; }
.stage .mark { position: absolute; inset: auto; height: auto; transform: translate(-50%, -50%); cursor: grab; touch-action: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stage .mark.is-drag { cursor: grabbing; }
.stage .mark img, .stage .mark svg { width: 100%; height: auto; display: block; pointer-events: none; overflow: visible; }
.stage .mark::after { content: ''; position: absolute; inset: -6px; border: 1px dashed rgba(123,44,16,0.6); border-radius: 2px; pointer-events: none; opacity: 0; transition: opacity .2s; }
.stage .mark:hover::after, .stage .mark.is-drag::after, .stage .mark:focus-visible::after { opacity: 1; }
.cfg__hint { margin: 0; padding: 12px 28px 22px; font-size: 12px; color: var(--testo-2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

.cfg__panel { flex: 1 1 420px; min-width: 0; background: var(--carta); display: flex; flex-direction: column; }
.tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--linea); }
.tabs button { min-height: 64px; padding: 10px 4px; border: 0; background: transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #6A7258; }
.tabs button[aria-selected="true"] { box-shadow: inset 0 -2px 0 var(--oliva); color: var(--inchiostro); }
.tabs .num { font-size: 10px; letter-spacing: 0.14em; }
.tabs .lab { font-size: 12px; text-align: center; line-height: 1.2; }
.cfg__body { flex: 1 1 auto; padding: 28px; min-height: 520px; }
.cfg__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 28px; border-top: 1px solid var(--linea); position: sticky; bottom: 0; background: var(--carta); }
.cfg__foot .link { min-height: 44px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }

.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-lg { display: flex; flex-direction: column; gap: 22px; }
.big { margin: 0; font-family: var(--head); font-size: 26px; }
.small { margin: 0; font-size: 13px; color: var(--testo-2); }
.label-caps { margin: 0; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }
.macro { position: relative; height: 220px; overflow: hidden; isolation: isolate; }
.macro > div { position: absolute; inset: 0; }
.macro .btn-zoom { position: absolute; right: 12px; bottom: 12px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--lino); color: var(--inchiostro); cursor: pointer; font-size: 12px; }
.optlist { display: flex; flex-direction: column; border-top: 1px solid var(--linea); }
.opt { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--linea); background: transparent; cursor: pointer; text-align: left; width: 100%; }
.opt__sw { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background-size: 160px 160px; background-position: center; }
.opt__txt { flex: 1 1 auto; display: flex; flex-direction: column; }
.opt__txt b { font-size: 14px; font-weight: 600; }
.opt__txt span { font-size: 12px; color: var(--testo-2); }
.ring { box-shadow: inset 0 0 0 1px rgba(43,50,31,0.25); border: 0; }
.ring.is-on { box-shadow: 0 0 0 2px var(--carta), 0 0 0 3px var(--oliva); }
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 10px; }
.swatches--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sw { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: transparent; cursor: pointer; padding: 0; font-size: 12px; text-align: center; }
.sw > span:first-child { width: 48px; height: 48px; border-radius: 50%; }
.swatches--3 .sw > span:first-child { width: 64px; height: 64px; }
.dots { display: flex; flex-wrap: wrap; gap: 8px; }
.dot { width: 34px; height: 34px; border-radius: 50%; cursor: pointer; padding: 0; }
.dot--s { width: 32px; height: 32px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills--grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pills--fill > * { flex: 1 1 0; }
.pill { min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer; font-size: 12px; border: 1px solid rgba(54,64,37,0.45); background: transparent; color: var(--inchiostro); }
.pill[aria-pressed="true"] { border-color: var(--oliva); background: var(--oliva); color: var(--lino); }
.tile { min-height: 52px; padding: 6px 14px; border-radius: 4px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 2px; border: 1px solid rgba(54,64,37,0.45); background: transparent; color: var(--inchiostro); }
.tile[aria-pressed="true"] { border-color: var(--oliva); background: var(--oliva); color: var(--lino); }
.tile b { font-size: 14px; font-weight: 600; }
.tile span { font-size: 11px; }
.tile--center { align-items: center; text-align: center; padding: 4px 8px; }
.part { display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--linea); padding-bottom: 18px; }
.part__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; border: 0; background: transparent; cursor: pointer; text-align: left; font-size: 14px; padding: 0; }
.check__box { width: 18px; height: 18px; border: 1px solid var(--oliva); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: 0 0 auto; }
.check[aria-checked="true"] .check__box { background: var(--oliva); color: var(--lino); }
.upload { position: relative; display: flex; align-items: center; justify-content: center; text-align: center; gap: 10px; min-height: 60px; padding: 8px 12px; border: 1px dashed var(--oliva); cursor: pointer; font-size: 14px; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload:focus-within { outline: 2px solid var(--ruggine); outline-offset: 3px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.field input, .field textarea, .field select { min-height: 44px; padding: 0 12px; border: 1px solid var(--oliva); border-radius: 0; background: #fff; font: inherit; font-size: 15px; color: var(--inchiostro); }
.field textarea { padding: 10px 12px; min-height: 90px; resize: vertical; }
.field input[aria-invalid="true"] { border-color: var(--ruggine); box-shadow: 0 0 0 1px var(--ruggine); }
.fields2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.range { accent-color: var(--oliva); width: 100%; }
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.size { display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 1px solid rgba(54,64,37,0.3); padding: 4px 6px; }
.size span:first-child { font-size: 13px; min-width: 32px; }
.size__ctl { display: flex; align-items: center; }
.size__ctl button { width: 32px; height: 32px; border: 0; background: transparent; cursor: pointer; font-size: 16px; }
.size__ctl output { min-width: 22px; text-align: center; font-size: 14px; font-weight: 600; }
.summary { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 13px; }
.summary dt { color: var(--testo-2); }
.summary dd { margin: 0; text-align: right; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 1.5; color: var(--testo-2); }
.consent input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--oliva); flex: 0 0 auto; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { margin: 0; font-size: 13px; }
.msg--err { color: var(--ruggine); }
.done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 40px 0; }
.done img { height: 72px; width: auto; }
.done p { margin: 0; }

.zoom { position: fixed; inset: 0; z-index: 60; background: #1E2414; display: flex; flex-direction: column; }
.zoom__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px; color: var(--lino); }
.zoom__head span { font-family: var(--head); font-size: 22px; }
.zoom__head button { min-height: 44px; padding: 0 18px; border: 1px solid var(--lino); border-radius: 999px; background: transparent; color: var(--lino); cursor: pointer; font-size: 12px; }
.zoom__body { position: relative; flex: 1 1 auto; isolation: isolate; }
.zoom__body > div { position: absolute; inset: 0; }

.cfg-about { padding-top: 40px; padding-bottom: 100px; }
.cfg-about__in { border-top: 1px solid var(--linea); padding-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 32px; }
.cfg-about h2 { margin: 0 0 12px; font-family: var(--head); font-weight: 400; font-size: 24px; }
.cfg-about p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--testo-2); }

@media (max-width: 1000px) {
  .cfg__stage-col { top: 63px; z-index: 5; box-shadow: 0 10px 18px -14px rgba(43,50,31,.35); }
  .stage--garment { max-width: min(680px, 32vh); }
  .cfg__hint { display: none; }
  .cfg__stage-head { padding: 12px 16px 6px; align-items: center; }
  .cfg__stage-head h1 { font-size: 22px; }
  .cfg__stage-head .eyebrow { display: none; }
  .seg button { min-height: 34px; padding: 0 14px; }
}
@media (max-width: 560px) {
  .cfg__stage-head { padding: 18px 16px 10px; }
  .cfg__hint { padding: 10px 16px 16px; }
  .cfg__body { padding: 22px 16px; min-height: 0; }
  .cfg__foot { padding: 14px 16px; }
  .tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: 0 0 84px; }
  .swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .summary { grid-template-columns: 1fr; gap: 2px; }
  .summary dd { text-align: left; margin-bottom: 8px; }
}
