/* ==========================================================================
   Storefront Themes & Layouts (classic, sport_dark, drive_red, b2b_slate, emerald_clean)
   Each theme customizes BOTH visual palette/geometry AND homepage block layout.
   ========================================================================== */

:root {
    --theme-accent: #0062d2;
    --theme-accent-hover: #004ea8;
    --theme-accent-soft: #eff6ff;
}

/* Accent color overrides (applied whenever non-classic theme or custom accent is active) */
body[data-has-theme="1"] .bg-brand-blue { background-color: var(--theme-accent) !important; }
body[data-has-theme="1"] .hover\:bg-brand-hover:hover,
body[data-has-theme="1"] .bg-brand-blue:hover { background-color: var(--theme-accent-hover) !important; }
body[data-has-theme="1"] .text-brand-blue { color: var(--theme-accent) !important; }
body[data-has-theme="1"] .hover\:text-brand-blue:hover { color: var(--theme-accent) !important; }
body[data-has-theme="1"] .border-brand-blue,
body[data-has-theme="1"] .hover\:border-brand-blue:hover,
body[data-has-theme="1"] .focus\:border-brand-blue:focus { border-color: var(--theme-accent) !important; }

/* --------------------------------------------------------------------------
   THEME 2: SPORT DARK (Carbon & Orange)
   Layout: Full-width top hero banner + full-width horizontal car search below
           + 4-col horizontal make cards (logo left, text right)
   -------------------------------------------------------------------------- */
body[data-theme="sport_dark"] {
    --theme-accent: #f97316;
    --theme-accent-hover: #ea580c;
    --theme-accent-soft: #fff7ed;
    background-color: #f3f4f6;
}
body[data-theme="sport_dark"] .sf-header {
    background-color: #111827 !important;
    border-bottom: 2px solid var(--theme-accent) !important;
    color: #f9fafb;
}
body[data-theme="sport_dark"] .sf-header a.sf-logo-link span.text-brand-dark {
    color: #ffffff !important;
}
body[data-theme="sport_dark"] .sf-header #header-garage-dropdown > a {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    color: #f3f4f6 !important;
}
body[data-theme="sport_dark"] .sf-header #header-garage-dropdown > a:hover {
    background-color: #374151 !important;
}
body[data-theme="sport_dark"] .sf-header .sf-header-action {
    color: #e5e7eb !important;
}
body[data-theme="sport_dark"] .sf-header .sf-header-action:hover {
    color: var(--theme-accent) !important;
}
body[data-theme="sport_dark"] .sf-hero-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important;
}
body[data-theme="sport_dark"] .sf-hero-banner {
    order: 1;
    width: 100%;
}
body[data-theme="sport_dark"] .sf-hero-banner #hero-slider-container {
    min-height: 320px;
    border-radius: 14px !important;
}
body[data-theme="sport_dark"] .sf-hero-search {
    order: 2;
    width: 100%;
}
body[data-theme="sport_dark"] .sf-hero-search-card {
    background: #111827 !important;
    border-color: #1f2937 !important;
    border-radius: 14px !important;
    color: #f9fafb;
}
body[data-theme="sport_dark"] .sf-hero-search-card > div > h2 {
    color: #f9fafb !important;
    font-size: 1rem !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
body[data-theme="sport_dark"] .sf-hero-search-card .sf-help-link {
    color: #9ca3af !important;
}
@media (min-width: 1024px) {
    body[data-theme="sport_dark"] .sf-makes-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 0.875rem !important;
    }
    body[data-theme="sport_dark"] .sf-make-card {
        flex-direction: row !important;
        text-align: left !important;
        justify-content: flex-start !important;
        gap: 0.875rem !important;
        padding: 0.875rem 1rem !important;
        border-radius: 12px !important;
    }
    body[data-theme="sport_dark"] .sf-make-card > div:first-child {
        margin-bottom: 0 !important;
        flex-shrink: 0;
    }
}

/* --------------------------------------------------------------------------
   THEME 3: DRIVE RED (Auto Retail)
   Layout: Mirrored Hero (banner LEFT, car selector RIGHT with red top accent)
           + dense 8-column makes showcase
   -------------------------------------------------------------------------- */
body[data-theme="drive_red"] {
    --theme-accent: #dc2626;
    --theme-accent-hover: #b91c1c;
    --theme-accent-soft: #fef2f2;
    background-color: #fafafa;
}
body[data-theme="drive_red"] .sf-header {
    border-bottom: 3px solid var(--theme-accent) !important;
}
body[data-theme="drive_red"] .sf-hero-search-card {
    border-top: 4px solid var(--theme-accent) !important;
    background: #ffffff !important;
}
@media (min-width: 1024px) {
    body[data-theme="drive_red"] .sf-hero-banner {
        order: 1 !important;
    }
    body[data-theme="drive_red"] .sf-hero-search {
        order: 2 !important;
    }
    body[data-theme="drive_red"] .sf-makes-grid {
        grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
        gap: 0.625rem !important;
    }
    body[data-theme="drive_red"] .sf-make-card {
        padding: 0.75rem 0.5rem !important;
        border-radius: 12px !important;
    }
}

