/* =============================================
   SPARSH — Dealer Page Styles
   ============================================= */

.dealer-page {
    background: var(--sky-deep);
    color: var(--text-primary);
    overflow-x: hidden;
}

.dealer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.dealer-section {
    padding: 100px 0;
    position: relative;
}

/* ---------- HERO SECTION ---------- */
.dealer-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 140px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.dealer-hero-content {
    max-width: 900px;
    margin: 0 auto;
    opacity: 0; /* Animated in JS */
    transform: translateY(30px);
}

.dealer-label {
    display: inline-block;
    color: var(--accent-gold);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.dealer-heading {
    font-family: 'Inter', sans-serif;
    font-size: clamp(3.5rem, 8vw, 6rem);
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 700;
    font-style: italic;
}

.dealer-subheadline {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.hero-cta-wrapper {
    margin-bottom: 40px;
}

.hero-product-line {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.btn-primary-gold {
    display: inline-block;
    padding: 18px 48px;
    background: var(--accent-gold);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(97, 181, 100, 0.2);
}

.btn-primary-gold:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(97, 181, 100, 0.4);
    background: #72c575; /* Slightly lighter gold/green */
}

/* ---------- APPLICATION FORM SECTION ---------- */
.form-section {
    background: transparent;
    border-top: 0;
    border-bottom: 0;
}

.form-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.form-headline {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 16px;
    font-weight: 400;
}

.dealer-growth-header {
    max-width: 980px;
}

.dealer-growth-heading {
    white-space: nowrap;
}

.form-subtext {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.dealer-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.02);
    padding: 60px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.dealer-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(97, 181, 100, 0.05);
}

.form-group select option {
    background: #0a1128;
    color: #fff;
}

.form-group select.native-select-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
}

.dealer-form .custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.dealer-form .custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
}

.dealer-form .custom-select__trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dealer-form .custom-select__trigger i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dealer-form .custom-select.open .custom-select__trigger {
    border-color: var(--accent-gold);
    background: rgba(97, 181, 100, 0.05);
}

.dealer-form .custom-select.open .custom-select__trigger i {
    transform: rotate(180deg);
}

.dealer-form .custom-select-wrapper.has-error .custom-select__trigger {
    border-color: #ff6b6b;
}

.dealer-form .custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(10, 17, 40, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-10px);
}

.dealer-form .custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
}

.dealer-form .custom-option {
    position: relative;
    display: block;
    padding: 14px 18px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dealer-form .custom-option:first-child {
    border-radius: 12px 12px 0 0;
}

.dealer-form .custom-option:last-child {
    border-radius: 0 0 12px 12px;
}

.dealer-form .custom-option:hover {
    background: rgba(97, 181, 100, 0.1);
    color: var(--accent-gold);
}

.dealer-form .custom-option.selected {
    color: var(--accent-gold);
    background: rgba(97, 181, 100, 0.05);
}

.submit-btn-large {
    grid-column: span 2;
    padding: 18px;
    background: var(--accent-gold);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s ease;
    margin-top: 20px;
}

.submit-btn-large:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(97, 181, 100, 0.3);
}

.form-microcopy {
    grid-column: span 2;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 15px;
}

/* ---------- WHY PARTNER SECTION ---------- */
.why-partner-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.why-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 32px;
    transition: all 0.4s ease;
}

.why-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-gold);
}

.why-card h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--accent-gold);
}

.why-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---------- PRODUCT SNAPSHOT SECTION ---------- */
.product-snapshot-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
}

