/* ============================================================
   DEALER PAGE — built on top of styles.css
   Reuses: fonts, navbar, footer, root variables
   ============================================================ */

:root {
    --dealer-gold: #c9a85c;
    --dealer-gold-soft: rgba(201, 168, 92, 0.6);
    --dealer-pin-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E");
}

.dealer-page {
    background: #02060d;
}

/* shared content container */
.dl-container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 4rem;
    position: relative;
    z-index: 2;
}

/* ============ HERO HEADER (space + logo) ============ */
.dealer-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dealer-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    will-change: transform;
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent);
}
.dealer-hero-logo {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 1.5rem;
}
.dealer-hero-logo img {
    width: clamp(280px, 36vw, 540px);
    height: auto;
    filter: drop-shadow(0 12px 40px rgba(0, 0, 0, .55));
}

/* ============ DEALER FINDER (globe backdrop) ============ */
.dealer-main {
    position: relative;
    width: 100%;
    min-height: 120vh;
    padding: 6rem 0 7rem;
}
.dealer-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    line-height: 0;
}
.dealer-bg-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: top;
    will-change: transform;
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent);
}

.dealer-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 4rem;
    text-align: center;
}

/* ----- heading: FIND OUR (top-left) · AUTHORIZED (huge) · DEALERS (right) ----- */
.dealer-title {
    display: inline-block;
    /* shrink-wrap to AUTHORIZED's width so DEALERS right-aligns to its edge */
    text-align: left;
    margin-bottom: 2.4rem;
    line-height: 1;
}
.dealer-title .t-small {
    display: block;
    font-size: clamp(1.2rem, 4.5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--light-text);
    margin-bottom: -.06em;
    padding-left: .12em;
}
.dealer-title .t-big {
    display: block;
    font-size: clamp(2.5rem, 13.5vw, 11rem);
    font-weight: 900;
    letter-spacing: -.01em;
    line-height: .82;
    color: var(--light-text);
    white-space: nowrap;
    text-shadow: 0 4px 40px rgba(0, 0, 0, .35);
}
.dealer-title .t-sub {
    display: block;
    font-size: clamp(1.4rem, 5vw, 3.8rem);
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--light-text);
    text-align: right;
    line-height: .9;
    margin-top: .02em;
}

/* ----- dropdowns ----- */
.dealer-selects {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 420px;
    margin: 0 auto;
}
.select-wrap {
    position: relative;
}
.select-wrap::after {
    content: "";
    position: absolute;
    right: 1.2rem;
    top: 50%;
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--dealer-gold);
    border-bottom: 2px solid var(--dealer-gold);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.select-wrap select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: hsla(47, 39%, 53%, 0.55);
    border: 1px solid var(--dealer-gold-soft);
    border-radius: 2px;
    color: var(--light-text);
    font-family: var(--font-gotham);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: .5px;
    text-align: left;
    padding: .8rem 3rem .8rem 1.2rem;
    cursor: pointer;
    outline: none;
    transition: border-color .25s ease, background .25s ease;
}
.select-wrap select:hover {
    border-color: var(--dealer-gold);
}
.select-wrap select:focus {
    border-color: var(--dealer-gold);
    box-shadow: 0 0 0 1px var(--dealer-gold);
}
.select-wrap select:disabled {
    opacity: .55;
    cursor: not-allowed;
}
.select-wrap select option {
    background: #0a1a2e;
    color: var(--light-text);
}

/* ----- selected dealer details ----- */
.dealer-result {
    margin: 1.6rem auto 0;
    max-width: 560px;
    text-align: left;
    padding: 1.4rem 1.6rem;
    border: 1px solid var(--dealer-gold-soft);
    border-radius: 6px;
    background: rgba(20, 40, 64, 0.4);
    backdrop-filter: blur(2px);
    color: rgba(255, 255, 255, .9);
}
.dealer-result h4 {
    color: var(--dealer-gold);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0 0 .5rem;
}
.dealer-result p {
    margin: .2rem 0;
    font-weight: 300;
    line-height: 1.6;
}
/* Only rendered when the dealer has a map pin on record. */
.dealer-location-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1rem;
    padding: .6rem 1.2rem;
    border: 1px solid var(--dealer-gold);
    border-radius: 2px;
    background: hsla(47, 39%, 53%, 0.18);
    color: var(--dealer-gold);
    font-family: var(--font-gotham);
    font-size: .85rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .25s ease, color .25s ease;
}
.dealer-location-btn::before {
    content: "";
    width: 14px;
    height: 14px;
    flex: none;
    background: currentColor;
    -webkit-mask: var(--dealer-pin-mask) center / contain no-repeat;
    mask: var(--dealer-pin-mask) center / contain no-repeat;
}
.dealer-location-btn:hover,
.dealer-location-btn:focus-visible {
    background: var(--dealer-gold);
    color: #0a1a2e;
}
.dealer-location-btn:focus-visible {
    outline: 2px solid var(--dealer-gold);
    outline-offset: 2px;
}

