/* ============================================================
   Boxes Trading — area Bespoke & Engraving
   Foglio dedicato alla pagina bespoke.html / en/bespoke.html.
   Scritto per il telefono prima di tutto: da li' arriva quasi
   tutto il traffico. Prefisso .bx- per non toccare il resto.
   Solaris Futura · https://solarisfutura.net
   ============================================================ */

.bx-page {
  --bx-line: rgba(212, 175, 55, .22);
  --bx-line-on: rgba(212, 175, 55, .72);
  --bx-card: rgba(22, 14, 7, .62);
  --bx-card-on: rgba(46, 30, 11, .78);
  --bx-r: 14px;
  --bx-bar-h: 76px;
  --wood: radial-gradient(circle at 32% 26%, #4a2f16, #231407 72%);
  --velvet: #7E1E12;
}

/* ---------- intestazione della pagina ---------- */

.bx-hero { min-height: min(560px, 62svh) !important; }
.bx-hero .ab-glass { max-width: 720px; }
.bx-hero h1 { font-size: clamp(2.2rem, 8vw, 4rem) !important; }
.bx-hero p { color: var(--text-muted); line-height: 1.9; }

.bx-hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.bx-hero-facts span {
  font-size: .78rem;
  letter-spacing: .04em;
  padding: 7px 12px;
  border: 1px solid var(--bx-line);
  border-radius: 999px;
  color: var(--text-gold);
  background: rgba(10, 7, 5, .5);
}

/* ---------- impianto dello studio ---------- */

.bx-studio { padding-block: clamp(46px, 7vw, 86px); }

.bx-grid { display: block; }

/* Sul telefono l'anteprima resta agganciata sotto la barra di navigazione:
   e' il motivo per cui questa pagina esiste, deve stare sempre in vista. */
@media (max-width: 999px) {
  .bx-side {
    position: sticky;
    inset-block-start: 74px;
    z-index: 30;
    margin: 0 -16px 20px;
    padding: 0 16px 12px;
    background: linear-gradient(180deg, #0b0705 0 84%, rgba(11, 7, 5, 0));
  }
  .bx-stage {
    padding: 12px;
    border-radius: 16px;
    background:
      radial-gradient(120% 90% at 50% -20%, rgba(212, 175, 55, .10), transparent 62%),
      #100b07;
  }
  .bx-lid {
    height: min(27svh, 210px);
    width: auto;
    max-width: 100%;
    margin-inline: auto;
  }
  .bx-caption { margin-top: 10px; font-size: .7rem; }
  /* qui il tasto principale e' nella barra: il flottante sparisce */
  .bx-page .wa-float { display: none; }
}

@media (min-width: 1000px) {
  .bx-grid {
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
    gap: 52px;
    align-items: start;
  }
  .bx-side { position: sticky; top: 104px; }
}

/* ---------- anteprima ---------- */

.bx-stage {
  border: 1px solid var(--bx-line);
  border-radius: 18px;
  padding: 16px;
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(212, 175, 55, .10), transparent 62%),
    rgba(12, 8, 5, .58);
}

.bx-lid {
  position: relative;
  aspect-ratio: var(--ar, 7 / 5);
  border-radius: 8px;
  background: var(--wood);
  overflow: hidden;
  box-shadow:
    0 24px 48px -26px #000,
    inset 0 1px 0 rgba(255, 236, 190, .16),
    inset 0 -18px 40px -22px rgba(0, 0, 0, .9);
  transition: aspect-ratio .35s ease, background .35s ease;
}

/* venatura del legno */
.bx-lid::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .3;
  background-image: repeating-linear-gradient(
    98deg,
    rgba(255, 255, 255, .05) 0 1px,
    rgba(0, 0, 0, .07) 1px 3px,
    transparent 3px 7px
  );
}

/* cornice di madreperla */
.bx-inlay {
  position: absolute;
  inset: 5.5%;
  border-radius: 5px;
  padding: 9px;
  box-shadow: inset 0 0 0 1px rgba(247, 229, 169, .30), 0 0 0 1px rgba(0, 0, 0, .4);
  background-image:
    radial-gradient(circle, rgba(247, 229, 169, .78) 1.15px, transparent 1.5px),
    linear-gradient(0deg, rgba(212, 175, 55, .12), rgba(212, 175, 55, .12));
  background-size: 7px 7px, auto;
}
@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .bx-inlay {
    -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
    mask-composite: exclude;
  }
}
@supports not ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .bx-inlay { background-image: none; }
}

