/* ==========================================================================
   GIOIELLERIA BENEDETTI PISA - COMPRO ORO & GIOIELLI (LIVELLO 1 BASE)
   Design System Luxury: Dark Obsidian & Pure Gold (#D4AF37)
   ========================================================================== */

/* Reset & Variabili Globali */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0D0E12;
    --bg-surface: #14161D;
    --card-bg: rgba(22, 25, 34, 0.85);
    --card-border: rgba(212, 175, 55, 0.22);
    --card-border-hover: rgba(212, 175, 55, 0.45);
    
    --gold: #D4AF37;
    --gold-light: #F6E29F;
    --gold-dark: #AA7C11;
    --gold-glow: rgba(212, 175, 55, 0.25);
    --gold-glow-strong: rgba(212, 175, 55, 0.45);
    
    --text-primary: #F8F9FA;
    --text-secondary: #9DA3B4;
    --text-muted: #6B7280;
    
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --warning: #F59E0B;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --error: #EF4444;
    --error-bg: rgba(239, 68, 68, 0.12);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    
    --transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(212, 175, 55, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(212, 175, 55, 0.04) 0%, transparent 45%),
        linear-gradient(180deg, #090A0D 0%, #0D0E12 100%);
    background-attachment: fixed;
}

/* ==========================================================================
   Header & Banner
   ========================================================================== */
.app-header {
    background: rgba(13, 14, 18, 0.95);
    border-bottom: 1px solid rgba(212, 175, 55, 0.18);
    position: relative;
    z-index: 10;
    padding: 1.1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}

.brand-link {
    transition: var(--transition);
}

.brand-link:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.header-logo-img {
    height: 74px;
    width: auto;
    max-width: 290px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.3));
}

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(170, 124, 17, 0.1) 100%);
    border: 1px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    box-shadow: 0 0 15px var(--gold-glow);
}

.logo-text h1 {
    font-family: var(--font-serif);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #FFFFFF 0%, var(--gold-light) 50%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.logo-text p {
    font-size: 0.74rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.header-shop-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.95rem;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid var(--gold);
    border-radius: 50px;
    color: var(--gold-light);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.header-shop-btn:hover {
    background: var(--gold);
    color: #000;
    box-shadow: 0 0 16px var(--gold-glow);
    transform: translateY(-1px);
}

.header-badge {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 0.45rem 1rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gold-light);
}

.badge-status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: pulseGlow 2s infinite;
}

.header-oam {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.45rem 0.85rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.header-oam .icon-oam {
    color: var(--gold);
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Live Market Ticker
   ========================================================================== */
.market-live-ticker {
    background: linear-gradient(90deg, #090B10 0%, #12151F 50%, #090B10 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    padding: 0.55rem 1.5rem;
    font-size: 0.8rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 9;
}

.market-live-ticker .ticker-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ticker-badge-live {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    color: #34D399;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.ticker-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 8px #10B981;
    animation: pulseDotLive 1.8s infinite;
}

@keyframes pulseDotLive {
    0% { transform: scale(0.85); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #10B981; }
    100% { transform: scale(0.85); opacity: 0.7; }
}

.ticker-items {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    flex-wrap: wrap;
}

.ticker-items strong {
    color: var(--gold-light);
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 0.92rem;
}

.ticker-items .ticker-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.ticker-sep {
    color: rgba(212, 175, 55, 0.3);
}

.ticker-time {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.73rem;
}

.icon-tiny {
    width: 12px;
    height: 12px;
    display: inline-block;
    vertical-align: middle;
}

/* Guarantee Banner */
.guarantee-banner {
    background: linear-gradient(90deg, rgba(170, 124, 17, 0.2) 0%, rgba(212, 175, 55, 0.15) 50%, rgba(170, 124, 17, 0.2) 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding: 0.65rem 1.5rem;
    text-align: center;
    font-size: 0.86rem;
    color: var(--gold-light);
}

.guarantee-banner .banner-content {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.guarantee-banner .icon-gold {
    width: 18px;
    height: 18px;
    color: var(--gold);
}

/* ==========================================================================
   Layout Principale
   ========================================================================== */
.main-content {
    max-width: 1240px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.app-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.75rem;
    margin-bottom: 3.5rem;
}

.right-column-stack {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* ==========================================================================
   Cards & Componenti Base
   ========================================================================== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--card-border-hover);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45), 0 0 20px rgba(212, 175, 55, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.card-header h2 {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    color: var(--text-primary);
    font-weight: 600;
}

.card-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.step-tag {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #000;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px var(--gold-glow);
}

/* ==========================================================================
   Area Bilancia Antica SVG
   ========================================================================== */
.scale-visual-area {
    background: radial-gradient(circle at 50% 40%, rgba(212, 175, 55, 0.08) 0%, rgba(13, 14, 18, 0.8) 75%);
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.25rem;
    margin: 0.5rem 0 0 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.scale-visual-area svg {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    margin: 0 auto;
    display: block;
}

.fade-transition {
    transition: opacity 0.35s ease-in-out;
}

/* ==========================================================================
   Selettori Calcolatore
   ========================================================================== */
.calculator-inputs {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.input-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
}

.label-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Paragrafo Quotazione Ufficiale di Borsa (Sopra al Selettore) */
.market-quote-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.09) 0%, rgba(17, 21, 32, 0.95) 100%);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: var(--radius-lg);
    padding: 0.9rem 1.4rem;
    margin-bottom: 1.6rem;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.market-quote-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.market-quote-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 50px;
    padding: 0.25rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.market-quote-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.market-quote-price {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.market-quote-price strong {
    font-size: 1.85rem;
    color: var(--gold-light);
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 14px rgba(212, 175, 55, 0.28);
}

.market-quote-time {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    font-weight: 500;
}

.market-quote-time i {
    width: 12px;
    height: 12px;
    color: var(--gold);
}

.carat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.carat-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1rem 0.6rem 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
    position: relative;
    user-select: none;
}

.carat-btn:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.35);
    color: var(--text-primary);
}

.carat-btn.active {
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.18) 0%, rgba(170, 124, 17, 0.06) 100%);
    border-color: var(--gold);
    color: var(--text-primary);
    box-shadow: 0 0 16px var(--gold-glow);
}

.carat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold-light);
    font-family: var(--font-serif);
}