/* --------------------------------------------------------------------------
   THEME 4: B2B SLATE (Industrial Slate & Amber)
   Layout: Popular Makes bar FIRST right below header (order: -1)
           + 50/50 split Hero (6 cols search / 6 cols banner) + crisp rectangular radii
   -------------------------------------------------------------------------- */
body[data-theme="b2b_slate"] {
    --theme-accent: #d97706;
    --theme-accent-hover: #b45309;
    --theme-accent-soft: #fffbeb;
    background-color: #f1f5f9;
}
body[data-theme="b2b_slate"] .sf-header {
    background-color: #0f172a !important;
    border-bottom: 2px solid var(--theme-accent) !important;
    color: #f8fafc;
}
body[data-theme="b2b_slate"] .sf-header a.sf-logo-link span.text-brand-dark {
    color: #ffffff !important;
}
body[data-theme="b2b_slate"] .sf-header #header-garage-dropdown > a {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
    border-radius: 8px !important;
}
body[data-theme="b2b_slate"] .sf-header .sf-header-action {
    color: #e2e8f0 !important;
}
body[data-theme="b2b_slate"] .sf-header .sf-header-action:hover {
    color: var(--theme-accent) !important;
}
body[data-theme="b2b_slate"] .sf-home-wrap {
    display: flex;
    flex-direction: column;
}
body[data-theme="b2b_slate"] .sf-makes-block {
    order: -1;
    margin-bottom: 2rem !important;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}
body[data-theme="b2b_slate"] .sf-make-card,
body[data-theme="b2b_slate"] .sf-hero-search-card,
body[data-theme="b2b_slate"] .sf-hero-banner #hero-slider-container {
    border-radius: 8px !important;
}
body[data-theme="b2b_slate"] .sf-hero-search-card {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    border-left: 4px solid var(--theme-accent) !important;
}
@media (min-width: 1024px) {
    body[data-theme="b2b_slate"] .sf-hero-search {
        grid-column: span 6 / span 6 !important;
    }
    body[data-theme="b2b_slate"] .sf-hero-banner {
        grid-column: span 6 / span 6 !important;
    }
    body[data-theme="b2b_slate"] .sf-makes-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
        gap: 0.625rem !important;
    }
}

/* --------------------------------------------------------------------------
   THEME 5: EMERALD CLEAN (Airy E-commerce)
   Layout: Full-width car search card ON TOP + full-width sleek banner below
           + spacious 4-column make cards with large rounded corners
   -------------------------------------------------------------------------- */
body[data-theme="emerald_clean"] {
    --theme-accent: #059669;
    --theme-accent-hover: #047857;
    --theme-accent-soft: #ecfdf5;
    background-color: #f4f9f6;
}
body[data-theme="emerald_clean"] .sf-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #d1fae5 !important;
}
body[data-theme="emerald_clean"] .sf-hero-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important;
}
body[data-theme="emerald_clean"] .sf-hero-search {
    order: 1;
    width: 100%;
}
body[data-theme="emerald_clean"] .sf-hero-search-card {
    background: #ffffff !important;
    border: 2px solid #a7f3d0 !important;
    border-radius: 24px !important;
    box-shadow: 0 10px 30px -12px rgba(5, 150, 105, 0.14) !important;
}
body[data-theme="emerald_clean"] .sf-hero-banner {
    order: 2;
    width: 100%;
}
body[data-theme="emerald_clean"] .sf-hero-banner #hero-slider-container {
    min-height: 250px !important;
    border-radius: 24px !important;
}
@media (min-width: 1024px) {
    body[data-theme="emerald_clean"] .sf-makes-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 1.125rem !important;
    }
    body[data-theme="emerald_clean"] .sf-make-card {
        border-radius: 22px !important;
        padding: 1.5rem 1rem !important;
        border-color: #d1fae5 !important;
    }
}

/* Horizontal 3-col vehicle steps + 2-col VIN/Article inputs for full-width hero themes */
@media (min-width: 1024px) {
    body[data-theme="sport_dark"] .sf-vehicle-steps,
    body[data-theme="emerald_clean"] .sf-vehicle-steps {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }
    body[data-theme="sport_dark"] .sf-vehicle-steps > div,
    body[data-theme="emerald_clean"] .sf-vehicle-steps > div {
        margin-bottom: 0 !important;
    }
    body[data-theme="sport_dark"] .sf-vehicle-steps #vehicle-step3-dropdown,
    body[data-theme="emerald_clean"] .sf-vehicle-steps #vehicle-step3-dropdown {
        left: auto !important;
        right: 0 !important;
    }
    body[data-theme="sport_dark"] .sf-vehicle-inputs,
    body[data-theme="emerald_clean"] .sf-vehicle-inputs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
    body[data-theme="sport_dark"] .sf-vehicle-inputs > div,
    body[data-theme="emerald_clean"] .sf-vehicle-inputs > div {
        margin-bottom: 0 !important;
    }
}

body[data-theme="sport_dark"] .sf-hero-search-card .sf-part-label {
    color: #d1d5db !important;
}