.product-chip {
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.product-chip:hover {
    background: var(--accent-soft);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: scale(1.05);
}

/* ---------- HOW IT WORKS SECTION ---------- */
.how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.step-item {
    position: relative;
    text-align: center;
}

.step-num {
    font-size: 4rem;
    font-weight: 800;
    color: var(--accent-gold);
    opacity: 0.1;
    line-height: 1;
    margin-bottom: -20px;
}

.step-content h4 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.step-content p {
    color: var(--text-secondary);
}

/* ---------- FINAL CTA SECTION ---------- */
.final-cta-centered {
    text-align: center;
    padding: 120px 0;
}

.final-cta-centered h2 {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 20px;
}

.final-cta-centered p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.final-cta-logo {
    height: 2.2em;
    vertical-align: middle;
    margin-top: 20px;
    display: inline-block;
}

.dealer-logo-large {
    height: 1.8em;
    vertical-align: middle;
    margin-top: 15px;
    display: inline-block;
}

/* ---------- STICKY MOBILE CTA ---------- */
.sticky-mobile-cta {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 1000;
}

.sticky-cta-btn {
    width: 100%;
    padding: 18px;
    background: var(--accent-gold);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

/* ---------- DEALERSHIP FAQ ACCORDION ---------- */
/* Matches Sleep Library "Commonly Asked Questions" card treatment exactly */
html body.dealer-page .faq-accordion {
    display: flex !important;
    flex-direction: column !important;
}

html body.dealer-page .faq-accordion .faq-item {
    margin: 0 0 16px 0 !important;
    padding: 0 28px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%) !important;
    overflow: hidden !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html body.dealer-page .faq-accordion .faq-item:hover {
    border-color: rgba(97, 181, 100, 0.35) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25) !important;
}

html body.dealer-page .faq-accordion .faq-item[open] {
    border-color: rgba(97, 181, 100, 0.35) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2) !important;
}

html body.dealer-page .faq-accordion .faq-item summary {
    padding: 24px 0 !important;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 1.05rem !important;
    line-height: 1.45 !important;
    background: transparent !important;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

html body.dealer-page .faq-accordion .faq-item summary::-webkit-details-marker {
    display: none !important;
}

html body.dealer-page .faq-accordion .faq-item summary::after {
    content: '' !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(97, 181, 100, 0.4) !important;
    background:
        linear-gradient(currentColor, currentColor) center / 10px 1px no-repeat,
        linear-gradient(currentColor, currentColor) center / 1px 10px no-repeat !important;
    color: var(--accent-gold) !important;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1), background-color 0.3s ease, border-color 0.3s ease !important;
    flex-shrink: 0 !important;
}

html body.dealer-page .faq-accordion .faq-item[open] summary::after {
    transform: rotate(135deg) !important;
    background:
        linear-gradient(currentColor, currentColor) center / 10px 1px no-repeat !important;
    background-color: rgba(97, 181, 100, 0.1) !important;
}

html body.dealer-page .faq-accordion .faq-item summary:hover {
    color: var(--accent-gold) !important;
}

html body.dealer-page .faq-accordion .faq-answer {
    padding: 0 0 24px !important;
    color: rgba(255, 255, 255, 0.75) !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 400;
    line-height: 1.7 !important;
    font-size: 0.95rem !important;
}

html body.dealer-page .faq-accordion .faq-answer p {
    margin: 0 !important;
}

html body.dealer-page .faq-cta-row.center {
    max-width: 880px;
    margin: 40px auto 0 !important;
    display: flex;
    justify-content: center;
    text-align: center;
}

/* Light mode */
html body.light-mode.dealer-page .faq-accordion .faq-item {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(26, 26, 46, 0.09) !important;
    box-shadow: 0 4px 20px rgba(26, 26, 46, 0.04) !important;
}

html body.light-mode.dealer-page .faq-accordion .faq-item:hover,
html body.light-mode.dealer-page .faq-accordion .faq-item[open] {
    background: #ffffff !important;
    border-color: rgba(97, 181, 100, 0.3) !important;
    box-shadow: 0 16px 40px rgba(26, 26, 46, 0.08) !important;
}

html body.light-mode.dealer-page .faq-accordion .faq-item summary {
    color: #1a1a2e !important;
}

html body.light-mode.dealer-page .faq-accordion .faq-answer {
    color: rgba(26, 26, 46, 0.72) !important;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 992px) {
    .dealer-hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .dealer-subheadline {
        margin: 0 auto 30px;
    }

    .hero-product-line {
        justify-content: center;
    }

    .why-partner-grid {
        grid-template-columns: 1fr;
    }

    .how-it-works-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dealer-section {
        padding: 60px 0;
    }

    .dealer-growth-heading {
        white-space: normal;
    }

    .dealer-form-container {
        padding: 30px 20px;
    }

    .dealer-form {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: span 1;
    }

    .submit-btn-large, .form-microcopy {
        grid-column: span 1;
    }

    .sticky-mobile-cta {
        display: block;
    }
}

@media (max-width: 480px) {
    .hero-product-line {
        font-size: 0.75rem;
        gap: 4px;
    }
}