.carat-purity {
    font-size: 0.74rem;
    color: var(--text-secondary);
}

.carat-rate {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold);
    background: rgba(0, 0, 0, 0.4);
    padding: 0.2rem 0.45rem;
    border-radius: var(--radius-sm);
    width: 100%;
}

.badge-recommended {
    position: absolute;
    top: -9px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    letter-spacing: 0.4px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.carat-btn.carat-ref-card {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(212, 175, 55, 0.25);
    border-style: dashed;
    position: relative;
}

.carat-btn.carat-ref-card:hover {
    background: rgba(212, 175, 55, 0.06);
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
}

.badge-ref {
    position: absolute;
    top: -9px;
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: #F1F5F9;
    font-size: 0.60rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    letter-spacing: 0.4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.carat-rate.ref-rate {
    color: var(--gold-light);
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.carat-info-banner {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.85rem;
    margin-top: 0.75rem;
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.carat-info-banner i {
    color: var(--gold);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.carat-info-banner strong {
    color: var(--gold-light);
}

/* Input Peso & Slider */
.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.weight-input-container {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 0.35rem 0.75rem;
    gap: 0.4rem;
}

.weight-input-container input {
    background: transparent;
    border: none;
    color: var(--gold-light);
    font-size: 1.3rem;
    font-weight: 700;
    width: 75px;
    text-align: right;
    font-family: var(--font-serif);
    outline: none;
}

.weight-input-container input::-webkit-outer-spin-button,
.weight-input-container input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.weight-input-container .unit {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.custom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #242733;
    outline: none;
    cursor: pointer;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFFFFF 0%, var(--gold) 100%);
    cursor: pointer;
    box-shadow: 0 0 10px var(--gold);
    border: 2px solid #000;
    transition: var(--transition);
}

.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 15px var(--gold);
}

.slider-limits {
    display: flex;
    justify-content: space-between;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.quick-weight-presets {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.2rem;
}

.preset-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-preset {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--text-secondary);
    font-size: 0.76rem;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-preset:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
    color: var(--gold-light);
}

/* Permuta Toggle (+10%) */
.permuta-container {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(0, 0, 0, 0.3) 100%);
    border: 1px dashed rgba(212, 175, 55, 0.35);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.permuta-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gold-light);
    flex-wrap: wrap;
}

.badge-bonus {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
}

.permuta-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider.round {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #2D313F;
    transition: var(--transition);
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider.round:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #FFFFFF;
    transition: var(--transition);
    border-radius: 50%;
}

input:checked + .slider.round {
    background-color: var(--gold);
}

input:checked + .slider.round:before {
    transform: translateX(22px);
    background-color: #000;
}

/* ==========================================================================
   Card Risultato Stima
   ========================================================================== */
.badge-certified {
    font-size: 0.76rem;
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}

.result-payout-box {
    background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.15) 0%, rgba(0, 0, 0, 0.6) 100%);
    border: 1px solid var(--gold);
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    text-align: center;
    margin-bottom: 1.25rem;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.15);
}