/* il disegno o il logo del cliente, come se fosse inciso */
.bx-art {
  position: absolute;
  inset: 14%;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.bx-lid[data-art="1"] .bx-art { display: flex; }
/* Il logo diventa chiaro su fondo scuro, come il madreperla intarsiato:
   il bianco della foto sparisce, le linee scure diventano luce. */
.bx-art img {
  max-width: 100%;
  max-height: 100%;
  filter: grayscale(1) contrast(1.35) invert(1);
  mix-blend-mode: screen;
  opacity: .86;
}
.bx-lid[data-place="corner"] .bx-art {
  inset: auto;
  inset-block-start: 11%;
  inset-inline-end: 11%;
  width: 26%;
  height: 26%;
}
.bx-lid[data-place="full"] .bx-art { inset: 9%; }

/* il testo inciso */
.bx-text {
  position: absolute;
  inset-inline: 12%;
  inset-block-start: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-size: clamp(1.05rem, 5.6vw, 1.9rem);
  line-height: 1.35;
  color: rgba(247, 231, 186, .9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .75), 0 -1px 0 rgba(0, 0, 0, .35);
  word-break: break-word;
  overflow: hidden;
  pointer-events: none;
  transition: font-family .2s ease;
}
.bx-text.long  { font-size: clamp(.85rem, 4.2vw, 1.45rem); }
.bx-text.xlong { font-size: clamp(.7rem, 3.4vw, 1.15rem); }
.bx-lid[data-place="corner"] .bx-text {
  inset-block-start: auto;
  inset-block-end: 12%;
  transform: none;
}
.bx-lid[data-art="1"][data-place="centre"] .bx-text {
  inset-block-start: auto;
  inset-block-end: 10%;
  transform: none;
  font-size: clamp(.85rem, 4vw, 1.2rem);
}
.bx-lid[data-text="0"] .bx-text { display: none; }

/* riflesso */
.bx-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 245, 220, .16) 0%, transparent 34%, transparent 66%, rgba(255, 245, 220, .07) 100%);
}

.bx-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  font-size: .74rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.bx-caption b {
  font-weight: 500;
  color: var(--text-gold);
  letter-spacing: .08em;
}

.bx-velvet {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--velvet);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
  vertical-align: -1px;
  margin-inline-end: 5px;
}

/* ---------- avanzamento ---------- */

.bx-progress { margin-bottom: 18px; }

.bx-segs { display: flex; gap: 5px; }
.bx-segs button {
  flex: 1;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(212, 175, 55, .2);
  cursor: default;
  transition: background .3s ease;
}
.bx-segs button.done { background: rgba(212, 175, 55, .55); cursor: pointer; }
.bx-segs button.now { background: var(--gold-primary); }

