/* =========================================================
   CAR LISTING & FILTER
========================================================= */

.clb-listing *, .clb-listing *::before, .clb-listing *::after,
.clb-filter *, .clb-filter *::before, .clb-filter *::after {
    box-sizing: border-box;
}

/* ================
   FILTER BAR
================ */

.clb-filter-2-rows {
    display: flex !important;
    flex-direction: row; /* Changed to row for a single line */
    flex-wrap: wrap;
    gap: 16px; /* Space between the fields */
    padding: 40px 40px; /* Adjusted padding for a cleaner look */
    margin-bottom: 28px;
    background: #ffffff; /* White background requested */
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); /* Subtle shadow to lift it off the page */
    align-items: center;
}

.clb-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    width: 100%;
}

.clb-filter-field {
    flex: 1 1 180px; /* Allows fields to grow and fill space equally */
    min-width: 150px;
}

.clb-filter-field select {
    width: 100%;
    height: 46px; /* Slightly taller for a modern look */
    padding: 0 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
    font-size: 14px;
    color: #222;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.clb-filter-field select:focus {
    border-color: #176B45; /* Green border on focus */
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(23, 107, 69, 0.1); /* Soft green glow */
}

.clb-filter-actions {
    display: flex;
    gap: 8px;
    margin-left: auto; /* Pushes button to the right */
}

/* Single Search Button Styling */
.clb-filter-apply {
    height: 46px;
    padding: 0 28px;
    border-radius: 8px;
    border: 1px solid #176B45;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    background: #111827;
    color: #ffffff;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.clb-filter-apply:hover {
    background: #87C24C; /* Darker green on hover */
    border-color: #ffffff;
}

.clb-filter-apply:active {
    transform: scale(0.98); /* Slight click effect */
}

/* Reset button hidden/removed (just in case it still appears) */
.clb-filter-reset {
    display: none !important; 
}

/* ================
   LISTING GRID & CARD
================ */

.clb-listing { width: 100%; }
.clb-listing-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.clb-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.clb-card:hover {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
    transform: translateY(-2px);
}

/* ================
   CARD IMAGE (UPDATED)
================ */

.clb-card-image-wrapper {
    position: relative;
    overflow: visible;
    border-radius: 12px 12px 0 0;
    background: #f5f5f5; /* Fallback background */
}

.clb-card-image-link {
    display: block;
    text-decoration: none !important;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    width: 100%;
}

/* The Image is the direct child */
.clb-card-img {
    display: block;
    width: 100%;
    height: auto; /* Allows the image to keep its natural height */
    object-fit: contain; /* Ensures nothing is cropped */
    transition: transform 0.3s ease;
}

.clb-card:hover .clb-card-img {
    transform: scale(1.04);
}

/* Placeholder if no image */
.clb-card-image-placeholder {
    width: 100%;
    height: 200px; /* Only for placeholder */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    background: #f5f5f5;
}

/* Chauffeur Badge in top left corner of image */
.clb-badge-chauffeur {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ffffff;
    color: #171717;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clb-card-rating {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #ffffff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #171717;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
    z-index: 3;
}

.clb-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 26px 18px 18px;
}

.clb-card-title { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: #171717; }
.clb-card-title a { color: inherit; text-decoration: none !important; }

.clb-card-location { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; color: #666; font-size: 13px; }

.clb-card-divider { height: 1px; margin: 0 0 14px; background: #f0f0f0; }

.clb-card-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    margin: 0 0 18px !important;
    padding: 0 !important;
    list-style: none;
}

.clb-spec-item { display: flex; align-items: center; gap: 8px; color: #333; font-size: 13px; }

/* Footer & Pricing */
.clb-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
    gap: 10px; /* Added gap to prevent overlapping */
}

.clb-card-price {
    display: inline-flex;
    align-items: baseline;
    color: #171717;
    font-weight: 800;
}

.clb-price-value { font-size: 18px; }
.clb-price-unit { font-size: 12px; font-weight: 400; color: #777; margin-left: 2px; }

.clb-book-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 18px;
    background: #171b18 !important;
    color: #ffffff !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap; /* Prevents text wrapping */
}
.clb-book-btn:hover { background: #176B45 !important; color: #ffffff !important; }


/* =========================================
   NEW CATEGORY CARD STYLE (Bottom Inline)
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;600;700;800&display=swap');

.clb-category-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 40px;
    /* Default grid for desktop, controlled by inline style on parent */
}

.clb-cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 250px;
    border-radius: 20px;
    background-color: #f0f0f0;
    overflow: hidden;
    text-decoration: none !important;
    padding: 0 !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.clb-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.clb-cat-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    z-index: 0;
    padding: 0 !important;
    margin: 0 !important;
    transition: transform 0.4s ease;
}

.clb-cat-card:hover .clb-cat-img {
    transform: scale(1.05);
}

.clb-cat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
    z-index: 1;
}

