/* ==========================================================================
   Modern & Unique Design System - Mel Ecom / Auto Sales & Service
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --brand-red: #dc2626;
    --brand-red-hover: #b91c1c;
    --brand-dark: #0f172a;
    --brand-slate: #1e293b;
    --brand-accent: #f59e0b;
    --brand-light: #f8fafc;
    --brand-border: #e2e8f0;
    --brand-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --brand-shadow-hover: 0 20px 30px -10px rgba(15, 23, 42, 0.15), 0 10px 12px -5px rgba(15, 23, 42, 0.08);
}

body {
    font-family: 'Outfit', 'Poppins', sans-serif !important;
    color: #334155;
    background-color: #ffffff;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Poppins', sans-serif !important;
    font-weight: 700;
    color: var(--brand-dark);
}

/* ==========================================================================
   Header & Topbar Styling (Compact & High Contrast)
   ========================================================================== */
.topbar,
.header.shop .topbar {
    background: #0f172a !important;
    padding: 6px 0 !important;
    border-bottom: 2px solid var(--brand-red) !important;
    line-height: 1.4 !important;
}

.topbar .list-main li,
.header.shop .topbar .list-main li,
.header.shop .top-left .list-main li,
.header.shop .right-content .list-main li {
    color: #ffffff !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    border-right-color: rgba(255, 255, 255, 0.2) !important;
}

.topbar .list-main li a,
.header.shop .topbar .list-main li a,
.header.shop .topbar a {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    font-size: 13px !important;
}

.topbar .list-main li a:hover,
.header.shop .topbar .list-main li a:hover,
.header.shop .topbar a:hover {
    color: var(--brand-accent) !important;
}

.topbar .list-main li i,
.header.shop .topbar .list-main li i,
.header.shop .top-left .list-main li i {
    color: #ef4444 !important;
    margin-right: 5px !important;
    font-size: 13px !important;
}

.c-header-wrapper {
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06) !important;
    padding: 2px 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    transition: all 0.3s ease !important;
}

.c-logo-wrapper img {
    max-height: 36px !important;
    width: auto !important;
    object-fit: contain !important;
}

