@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&display=swap');

/* ============================================
   RESET
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden !important;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #0f172a;
    line-height: 1.5;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   SEARCH SECTION
============================================ */
.search-section {
    background: #ffffff;
    padding: 1.4rem 0 2rem;
    border-bottom: 1px solid #eef2f8;
    overflow: visible !important;
}

.bg-overlay {
    display: none;
}

.search-section h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.7rem;
}

.search-section p {
    font-size: 1rem;
    color: #64748b;
}

.container-fluid.px-lg-5 {
    padding-left: 16px !important;
    padding-right: 16px !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* ============================================
   HERO PROMO
============================================ */
.hero-promo {
    background: #f8fafc;
    border-radius: 18px;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem auto 1.2rem;
    border: 1px solid #e2e8f0;
}

.hero-promo__brand strong {
    font-weight: 700;
    color: #0f172a;
    display: block;
}

.hero-promo__brand span {
    color: #64748b;
    font-size: 0.9rem;
}

.hero-promo__cta {
    background: #0f172a;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

/* ============================================
   FORM CONTAINER
============================================ */
.glass-form-container {
    background: #ffffff;
    border-radius: 22px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: visible !important;
    max-width: 100% !important;
}

.glass-form-container--hero {
    overflow: visible !important;
}

/* ============================================
   TOP TABS
============================================ */
.home-top-tabs {
    background: #fafbfc;
    padding: 1rem 1rem 0.4rem;
    border-bottom: 1px solid #eef2f8;
    overflow: hidden;
}

.home-top-tabs-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    width: 100%;
}

.home-top-tab {
    width: 100%;
    min-width: 0;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 0.9rem 0.6rem;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.82rem;
    color: #334155;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    transition: all 0.2s ease;
    line-height: 1.15;
}

.home-top-tab__icon {
    font-size: 1.25rem;
    line-height: 1;
}

.home-top-tab:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.home-top-tab.active {
    background: #ff3b30;
    border-color: #ff3b30;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(255, 59, 48, 0.18);
}

/* ============================================
   FORM
============================================ */
#homeSearch {
    padding: 1rem;
    overflow: visible !important;
}

.home-search-compact {
    overflow: visible !important;
}

.home-search-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
    margin-bottom: 0.9rem;
    overflow: visible !important;
    max-width: 100% !important;
}

.home-search-row--second {
    grid-template-columns: 1fr;
    margin-bottom: 0;
}

.home-search-col,
.home-search-col--brand,
.home-search-col--model,
.home-search-col--modeltext,
.home-search-col--price,
.home-search-col--year,
.home-search-col--submit {
    min-width: 0;
    overflow: visible !important;
    max-width: 100% !important;
}

/* ============================================
   FIELD WRAPPER
============================================ */
.form-group-glass {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    position: relative;
    transition: all 0.2s;
    overflow: visible !important;
    margin-bottom: 0 !important;
}

.form-group-glass:hover {
    border-color: #94a3b8;
}

.form-group-glass:focus-within {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10);
}

.form-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 3;
}

.form-group-glass select,
.form-group-glass input {
    width: 100%;
    border: none;
    padding: 0.95rem 0.95rem 0.95rem 2.5rem;
    background: transparent;
    font-size: 0.95rem;
    outline: none;
    font-family: 'Inter', sans-serif;
    color: #0f172a;
}

.form-group-glass input::placeholder {
    color: #94a3b8;
}

.form-group-glass select option {
    color: #0f172a;
    background: white;
}

/* ============================================
   SELECT2
============================================ */
.select2-container {
    width: 100% !important;
    margin: 0 !important;
    vertical-align: top !important;
    z-index: 20;
    max-width: 100% !important;
}

.select2-container--default .select2-selection--single {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 16px !important;
    height: 56px !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
}

.select2-container--default .select2-selection--single:hover {
    border-color: #94a3b8 !important;
}

.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #0f172a !important;
    font-size: 0.95rem;
    padding-left: 2.5rem !important;
    padding-right: 2.2rem !important;
    line-height: 54px !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 12px !important;
}

.select2-dropdown {
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    margin-top: -2px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12);
    left: 0 !important;
    z-index: 99999 !important;
    overflow: hidden;
    position: absolute !important;
}

.select2-container--open .select2-dropdown {
    top: 100% !important;
    margin-top: -2px !important;
    transform: none !important;
}

.select2-results__options {
    max-height: 260px;
    overflow-y: auto;
}

.select2-results__option {
    padding: 12px 14px !important;
    font-size: 0.9rem;
    color: #0f172a;
}

.select2-results__option--highlighted {
    background: #fff1f2 !important;
    color: #ef4444 !important;
}