.clb-cat-bottom-row {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 24px !important;
    box-sizing: border-box;
}

.clb-cat-title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.clb-cat-arrow-btn {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: #171B18;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.clb-cat-card:hover .clb-cat-arrow-btn {
    background-color: #176B45;
    transform: rotate(-45deg);
}

.clb-cat-arrow-btn svg {
    stroke-width: 2px;
}

/* =========================================
   RESPONSIVENESS (Tablet & Mobile)
========================================= */

/* Tablet */
@media (max-width: 992px) {
    .clb-category-grid {
        /* Force 2 columns on tablet if not already handled by inline style */
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 20px !important;
    }
    .clb-cat-card {
        height: 220px;
    }
    .clb-cat-title {
        font-size: 22px;
    }
    .clb-cat-arrow-btn {
        width: 40px;
        height: 40px;
    }
    .clb-cat-bottom-row {
        padding: 20px !important;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .clb-category-grid {
        /* Force 1 column on mobile */
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .clb-cat-card {
        height: 200px;
    }
    .clb-cat-title {
        font-size: 20px;
    }
    .clb-cat-arrow-btn {
        width: 36px;
        height: 36px;
    }
    .clb-cat-bottom-row {
        padding: 16px !important;
    }
}

/* =========================================
   VIEW ALL BUTTON (Home Page Grid)
========================================= */
.clb-view-all-wrap {
    margin-top: 40px;
    text-align: center;
}

.clb-view-all-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 32px;
    background-color: #176B45 !important; /* Green default */
    color: #ffffff !important;
    border: 1px solid #176B45 !important;
    border-radius: 8px !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    box-shadow: none !important;
}

/* Hover state */
.clb-view-all-btn:hover,
.clb-view-all-btn:focus,
.clb-view-all-btn:active,
.clb-view-all-btn:visited {
    background-color: #171B18 !important; /* Dark default on hover */
    border-color: #171B18 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* =========================================
   RESPONSIVE FIXES (Mobile & Tablet)
========================================= */

@media (max-width: 1100px) {
    .clb-listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .clb-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 820px) {
    .clb-listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .clb-filter-actions { width: 100%; margin-left: 0; margin-top: 8px; }
    .clb-filter-apply, .clb-filter-reset { flex: 1; }
    
    .clb-filter-2-rows {
        padding: 20px; /* Reduce padding on tablets */
    }
}

/* FORCE ONE COLUMN ON MOBILE & FIX SIZING */
@media (max-width: 767px) {
    .clb-listing-grid { 
        grid-template-columns: 1fr !important; 
        width: 100% !important;
        display: grid !important;
    }
    .clb-category-grid { 
        grid-template-columns: 1fr !important; 
        width: 100% !important;
        display: grid !important;
    }
    
    .clb-card, .clb-cat-card {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .clb-filter-2-rows {
        padding: 15px; /* Further reduce padding on phones */
    }
    
    .clb-cat-card {
        min-height: 250px; /* Slightly smaller category cards on mobile */
    }
}

/* =========================================
   MULTI-SELECT STYLING (For Listing Form)
========================================= */
select[multiple] {
    height: auto !important;
    min-height: 100px;
    padding: 10px;
    background-image: none; /* Remove dropdown arrow */
}

select[multiple] option {
    padding: 8px 12px;
    margin-bottom: 2px;
    border-radius: 4px;
    cursor: pointer;
}

select[multiple] option:checked {
    background-color: #176B45;
    color: #ffffff;
    box-shadow: 0 0 0 2px #70F46D inset;
}

/* Settings Page Notice */
.clb-license-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px;
    margin-bottom: 20px;
    color: #856404;
}

/* =========================================
   CARD ACTIONS (Book Now + WhatsApp)
========================================= */
.clb-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Hover effect for the inline styled button */
.clb-card-whatsapp:hover {
    background: #176B45 !important;
    border-color: #176B45 !important;
    color: #ffffff !important;
}




/* =========================================
   CAR BRAND CARDS (Left Half Circle)
========================================= */

.clb-brand-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 40px;
}

.clb-brand-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 10px 16px 10px 0; /* 0 padding left to let the circle sit flush */
    background: #ffffff; /* White background for the rest of the card */
    border: 1px solid #e8e8e8; 
    border-radius: 10px; /* Pill shape */
    text-decoration: none !important;
    transition: all 0.3s ease;
    height: 90px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    overflow: hidden;
}

