/* ══════════════════════════════════════════════════════════════
   GIFTCARD.CSS – pagina Buono regalo e gestione buoni
══════════════════════════════════════════════════════════════ */
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
.gift { max-width: 1100px; margin: 0 auto; padding: 8rem 1.5rem 5rem; }

.gift-hero { text-align: center; max-width: 720px; margin: 0 auto 3rem; }
.gift-kicker, .gift-label {
    font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase;
    color: rgba(255,255,255,0.5); margin-bottom: 1rem;
}
.gift-hero h1 {
    font-family: var(--font-display); font-weight: 300;
    font-size: clamp(3rem, 8vw, 5.5rem); line-height: 1; margin-bottom: 1.4rem;
}
.gift-intro { font-size: 1rem; font-weight: 300; line-height: 1.8; color: rgba(255,255,255,0.75); }
.gift-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 2.2rem; }
.gift-jump a {
    font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--white); text-decoration: none;
    border: 1px solid rgba(255,255,255,0.25); padding: 9px 14px; transition: background 0.2s;
}
.gift-jump a:hover { background: rgba(255,255,255,0.1); }

.gift-steps {
    list-style: none; counter-reset: s;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-bottom: 1rem;
}
.gift-steps li {
    counter-increment: s; position: relative;
    border: 1px solid rgba(255,255,255,0.12); padding: 1.4rem 1.4rem 1.3rem 3.6rem;
    font-size: 0.9rem; font-weight: 300; line-height: 1.7; color: rgba(255,255,255,0.75);
}
.gift-steps li::before {
    content: counter(s); position: absolute; left: 1.3rem; top: 1rem;
    font-family: var(--font-display); font-size: 2rem; color: var(--white);
}
.gift-steps strong { font-weight: 400; color: var(--white); }

.gift-section { padding: 4.5rem 0; border-top: 1px solid rgba(255,255,255,0.1); margin-top: 3.5rem; }
.gift-section + .gift-section { margin-top: 0; }
.gift-head { max-width: 680px; margin-bottom: 2.4rem; }
.gift-head h2, .gift-done h2 {
    font-family: var(--font-display); font-weight: 300;
    font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.15; margin-bottom: 1rem;
}
.gift-head h2 em { font-style: italic; }
.gift-head p:not(.gift-label) { font-size: 0.95rem; font-weight: 300; line-height: 1.8; color: rgba(255,255,255,0.75); }

/* ── modulo + anteprima ── */
.gift-builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.gift-preview { position: sticky; top: 100px; }
.gift-preview canvas { display: block; width: 100%; height: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.6); outline: 1px solid rgba(255,255,255,0.08); }
.preview-note { font-size: 0.8rem; font-weight: 300; color: rgba(255,255,255,0.5); margin-top: 0.9rem; }