.payout-amount {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 1px;
    line-height: 1.1;
    text-shadow: 0 0 20px var(--gold-glow);
}

.payout-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.4rem;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
    background: rgba(0, 0, 0, 0.25);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.breakdown-item strong {
    color: var(--text-primary);
}

.breakdown-item.bonus-row {
    color: var(--gold);
    border-top: 1px dashed rgba(212, 175, 55, 0.25);
    padding-top: 0.5rem;
    margin-top: 0.25rem;
}

.breakdown-item.bonus-row strong {
    color: var(--gold-light);
    font-weight: 700;
}

.payment-highlight-box {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(170, 124, 17, 0.25) 100%);
    border: 1.5px solid var(--gold);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: var(--gold-light);
    font-weight: 700;
    font-size: 0.86rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.15);
}

.payment-highlight-box .icon-zap {
    width: 18px;
    height: 18px;
    color: var(--gold);
    flex-shrink: 0;
}

/* ==========================================================================
   Form Blocca Prezzo (Lead Generation)
   ========================================================================== */
.lead-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.9rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
    background: rgba(0, 0, 0, 0.6);
}

.input-subtext {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.privacy-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0.3rem 0;
}

.privacy-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    accent-color: var(--gold);
    width: 16px;
    height: 16px;
}

.privacy-checkbox label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.privacy-checkbox a {
    color: var(--gold-light);
    text-decoration: underline;
}

.form-error {
    background: var(--error-bg);
    border: 1px solid var(--error);
    color: #FCA5A5;
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
}

/* Pulsanti */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.4rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-full {
    width: 100%;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
    color: #000;
    box-shadow: 0 4px 15px var(--gold-glow);
}

.btn-gold:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px var(--gold-glow-strong);
}

.btn-gold:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-outline-gold {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--gold);
    color: var(--gold-light);
}

.btn-outline-gold:hover {
    background: rgba(212, 175, 55, 0.2);
    box-shadow: 0 0 15px var(--gold-glow);
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.btn-text:hover {
    color: var(--gold-light);
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* ==========================================================================
   Voucher Digitale (Ticket)
   ========================================================================== */
.voucher-area {
    animation: fadeIn 0.4s ease-out;
}

.voucher-success-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.success-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--success-bg);
    border: 1px solid var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.6rem;
    color: var(--success);
}

.voucher-success-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-family: var(--font-serif);
}

.voucher-success-header p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.ticket {
    background: #FFFFFF;
    color: #1A1E24;
    border: 2px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 24px rgba(212, 175, 55, 0.2);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.ticket-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: 5rem;
    font-family: var(--font-serif);
    font-weight: 900;
    color: rgba(212, 175, 55, 0.06);
    pointer-events: none;
    letter-spacing: 10px;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 0.9rem;
    margin-bottom: 1rem;
}

.ticket-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ticket-logo-img {
    height: 42px;
    width: auto;
    max-width: 90px;
    object-fit: contain;
}

.ticket-brand h4 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--gold-dark);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.ticket-sub {
    font-size: 0.72rem;
    color: #4B5563;
}

.ticket-badge-box {
    text-align: right;
}

.t-badge {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-bottom: 0.2rem;
    letter-spacing: 0.5px;
}

.ticket-id {
    font-size: 0.78rem;
    color: #4B5563;
}

.ticket-id strong {
    color: var(--gold-dark);
}

.ticket-main-value {
    text-align: center;
    background: #FAF8F2;
    border: 1.5px solid var(--gold);
    border-radius: var(--radius-md);
    padding: 0.9rem;
    margin-bottom: 1rem;
}

.ticket-main-value .v-label {
    font-size: 0.7rem;
    color: #78643C;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

.ticket-main-value .v-amount {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold-dark);
    line-height: 1.1;
    margin-top: 0.2rem;
}

.ticket-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.85rem;
}

.ticket-cell {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.ticket-cell .t-label {
    font-size: 0.7rem;
    color: #6B7280;
}

.ticket-cell strong {
    font-size: 0.85rem;
    color: #111827;
}

.ticket-cell-benchmark {
    grid-column: 1 / -1;
    background: rgba(212, 175, 55, 0.08);
    border: 1px dashed rgba(212, 175, 55, 0.45);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.2rem;
}

.ticket-cell-benchmark .t-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.74rem;
    color: #634f19;
    font-weight: 500;
}

