/* Featured Banner Section Styles */

/* Section Title */
.featured-section-title {
    position: relative;
    z-index: 2;
}

.featured-section-title h2 {
    color: #ffffff; /* Restored white color */
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Restored text shadow */
    position: relative;
    display: inline-block;
}

.featured-title-accent {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, rgba(253, 86, 49, 0.5), rgba(253, 86, 49, 1), rgba(253, 86, 49, 0.5));
    margin: 0 auto;
    border-radius: 2px;
}

/* Ad icon for banner promoted listings */
.ad-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #fd5631;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.ad-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

/* Main container */
.featured-banner-section {
    padding: 0.1rem 0; /* Reduced by another 50% from 0.2rem to 0.1rem */
    background-color: transparent; /* Removed background color */
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Mobile-specific top padding adjustment */
@media (max-width: 767.98px) {
    .featured-banner-section {
        padding: 0.15rem 0; /* Reduced by another 50% from 0.3rem to 0.15rem */
    }
}

/* Removed gradient and pattern overlays */

/* Position row content properly */
.featured-banner-section .row {
    position: relative;
}

/* Carousel/Slider Styles */
.featured-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    height: 510px; /* Adjusted to match the 3 horizontal cards with new height */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-carousel:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.07);
    transform: translateY(-5px);
}

.featured-carousel .carousel-inner {
    height: 100%;
}

.featured-carousel .carousel-item {
    height: 100%;
    transition: transform 1.5s cubic-bezier(0.33, 1, 0.68, 1); /* Smoother, more elegant transition */
}

/* Add fade effect to carousel */
.featured-carousel .carousel-inner .active.carousel-item-start,
.featured-carousel .carousel-inner .carousel-item-prev:not(.carousel-item-end) {
    transform: translateX(-10%);
    opacity: 0;
    transition: transform 1.5s cubic-bezier(0.33, 1, 0.68, 1), opacity 1.5s ease-in-out;
}

.featured-carousel .carousel-inner .active.carousel-item-end,
.featured-carousel .carousel-inner .carousel-item-next:not(.carousel-item-start) {
    transform: translateX(10%);
    opacity: 0;
    transition: transform 1.5s cubic-bezier(0.33, 1, 0.68, 1), opacity 1.5s ease-in-out;
}

.featured-carousel .carousel-inner .carousel-item-next,
.featured-carousel .carousel-inner .carousel-item-prev,
.featured-carousel .carousel-inner .carousel-item.active {
    transform: translateX(0);
    opacity: 1;
    transition: transform 1.5s cubic-bezier(0.33, 1, 0.68, 1), opacity 1.5s ease-in-out;
}

.featured-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.7);
    transition: transform 0.5s ease;
}

.featured-carousel:hover .carousel-item img {
    transform: scale(1.05);
}

/* Car details overlay */
.featured-car-details {
    position: absolute;
    bottom: -2px; /* Extended slightly below the image to prevent gaps */
    left: 0;
    right: 0;
    padding: 2rem 2.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.6) 70%, transparent);
    color: #fff;
    z-index: 2;
    transform: translateY(0);
    transition: padding 0.4s ease;
}

.featured-carousel:hover .featured-car-details {
    transform: translateY(0); /* Removed the upward movement */
    padding-bottom: 2.25rem;
}

.featured-car-details h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
    line-height: 1.2;
    position: relative;
    display: inline-block;
}

