/* ============================================
   VENDI IL TUO USATO - Zonzini Stairclimbers
   ============================================ */

body{
    background-color: var(--color-secondary);
}

/* ============================================
   HERO SECTION - Due colonne, metà schermo
   ============================================ */

.vendi-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 50vh;
    background: var(--color-cream);
    overflow: hidden;
}

.vendi-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-5xl) var(--space-3xl) var(--space-5xl) var(--layout-margin);
}

.vendi-eyebrow {
    display: inline-block;
    font-size: var(--font-size-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.vendi-hero h1 {
    color: var(--color-secondary);
    margin-bottom: var(--space-lg);
    max-width: 1200px;
}

.vendi-hero .lead {
    color: var(--color-secondary);
    opacity: 0.8;
    max-width: 800px;
    margin: 0;
}

.vendi-hero-image {
    position: relative;
    overflow: hidden;
    padding: var(--space-5xl);
}

.vendi-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

@media (max-width: 992px) {
    .vendi-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .vendi-hero-content {
        padding: var(--space-5xl) var(--layout-margin) var(--space-3xl);
        order: 1;
    }
    
    .vendi-hero-image {
        order: 2;
        min-height: 300px;
        padding: 0 var(--layout-margin) var(--space-3xl);
    }
}

@media (max-width: 768px) {
    .vendi-hero-content {
        padding: var(--space-4xl) var(--layout-margin) var(--space-2xl);
    }
    
    .vendi-hero-image {
        min-height: 250px;
        padding: 0 var(--layout-margin) var(--space-2xl);
    }
}


/* ============================================
   PINNED SECTION
   ============================================ */

.vendi-pinned {
    display: flex;
    min-height: 100vh;
    background: var(--color-secondary);
}

.vendi-pinned-left {
    width: 50%;
    height: 100vh;
    position: sticky;
    top: 0;
    background: var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: var(--space-3xl) var(--space-2xl) var(--space-3xl) var(--layout-margin);
}

.vendi-pinned-content {
    max-width: 480px;
}

.vendi-pinned-content h2 {
    color: white;
    line-height: 1;
}

.vendi-pinned-right {
    width: 50%;
}

.vendi-panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--space-3xl);
}

.vendi-panel .panel-content {
    max-width: 500px;
}

/* Panel Intro - Rosso */
.vendi-panel.panel-intro {
    background: var(--color-primary);
}

.vendi-panel.panel-intro h3,
.vendi-panel.panel-intro p,
.vendi-panel.panel-intro .lead {
    color: white;
}

.vendi-panel.panel-intro h3 {
    text-transform: none;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

/* Panel Value - Crema */
.vendi-panel.panel-value {
    background: var(--color-cream);
}

.vendi-panel.panel-value h3,
.vendi-panel.panel-value p {
    color: var(--color-secondary);
}

.vendi-panel.panel-value h3 {
    text-transform: none;
    font-weight: 700;
}

.value-icon {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-lg);
    color: var(--color-primary);
}

.value-icon svg {
    width: 100%;
    height: 100%;
}

/* Panel Process - Grigio scuro */
.vendi-panel.panel-process {
    background: var(--color-secondary);
}