.ticket-cell-benchmark .t-label i {
    width: 13px;
    height: 13px;
    color: #926900;
}

.ticket-cell-benchmark strong {
    font-size: 0.95rem;
    color: #926900;
    font-weight: 700;
    white-space: nowrap;
}

.ticket-row-permuta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #92400E;
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.85rem;
    font-weight: 600;
}

.ticket-expiration-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #FEF3C7;
    border: 1px solid #F59E0B;
    color: #92400E;
    padding: 0.45rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Barcode */
.ticket-barcode-wrapper {
    text-align: center;
    border-top: 1px dashed #D1D5DB;
    padding-top: 0.9rem;
    margin-bottom: 0.85rem;
}

.barcode {
    display: flex;
    justify-content: center;
    align-items: stretch;
    height: 38px;
    gap: 2.5px;
}

.barcode .bar {
    width: 2.5px;
    background: #111827;
}

.barcode .bar.thin { width: 1.2px; }
.barcode .bar.fat { width: 4.5px; }

.barcode-num {
    font-family: monospace;
    font-size: 0.7rem;
    color: #6B7280;
    letter-spacing: 2px;
    margin-top: 0.3rem;
}

.ticket-footer {
    font-size: 0.72rem;
    color: #4B5563;
    text-align: center;
    border-top: 1px solid #E5E7EB;
    padding-top: 0.75rem;
}

.ticket-footer strong {
    color: #111827;
}

.ticket-legal {
    font-size: 0.65rem;
    margin-top: 0.35rem;
    color: #6B7280;
    line-height: 1.35;
}

.voucher-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* ==========================================================================
   Sezione Servizi Speciali
   ========================================================================== */
.services-section, .faq-section, .store-info-section {
    margin-bottom: 3.5rem;
}

.section-title-wrap {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 1.85rem;
    color: var(--text-primary);
    font-weight: 700;
}

.section-subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.service-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.5rem 1.25rem;
}

.service-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    margin-bottom: 0.4rem;
}

.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--text-primary);
}

.service-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
}

.service-meta {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--gold-light);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.6rem;
}

/* ==========================================================================
   Sezione FAQ
   ========================================================================== */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.faq-card {
    display: flex;
    gap: 1.1rem;
    padding: 1.4rem;
}

.faq-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    flex-shrink: 0;
}

.faq-body h4 {
    font-size: 0.96rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.faq-body p {
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.faq-body strong {
    color: var(--gold-light);
}

/* ==========================================================================
   Sezione Info Punto Vendita
   ========================================================================== */
.store-info-card {
    background: radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.12) 0%, rgba(20, 22, 29, 0.95) 60%);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.store-info-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: center;
}

.store-tag {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--gold);
    margin-bottom: 0.35rem;
}