/* Seller name subscript */
.featured-car-details h3 .seller-subscript {
    font-size: 0.4em; /* Reduced size */
    font-weight: 300; /* Reduced weight */
    color: rgba(255, 255, 255, 0.7);
    margin-left: 0.25rem; /* Reduced gap by 50% */
    vertical-align: baseline;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Add accent line before title */
.featured-car-details h3::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 0.3em;
    width: 6px;
    height: 0.8em;
    background: linear-gradient(to bottom, #fd5631, #ff7e5f);
    border-radius: 3px;
}

.featured-car-details p {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.featured-car-details p i {
    color: #fd5631;
    margin-right: 0.2rem;
    font-size: 1rem;
}

.featured-car-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fd5631;
    margin-top: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
    display: inline-block;
    position: relative;
    padding-left: 5px;
}

.featured-car-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #fd5631 0%, #ff7e5f 100%);
    color: #fff;
    padding: 2px 4px;
    border-radius: 0 0 4px 0;
    font-weight: 400;
    font-size: 0.6rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    z-index: 2;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border: none;
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-carousel:hover .featured-car-badge {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Carousel controls */
.featured-carousel .carousel-control-prev,
.featured-carousel .carousel-control-next {
    width: 10%;
    opacity: 0;
    transition: all 0.3s ease;
}

.featured-carousel .carousel-control-prev-icon,
.featured-carousel .carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: rgba(0, 0, 0, 0.5);
    background-size: 50%;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.featured-carousel:hover .carousel-control-prev,
.featured-carousel:hover .carousel-control-next {
    opacity: 1;
}

.featured-carousel:hover .carousel-control-prev-icon,
.featured-carousel:hover .carousel-control-next-icon {
    background-color: rgba(253, 86, 49, 0.7);
    transform: scale(1.1);
}

.featured-carousel .carousel-indicators {
    margin-bottom: 1rem;
    z-index: 3;
}

/* Right-aligned indicators */
.featured-carousel .carousel-indicators.right-aligned {
    justify-content: flex-end;
    margin-right: 1.5rem;
    margin-left: 0;
}

.featured-carousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.featured-carousel .carousel-indicators button.active {
    background-color: #fd5631;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(253, 86, 49, 0.5);
}

/* Placeholder Card Styles */
.featured-horizontal-card.placeholder-card {
    background: linear-gradient(to right, #251b49, #2a1f54);
}

.featured-horizontal-card.placeholder-card .card-img.placeholder-glow {
    width: 40%;
    min-width: 40%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
}

.featured-horizontal-card.placeholder-card .card-body {
    padding: 1rem;
}

.featured-horizontal-card.placeholder-card .placeholder {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    height: 1.2rem;
}

/* Horizontal Card Styles */
.featured-horizontal-card {
    display: flex;
    background: linear-gradient(to right, #251b49, #2a1f54);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 0.5rem; /* Reduced space between cards */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    height: 160px; /* Increased height for additional information */
    flex: 1; /* Allow card to grow */
    flex-shrink: 0; /* Prevent card from shrinking */
    max-height: 160px; /* Ensure consistent height */
    position: relative;
}

/* Horizontal card featured badge */
.horizontal-featured-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #fd5631 0%, #ff7e5f 100%);
    color: #fff;
    padding: 2px 4px;
    border-radius: 0 0 4px 0;
    font-weight: 400;
    font-size: 0.6rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    z-index: 3;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border: none;
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-horizontal-card:hover .horizontal-featured-badge {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Add subtle glow effect on hover */
.featured-horizontal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(253, 86, 49, 0), rgba(253, 86, 49, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.featured-horizontal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.featured-horizontal-card:hover::before {
    opacity: 1;
}

/* Remove margin from last card */
.featured-horizontal-card:last-child {
    margin-bottom: 0;
}

/* Container for horizontal cards */
#featured-horizontal-cards {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    gap: 5px; /* Reduced gap between cards */
}

.featured-horizontal-card .card-img {
    width: 40%;
    min-width: 40%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
    position: relative;
}

.featured-horizontal-card:hover .card-img {
    transform: scale(1.05);
}

/* Add subtle gradient overlay on images */
.featured-horizontal-card .card-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.3), transparent);
    pointer-events: none;
}

.featured-horizontal-card .card-body {
    padding: 0.375rem 1.25rem; /* Reduced top/bottom padding by 50% */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Changed from space-between to ensure title has enough space */
    position: relative;
    z-index: 2;
    background: linear-gradient(to right, rgba(37, 27, 73, 0), rgba(37, 27, 73, 0.8));
    text-align: left; /* Ensure all content is left-aligned */
    align-items: flex-start; /* Align items to the left */
    width: 60%; /* Ensure card body has enough width */
}

.featured-horizontal-card .card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
    max-height: 1.2em;
    display: block;
    padding-bottom: 0; /* Remove padding */
    text-align: left; /* Ensure left alignment */
    flex: 1; /* Allow title to take available space */
    min-width: 0; /* Allow flex item to shrink below content size */
    position: relative; /* Ensure proper stacking */
    z-index: 2; /* Higher z-index to ensure visibility */
}

.featured-horizontal-card .title-container {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.125rem; /* Reduced margin by 50% */
    width: 100%;
    flex-wrap: nowrap;
}

.featured-horizontal-card .card-seller {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
}

.featured-horizontal-card .card-details {
    display: flex;
    justify-content: flex-start; /* Changed from space-between to left-align */
    margin-bottom: 0.15rem; /* Reduced margin by 50% */
    gap: 0.75rem; /* Reduced gap to fit more items */
    width: 100%; /* Ensure full width */
}

.featured-horizontal-card .card-details.single-line {
    flex-wrap: nowrap; /* Prevent wrapping to keep all items on one line */
    overflow-x: hidden; /* Hide horizontal overflow */
    margin-bottom: 0.075rem; /* Reduced by 50% from previous value */
}

.featured-horizontal-card .detail-item {
    font-size: 0.7rem; /* Further reduced font size */
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.2px;
    line-height: 1.1; /* Reduced line height */
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap; /* Prevent wrapping within items */
    overflow: hidden; /* Hide overflow */
    text-overflow: ellipsis; /* Add ellipsis for overflow */
    font-weight: 400; /* Reduced font weight */
}

.featured-horizontal-card .detail-item i {
    color: #fd5631;
    font-size: 0.8rem; /* Reduced icon size */
    min-width: 12px; /* Ensure consistent width */
}

.featured-horizontal-card .card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fd5631;
    margin-top: 0.05rem; /* Reduced by 50% from previous value */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    display: inline-block;
}