.c-menus-wrapper ul {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.c-menus-wrapper ul li a {
    color: #1e293b !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    line-height: 1.2 !important;
    display: inline-block !important;
}

.c-menus-wrapper ul li a:hover,
.c-menus-wrapper ul li.active a {
    color: var(--brand-red) !important;
    background: rgba(220, 38, 38, 0.08) !important;
}

.c-cart-items-wrapper .single-icon {
    position: relative !important;
    width: 36px !important;
    height: 36px !important;
    background: #f1f5f9 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #0f172a !important;
    font-size: 15px !important;
    transition: all 0.2s ease !important;
}

.c-cart-items-wrapper .single-icon:hover {
    background: var(--brand-red) !important;
    color: #ffffff !important;
}

.c-cart-items-wrapper .total-count {
    position: absolute !important;
    top: -3px !important;
    right: -3px !important;
    background: var(--brand-red) !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

/* ==========================================================================
   Global Section Titles & Cards
   ========================================================================== */
.c-title-wrapper {
    text-align: center;
    margin-bottom: 40px;
}

.c-title-wrapper .title {
    font-size: 34px;
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.c-title-wrapper .subtitle {
    font-size: 16px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* Redesigned Product/Car Card */
.c-card-wrapper {
    background: #ffffff;
    border: 1px solid var(--brand-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--brand-shadow);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.c-card-wrapper:hover {
    transform: translateY(-6px);
    box-shadow: var(--brand-shadow-hover);
    border-color: #cbd5e1;
}

.c-card-img {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: #f8fafc;
}

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

.c-card-wrapper:hover .c-card-img img {
    transform: scale(1.06);
}

.c-discount-top {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--brand-red);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
    margin: 0;
}

.c-sold-out-top {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #0f172a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    margin: 0;
}

.c-card-des {
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1.4;
    margin: 10px 0;
}

.action-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    background: #f1f5f9;
    color: var(--brand-dark) !important;
    font-weight: 700;
    font-size: 14px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.action-btn:hover {
    background: var(--brand-red);
    color: #ffffff !important;
}

/* Price Format Styling */
.discount {
    color: var(--brand-red);
    font-weight: 800;
    font-size: 18px;
}

del {
    color: #94a3b8;
    font-size: 14px;
}

/* ==========================================================================
   Hero Slider Modern Overlays
   ========================================================================== */
#Gslider .carousel-item {
    position: relative;
}

#Gslider .carousel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 60%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.c-carousel-content {
    z-index: 10;
    justify-content: center;
    max-width: 600px;
}

.c-carousel-content h2 {
    font-size: 44px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 15px;
}

.c-carousel-content p {
    font-size: 18px;
    color: #cbd5e1;
}

.c-hero-btn {
    background: var(--brand-red) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 12px 28px !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.3) !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.c-hero-btn:hover {
    background: var(--brand-red-hover) !important;
    transform: translateY(-2px) !important;
}

/* ==========================================================================
   Forms, Inputs & NiceSelect Dropdown Fixes
   ========================================================================== */
.form-control {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 15px;
    height: 50px;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
    outline: none;
}

/* Complete NiceSelect Dropdown Fix */
.nice-select {
    width: 100% !important;
    height: 50px !important;
    line-height: 48px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding-left: 16px !important;
    padding-right: 36px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    margin-bottom: 0 !important;
    background-color: #ffffff !important;
    background-image: none !important; /* Removes Bootstrap double arrow conflict */
    float: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.nice-select:hover, .nice-select:focus, .nice-select.open {
    border-color: var(--brand-red) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
}

.nice-select .current {
    font-weight: 500 !important;
    color: #0f172a !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    width: 100% !important;
    line-height: 48px !important;
}

.nice-select:after {
    right: 16px !important;
    border-bottom: 2px solid #64748b !important;
    border-right: 2px solid #64748b !important;
    width: 8px !important;
    height: 8px !important;
    margin-top: -5px !important;
    position: absolute !important;
    top: 50% !important;
    pointer-events: none !important;
}

.nice-select.open:after {
    transform: rotate(-135deg) !important;
}

.nice-select .list {
    width: 100% !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.18) !important;
    margin-top: 6px !important;
    z-index: 99999 !important;
    max-height: 260px !important;
    overflow-y: auto !important;
    padding: 6px !important;
    background-color: #ffffff !important;
    left: 0 !important;
    right: 0 !important;
}

.nice-select .option {
    padding-left: 14px !important;
    padding-right: 14px !important;
    line-height: 38px !important;
    min-height: 38px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: #334155 !important;
    font-weight: 500 !important;
    transition: all 0.15s ease !important;
}

.nice-select .option:hover, .nice-select .option.focus, .nice-select .option.selected.focus {
    background-color: #fef2f2 !important;
    color: var(--brand-red) !important;
    font-weight: 700 !important;
}

.nice-select .option.selected {
    font-weight: 700 !important;
    color: var(--brand-red) !important;
    background-color: #fff5f5 !important;
}

/* Ensure Search Card allows dropdowns to display overflow */
.search-widget-card,
.search-widget-card .row,
.search-widget-card .col-12,
.search-widget-card .col-md-6,
.search-widget-card .col-lg-3,
.search-widget-card .col-xl-3 {
    overflow: visible !important;
}

.btn-primary {
    background-color: var(--brand-red);
    border-color: var(--brand-red);
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--brand-red-hover);
    border-color: var(--brand-red-hover);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 0 !important;
}

.breadcrumbs ul li a {
    color: #475569;
    font-weight: 500;
}

.breadcrumbs ul li.active a {
    color: var(--brand-red);
    font-weight: 700;
}

/* ==========================================================================
   Footer & Newsletter
   ========================================================================== */
footer.footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    color: #cbd5e1;
    padding-top: 60px;
    border-top: 4px solid var(--brand-red);
}

footer.footer .single-footer h4 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

footer.footer .single-footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 3px;
    background: var(--brand-red);
    border-radius: 2px;
}

footer.footer ul li a {
    color: #cbd5e1;
    transition: color 0.2s ease;
}

footer.footer ul li a:hover {
    color: var(--brand-accent) !important;
}

footer.footer .copyright {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
    color: #94a3b8;
}
