/* Dream Car Page */

.dream-car-hero {
    margin-bottom: 40px;
}

.hero-banner {
    position: relative;
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 0 16px;
    width: 100%;
    max-width: 700px;
}

/* Hero search bar */
.hero-search {
    width: 100%;
}

.hero-search-inner {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    padding: 6px 6px 6px 20px;
    gap: 0;
}

.hero-search-icon {
    display: flex;
    align-items: center;
    color: #94a3b8;
    flex-shrink: 0;
    margin-right: 10px;
}

.hero-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #1e293b;
    background: transparent;
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-width: 0;
    padding: 6px 0;
}

.hero-search-input::placeholder {
    color: #94a3b8;
}

.hero-search-btn {
    padding: 10px 28px;
    background: linear-gradient(135deg, #13618C 0%, #297B35 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.hero-search-btn:hover {
    box-shadow: 0 4px 16px rgba(19, 97, 140, 0.35);
    transform: translateY(-1px);
}

/* Search results count */
.search-results-count {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    margin: 0 0 12px 0;
    min-height: 18px;
}

/* No results placeholder */
.no-results-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 80px 24px;
    text-align: center;
    color: #94a3b8;
}

.no-results-placeholder svg {
    opacity: 0.35;
    color: #64748b;
}

.no-results-title {
    font-size: 20px;
    font-weight: 700;
    color: #334155;
    margin: 0;
}

.no-results-sub {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}

.hero-overlay h1 {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Filter Section */
.filter-section {
    background-color: #FFFFFF;
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: -20px 0 40px 0;
    position: relative;
    z-index: 1;
}

.filter-container {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-dropdown {
    flex: 1;
    min-width: 150px;
    padding: 12px 14px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    font-size: 13px;
    color: #344054;
    background-color: #F9FAFB;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all 0.2s ease;
}

.filter-dropdown:hover {
    border-color: #13618C;
    background-color: #F9FAFB;
}

.filter-dropdown:focus {
    outline: none;
    border-color: #13618C;
    box-shadow: 0 0 0 3px rgba(19, 97, 140, 0.1);
}

.filter-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #13618C 0%, #297B35 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(19, 97, 140, 0.3);
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(19, 97, 140, 0.4);
}

/* Cars Listing Section */
.cars-listing {
    background-color: #F9FAFB;
    padding: 40px 0;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(600px, 100%), 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Car Card */
.car-card {
    flex: 0 0 750px;
    max-width: 100%;
    background-color: #FFFFFF;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.25s ease;
    border: 1px solid #F1F5F9;
    position: relative;
}

.car-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
    transform: translateY(-3px);
}

.car-card-content {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
}

/* Image Section */
.car-image-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background-color: #FFFFFF;
}

.main-image-container {
    position: relative;
    width: 100%;
    height: 240px;
    border-radius: 10px;
    overflow: hidden;
}

.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #FFD75E 0%, #EFAC22 50%, #B07A30 100%);
    color: #1a120a;
    padding: 6px 16px;
    border-radius: 0 10px 0 10px;
    font-size: 11px;
    font-weight: 700;
    z-index: 20;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 8px rgba(180, 120, 0, 0.28);
}

.thumbnails-container {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.thumbnail {
    width: 110px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #E2E8F0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.thumbnail:hover {
    border-color: #13618C;
}

.thumbnail-wrapper {
    position: relative;
    width: 110px;
    height: 60px;
}

.thumbnail-wrapper .thumbnail {
    width: 100%;
    height: 100%;
}

.thumbnail-wrapper .thumbnail-more {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
    z-index: 10;
}

.thumbnail-wrapper .thumbnail-more:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Details Section */
.car-details-section {
    display: flex;
    flex-direction: column;
    padding: 20px;
    padding-top: 20px;
    justify-content: flex-start;
    gap: 0;
}

.car-details-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1D2939;
    margin: 0 0 12px 0;
}

.car-location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #475467;
}

.location-icon {
    font-size: 10px;
}

.car-location p {
    margin: 0;
}

.car-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 14px;
}

.car-price .currency {
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, #13618C 0%, #297B35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.car-price .price-amount {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #13618C 0%, #297B35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Name row: make badge + car title */
.car-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.car-name-row h3 {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.make-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 4px 12px 4px 5px;
    border-radius: 30px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    flex-shrink: 0;
}

.make-badge-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 50%;
}

/* Spec card grid (4 items: Mileage, Registration, Fuel Type, Car Type) */
.car-specs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.spec-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 10px 6px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
}

.spec-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #eaf0f6;
    border-radius: 50%;
    color: #2e6da4;
    flex-shrink: 0;
}

.spec-card-label {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0;
}

.spec-card-value {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

/* Card footer: posted-by + view details btn */
.car-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.view-details-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border: 1.5px solid #13618C;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #13618C;
    text-decoration: none;
    background: transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}