/* Add subtle accent line before price */
.featured-horizontal-card .card-price::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 5px;
    height: 1.2em;
    background: linear-gradient(to bottom, #fd5631, #ff7e5f);
    transform: translateY(-50%);
    border-radius: 2px;
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .featured-carousel {
        height: 460px;
        margin-bottom: 1.5rem;
    }

    .featured-horizontal-card {
        height: 145px;
        max-height: 145px;
    }

    .featured-horizontal-card .card-details {
        flex-direction: row; /* Keep as row for tablet */
        gap: 0.5rem;
        margin-bottom: 0.2rem;
        flex-wrap: wrap; /* Allow wrapping if needed */
    }

    .featured-horizontal-card .card-details.single-line {
        flex-wrap: nowrap; /* Keep all items on one line */
        overflow-x: hidden; /* Hide overflow */
    }

    .featured-horizontal-card .card-title {
        font-size: 1rem;
    }

    .featured-horizontal-card .title-container {
        gap: 0.4rem;
    }

    .featured-horizontal-card .card-seller {
        font-size: 0.65rem;
    }

    .featured-horizontal-card .card-text {
        font-size: 0.8rem;
    }

    .featured-horizontal-card .card-price {
        font-size: 1rem;
    }
}

@media (max-width: 767.98px) {
    .featured-section-title h2 {
        font-size: 1.75rem;
    }

    .featured-title-accent {
        width: 60px;
    }

    .featured-carousel {
        height: 300px;
    }

    .featured-car-details {
        padding: 1.5rem 1.75rem;
    }

    .featured-car-details h3 {
        font-size: 1.5rem;
    }

    .featured-car-details h3::before {
        left: -10px;
        width: 4px;
    }

    .featured-car-details p {
        font-size: 1rem;
    }

    .featured-car-price {
        font-size: 1.3rem;
    }

    .featured-car-badge {
        padding: 2px 4px;
        font-size: 0.6rem;
    }
}

@media (max-width: 575.98px) {
    .featured-section-title h2 {
        font-size: 1.5rem;
    }

    .featured-title-accent {
        width: 50px;
        height: 3px;
    }

    .featured-carousel {
        height: 300px;
    }

    .featured-horizontal-card .card-details {
        gap: 0.3rem;
        flex-wrap: wrap;
    }

    .featured-horizontal-card .card-details.single-line {
        gap: 0.2rem;
        flex-wrap: nowrap;
    }

    .featured-horizontal-card .detail-item {
        font-size: 0.75rem;
    }

    .featured-horizontal-card .detail-item i {
        font-size: 0.8rem;
    }

    .featured-car-details {
        padding: 1rem 1.25rem;
    }

    .featured-car-details h3 {
        font-size: 1.25rem;
    }

    .featured-car-details h3::before {
        left: -8px;
        width: 3px;
        height: 0.7em;
    }

    .featured-car-details p {
        font-size: 0.9rem;
    }

    .featured-car-price {
        font-size: 1.1rem;
    }

    .featured-car-badge {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
        top: 0.75rem;
        right: 0.75rem;
    }

    .featured-horizontal-card {
        height: 130px;
        max-height: 130px;
    }

    .featured-horizontal-card .card-body {
        padding: 0.375rem 1rem 0.375rem 0.75rem; /* Reduced top/bottom padding by 50% */
        justify-content: flex-start;
    }

    .featured-horizontal-card .card-title {
        font-size: 0.9rem;
    }

    .featured-horizontal-card .title-container {
        gap: 0.3rem;
    }

    .featured-horizontal-card .card-seller {
        font-size: 0.6rem;
        max-width: 40%;
    }

    .featured-horizontal-card .card-text {
        font-size: 0.75rem;
    }

    .featured-horizontal-card .card-price {
        font-size: 0.9rem;
    }

    .featured-horizontal-card .card-price::before {
        left: -7px;
        width: 3px;
        height: 1em;
    }
}