.select2-results__option[aria-selected="true"] {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

/* ============================================
   BUTTON
============================================ */
.home-search-btn {
    background: #0f172a;
    border: none;
    border-radius: 16px;
    padding: 0.95rem 1.2rem;
    font-weight: 700;
    font-size: 0.95rem;
    width: 100%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 56px;
}

.home-search-btn:hover {
    background: #1e293b;
}

/* ============================================
   DETAILED SEARCH BUTTON
============================================ */
.home-search-actions {
    margin-top: 1.3rem;
    text-align: center;
}

.home-more-btn {
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.65rem 1.2rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.home-more-btn:hover {
    background: #f8fafc;
    border-color: #ef4444;
    color: #ef4444;
}

/* ============================================
   TRANSPORT / PARTS SUBTABS
============================================ */
.ao-transport-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1rem 0 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eef2f8;
}

.ao-transport-tab {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    padding: 0.45rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.ao-transport-tab.active {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.ao-help-note {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* ============================================
   QUICK LINKS ISPOD SEARCH
============================================ */
.category-links-home {
    margin-top: 1.5rem;
}

.chips-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
    margin-bottom: 0.8rem;
}

.chips-row a {
    background: #ffffff;
    padding: 0.55rem 1rem;
    border-radius: 14px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.chips-row a:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fff;
}

.chips-row a.btn-parts-translucent {
    border-color: #fecaca;
    background: #fff5f5;
    color: #dc2626;
}

/* ============================================
   RESULTS
============================================ */
.front-results {
    padding: 2.2rem 0 4rem;
    background: #f8fafc;
}

.section-kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #5f7f9c;
    margin-bottom: 0.5rem;
}

.section-heading {
    font-size: 1.55rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-heading i {
    color: #ef4444;
    font-size: 1.6rem;
}

.section-sub {
    font-weight: 400;
    font-size: 0.9rem;
    color: #5f7f9c;
    margin-left: 8px;
}

.fp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.4rem;
    margin: 1.3rem 0 2.2rem;
}

.fp-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #eef2f6;
    position: relative;
}

.fp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.12);
}

.ribbon-biz-mini {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #2c5f2d;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    z-index: 2;
}

.fp-photo {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #eef2f6;
}

.fp-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.fp-card:hover .fp-photo img {
    transform: scale(1.08);
}

.list-wm {
    position: absolute;
    max-width: 80px;
    max-height: 60px;
    bottom: 12px;
    left: 12px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
}

.list-wm.center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.fp-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
}

.fp-badge {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
}

.fp-badge--featured {
    background: #e67e22 !important;
}

.fp-brand {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

.fp-brand a {
    color: white;
    text-decoration: none;
}

.fp-body {
    padding: 1rem 1rem 1.2rem;
    position: relative;
}

.dealer-badge {
    position: absolute;
    top: -20px;
    right: 16px;
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid white;
}

.dealer-badge img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 60px;
}

.fp-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.fp-type {
    font-size: 0.7rem;
    background: #eef2ff;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-weight: 500;
    color: #1e5f7a;
}

.fp-price {
    font-weight: 800;
    font-size: 1.3rem;
    color: #1f3b4c;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    background: linear-gradient(180deg, #1f3b4c 0%, #0f2c3b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fp-title a {
    font-weight: 700;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.6rem;
    color: #0f2c3b;
    text-decoration: none;
}

.fp-title a:hover {
    color: #ef4444;
}

.fp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #4a627a;
    margin-bottom: 0.8rem;
}

.fp-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.fp-foot {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #6f8eae;
    border-top: 1px solid #ecf3f9;
    padding-top: 0.7rem;
    margin-top: 0.2rem;
}

/* Ads */
.fp-ad {
    margin: 1.2rem 0;
}

.fp-ad-box {
    background: white;
    border-radius: 24px;
    padding: 0.8rem;
    border: 1px dashed #cbd5e1;
}

.fp-ad-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    background: #eef2f6;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (min-width: 768px) {
    .home-search-row {
        grid-template-columns: 1.2fr 1.2fr 0.9fr 0.9fr;
    }

    .home-search-row--second {
        grid-template-columns: 1fr 1fr 0.8fr 0.7fr;
    }

    .home-top-tabs-inner {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    #homeSearch {
        padding: 1rem;
    }

    .glass-form-container {
        margin: 0;
    }

    .section-heading {
        font-size: 1.4rem;
    }
}

@media (max-width: 576px) {
    .search-section h1 {
        font-size: 1.5rem;
    }

    .hero-promo {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
        border-radius: 16px;
    }

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

    .form-group-glass select,
    .form-group-glass input {
        padding: 0.8rem 0.8rem 0.8rem 2.3rem;
        min-height: 56px;
    }

    .select2-container--default .select2-selection--single {
        height: 56px !important;
    }

    .ao-transport-tab {
        padding: 0.4rem 0.8rem;
    }
}