.bx-steplabel {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.bx-steplabel small {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.bx-steplabel h2 {
  margin: 0;
  font-family: var(--font-en-title);
  font-size: clamp(1.4rem, 5.4vw, 1.9rem);
  color: var(--text-main);
  font-weight: 400;
}
html[dir="rtl"] .bx-steplabel h2 { font-family: var(--font-ar-title); }

.bx-hint {
  margin: 8px 0 20px;
  font-size: .9rem;
  line-height: 1.8;
  color: var(--text-muted);
}

/* ---------- i passi ---------- */

.bx-step { display: none; padding: 0; margin: 0; }
.bx-step.on { display: block; animation: bxIn .34s cubic-bezier(.22, .8, .3, 1); }
@keyframes bxIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.bx-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bx-opts.one { grid-template-columns: 1fr; }
.bx-opts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.bx-opt {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
  min-height: 88px;
  padding: 15px 14px;
  border: 1px solid var(--bx-line);
  border-radius: var(--bx-r);
  background: var(--bx-card);
  color: var(--text-main);
  font: inherit;
  font-size: .95rem;
  text-align: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .22s ease, background .22s ease, transform .22s ease;
}
.bx-opt:active { transform: scale(.985); }
.bx-opt b { font-weight: 500; line-height: 1.35; }
.bx-opt small { color: var(--text-muted); font-size: .78rem; line-height: 1.5; }
.bx-opt[aria-pressed="true"] {
  border-color: var(--bx-line-on);
  background: var(--bx-card-on);
  box-shadow: 0 14px 34px -24px #000;
}
.bx-opt[aria-pressed="true"]::after {
  content: '';
  position: absolute;
  inset-block-start: 10px;
  inset-inline-end: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23120b04' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round' d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.bx-opt:focus-visible { outline: 2px solid var(--gold-primary); outline-offset: 3px; }

/* misure: riga larga con prezzo */
.bx-size {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 74px;
}
.bx-size .bx-size-l { display: flex; flex-direction: column; gap: 3px; }
.bx-size .bx-dim {
  font-family: var(--font-en-title);
  font-size: 1.15rem;
  color: var(--text-gold);
  letter-spacing: .02em;
}
.bx-size .bx-price {
  font-size: .92rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-inline-end: 22px;
}
.bx-tag {
  position: absolute;
  inset-block-start: -8px;
  inset-inline-start: 14px;
  font-size: .64rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--gold-primary);
  color: #16100a;
}

/* campioni di legno e velluto */
.bx-chip { align-items: center; flex-direction: row; gap: 12px; min-height: 68px; }
.bx-dot {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 3px 8px -3px #000;
}

/* ---------- campi ---------- */

.bx-field { margin-top: 18px; }
.bx-field > label {
  display: block;
  margin-bottom: 8px;
  font-size: .8rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.bx-field input,
.bx-field textarea {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--bx-line);
  border-radius: 12px;
  background: rgba(10, 7, 4, .6);
  color: var(--text-main);
  font: inherit;
  font-size: 1rem;
}
.bx-field textarea { min-height: 96px; resize: vertical; line-height: 1.7; }
.bx-field input:focus,
.bx-field textarea:focus {
  outline: none;
  border-color: var(--bx-line-on);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, .12);
}
.bx-count { display: block; margin-top: 6px; font-size: .75rem; color: var(--text-muted); text-align: end; }

.bx-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* quantita' */
.bx-qty { display: flex; align-items: center; gap: 0; width: fit-content; border: 1px solid var(--bx-line); border-radius: 12px; overflow: hidden; }
.bx-qty button {
  width: 52px;
  height: 52px;
  border: 0;
  background: rgba(10, 7, 4, .6);
  color: var(--text-gold);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.bx-qty button:active { background: rgba(212, 175, 55, .16); }
.bx-qty input {
  width: 68px;
  height: 52px;
  border: 0;
  border-inline: 1px solid var(--bx-line);
  background: transparent;
  color: var(--text-main);
  text-align: center;
  font: inherit;
  font-size: 1.05rem;
  border-radius: 0;
}

/* ---------- caricamento immagine ---------- */

.bx-drop {
  display: block;
  margin-top: 6px;
  padding: 26px 18px;
  border: 1.5px dashed rgba(212, 175, 55, .45);
  border-radius: 16px;
  background: rgba(12, 8, 5, .5);
  text-align: center;
  cursor: pointer;
  transition: border-color .22s ease, background .22s ease;
}
.bx-drop:hover, .bx-drop.hot { border-color: var(--gold-primary); background: rgba(30, 20, 8, .6); }
.bx-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bx-drop svg { width: 30px; height: 30px; color: var(--gold-primary); }
.bx-drop b { display: block; margin-top: 10px; font-weight: 500; color: var(--text-main); }
.bx-drop small { display: block; margin-top: 5px; font-size: .78rem; color: var(--text-muted); }
.bx-drop:focus-within { outline: 2px solid var(--gold-primary); outline-offset: 3px; }

.bx-file {
  display: none;
  align-items: center;
  gap: 13px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--bx-line);
  border-radius: 14px;
  background: var(--bx-card);
}
.bx-file.on { display: flex; }
.bx-file img { width: 56px; height: 56px; border-radius: 9px; object-fit: cover; flex: 0 0 auto; }
.bx-file-txt { min-width: 0; flex: 1; }
.bx-file-txt b { display: block; font-weight: 500; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-file-txt small { color: var(--text-muted); font-size: .78rem; }
.bx-file-txt small.ok { color: #8fd6a8; }
.bx-file-txt small.bad { color: #e79086; }
.bx-x {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--bx-line);
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}
.bx-x:hover { color: var(--text-main); border-color: var(--bx-line-on); }

.bx-prog { height: 3px; margin-top: 8px; border-radius: 99px; background: rgba(212, 175, 55, .18); overflow: hidden; }
.bx-prog i { display: block; height: 100%; width: 0; background: var(--gold-primary); transition: width .2s ease; }

.bx-note {
  margin-top: 14px;
  padding: 14px 15px;
  border: 1px solid rgba(212, 175, 55, .3);
  border-radius: 14px;
  background: rgba(126, 30, 18, .14);
  font-size: .88rem;
  line-height: 1.75;
  color: var(--text-main);
}
.bx-note.hide { display: none; }
.bx-note b { display: block; margin-bottom: 4px; color: var(--text-gold); font-weight: 500; }
.bx-note a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- riepilogo ---------- */

.bx-sum { margin-top: 6px; border: 1px solid var(--bx-line); border-radius: 16px; overflow: hidden; }
.bx-sum dl { margin: 0; }
.bx-sum .r {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: baseline;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(212, 175, 55, .12);
  font-size: .93rem;
}
.bx-sum .r:last-child { border-bottom: 0; }
.bx-sum dt { color: var(--text-muted); flex: 0 0 auto; }
.bx-sum dd { margin: 0; text-align: end; color: var(--text-main); }

.bx-ref {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px dashed rgba(212, 175, 55, .4);
  border-radius: 14px;
  font-size: .86rem;
  color: var(--text-muted);
}
.bx-ref b { font-family: var(--font-en-title); font-size: 1.05rem; letter-spacing: .12em; color: var(--gold-light); }

/* ---------- barra fissa in basso ---------- */

.bx-bar {
  position: sticky;
  inset-block-end: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--bx-line);
  border-radius: 18px 18px 0 0;
  background: rgba(9, 6, 4, .93);
  backdrop-filter: blur(14px);
  box-shadow: 0 -18px 40px -30px #000;
}
/* Sull'ultimo passo l'etichetta e' lunga: il tasto scende a riga intera
   invece di schiacciare il prezzo. */
.bx-bar.send { flex-wrap: wrap; row-gap: 10px; }
.bx-bar.send #bxSend { flex: 1 1 100%; }
.bx-bar-info { flex: 1; min-width: 0; line-height: 1.3; overflow: hidden; }
.bx-bar-info small {
  display: block;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.bx-bar-info b {
  font-family: var(--font-en-title);
  font-size: 1.28rem;
  font-weight: 400;
  color: var(--gold-light);
  white-space: nowrap;
}
.bx-bar-info b.quote { font-size: 1rem; letter-spacing: .02em; }

.bx-back {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border: 1px solid var(--bx-line);
  border-radius: 12px;
  background: transparent;
  color: var(--text-gold);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.bx-back[hidden] { display: none; }
.bx-next {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary) 55%, var(--gold-deep));
  color: #180f05;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 12px 28px -16px rgba(212, 175, 55, .8);
}
.bx-next:active { transform: translateY(1px); }
.bx-next svg { width: 18px; height: 18px; vertical-align: -4px; margin-inline-start: 7px; }

.bx-alt {
  margin-top: 14px;
  text-align: center;
  font-size: .85rem;
  color: var(--text-muted);
}
.bx-alt a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- esito ---------- */

.bx-done { display: none; text-align: center; padding: 18px 4px 4px; }
.bx-done.on { display: block; }
.bx-done .tick {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 1px solid var(--bx-line-on);
  display: grid;
  place-items: center;
  color: var(--gold-primary);
}
.bx-done .tick svg { width: 28px; height: 28px; }
.bx-done h3 { font-family: var(--font-en-title); font-size: 1.5rem; font-weight: 400; margin: 0 0 10px; }
html[dir="rtl"] .bx-done h3 { font-family: var(--font-ar-title); }
.bx-done p { color: var(--text-muted); line-height: 1.85; font-size: .95rem; }
.bx-done .bx-ref { margin-inline: auto; max-width: 340px; }

/* ---------- blocchi editoriali sotto lo studio ---------- */

.bx-steps-list { display: grid; gap: 14px; counter-reset: bxs; }
@media (min-width: 760px) { .bx-steps-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .bx-steps-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bx-steps-list li {
  list-style: none;
  padding: 22px 20px;
  border: 1px solid var(--bx-line);
  border-radius: 16px;
  background: var(--bx-card);
}
.bx-steps-list li::before {
  counter-increment: bxs;
  content: counter(bxs, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-en-title);
  font-size: 1.4rem;
  color: var(--gold-primary);
}
.bx-steps-list h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 500; color: var(--text-main); }
.bx-steps-list p { margin: 0; font-size: .9rem; line-height: 1.8; color: var(--text-muted); }

.bx-faq { display: grid; gap: 10px; max-width: 860px; margin-inline: auto; }
.bx-faq details {
  border: 1px solid var(--bx-line);
  border-radius: 14px;
  background: var(--bx-card);
  overflow: hidden;
}
.bx-faq summary {
  padding: 17px 18px;
  cursor: pointer;
  font-size: .98rem;
  color: var(--text-main);
  list-style: none;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.bx-faq summary::-webkit-details-marker { display: none; }
.bx-faq summary::after {
  content: '+';
  color: var(--gold-primary);
  font-size: 1.3rem;
  line-height: 1;
  flex: 0 0 auto;
}
.bx-faq details[open] summary::after { content: '−'; }
.bx-faq p { margin: 0; padding: 0 18px 18px; font-size: .92rem; line-height: 1.85; color: var(--text-muted); }

/* ---------- correzioni fini ---------- */

@media (max-width: 460px) {
  .bx-opts.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bx-next { padding: 0 16px; font-size: .95rem; }
  .bx-stage { padding: 12px; border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .bx-step.on { animation: none; }
  .bx-lid { transition: none; }
}

/* ---------- stati nascosti e messaggi d'errore ---------- */

.bx-page [hidden] { display: none !important; }

.bx-prog { display: block; }

.bx-err {
  min-height: 1.25em;
  margin: 12px 0 0;
  font-size: .88rem;
  line-height: 1.6;
  color: #e79086;
  text-align: center;
}

.bx-noscript {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--bx-line);
  border-radius: 14px;
  text-align: center;
  color: var(--text-muted);
}
