/* ============================================================================
   CARS PAGE STYLING - OMAN WEBSITE
   Using Omani Cultural Color Palette for consistency with template
   ============================================================================ */

/* Omani Color Variables */
:root {
    /* Brand colors from trip.css */
    --brand-primary: #fd7b21;
    --brand-secondary: #ff9e5e;
    --brand-green: #4CAF50;
    --brand-blue: #5C6BC0;
    --brand-purple: #9C27B0;
    
    /* Neutral colors */
    --text-primary: #333;
    --text-secondary: #666;
    --text-tertiary: #999;
    --bg-light: #f8f9fa;
    --bg-white: #fff;
    --border-color: #eef0f2;
    --border-hover: #fdd8b8;
}

/* Hero Section */
.cars-hero-section {
    background: linear-gradient(135deg, #fd7b21 0%, #e86a10 50%, #ff9e5e 100%);
    padding: 70px 0 80px;
    position: relative;
    overflow: hidden;
}

.cars-hero-section::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -8%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    animation: floatBubble 8s ease-in-out infinite;
}

.cars-hero-section::after {
    content: '';
    position: absolute;
    bottom: -25%;
    left: -5%;
    width: 350px;
    height: 350px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    animation: floatBubble 10s ease-in-out infinite reverse;
}

@keyframes floatBubble {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.cars-hero-content {
    text-align: center;
    color: var(--bg-white);
    position: relative;
    z-index: 1;
}

.cars-hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.cars-hero-content p {
    font-size: 18px;
    opacity: 0.9;
}

/* Section Backgrounds */
.white-bg {
    background-color: var(--bg-white);
}

.gray-bg {
    background-color: var(--bg-light);
}

.small-padding {
    padding: 40px 0;
}

/* Search Section */
.cars-search-section {
    position: relative;
}

.cars-search-box {
    background: var(--bg-white);
    border-radius: 24px;
    padding: 0;
    box-shadow: 0 25px 80px rgba(0,0,0,0.18);
    border: none;
    position: relative;
    overflow: hidden;
}

.cars-search-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #fd7b21 0%, #ff9e5e 100%);
}

.search-header {
    text-align: center;
    margin-bottom: 0;
    padding: 35px 40px 25px;
    background: linear-gradient(180deg, #fffbf7 0%, #fff 100%);
    border-bottom: 1px solid #f5f0eb;
    position: relative;
    z-index: 1;
}

.search-header-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #fd7b21 0%, #ff9e5e 100%);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--bg-white);
    font-size: 24px;
    box-shadow: 0 8px 24px rgba(253,123,33,0.3);
}

.search-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.search-subtitle {
    color: var(--text-tertiary);
    font-size: 14px;
    margin-bottom: 0;
}

/* Search Form */
.cars-search-form {
    position: relative;
    z-index: 1;
    padding: 30px 40px 25px;
}

.search-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.filter-item {
    display: flex;
    flex-direction: column;
}