.gift-form fieldset { border: 0; padding: 0; margin: 0 0 2.4rem; }
.gift-form legend {
    font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
    color: rgba(255,255,255,0.55); margin-bottom: 1rem; padding: 0;
}
.hint { font-size: 0.85rem; font-weight: 300; color: rgba(255,255,255,0.6); margin: -0.4rem 0 1rem; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 1rem; min-width: 0; }
.field label { font-size: 0.82rem; font-weight: 300; color: rgba(255,255,255,0.75); }
.field label small { color: rgba(255,255,255,0.45); }
.field > small { font-size: 0.75rem; color: rgba(255,255,255,0.45); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.field-row--addr { grid-template-columns: 1fr 90px; }
.gift input[type=text], .gift input:not([type]), .gift input[type=email], .gift input[type=tel],
.gift input[type=number], .gift textarea, .adm input, .adm textarea, .adm select {
    width: 100%; background: #111; color: var(--white);
    border: 1px solid rgba(255,255,255,0.18); border-radius: 0;
    padding: 12px 13px; font: 300 16px/1.4 var(--font-ui);
    transition: border-color 0.2s;
}
.gift textarea, .adm textarea { resize: vertical; min-height: 80px; }
.gift input:focus, .gift textarea:focus, .adm input:focus, .adm textarea:focus, .adm select:focus { outline: none; border-color: var(--white); }
.gift input[aria-invalid=true], .gift textarea[aria-invalid=true] { border-color: #e06c5f; }
.count { align-self: flex-end; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.chips, .pay { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
.pay { grid-template-columns: repeat(2, 1fr); }
.chip, .pay-opt, .style-opt { position: relative; cursor: pointer; }
.chip input, .pay-opt input, .style-opt input, .check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip > span, .pay-opt > span {
    display: block; height: 100%; border: 1px solid rgba(255,255,255,0.18); padding: 0.75rem 0.8rem;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.chip b, .pay-opt b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; }
.pay-opt b { font-family: var(--font-ui); font-weight: 400; font-size: 0.95rem; }
.chip small, .pay-opt small { display: block; font-size: 0.72rem; color: rgba(255,255,255,0.5); margin-top: 2px; line-height: 1.3; }
.chip:hover > span, .pay-opt:hover > span { border-color: rgba(255,255,255,0.5); }
.chip input:checked + span, .pay-opt input:checked + span { background: #fafafa; color: var(--black); border-color: #fafafa; }
.chip input:checked + span small, .pay-opt input:checked + span small { color: rgba(0,0,0,0.6); }
.chip input:focus-visible + span, .pay-opt input:focus-visible + span,
.style-opt input:focus-visible ~ img, .style-opt input:focus-visible ~ .style-plain,
.check input:focus-visible + span::before { outline: 2px solid var(--white); outline-offset: 3px; }

.styles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; }
.style-opt img, .style-plain {
    display: block; width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: cover;
    border: 2px solid transparent; opacity: 0.6; transition: opacity 0.2s, border-color 0.2s;
}
.style-plain {
    display: flex; align-items: center; justify-content: center; background: #0a0a0a;
    outline: 1px solid rgba(255,255,255,0.3); outline-offset: -6px;
    font-family: var(--font-display); font-size: 1.4rem;
}
.style-opt span:last-child { display: block; font-size: 0.75rem; text-align: center; margin-top: 5px; color: rgba(255,255,255,0.6); }
.style-opt:hover img, .style-opt:hover .style-plain { opacity: 0.9; }
.style-opt input:checked ~ img, .style-opt input:checked ~ .style-plain { opacity: 1; border-color: var(--white); }
.style-opt input:checked ~ span:last-child { color: var(--white); }

.check { display: flex; gap: 0.7rem; align-items: flex-start; cursor: pointer; font-size: 0.88rem; font-weight: 300; line-height: 1.5; color: rgba(255,255,255,0.8); position: relative; }
.check > span { position: relative; padding-left: 1.9rem; }
.check > span::before {
    content: ''; position: absolute; left: 0; top: 0.1rem; width: 18px; height: 18px;
    border: 1px solid rgba(255,255,255,0.55);
}
.check > span::after {
    content: ''; position: absolute; left: 5px; top: calc(0.1rem + 5px); width: 10px; height: 10px;
    background: var(--white); transform: scale(0); transition: transform 0.15s;
}
.check input:checked + span::after { transform: scale(1); }
.check a { color: var(--white); }
.check--privacy { margin-bottom: 1.4rem; }
.check--privacy.is-invalid > span::before { border-color: #e06c5f; }

.form-error { background: rgba(224,108,95,0.12); border-left: 2px solid #e06c5f; padding: 0.8rem 1rem; font-size: 0.88rem; margin-bottom: 1rem; }

.btn-main, .btn-line {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--white); color: var(--black); text-decoration: none; border: 1px solid var(--white);
    font: 400 11px/1 var(--font-ui); letter-spacing: 0.16em; text-transform: uppercase;
    padding: 15px 22px; cursor: pointer; transition: opacity 0.2s, background 0.2s;
}
.btn-main:hover { opacity: 0.85; }
.btn-main[disabled] { opacity: 0.5; cursor: wait; }
.btn-line { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.35); }
.btn-line:hover { background: rgba(255,255,255,0.1); }
.btn-line i, .btn-main i { font-size: 1rem; }
.gift-form .btn-main { width: 100%; padding: 18px 22px; }

/* ── conferma ── */
.gift-done { max-width: 720px; outline: none; }
.gift-done .code { font-family: var(--font-ui); font-weight: 400; font-size: 0.6em; letter-spacing: 0.08em; white-space: nowrap; border: 1px solid rgba(255,255,255,0.35); padding: 0.1em 0.4em; vertical-align: middle; }
.gift-done > p:not(.gift-label) { font-size: 0.95rem; font-weight: 300; line-height: 1.8; color: rgba(255,255,255,0.75); margin-bottom: 1.4rem; }
.pay-box { background: #111; border: 1px solid rgba(255,255,255,0.12); padding: 1.4rem 1.5rem; margin: 1.6rem 0; font-size: 0.95rem; font-weight: 300; line-height: 1.8; }
.pay-box strong { font-weight: 400; }
.pay-box a { color: var(--white); }
.pay-box .iban { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.95rem; letter-spacing: 0.04em; word-break: break-all; }
.copy { background: none; border: 1px solid rgba(255,255,255,0.3); color: var(--white); font: 300 11px var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 8px; margin-left: 6px; cursor: pointer; }
.gift-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ── verifica ── */
.check-form { display: flex; gap: 0.6rem; max-width: 520px; }
.check-form input { flex: 1; text-transform: uppercase; letter-spacing: 0.08em; }
.check-result { margin-top: 2rem; }
.status {
    display: inline-block; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
    padding: 6px 10px; border: 1px solid currentColor; margin-bottom: 1rem;
}
.status--valid { color: #8fd19e; }
.status--issued { color: #f0c36d; }
.status--redeemed, .status--expired, .status--cancelled { color: rgba(255,255,255,0.55); }
.result-text { font-size: 0.95rem; font-weight: 300; line-height: 1.8; color: rgba(255,255,255,0.8); max-width: 680px; margin-bottom: 1.2rem; }
.result-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); gap: 1.4rem; align-items: start; margin-top: 1.4rem; }
.result-card canvas { display: block; width: 100%; height: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.result-card .tel { max-width: 260px; }

/* ── domande ── */
.faq-dark { max-width: 760px; }
.faq-dark details { border-top: 1px solid rgba(255,255,255,0.12); }
.faq-dark details:first-child { border-top: 0; }
.faq-dark summary { list-style: none; cursor: pointer; position: relative; padding: 0.9rem 2rem 0.9rem 0; font-size: 0.95rem; font-weight: 300; }
.faq-dark summary::-webkit-details-marker { display: none; }
.faq-dark summary::after { content: '+'; position: absolute; right: 0.2rem; top: 0.75rem; font-size: 1.2rem; color: rgba(255,255,255,0.5); transition: transform 0.2s; }
.faq-dark details[open] summary::after { transform: rotate(45deg); }
.faq-dark details p { padding: 0 0 1rem; font-size: 0.9rem; font-weight: 300; line-height: 1.7; color: rgba(255,255,255,0.7); }

.print-area { display: none; }

@media (max-width: 900px) {
    .gift-builder { grid-template-columns: 1fr; gap: 0; }
    .gift-preview { position: static; order: -1; margin-bottom: 2.4rem; }
    .gift-steps { grid-template-columns: 1fr; gap: 0.6rem; }
    .result-card { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .gift { padding-top: 6.5rem; }
    .chips { grid-template-columns: repeat(2, 1fr); }
    .styles { grid-template-columns: repeat(3, 1fr); }
    .field-row { grid-template-columns: 1fr; }
    .field-row--addr { grid-template-columns: 1fr 80px; }
    .check-form { flex-direction: column; }
    .gift-section { padding: 3.5rem 0; }
}

/* ── stampa: solo il buono, A5 orizzontale ── */
@media print {
    @page { size: A5 landscape; margin: 0; }
    html, body { background: #fff !important; }
    body > *:not(.print-area) { display: none !important; }
    .print-area { display: block !important; }
    .print-area img { display: block; width: 210mm; height: 148mm; object-fit: contain; }
    #cookie-banner, .cookie-banner { display: none !important; }
}

/* ── grafica: versione, colore, foto del cliente ── */
.sub-legend { font-size: 0.78rem; font-weight: 300; color: rgba(255,255,255,0.6); margin: 1.2rem 0 0.5rem; }
.sub-legend:first-of-type { margin-top: 0; }
.chips--3 { grid-template-columns: repeat(3, 1fr); }
.chip b.b-ui { font-family: var(--font-ui); font-weight: 400; font-size: 0.92rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch span {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px;
    border: 1px solid rgba(255,255,255,0.18); font-size: 0.85rem; font-weight: 300;
}
.swatch span::before { content: ''; width: 18px; height: 18px; border-radius: 50%; background: var(--c); }
.swatch input:checked + span { border-color: var(--white); background: rgba(255,255,255,0.08); }
.swatch input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 3px; }
.upload { margin-top: 1rem; }
.upload input[type=file] { color: rgba(255,255,255,0.8); font: 300 14px var(--font-ui); }
.upload input[type=file]::file-selector-button {
    background: var(--white); color: var(--black); border: 0; padding: 10px 14px; margin-right: 12px;
    font: 400 11px var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
}
.upload-msg { color: #f0c36d !important; }
@media (max-width: 560px) { .chips--3 { grid-template-columns: 1fr; } }

/* ciò che è nascosto resta nascosto, anche se ha un display impostato */
[hidden] { display: none !important; }

/* temi: riquadri colorati con la scritta */
.chips--2 { grid-template-columns: repeat(2, 1fr); }
.style-tile {
    display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 3 / 2;
    background: var(--bg); color: var(--ink); border: 2px solid transparent; opacity: 0.7;
    font-family: var(--font-display); font-style: italic; font-size: clamp(0.85rem, 2.2vw, 1.15rem);
    outline: 1px solid rgba(255,255,255,0.15); outline-offset: -1px; transition: opacity 0.2s, border-color 0.2s;
}
.style-opt:hover .style-tile { opacity: 0.9; }
.style-opt input:checked ~ .style-tile { opacity: 1; border-color: var(--white); }
.style-opt input:focus-visible ~ .style-tile { outline: 2px solid var(--white); outline-offset: 3px; }
@media (max-width: 560px) { .chips--2 { grid-template-columns: 1fr 1fr; } }

/* ── TELEFONO: TESTI PIÙ LEGGIBILI (generato) ── */
@media (max-width: 768px) {
    .gift-kicker, .gift-label { font-size: 12.5px; }
    .gift-jump a { font-size: 12.5px; }
    .gift-steps li { font-size: 16px; }
    .gift-head p:not(.gift-label) { font-size: 16px; }
    .preview-note { font-size: 13.5px; }
    .gift-form legend { font-size: 12.5px; }
    .hint { font-size: 14.5px; }
    .field label { font-size: 14.5px; }
    .field > small { font-size: 13.5px; }
    .pay-opt b { font-size: 16px; }
    .chip small, .pay-opt small { font-size: 12.5px; }
    .style-opt span:last-child { font-size: 13.5px; }
    .check { font-size: 16px; }
    .form-error { font-size: 16px; }
    .gift-done > p:not(.gift-label) { font-size: 16px; }
    .pay-box { font-size: 16px; }
    .pay-box .iban { font-size: 16px; }
    .status { font-size: 12.5px; }
    .result-text { font-size: 16px; }
    .faq-dark summary { font-size: 16px; }
    .faq-dark details p { font-size: 16px; }
    .sub-legend { font-size: 13.5px; }
    .chip b.b-ui { font-size: 16px; }
    .swatch span { font-size: 14.5px; }
}
/* ── FINE TESTI TELEFONO ── */
