/* Babar Autos - Premium Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Brand Colors (Babar Autos - Red/Black) */
    --primary: #D32F2F;
    /* Red */
    --primary-dark: #B71C1C;
    /* Dark Red */
    --primary-light: #FFCDD2;
    /* Light Red */
    --secondary: #020617;
    /* Black/Dark Navy */
    --secondary-dark: #000000;

    --accent: var(--primary);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Backgrounds */
    --light: #f8fafc;
    --bg-light: #f8fafc;
    /* Defined explicitly */
    --white: #ffffff;

    /* Slate 50 */
    --glass: rgba(255, 255, 255, 0.9);
    --elite-gold: #D32F2F;
    /* Treating 'Gold' accents as Red for brand consistency */
    --elite-gold-glow: rgba(211, 47, 47, 0.4);
}

/* Shimmer Animation */
@keyframes glass-shimmer {
    0% {
        transform: translateX(-150%) skewX(-25deg);
    }

    50% {
        transform: translateX(150%) skewX(-25deg);
    }

    100% {
        transform: translateX(150%) skewX(-25deg);
    }
}

.shimmer-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    animation: glass-shimmer 4s infinite;
    pointer-events: none;
}


@media (max-width: 767px) {
    body {
        padding-bottom: 80px;
    }

    .glass-nav {
        height: 60px !important;
        display: flex !important;
        align-items: center !important;
        padding: 0 10px !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        background: rgba(255, 255, 255, 0.7) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        margin: 0 auto !important;
        width: 94% !important;
        border-radius: 20px !important;
        top: 10px !important;
        left: 3% !important;
        position: fixed !important;
        z-index: 100 !important;
        overflow: hidden !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }



    html.dark .glass-nav {
        background: rgba(15, 23, 42, 0.7) !important;
        border-color: rgba(255, 255, 255, 0.05) !important;
        border-top-color: rgba(255, 255, 255, 0.1) !important;
    }

    .glass-nav .container {
        padding: 0 !important;
        max-width: 100% !important;
    }

    .glass-nav .flex.items-center.justify-between {
        height: 100% !important;
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 40px 1fr 40px !important;
        align-items: center !important;
        gap: 0 !important;
    }



    .header-action-left {
        grid-column: 1;
        display: flex;
        justify-content: flex-start;
    }

    .header-action-left button {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.03);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    html.dark .header-action-left button {
        background: rgba(255, 255, 255, 0.05);
    }

    .glass-nav a.flex.items-center.gap-3 {
        grid-column: 2;
        justify-content: center !important;
        gap: 0 !important;
    }

    .glass-nav .site-logo {
        height: 26px !important;
        width: auto !important;
    }

    .header-action-right {
        grid-column: 3;
        display: flex;
        justify-content: flex-end;
    }



    #mobileThemeToggle {
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.03);
    }

    html.dark #mobileThemeToggle {
        background: rgba(255, 255, 255, 0.05);
    }

    .notification-dot {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 7px;
        height: 7px;
        background: #ef4444;
        /* Bright Red */
        border-radius: 50%;
        border: 2px solid white;
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
        animation: pulse-red 2s infinite;
    }

    @keyframes pulse-red {
        0% {
            transform: scale(0.95);
            box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
        }

        70% {
            transform: scale(1);
            box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
        }

        100% {
            transform: scale(0.95);
            box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        }
    }

    html.dark .notification-dot {
        border-color: #0f172a;
    }

    /* Dynamic Search Header */
    .mobile-search-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 70px;
        background: var(--white);
        z-index: 150;
        display: none;
        align-items: center;
        padding: 0 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        animation: slide-down 0.3s ease;
    }

    html.dark .mobile-search-overlay {
        background: #0f172a;
    }

    @keyframes slide-down {
        from {
            transform: translateY(-100%);
        }

        to {
            transform: translateY(0);
        }
    }

    .mobile-search-input {
        flex: 1;
        height: 45px;
        background: rgba(0, 0, 0, 0.03);
        border: 1px solid rgba(0, 0, 0, 0.05);
        border-radius: 12px;
        padding: 0 15px;
        font-size: 16px;
        outline: none;
    }

    html.dark .mobile-search-input {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
        color: white;
    }
}

/* Premium Desktop Button Glow */
.btn-elite-glow {
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px var(--elite-gold-glow);
    transition: all 0.3s ease;
}

.btn-elite-glow:hover {
    box-shadow: 0 0 25px var(--elite-gold);
    transform: translateY(-2px);
}


@media (min-width: 768px) {
    .mobile-footer-minimal {
        display: none !important;
    }
}


/* Mobile Bottom Nav */
.mobile-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 50;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.05);
}

html.dark .mobile-nav-bar {
    background: rgba(15, 23, 42, 0.85);
    border-top-color: rgba(255, 255, 255, 0.05);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 20%;
}

.mobile-nav-item.active {
    color: var(--primary);
}

html.dark .mobile-nav-item.active {
    color: var(--elite-gold);
}

.mobile-nav-item i {
    font-size: 20px;
}