.vendi-panel.panel-process h3 {
    color: white;
    margin-bottom: var(--space-2xl);
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.process-step {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
}

.step-number {
    font-size: var(--font-size-h3);
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    flex-shrink: 0;
}

.step-content h4 {
    color: white;
    font-size: var(--font-size-body);
    font-weight: 700;
    text-transform: none;
    margin-bottom: var(--space-xs);
}

.step-content p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Mobile Pinned */
@media (max-width: 992px) {
    .vendi-pinned {
        flex-direction: column;
    }
    
    .vendi-pinned-left {
        width: 100%;
        height: auto;
        min-height: 40vh;
        position: relative;
        padding: var(--space-4xl) var(--layout-margin) var(--space-2xl);
    }
    
    .vendi-pinned-right {
        width: 100%;
    }
    
    .vendi-panel {
        min-height: auto;
        padding: var(--space-3xl) var(--layout-margin);
    }
}


/* ============================================
   FORM SECTION
   ============================================ */

/* Wrapper grigio esterno */
.vendi-form-wrapper {
    background: var(--color-secondary);
    padding: var(--layout-margin);
    position: relative;
    z-index: 10;
}

/* Box crema interno con bordi arrotondati */
.vendi-form-section {
    background: var(--color-cream);
    padding: var(--space-4xl) var(--space-3xl);
    border-radius: var(--radius-lg);
    position: relative;
}

.vendi-form-header {
    max-width: 1200px;
    margin-bottom: var(--space-3xl);
}

.vendi-form-header h2 {
    color: var(--color-secondary);
    margin-bottom: var(--space-lg);
}

.vendi-form-header p {
    color: var(--color-secondary);
    opacity: 0.8;
}

/* Form Sections */
.form-section {
    margin-bottom: var(--space-3xl);
    padding-bottom: var(--space-3xl);
    border-bottom: 1px solid rgba(38, 38, 38, 0.1);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    font-size: var(--font-size-h5);
    font-weight: 700;
    color: var(--color-secondary);
    text-transform: uppercase;
    margin-bottom: var(--space-xl);
}

.form-section-desc {
    color: var(--color-secondary);
    opacity: 0.7;
    margin-bottom: var(--space-lg);
}

/* Form Grid */
.form-grid {
    display: grid;
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

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

@media (max-width: 992px) {
    .form-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-grid-3,
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Form Fields */
.vendi-form .form-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.vendi-form .form-field label {
    font-family: var(--font-primary);
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--color-secondary);
    text-transform: uppercase;
}

.vendi-form input,
.vendi-form select,
.vendi-form textarea {
    font-family: var(--font-primary);
    font-size: var(--font-size-body);
    padding: var(--space-md);
    border: 2px solid rgba(38, 38, 38, 0.15);
    border-radius: var(--radius-md);
    background: white;
    color: var(--color-secondary);
    transition: border-color var(--transition-fast);
}

.vendi-form input:focus,
.vendi-form select:focus,
.vendi-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.vendi-form input::placeholder,
.vendi-form textarea::placeholder {
    color: rgba(38, 38, 38, 0.4);
}

.vendi-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23262626' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 48px;
}

/* Photo Upload Grid */
.photo-upload-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
}

@media (max-width: 992px) {
    .photo-upload-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .photo-upload-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.photo-upload-item {
    position: relative;
}

.photo-upload-item input[type="file"] {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.photo-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) var(--space-md);
    background: white;
    border: 2px dashed rgba(38, 38, 38, 0.2);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    min-height: 160px;
}

.photo-upload-label:hover {
    border-color: var(--color-primary);
    background: rgba(210, 10, 17, 0.02);
}

.photo-upload-label.has-file {
    border-color: var(--color-success);
    border-style: solid;
    background: rgba(54, 173, 128, 0.05);
}

.photo-upload-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-sm);
    color: rgba(38, 38, 38, 0.3);
    transition: color var(--transition-fast);
}

.photo-upload-label:hover .photo-upload-icon {
    color: var(--color-primary);
}

.photo-upload-label.has-file .photo-upload-icon {
    color: var(--color-success);
}

.photo-upload-text {
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--color-secondary);
    text-transform: uppercase;
}

.photo-upload-filename {
    font-size: var(--font-size-xs);
    color: var(--color-success);
    margin-top: var(--space-xs);
    word-break: break-all;
    max-width: 100%;
}

/* Checkbox */
.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.form-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.form-checkbox label {
    font-size: var(--font-size-small);
    color: var(--color-secondary);
    cursor: pointer;
    line-height: 1.5;
}