.view-details-btn:hover {
    background: linear-gradient(135deg, #13618C 0%, #297B35 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(19, 97, 140, 0.25);
    transform: translateY(-1px);
}

.car-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 5px;
    padding-bottom: 5px;
    /* border-bottom: 1px solid #E5E7EB; */
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #1D2939;
}

.spec-item .spec-icon {
    font-size: 14px;
    min-width: 16px;
    display: flex;
    align-items: center;
    color: #13618C;
}

.spec-item .spec-icon svg {
    display: block;
    flex-shrink: 0;
}

.spec-item div {
    display: flex;
    flex-direction: column;
}

.spec-item .spec-value {
    margin: 0;
    font-size: 13px;
    color: #1D2939;
    font-weight: 500;
}

.car-date {
    font-size: 12px;
    font-weight: 500;
    color: #667085;
    margin-bottom: auto;
}

.dream-skeleton-card {
    pointer-events: none;
}

.dream-skeleton-box,
.dream-skeleton-line {
    position: relative;
    overflow: hidden;
    background: #e7eaee;
}

.dream-skeleton-box::after,
.dream-skeleton-line::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, rgba(231, 234, 238, 0) 0%, rgba(255, 255, 255, 0.85) 45%, rgba(231, 234, 238, 0) 100%);
    animation: dreamSkeletonShimmer 1.2s infinite;
}

.dream-skeleton-line {
    border-radius: 8px;
    margin-bottom: 10px;
}

.dream-skeleton-title {
    width: 68%;
    height: 22px;
    margin-top: 4px;
}

.dream-skeleton-subtitle {
    width: 52%;
    height: 16px;
}

.dream-skeleton-price {
    width: 40%;
    height: 20px;
}

@keyframes dreamSkeletonShimmer {
    100% {
        transform: translateX(100%);
    }
}