/* Hover state */
.clb-brand-card:hover {
    box-shadow: 0 6px 15px rgba(135, 193, 76, 0.2); 
    border-color: #C7E2AB; 
    transform: translateY(-3px);
}

/* The Left Half Circle */
.clb-brand-logo-wrap {
    position: relative;
    width: 90px; /* Matches card height to make a perfect circle */
    height: 90px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #C7E2AB; /* Your requested color */
    border-radius: 0 50px 50px 0; 

    margin-left: -1px; /* Fixes 1px gap on the border */
}

.clb-brand-logo {
    max-width: 60%; /* Keeps the logo inside the circle nicely */
    max-height: 60%;
    object-fit: contain;
    /* Optional: Keep grayscale for uniform look */
    filter: grayscale(100%) opacity(0.85); 
    transition: filter 0.3s ease;
}

/* Logo becomes full color on hover */
.clb-brand-card:hover .clb-brand-logo {
    filter: grayscale(0%) opacity(1);
}

.clb-brand-name {
    font-size: 18px;
    font-weight: 700;
    color: rgb(17, 24, 39); 
    text-align: left;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

/* Responsive */
@media (max-width: 992px) {
    .clb-brand-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-width: 767px) {
    .clb-brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 480px) {
    .clb-brand-grid { grid-template-columns: 1fr !important; }
}

/* =========================================
   LOCATION CARDS - FIXED GRID LAYOUT
========================================= */

/* Force the container to be a grid */
.clb-location-grid {
    display: grid !important;
    gap: 20px !important;
    margin-bottom: 40px !important;
    width: 100% !important;
}

/* Card Styling */
.clb-location-card {
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border: 1px solid #EAECEF !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    text-decoration: none !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease !important;
    width: 100% !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03) !important;
}

.clb-location-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-3px) !important;
}

/* Image Container */
.clb-loc-img-wrap {
    width: 100% !important;
    aspect-ratio: 16 / 10 !important;
    background: #F4F5FA !important;
    position: relative !important;
    overflow: hidden !important;
}

.clb-loc-img-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.3s ease !important;
}

.clb-location-card:hover .clb-loc-img-wrap img {
    transform: scale(1.05) !important;
}

/* Fallback if no image */
.clb-loc-no-img {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #E2E8F0 !important;
    color: #94A3B8 !important;
    font-size: 32px !important;
    font-weight: 800 !important;
}

/* Text Container (Light Green Background) */
.clb-loc-info {
    padding: 16px 20px !important;
    background: #F4F7F4 !important;
}

/* Text (Dark color for readability) */
.clb-loc-name {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111424 !important; /* Fixed: Changed from #F4F7F4 to dark */
    line-height: 1.3 !important;
    text-transform: capitalize !important;
    background: transparent !important; /* Fixed: Removed background from text */
}

/* Responsive Grid */
@media (max-width: 992px) {
    .clb-location-grid { 
        grid-template-columns: repeat(3, 1fr) !important; 
    }
}

@media (max-width: 767px) {
    .clb-location-grid { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 15px !important;
    }
    .clb-loc-info {
        padding: 12px 15px !important;
    }
    .clb-loc-name {
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .clb-location-grid { 
        grid-template-columns: 1fr !important; 
    }
}