/* ============ SHARED HEADINGS / TEXT ============ */
.dl-heading {
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--light-text);
    margin: 0 0 1rem;
}
.dl-heading span {
    color: var(--dealer-gold);
}
.dl-text {
    font-size: clamp(.95rem, 1.4vw, 1.15rem);
    font-weight: 300;
    line-height: 1.7;
    color: rgba(255,255,255,.85);
    max-width: 900px;
    margin: 0 0 2.5rem;
}

/* ============ BECOME A DEALER ============ */
.become-dealer {
    position: relative;
    width: 100%;
    padding: 7rem 0;
}
.bd-bg {
    position: absolute;
    top: -10%;                 /* overscan so the parallax shift never exposes a hard edge */
    left: 0;
    width: 100%;
    height: 120%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    will-change: transform;
    opacity: .45;
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent);
}

/* ----- form (site's gold style) ----- */
.bd-form { width: 100%; }

.bd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--dealer-gold-soft);
    background: hsla(47, 39%, 53%, 24%);
    backdrop-filter: blur(2px);
}
.bd-grid input,
.bd-grid textarea {
    width: 100%;
    background: transparent;
    border: 0;
    border-right: 1px solid var(--dealer-gold-soft);
    border-bottom: 1px solid var(--dealer-gold-soft);
    padding: 1.4rem 1.5rem;
    color: var(--light-text);
    font-family: var(--font-gotham);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: .5px;
    outline: none;
    transition: background .25s ease, box-shadow .25s ease;
}
/* remove right border on the second column to avoid double edge */
.bd-grid input:nth-child(2n),
.bd-grid .full {
    border-right: 0;
}
.bd-grid .full {
    grid-column: 1 / -1;
}
.bd-grid textarea {
    resize: vertical;
    min-height: 140px;
    border-bottom: 0;
}
.bd-grid input::placeholder,
.bd-grid textarea::placeholder {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 300;
}
.bd-grid input:focus,
.bd-grid textarea:focus {
    background: rgba(201, 168, 92, 0.12);
    box-shadow: inset 0 0 0 1px var(--dealer-gold);
}
.bd-grid input.is-invalid,
.bd-grid textarea.is-invalid {
    background: rgba(220, 53, 69, 0.14);
    box-shadow: inset 0 0 0 1px rgba(220, 53, 69, 0.8);
}

.bd-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
}
.submit-btn {
    background: var(--dealer-gold);
    color: #fff;
    border: 0;
    padding: 1rem 4rem;
    font-family: var(--font-gotham);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.submit-btn:hover {
    background: #d8b96a;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(201, 168, 92, 0.35);
}

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

/* ----- large tablets / small laptops ----- */
@media (max-width: 1200px) {
    .dl-container,
    .dealer-container { padding: 0 3rem; }
}

/* ----- tablets (landscape) ----- */
@media (max-width: 992px) {
    .dl-container,
    .dealer-container { padding: 0 2.5rem; }
    .dealer-main { min-height: 100vh; padding: 5rem 0 6rem; }
    .become-dealer { padding: 6rem 0; }
}

/* ----- tablets (portrait) ----- */
@media (max-width: 768px) {
    .dl-container,
    .dealer-container { padding: 0 1.5rem; }
    .dealer-hero { min-height: 400px; }
    .dealer-hero-logo img { width: clamp(220px, 55vw, 340px); }

    .dealer-main { min-height: 0; padding: 4rem 0 5rem; }
    .dealer-title { margin-bottom: 1.6rem; }
    .dealer-selects { max-width: min(100%, 340px); }

    .become-dealer { padding: 5rem 0; }
    .bd-grid { grid-template-columns: 1fr; }
    .bd-grid input,
    .bd-grid textarea { border-right: 0; padding: 1.2rem 1.2rem; }
    .bd-actions { justify-content: stretch; }
    .bd-actions .submit-btn { width: 100%; padding: 1rem; }
}

/* ----- phones ----- */
@media (max-width: 576px) {
    .dl-container,
    .dealer-container { padding: 0 1rem; }
    .dealer-hero { min-height: 340px; }
    .dealer-hero-logo img { width: clamp(180px, 60vw, 260px); }

    .dealer-main { padding: 3.5rem 0 4.5rem; }
    .dealer-result { padding: 1.1rem 1.2rem; }

    .dl-heading { letter-spacing: 2px; }

    .become-dealer { padding: 4rem 0; }
    .bd-grid input,
    .bd-grid textarea { padding: 1.05rem 1rem; font-size: .95rem; }
    .submit-btn { font-size: 1.05rem; letter-spacing: 2px; }
}

/* ----- short landscape phones ----- */
@media (max-height: 480px) and (orientation: landscape) {
    .dealer-hero { height: 100svh; min-height: 0; }
    .dealer-hero-logo img { width: clamp(160px, 24vw, 240px); }
}
