/* ============================================
   CARS DETAILS PAGE STYLES
   ============================================ *

/* Cars Section Header */
.cars-section {
    max-width: 1200px;
    margin: 0 auto;
}

.cars-header {
    text-align: center;
    margin-bottom: 50px;
}

.cars-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #1a3a3a;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.cars-header p {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

/* Cars Filters */
.cars-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.search-filter,
.price-filter {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-width: 200px;
    font-family: 'Noto Serif Lao', serif;
}

.search-wrapper {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-filter {
    flex: 1;
    min-width: 250px;
    border-radius: 8px 0 0 8px;
    margin: 0;
    box-shadow: none;
}

.btn-clear {
    padding: 12px 16px;
    background: white;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #e0e0e0;
}

.btn-clear:hover {
    color: #ff6b35;
    background: #fff5f0;
}

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

.btn-search {
    padding: 12px 20px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border: none;
    border-radius: 0 8px 8px 0;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-search:hover {
    background: linear-gradient(135deg, #ff5722 0%, #f77d0f 100%);
    transform: scale(1.05);
}

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

.search-filter:focus,
.price-filter:focus {
    outline: none;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.2);
    transform: translateY(-2px);
}

.search-filter::placeholder {
    color: #999;
}

/* Search Message Area */
.search-message {
    margin-top: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #ffe0d6 0%, #fff5f0 100%);
    border: 2px solid #ffb3a0;
    border-radius: 12px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #d95c3e;
    display: none;
    animation: slideDown 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.no-results-text {
    display: inline-block;
    line-height: 1.6;
}

.search-term {
    font-weight: 700;
    color: #ff6b35;
    word-break: break-word;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cars Grid Layout */
.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

/* Car Card Styles */
.car-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.car-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 16px 40px rgba(255, 107, 53, 0.25);
}

/* Car Card Image */
.car-card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.car-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    background: linear-gradient(90deg, #f5f5f5 25%, #e5e5e5 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: placeholder 1.5s infinite;
}

.car-image.loaded {
    animation: none;
    background: none;
}

@keyframes placeholder {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

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

/* Badge Container */
.card-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 10;
}

/* Promo Badge on Car Card */
.promo-badge-car {
    position: relative;
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
}

/* Popular Badge on Car Card */
.popular-badge-car {
    position: relative;
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #000000;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Car Card Body */
.car-card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
}

/* Car Title */
.car-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a3a3a;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

/* Car Specs */
.car-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.spec-badge {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    display: inline-block;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.spec-badge:hover {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border-color: #ff6b35;
    transform: translateY(-2px);
}

/* Price Section */
.price-section-car {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 15px 0 10px 0;
    padding: 15px;
    background: linear-gradient(135deg, #fff9f5 0%, #fff5f0 100%);
    border-radius: 12px;
    border: 2px solid #ffe0d6;
}

.price-old {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
    font-weight: 500;
}

.price-new {
    font-size: 18px;
    font-weight: 700;
    color: #ff6b35;
    font-family: 'Noto Serif Lao', serif;
}

.price-main {
    font-size: 18px;
    font-weight: 700;
    color: #ff6b35;
    font-family: 'Noto Serif Lao', serif;
}

.price-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}

/* Book Button */
.btn-book {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    margin-top: auto;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    font-family: 'Noto Serif Lao', serif;
}

.btn-book::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-book:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btn-book:hover::before {
    width: 300px;
    height: 300px;
}

.btn-book:active {
    transform: translateY(-1px);
}

/* No Cars Message */
.no-cars {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #999;
    font-size: 1.2rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .cars-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }

    .cars-header h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .cars-details-container {
        padding: 40px 15px;
    }

    .cars-header {
        margin-bottom: 30px;
    }

    .cars-header h1 {
        font-size: 1.8rem;
    }

    .cars-header p {
        font-size: 1rem;
    }

    .cars-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cars-filters {
        flex-direction: column;
    }

    .search-filter,
    .price-filter {
        min-width: unset;
        width: 100%;
    }

    .btn-clear {
        padding: 10px 14px;
    }

    .btn-search {
        padding: 10px 16px;
    }

    .search-message {
        min-width: unset;
        width: 100%;
        margin-top: 15px;
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .car-card-image {
        height: 200px;
    }

    .car-card-body {
        padding: 20px;
        gap: 12px;
    }

    .car-title {
        font-size: 1.2rem;
    }

    .price-new,
    .price-main {
        font-size: 16px;
    }

    .spec-badge {
        font-size: 0.85rem;
        padding: 6px 10px;
    }

    .btn-book {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .cars-details-container {
        padding: 20px 10px;
    }

    .cars-header h1 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }

    .cars-header p {
        font-size: 0.9rem;
    }

    .car-card-image {
        height: 180px;
    }

    .promo-badge-car {
        padding: 6px 12px;
        font-size: 0.85rem;
        top: 10px;
        right: 10px;
    }

    .car-card-body {
        padding: 15px;
        gap: 10px;
    }

    .car-title {
        font-size: 1.1rem;
    }

    .price-section-car {
        padding: 12px;
        margin: 10px 0 8px 0;
    }

    .price-new,
    .price-main {
        font-size: 1.2rem;
    }

    .spec-badge {
        font-size: 0.8rem;
        padding: 5px 8px;
    }

    .car-specs {
        gap: 8px;
    }

    .btn-book {
        padding: 10px 16px;
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }

    .search-message {
        font-size: 0.9rem;
        padding: 12px 14px;
        min-width: unset;
        margin-top: 12px;
    }

    .search-term {
        display: block;
        margin-top: 4px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.car-card {
    animation: fadeIn 0.6s ease forwards;
}

.car-card:nth-child(1) {
    animation-delay: 0.1s;
}

.car-card:nth-child(2) {
    animation-delay: 0.2s;
}

.car-card:nth-child(3) {
    animation-delay: 0.3s;
}

.car-card:nth-child(n+4) {
    animation-delay: 0.4s;
}