/* Base styles */
:root {
    --primary-color: #32b905;
    --primary-hover: #24f71b;
    --text-color: #333;
    --text-light: #32b905;
    --border-color: #e5e7eb;
    --bg-light: #befdb5;
    --yellow: #ffc107;
    --pink: #e91e63;
    --purple: #9c27b0;
    --purple-light: #7e57c2;
    --blue: #2196f3;
    --blue-light: #03a9f4;
    --green: #4caf50;
    --green-light: #8bc34a;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

img {
    max-width: 100%;
}

/* Desktop Header */
.desktop-header {
    background-color: #fff;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: #000;
}

.logo-icon {
    margin-right: 0.5rem;
}

/* Catalog Button */
.catalog-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.375rem;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    transition: var(--transition);
}

.catalog-btn:hover {
    background-color: var(--primary-hover);
}

/* Search */
.search-container {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.625rem 3rem 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.9375rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.1);
}

.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 3rem;
    background-color: var(--primary-color);
    border: none;
    border-radius: 0 0.375rem 0.375rem 0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-btn:hover {
    background-color: var(--primary-hover);
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.login-btn, .saved-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.login-btn:hover, .saved-btn:hover {
    color: var(--primary-color);
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem;
    transition: var(--transition);
}

.lang-btn:hover {
    color: var(--primary-color);
}

.flag-icon {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-width: 160px;
    z-index: 10;
    margin-top: 0.5rem;
}

.language-selector:hover .lang-dropdown {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.lang-option:hover {
    background-color: var(--bg-light);
}

.lang-option.active {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Mobile Header */
.mobile-header {
    display: none;
    padding: 0.75rem 0;
    background-color: #fff;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    border-radius: 1.5rem;
    padding: 0.5rem 1rem;
}

.search-icon {
    color: var(--text-light);
    margin-right: 0.5rem;
}

.mobile-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.9375rem;
    outline: none;
}

.grid-btn {
    color: var(--text-light);
    padding: 0.25rem;
}

/* Desktop Navigation */
.desktop-nav {
    background-color: #fff;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.desktop-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.nav-scroll {
    display: flex;
    gap: 1.5rem;
    padding: 0.25rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--primary-color);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 0.25rem;
    color: white;
}

.nav-icon.yellow { background-color: var(--yellow); }
.nav-icon.pink { background-color: var(--pink); }
.nav-icon.purple { background-color: var(--purple); }
.nav-icon.purple-light { background-color: var(--purple-light); }
.nav-icon.blue { background-color: var(--blue); }
.nav-icon.blue-light { background-color: var(--blue-light); }
.nav-icon.green { background-color: var(--green); }
.nav-icon.green-light { background-color: var(--green-light); }

/* Mobile Promo Banner */
.mobile-promo-banner {
    display: none;
    background: linear-gradient(90deg, #9c27b0 0%, #6a0080 100%);
    color: white;
    border-radius: 0.75rem;
    margin: 1rem 0;
    overflow: hidden;
}

.promo-content {
    display: flex;
    padding: 1rem;
}

.promo-text {
    flex: 1;
}

.promo-text h2 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.promo-text ul {
    list-style: none;
    font-size: 0.75rem;
    margin-bottom: 1rem;
}

.promo-text li {
    margin-bottom: 0.25rem;
}

.promo-btn {
    background-color: #00c853;
    color: white;
    border-radius: 1.5rem;
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.promo-image {
    position: relative;
    width: 40%;
}

.gift-label {
    position: absolute;
    top: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* Mobile Category Icons */
.mobile-categories {
    display: none;
    margin: 1.5rem 0;
}

.category-icons {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    color: white;
}

.category-item span {
    font-size: 0.75rem;
    text-align: center;
}

/* Desktop Banner */
.desktop-banner {
    background: linear-gradient(90deg, #1a237e 0%, #283593 100%);
    color: white;
    border-radius: 1rem;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

.banner-content {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

.banner-text {
    max-width: 60%;
    padding: 0 2rem;
    z-index: 2;
}

.banner-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.banner-text p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.view-cars-btn {
    background-color: #2979ff;
    color: white;
    border-radius: 0.375rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.view-cars-btn:hover {
    background-color: #2962ff;
}

.banner-image {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 50%;
    height: 100%;
    background-image: url('https://via.placeholder.com/800x400');
    background-size: contain;
    background-position: right bottom;
    background-repeat: no-repeat;
}

/* Banner Navigation */
.banner-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 3;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: white;
    width: 24px;
    border-radius: 4px;
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: var(--transition);
}

.banner-arrow:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.banner-arrow.prev {
    left: 1rem;
}

.banner-arrow.next {
    right: 1rem;
}

/* Mobile Popular Section */
.mobile-popular {
    display: none;
    margin: 1.5rem 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.see-all {
    display: flex;
    align-items: center;
    color: var(--text-light);
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.car-card {
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.car-image {
    position: relative;
    height: 120px;
    background-color: #f5f5f5;
}

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

.car-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.badge {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    color: white;
}

.badge.discount {
    background-color: #ff9800;
}

.badge.sale {
    background-color: #4caf50;
}

.badge.days {
    background-color: #2196f3;
}

.favorite-btn {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.car-info {
    padding: 0.75rem;
}

.car-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.car-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    background-color: #f5f5f500;
    border-radius: 0.25rem;
}

.preorder {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    background-color: #757575;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.price {
    display: flex;
    flex-direction: column;
}

.currency {
    font-size: 0.75rem;
    color: var(--text-light);
}

.amount {
    font-size: 1rem;
    font-weight: 600;
}

.local-price {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0;
    z-index: 100;
}

.mobile-bottom-nav {
    display: none;
    justify-content: space-around;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
}

.mobile-bottom-nav .nav-item span {
    font-size: 0.75rem;
}

.mobile-bottom-nav .nav-item.active {
    color: var(--primary-color);
}

/* Responsive styles */
@media (max-width: 1024px) {
    .banner-text h1 {
        font-size: 2rem;
    }
    
    .banner-text p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .desktop-header, .desktop-nav, .desktop-banner {
        display: none;
    }
    
    .mobile-header, .mobile-promo-banner, .mobile-categories, .mobile-popular, .mobile-bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 60px; /* Space for mobile nav */
    }
}

@media (max-width: 480px) {
    .car-grid {
        grid-template-columns: 1fr;
    }
}