.filter-item label {
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: 2px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-item select {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-light);
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-item select:hover {
    border-color: var(--border-hover);
    background: #fffcfa;
}

.filter-item select:focus {
    outline: none;
    border-color: var(--brand-primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(253,123,33,0.1);
}

.search-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.search-btn {
    background: linear-gradient(135deg, #fd7b21 0%, #e86a10 100%);
    color: var(--bg-white);
    border: none;
    padding: 16px 40px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(253,123,33,0.35);
    letter-spacing: 0.3px;
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(253,123,33,0.45);
    background: linear-gradient(135deg, #e86a10 0%, #d05a00 100%);
}

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

.reset-btn {
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    padding: 16px 40px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reset-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: #fff8f3;
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    position: relative;
}

.section-title h2::before {
    content: '✦';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    color: var(--brand-primary);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 16px;
}

.section-separator {
    display: block;
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, #fd7b21 0%, #ff9e5e 100%);
    margin: 0 auto;
    border-radius: 2px;
}

/* Popular Brands */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.brand-item {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.brand-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #fd7b21 0%, #ff9e5e 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.brand-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--brand-primary);
}

.brand-item:hover::before {
    transform: scaleX(1);
}

.brand-logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 20px;
}

.brand-item span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

/* Cars Grid */
.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* Car Card */
.car-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: none;
    position: relative;
}

.car-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #fd7b21 0%, #ff9e5e 100%);
}

.car-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.car-card.featured {
    border: 2px solid var(--brand-primary);
    background: linear-gradient(135deg, #fff 0%, #fff9f5 100%);
}

.car-card.featured::before {
    background: linear-gradient(90deg, #fd7b21 0%, #ff6b6b 50%, #fd7b21 100%);
}

.car-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.car-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--bg-white);
    text-transform: uppercase;
}

.car-badge.featured {
    background: linear-gradient(135deg, #fd7b21 0%, #ff9e5e 100%);
}

.car-badge.new {
    background: linear-gradient(135deg, var(--brand-green) 0%, #8BC34A 100%);
}

.car-price {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--brand-green) 0%, #45a049 100%);
    color: var(--bg-white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.car-price small {
    font-size: 12px;
    font-weight: 500;
}

.car-content {
    padding: 20px;
}

.car-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.car-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.spec-item i {
    color: var(--brand-primary);
    font-size: 14px;
}

.car-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.car-location i {
    color: var(--brand-green);
}

.car-actions {
    display: flex;
    gap: 12px;
}

.btn-view-details {
    flex: 1;
    background: linear-gradient(135deg, var(--brand-blue) 0%, #7986CB 100%);
    color: var(--bg-white);
    padding: 10px 16px;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-view-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(92,107,192,0.3);
}

.btn-contact {
    flex: 1;
    background: var(--bg-white);
    color: var(--brand-primary);
    border: 2px solid var(--brand-primary);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-contact:hover {
    background: var(--brand-primary);
    color: var(--bg-white);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cars-hero-content h1 {
        font-size: 32px;
    }
    
    .cars-hero-content p {
        font-size: 14px;
    }
    
    .cars-search-box {
        padding: 20px;
    }
    
    .search-filters-grid {
        grid-template-columns: 1fr;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .search-btn,
    .reset-btn {
        width: 100%;
        justify-content: center;
    }
    
    .cars-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title h2 {
        font-size: 24px;
    }
    
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .cars-hero-section {
        padding: 40px 0;
    }
    
    .cars-hero-content h1 {
        font-size: 24px;
    }
    
    .car-specs {
        grid-template-columns: 1fr;
    }
    
    .car-actions {
        flex-direction: column;
    }
    
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* RTL Support */
[dir="rtl"] .car-card.featured::before {
    right: auto;
    left: 0;
}

[dir="rtl"] .car-badge {
    right: auto;
    left: 12px;
}

[dir="rtl"] .car-price {
    left: auto;
    right: 12px;
}

[dir="rtl"] .spec-item i,
[dir="rtl"] .car-location i,
[dir="rtl"] .search-btn i,
[dir="rtl"] .reset-btn i,
[dir="rtl"] .btn-view-details i,
[dir="rtl"] .btn-contact i {
    margin-left: 0;
    margin-right: 8px;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .cars-search-box::before {
        animation: none;
    }
    
    .car-card,
    .brand-item,
    .search-btn,
    .reset-btn,
    .btn-view-details,
    .btn-contact {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .cars-hero-section,
    .search-actions,
    .car-actions {
        display: none;
    }
    
    .car-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* No Results Message */
.no-cars-message {
    text-align: center;
    padding: 60px 20px;
}

.no-results-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.no-results-content i {
    font-size: 64px;
    color: var(--brand-primary);
    opacity: 0.5;
}

.no-results-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.no-results-content p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
    max-width: 400px;
}