.store-info-details h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.store-address, .store-hours {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.store-contact-btns {
    display: flex;
    gap: 0.85rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.store-reassurance {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.reassurance-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.reassurance-item i {
    color: var(--gold);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.reassurance-item strong {
    font-size: 0.88rem;
    color: var(--text-primary);
    display: block;
}

.reassurance-item p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Footer Istituzionale
   ========================================================================== */
.app-footer {
    background: #090A0D;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    padding: 3rem 0 2rem;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.footer-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-brand {
    max-width: 480px;
}

.footer-logo-img {
    height: 48px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.3));
}

.footer-tagline {
    font-size: 0.74rem;
    color: var(--gold-light);
    letter-spacing: 0.5px;
    margin-top: 0.15rem;
}

.footer-brand strong {
    font-family: var(--font-serif);
    font-size: 1.18rem;
    color: var(--gold-light);
}

.footer-desc {
    margin-top: 0.8rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.footer-legal-data p {
    margin-bottom: 0.25rem;
    font-size: 0.82rem;
}

.footer-legal-data strong {
    color: var(--text-secondary);
}

.footer-bottom {
    text-align: center;
    font-size: 0.76rem;
}

.legal-disclaimer {
    margin-top: 0.6rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.anyweb-credits,
.anyweb-credits a {
    font-weight: 300 !important;
    color: var(--text-muted) !important;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.anyweb-credits a:hover {
    color: var(--gold-light) !important;
}


/* ==========================================================================
   Animazioni
   ========================================================================== */
@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Regole di Stampa (@media print)
   ========================================================================== */
@media print {
    body {
        background: #FFFFFF !important;
        color: #000000 !important;
        padding: 0 !important;
    }

    .app-header,
    .guarantee-banner,
    .scale-card,
    .result-card,
    .lead-form,
    .services-section,
    .faq-section,
    .store-info-section,
    .app-footer,
    .voucher-actions,
    .voucher-success-header {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }

    .app-grid {
        display: block !important;
        margin: 0 !important;
    }

    .voucher-area {
        display: block !important;
    }

    .ticket {
        border: 2px solid #D4AF37 !important;
        background: #FFFFFF !important;
        color: #111827 !important;
        box-shadow: none !important;
        padding: 25px !important;
        max-width: 650px !important;
        margin: 20px auto !important;
        page-break-inside: avoid;
    }

    .ticket-brand h4 {
        color: #AA7C11 !important;
    }

    .ticket-main-value {
        background: #FAF8F2 !important;
        border: 1.5px solid #D4AF37 !important;
    }

    .ticket-main-value .v-label {
        color: #78643C !important;
    }

    .ticket-main-value .v-amount {
        color: #AA7C11 !important;
    }

    .ticket-grid {
        background: #F9FAFB !important;
        border: 1px solid #E5E7EB !important;
    }

    .ticket-cell strong {
        color: #111827 !important;
    }

    .ticket-cell-benchmark {
        background: #FDF9EE !important;
        border: 1px dashed #D4AF37 !important;
    }

    .ticket-cell-benchmark strong {
        color: #926900 !important;
    }

    .barcode .bar {
        background: #111827 !important;
    }
}

/* ==========================================================================
   Responsive Design & Ottimizzazioni Mobile (Smartphone & Tablet)
   ========================================================================== */
@media (max-width: 1024px) {
    .app-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .store-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 0 1rem;
        margin: 1.25rem auto;
    }

    .card {
        padding: 1.25rem;
        border-radius: var(--radius-md);
    }

    .section-title {
        font-size: 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    /* Header mobile centrato e logo ingrandito */
    .app-header {
        padding: 1rem 0 0.85rem;
    }

    .header-container {
        padding: 0 1rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }

    .logo-area {
        justify-content: center;
        width: 100%;
    }

    .header-logo-img {
        height: 70px;
        max-width: 270px;
        margin: 0 auto;
    }

    .header-actions {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .header-oam {
        font-size: 0.82rem;
        padding: 0.45rem 1rem;
        margin: 0 auto;
        justify-content: center;
    }

    .guarantee-banner {
        font-size: 0.78rem;
        padding: 0.5rem 0.75rem;
    }

    /* Griglia Carature su 2 Colonne Mobile */
    .carat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .carat-btn {
        padding: 0.85rem 0.5rem 0.7rem;
        min-height: 84px;
    }

    .carat-value {
        font-size: 1.15rem;
    }

    .carat-rate {
        font-size: 0.76rem;
    }

    /* Prevenzione Zoom Automatico iOS Safari su Input (font-size >= 16px) */
    .form-group input,
    .weight-input-container input {
        font-size: 16px !important;
    }

    .weight-input-container input {
        font-size: 1.25rem !important;
        width: 65px;
    }

    /* Slider Mobile Touch Target */
    .custom-slider {
        height: 10px;
        touch-action: pan-y;
    }

    .custom-slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }

    /* Preset Pesi Touch */
    .quick-weight-presets {
        gap: 0.4rem;
    }

    .btn-preset {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
        min-height: 36px;
    }

    /* Bilancia Responsive Mobile - 100% larghezza */
    .scale-visual-area svg {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }

    /* Permuta Box Mobile */
    .permuta-container {
        padding: 0.9rem;
        flex-direction: row;
        align-items: center;
    }

    .permuta-title {
        font-size: 0.88rem;
    }

    .permuta-desc {
        font-size: 0.75rem;
    }

    /* Payout Box */
    .payout-amount {
        font-size: 2.1rem;
    }

    .payout-details {
        font-size: 0.8rem;
    }

    /* Form Mobile */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .btn {
        min-height: 48px; /* Standard ergonomico Apple/Google per tocco dito */
        font-size: 0.95rem;
    }

    /* Ticket Voucher Mobile */
    .ticket {
        padding: 1.15rem 0.9rem;
    }

    .ticket-main-value .v-amount {
        font-size: 1.8rem;
    }

    .ticket-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .barcode {
        height: 32px;
    }

    /* Store Info Section Mobile */
    .store-contact-btns {
        flex-direction: column;
        width: 100%;
    }

    .store-contact-btns .btn {
        width: 100%;
    }

    .footer-top {
        flex-direction: column;
        gap: 1.25rem;
    }
}

@media (max-width: 360px) {
    .carat-grid {
        grid-template-columns: 1fr;
    }
    
    .payout-amount {
        font-size: 1.85rem;
    }
}