.mobile-nav-sell-btn {
    position: relative;
    top: -20px;
}

.sell-btn-inner {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 20px rgba(29, 61, 130, 0.3);
    border: 4px solid var(--white);
    transition: all 0.3s ease;
}

html.dark .sell-btn-inner {
    background: linear-gradient(135deg, var(--elite-gold), #d97706);
    box-shadow: 0 10px 20px rgba(251, 191, 36, 0.2);
    border-color: #0f172a;
    color: #0f172a;
}


html.dark {
    --bg-light: #0f172a;
    /* Slate 900 */
    --text-main: #f1f5f9;
    /* Slate 100 */
    --glass: rgba(15, 23, 42, 0.8);
    /* Dark Glass */
    --white: #1e293b;
    /* Slate 800 */
}


body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}



/* UI Components */
.premium-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

.text-primary {
    color: var(--primary);
}

.bg-primary {
    background-color: var(--primary);
}

.border-primary {
    border-color: var(--primary);
}

.hover-primary:hover {
    color: var(--primary);
}

.hover-bg-primary:hover {
    background-color: var(--primary);
}

/* Hero Section Gradient */
.hero-gradient {
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.1), transparent),
        radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.05), transparent);
}


/* Buttons */
.btn-premium {
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-premium:active {
    transform: scale(0.95);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 15px 25px -5px rgba(16, 185, 129, 0.5);
    box-shadow: 0 15px 25px -5px rgba(16, 185, 129, 0.5);
    filter: brightness(1.1);
}

html.dark .btn-primary {
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.5);
}

/* Glassmorphism */
.glass-nav {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

html.dark .glass-nav {
    background: rgba(15, 23, 42, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

html.dark .site-logo {
    filter: brightness(0) invert(1);
}


/* Car Listing Cards */
.car-card-premium {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.car-card-premium .p-6,
.car-card-premium .p-8 {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.car-card-premium .p-6>div:last-child,
.car-card-premium .p-8>div:last-child {
    margin-top: auto;
}

.car-card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.1);
}

.car-card-premium .img-container {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
    background-color: #e2e8f0;
}

.car-card-premium img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.car-card-premium:hover img {
    transform: scale(1.1);
}

/* Horizontal Car Listing Card (PakWheels Style) */
.car-card-list {
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    position: relative;
}

@media (min-width: 768px) {
    .car-card-list {
        flex-direction: row;
        height: 200px;
    }
}

.car-card-list.is-featured {
    background: #f0f4f9;
    /* Very light Navy */
    border: 1px solid #c2d2e7;
    border: 1px solid #c2d2e7;
    border-left: 4px solid var(--primary);
}

html.dark .car-card-list {
    border-color: #1e293b;
}

html.dark .car-card-list.is-featured {
    background: #1e293b;
    border-color: #1e293b;
    border-left-color: var(--primary);
}

html.dark .car-card-list .img-box {
    background: #0f172a;
}

html.dark .car-card-list .car-title {
    color: #f1f5f9;
}

html.dark .car-card-list .car-title:hover {
    color: var(--primary-400);
}

html.dark .car-card-list .car-price {
    color: #fff;
}

html.dark .car-location {
    color: #94a3b8;
}

html.dark .car-specs-strip>div {
    color: #cbd5e1;
    border-right-color: #334155;
}

.car-card-list .img-box {
    width: 100%;
    height: 180px;
    position: relative;
    overflow: hidden;
    background: #eee;
}

@media (min-width: 768px) {
    .car-card-list .img-box {
        width: 240px;
        min-width: 240px;
        height: 100%;
    }
}

.car-card-list .img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-count-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
}

.car-card-list .info-box {
    padding: 12px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.car-card-list .car-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.car-card-list .car-title:hover {
    color: #444;
}

.car-card-list .car-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.car-location {
    color: #666;
    font-size: 0.9rem;
    margin-top: 4px;
    margin-bottom: 12px;
}

.car-specs-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 12px;
}

.car-specs-strip>div {
    padding: 0 12px;
    border-right: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #444;
}

.car-specs-strip>div:first-child {
    padding-left: 0;
}

.car-specs-strip>div:last-child {
    border-right: none;
}

.car-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.update-time {
    font-size: 0.8rem;
    color: #777;
}

.action-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-phone {
    background: var(--primary);
    color: white !important;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    text-decoration: none;
}

.btn-phone:hover {
    background: var(--primary-dark);
}

.fav-btn {
    color: #ccc;
    font-size: 1.1rem;
    padding: 6px 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    transition: all 0.2s;
    background: var(--white);
}

html.dark .fav-btn {
    border-color: #334155;
    color: #94a3b8;
}

html.dark .fav-btn:hover {
    color: #f87171;
    border-color: #7f1d1d;
}

.fav-btn:hover {
    color: #f87171;
    border-color: #fecaca;
}

/* Badge Fixes */
/* Badge Fixes */
.badge-new {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    background-color: #facc15;
    color: #0f172a;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom-right-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-imported {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 5;
}