.form-checkbox label a {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Submit Section */
.form-section-submit {
    border-bottom: none;
    padding-bottom: 0;
}

/* Terms */
.vendi-terms {
    margin-top: var(--space-3xl);
    padding: var(--space-xl);
    background: rgba(38, 38, 38, 0.05);
    border-radius: var(--radius-lg);
}

.vendi-terms h4 {
    font-size: var(--font-size-body);
    font-weight: 700;
    color: var(--color-secondary);
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.vendi-terms p {
    font-size: var(--font-size-small);
    color: var(--color-secondary);
    opacity: 0.8;
    margin-bottom: var(--space-sm);
}

.vendi-terms p:last-child {
    margin-bottom: 0;
}


/* ============================================
   FAQ SECTION
   ============================================ */

.vendi-faq-section {
    background: var(--color-secondary);
    padding: var(--space-5xl) 0;
    position: relative;
    z-index: 10;
}

.vendi-faq-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.vendi-faq-header h2 {
    color: white;
    margin-bottom: var(--space-md);
}

.vendi-faq-header p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* FAQ Accordion */
.faq-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-item:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl) 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: var(--space-lg);
}

.faq-question span {
    font-family: var(--font-primary);
    font-size: var(--font-size-body);
    font-weight: 600;
    color: white;
    flex: 1;
}

.faq-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--color-primary);
    transition: transform var(--transition-base);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base), padding var(--transition-base);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-bottom: var(--space-xl);
}

.faq-answer p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin: 0;
}

/* FAQ Footer */
.vendi-faq-footer {
    text-align: center;
    margin-top: var(--space-3xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.vendi-faq-footer p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: var(--space-sm);
}

.vendi-faq-footer a {
    color: var(--color-primary);
    font-weight: 600;
}

.vendi-faq-footer a:hover {
    text-decoration: underline;
}


/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .vendi-form-wrapper {
        padding: var(--layout-margin);
    }
    
    .vendi-form-section {
        padding: var(--space-2xl) var(--space-lg);
        border-radius: var(--radius-md);
    }
    
    .vendi-faq-section {
        padding: var(--space-3xl) 0;
    }
    
    .form-section {
        margin-bottom: var(--space-2xl);
        padding-bottom: var(--space-2xl);
    }
    
    .photo-upload-label {
        min-height: 140px;
        padding: var(--space-lg) var(--space-sm);
    }
    
    .photo-upload-icon {
        width: 36px;
        height: 36px;
    }
    
    .photo-upload-text {
        font-size: var(--font-size-xs);
    }
}


/* ============================================
   LOADING E MESSAGES
   ============================================ */

.form-loading {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    color: var(--color-secondary);
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(38, 38, 38, 0.2);
    border-top-color: var(--color-secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.form-message {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-top: var(--space-lg);
}

.form-message svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.form-message-success {
    background: rgba(54, 173, 128, 0.15);
    border: 1px solid var(--color-success);
    color: #1e7a52;
}

.form-message-success svg {
    stroke: var(--color-success);
}

.form-message-error {
    background: rgba(210, 10, 17, 0.1);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.form-message-error svg {
    stroke: var(--color-primary);
}

.form-message-error ul {
    margin: var(--space-sm) 0 0;
    padding-left: var(--space-lg);
    list-style: disc;
}

.form-message-error li {
    margin-bottom: var(--space-xs);
}

/* Photo Upload Error */
.photo-upload-error {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-primary);
    margin-top: var(--space-xs);
}

.photo-upload-label.has-error {
    border-color: var(--color-primary);
    background: rgba(210, 10, 17, 0.05);
}

.photo-upload-label.has-file {
    border-color: var(--color-success);
    background: rgba(54, 173, 128, 0.05);
}

.photo-upload-filename {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-success);
    margin-top: var(--space-xs);
    word-break: break-all;
}



/* ============================================
   FAQ APERTE (non accordion)
   ============================================ */

.vendi-faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item-open {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid rgba(38, 38, 38, 0.1);
}

.faq-item-open:last-child {
    border-bottom: none;
}

.faq-item-open h3 {
    font-size: var(--font-size-body);
    font-weight: 700;
    color: var(--color-cream);
    margin-bottom: var(--space-sm);
    text-transform: none;
}

.faq-item-open p {
    font-size: var(--font-size-body);
    color: var(--color-cream);
    line-height: var(--line-height-body);
    margin: 0;
}

.vendi-faq-intro {
    font-size: var(--font-size-body);
    color: var(--color-text-light);
    line-height: var(--line-height-body);
    margin-top: var(--space-md);
}

.vendi-faq-intro a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: underline;
}