.posted-by-section {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.posted-label {
    font-size: 14px;
    color: #344054;
    margin: 0;
    font-weight: 500;
    white-space: nowrap;
}

.posted-by {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar {
    width: 32px;
    height: 32px;
    background-color: #1D2939;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.store-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.posted-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.seller-name {
    font-size: 12px;
    color: #1D2939;
    font-weight: 700;
    margin: 0;
}

.seller-rating {
    color: #475467;
    font-size: 12px;
    font-weight: 400;
    margin: 0;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    font-size: 2vh;
    color: #F59E0B;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 14px;
    color: #475467;
    text-decoration: none;
    transition: color 0.3s ease;
    flex: 1;
}

.pagination-btn.prev {
    justify-content: flex-start;
}

.pagination-btn.next {
    justify-content: flex-end;
}

.pagination-btn:hover {
    color: #13618C;
}

.pagination-btn span {
    white-space: nowrap;
}

.pagination-numbers {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex: 1;
}

.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    font-size: 14px;
    color: #667085;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.page-number:hover {
    border-color: #E2E8F0;
    background-color: #F8FAFC;
    color: #13618C;
}

.page-number.active {
    background: linear-gradient(135deg, #13618C 0%, #297B35 100%);
    color: #FFFFFF;
    border-color: transparent;
}

/* =====================
   Responsive Design
   ===================== */

/* Large tablet */
@media (max-width: 1200px) {
    .cars-grid {
        grid-template-columns: 1fr;
    }

    .filter-container {
        gap: 10px;
    }

    .filter-dropdown {
        min-width: 120px;
        flex: 0 1 auto;
    }
}

/* Tablet — switch card to side-by-side with a shorter image column */
@media (max-width: 992px) {
    .cars-grid {
        gap: 16px;
    }

    .hero-overlay h1 {
        font-size: 36px;
    }

    .hero-banner {
        height: 300px;
    }

    .filter-dropdown {
        min-width: 100px;
        padding: 10px 12px;
        font-size: 12px;
    }

    .filter-btn {
        padding: 10px 24px;
    }

    .car-card-content {
        grid-template-columns: 220px 1fr;
    }

    .main-image-container {
        height: 200px;
    }

    /* Shrink spec cards a touch */
    .spec-card {
        padding: 8px 4px;
        gap: 4px;
    }

    .spec-icon-wrap {
        width: 38px;
        height: 38px;
    }

    .spec-icon-wrap svg {
        width: 18px;
        height: 18px;
    }

    .spec-card-label {
        font-size: 9px;
    }

    .spec-card-value {
        font-size: 12px;
    }
}

/* Small tablet / large phone — stack card vertically */
@media (max-width: 768px) {
    .hero-overlay h1 {
        font-size: 26px;
    }

    .hero-banner {
        height: 220px;
    }

    .hero-search-input {
        font-size: 13px;
    }

    .hero-search-btn {
        padding: 9px 20px;
        font-size: 13px;
    }
    .filter-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .filter-dropdown {
        min-width: 0;
        padding: 10px;
        font-size: 12px;
    }

    .filter-btn {
        grid-column: 1 / -1;
        padding: 11px 16px;
        font-size: 13px;
    }

    /* Card stacks: image on top, details below */
    .car-card-content {
        grid-template-columns: 1fr;
    }

    .car-image-section {
        padding: 12px 12px 0;
        gap: 8px;
    }

    .car-details-section {
        padding: 14px 16px 16px;
    }

    .main-image-container {
        height: 230px;
        border-radius: 10px;
    }

    /* Scrollable thumbnails row */
    .thumbnails-container {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px;
        padding-bottom: 2px;
    }

    .thumbnails-container::-webkit-scrollbar {
        display: none;
    }

    .thumbnail {
        width: 90px;
        height: 56px;
        flex-shrink: 0;
    }

    .thumbnail-wrapper {
        width: 90px;
        height: 56px;
        flex-shrink: 0;
    }

    .car-name-row h3 {
        font-size: 15px;
    }

    .car-location {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .car-price {
        margin-bottom: 12px;
    }

    .car-price .price-amount {
        font-size: 19px;
    }

    /* Spec grid: stays 4-col but smaller cards */
    .car-specs-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        margin-bottom: 14px;
    }

    .spec-card {
        padding: 8px 4px;
        gap: 4px;
        border-radius: 10px;
    }

    .spec-icon-wrap {
        width: 36px;
        height: 36px;
    }

    .spec-icon-wrap svg {
        width: 16px;
        height: 16px;
    }

    .spec-card-label {
        font-size: 9px;
        letter-spacing: 0.04em;
    }

    .spec-card-value {
        font-size: 12px;
    }

    /* Footer: button full-width on narrow stacked card */
    .car-footer {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 10px;
    }

    .view-details-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 18px;
    }
}

/* Phone */
@media (max-width: 480px) {
    .hero-overlay h1 {
        font-size: 20px;
    }

    .hero-banner {
        height: 180px;
    }

    .hero-search-inner {
        padding: 4px 4px 4px 14px;
    }

    .hero-search-input {
        font-size: 13px;
    }

    .hero-search-btn {
        padding: 9px 18px;
        font-size: 13px;
    }

    /* Filters: 2-col then full-width button */
    .filter-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .filter-btn {
        grid-column: 1 / -1;
    }

    .cars-listing {
        padding: 24px 0;
    }

    .cars-grid {
        gap: 12px;
    }

    .car-card {
        border-radius: 12px;
    }

    .car-image-section {
        padding: 10px 10px 0;
        gap: 6px;
    }

    .car-details-section {
        padding: 12px 14px 14px;
    }

    .main-image-container {
        height: 200px;
        border-radius: 8px;
    }

    /* Hide thumbnails on small phones — image is big enough */
    .thumbnails-container {
        display: none;
    }

    .car-name-row {
        margin-bottom: 8px;
    }

    .car-name-row h3 {
        font-size: 15px;
    }

    .car-location {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .car-price .price-amount {
        font-size: 18px;
    }

    .car-price .currency {
        font-size: 13px;
    }

    .car-price {
        margin-bottom: 12px;
    }

    /* Spec grid: 2×2 */
    .car-specs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 14px;
    }

    .spec-card {
        padding: 10px 8px;
        gap: 5px;
        border-radius: 10px;
    }

    .spec-icon-wrap {
        width: 38px;
        height: 38px;
    }

    .spec-icon-wrap svg {
        width: 18px;
        height: 18px;
    }

    .spec-card-label {
        font-size: 10px;
    }

    .spec-card-value {
        font-size: 13px;
    }

    .car-footer {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 10px;
    }

    .view-details-btn {
        width: 100%;
        justify-content: center;
        padding: 11px 18px;
        font-size: 14px;
    }

    .posted-by {
        gap: 6px;
    }

    .seller-name {
        font-size: 12px;
    }

    /* Pagination compact */
    .pagination {
        gap: 8px;
        padding-top: 16px;
    }

    .page-number {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .pagination-btn {
        font-size: 13px;
        padding: 6px 8px;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .hero-banner {
        height: 150px;
    }

    .hero-overlay h1 {
        font-size: 18px;
    }

    /* Stack filters fully */
    .filter-container {
        grid-template-columns: 1fr;
    }

    .filter-btn {
        grid-column: 1;
    }

    .car-details-section {
        padding: 10px 12px 12px;
    }

    .car-specs-grid {
        gap: 6px;
    }

    .spec-card-value {
        font-size: 12px;
    }

    .hero-search-inner {
        padding: 4px 4px 4px 14px;
    }

    .hero-search-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}
