:root {
    --primary-blue: #3d69e1;
    --text-white: #ffffff;
    --text-dark: #171a20;
    --bg-dark: #000000;
    --bg-light: #ffffff;
    --header-height: 56px;
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --price-gold: #c5a059;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
    background-color: var(--bg-light);
}

h1,
h2,
.logo {
    font-family: 'Outfit', sans-serif;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}


/* Header */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-bottom: 1px solid transparent;
}

#main-header.scrolled,
#main-header:has(.nav-item:hover),
#main-header:has(.icon-dropdown-container:hover) {
    background-color: #ffffff;
    /* Unified solid white */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

#main-header:has(.nav-item:hover) .logo a,
#main-header:has(.nav-item:hover) .desktop-nav a,
#main-header:has(.nav-item:hover) .header-icons a,
#main-header:has(.icon-dropdown-container:hover) .logo a,
#main-header:has(.icon-dropdown-container:hover) .desktop-nav a,
#main-header:has(.icon-dropdown-container:hover) .header-icons a {
    color: var(--text-dark) !important;
}

#mobile-menu-btn,
.mobile-menu {
    display: none;
}

.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-white);
    text-decoration: none;
    letter-spacing: 4px;
    transition: var(--transition-smooth);
}

#main-header.scrolled .logo a {
    color: var(--text-dark);
}

.desktop-nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
    height: 100%;
}

.desktop-nav a {
    color: var(--text-white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: var(--transition-smooth);
    background-color: rgba(255, 255, 255, 0.1);
    /* Frosted 'watered' background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#main-header.scrolled .desktop-nav a {
    color: var(--text-dark);
    background-color: rgba(0, 0, 0, 0.05);
}

.desktop-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#main-header.scrolled .desktop-nav a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.header-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-icons a {
    color: var(--text-white);
    padding: 8px;
    border-radius: 4px;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

.header-icons a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

#main-header.scrolled .header-icons a {
    color: var(--text-dark);
}

#main-header.scrolled .header-icons a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Hero Section */
.hero {
    position: relative;
    height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    background-color: var(--bg-dark);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
}

.hero-panel {
    flex: 1;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.hero-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    will-change: transform;
}

.panel-top img {
    object-position: center 10%;
}

.panel-bottom img {
    object-position: center 95%;
    border-left: 2px solid var(--bg-dark);
}

.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 80px;
    pointer-events: none;
}

.hero-content * {
    pointer-events: auto;
}

.hero-top-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hero h1 {
    font-size: 56px;
    font-weight: 500;
    color: var(--text-white);
    letter-spacing: -1px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

.price-tag {
    font-size: 18px;
    color: var(--text-white);
    margin-top: 10px;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-top: 30px;
    width: 100%;
    justify-content: center;
}

@media (max-width: 768px) {
    .hero-buttons {
        padding: 0 32px;
        /* Added side breathing room for mobile buttons */
        gap: 12px;
        flex-direction: column;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-smooth);
    min-width: 260px;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-blue) !important;
    color: var(--text-white) !important;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.8) !important;
    color: var(--text-dark) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-white);
    cursor: pointer;
    z-index: 15;
}

/* Mega Menus */
.nav-item {
    position: static;
    height: 100%;
    display: flex;
    align-items: center;
}

.mega-menu {
    position: fixed;
    top: -1000px;
    left: 0;
    width: 100vw;
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    padding: 60px 0 100px;
    transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    z-index: 999;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    opacity: 0;
    pointer-events: none;
}

.nav-item:hover .mega-menu,
.nav-item.active .mega-menu {
    top: var(--header-height);
    opacity: 1;
    pointer-events: auto;
}

.mega-menu-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: flex-start;
    gap: 80px;
    flex-wrap: wrap;
}

.dropdown-category {
    min-width: 200px;
}

.dropdown-category h4 {
    font-size: 14px;
    color: #86868b;
    margin-bottom: 20px;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.dropdown-category ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dropdown-category ul li a {
    color: var(--text-dark) !important;
    font-size: 14px !important;
    padding: 0 !important;
    font-weight: 500 !important;
    transition: color 0.2s ease;
    display: inline-block;
    background: none !important;
    backdrop-filter: none !important;
}

.dropdown-category ul li a:hover {
    color: var(--primary-blue) !important;
}

/* More Dropdown Specifics */
.more-dropdown .mega-menu-content {
    gap: 40px;
}

.more-dropdown h4 a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}

/* Models Carousel Section */
.models-carousel {
    background-color: var(--bg-light);
    padding: 40px 0 80px;
    /* Reduced top padding to pull sections together */
}

.horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 32px;
    padding: 10px 20px;
    padding-left: 30px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.horizontal-scroll-container::-webkit-scrollbar {
    display: none;
}

.model-card {
    flex: 0 0 950px;
    /* Increased for cinematic desktop view */
    height: 580px;
    /* Proportionally increased height */
    background: #f4f4f4;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    scroll-snap-align: start;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;

}

@media (max-width: 768px) {
    .model-card {
        flex: 0 0 60vw;
        /* Even narrower for a clearer scroll cue */
        height: 440px;
        /* Proportionally adjusted height */
    }

    .models-carousel {
        padding: 20px 0 60px;
        /* Even tighter spacing on mobile */
    }

    .horizontal-scroll-container {
        padding-left: 20px;
        gap: 16px;
    }
}

/* Skeleton shimmer while images load */
@keyframes shimmer {
    0% {
        background-position: -800px 0;
    }

    100% {
        background-position: 800px 0;
    }
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite linear;

}

.card-img.loaded {
    opacity: 1;
    animation: none;
    background: none;
}


.model-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    padding-bottom: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.model-info h3 {
    font-size: 22px;
    font-weight: 600;
}

.model-tags {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 12px;
}

.model-tags:empty {
    margin-bottom: 0;
    /* Tighten space if no tags */
    display: none;
}

.model-tags::-webkit-scrollbar {
    display: none;
}

.tag {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

.tag-description {
    display: none;
}

.tag.price-pill {
    background: white;
    color: black;
    border: none;
    font-weight: 600;
    padding: 6px 16px;
    /* Increased horizontal padding for a premium look */
}

.model-card-buttons {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.model-card-buttons .btn {
    min-width: 220px;
    padding: 15px;
}

/* Responsive */
@media (max-width: 768px) {

    .desktop-nav,
    .header-icons a {
        display: none;
    }

    #mobile-menu-btn {
        display: block;
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        color: var(--text-white);
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 6px 16px;
        border-radius: 4px;
        font-weight: 500;
        cursor: pointer;
        margin-right: 10px;
        transition: var(--transition-smooth);
    }

    #main-header.scrolled #mobile-menu-btn {
        background: rgba(255, 255, 255, 0.05);
        color: var(--text-dark);
        border-color: rgba(0, 0, 0, 0.1);
    }

    .mobile-menu {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 2000;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        overflow: hidden;
    }

    .mobile-menu.active {
        right: 0;
    }

    /* Both panels sit side by side inside the overlay */
    .mobile-menu-panel {
        min-width: 100%;
        height: 100%;
        padding: 20px 40px;
        flex-direction: column;
        display: flex;
        overflow-y: auto;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Only slide OUT the main panel — NOT the sub-panel */
    .mobile-menu.sub-active #mobile-main-panel {
        transform: translateX(-100%);
    }

    /* Sub-panel: starts off-screen to the right, slides in */
    .mobile-sub-panel {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform: translateX(100%);
        /* hidden right */
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Slide sub-panel in when active */
    .mobile-menu.sub-active .mobile-sub-panel {
        transform: translateX(0);
    }

    .mobile-menu-header {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 40px;
    }

    .close-btn {
        background: none;
        border: none;
        font-size: 40px;
        color: #333;
        cursor: pointer;
    }

    /* Back button in sub-panel */
    .mobile-back-btn {
        background: none;
        border: none;
        font-size: 16px;
        font-weight: 500;
        color: #171a20;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0;
    }

    .mobile-back-btn i {
        font-size: 14px;
    }

    /* Sub-panel content: hero title + models */
    .mobile-sub-group {
        margin-bottom: 36px;
    }

    .mobile-sub-group h3 {
        margin: 0;
        letter-spacing: -0.5px;
    }

    .mobile-sub-group h3 a {
        font-size: 24px;
        color: #171a20;
        text-decoration: none;
        font-weight: 600;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .mobile-sub-group h3 a::after {
        content: '\203A';
        font-size: 24px;
        font-weight: 300;
        color: #999;
    }

    #mobile-nav-list {
        list-style: none;
    }

    #mobile-nav-list li {
        margin-bottom: 25px;
    }

    /* Category items get a chevron to hint at sub-panel */
    #mobile-nav-list li.has-submenu>a {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #mobile-nav-list li.has-submenu>a::after {
        content: '\203A';
        /* › */
        font-size: 24px;
        font-weight: 300;
        color: #999;
    }

    #mobile-nav-list li a {
        font-size: 24px;
        color: #171a20;
        text-decoration: none;
        font-weight: 600;
        display: block;
        padding: 10px 0;
    }

    .horizontal-scroll-container {
        padding-left: 20px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-buttons {
        flex-direction: row;
        gap: 10px;
        padding: 0 20px;
        /* Reduced to prevent overflow */
        width: 100%;
        box-sizing: border-box;
        /* Ensure padding is included in width */
        max-width: 100%;
    }

    .hero-buttons .btn {
        padding: 12px 30px;
        /* Perfectly balanced: bold girth but safe for small screens */
        min-width: 0;
        flex: 1;
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
        border-radius: 4px;
        text-align: center;
        box-sizing: border-box;
    }

    .btn-primary {
        background-color: #3e6ae1 !important;
        /* More vibrant blue like pic 2 */
    }

    .btn-secondary {
        background-color: rgba(255, 255, 255, 0.9) !important;
        /* Cleaner white like pic 2 */
        color: #171a20 !important;
    }

    .model-card {
        flex: 0 0 340px;
        /* Slimmer desktop cards */
        height: 520px;
    }

    .model-info {
        padding: 20px;
        padding-bottom: 30px;
        /* Extra space below buttons on mobile */
        gap: 8px;
        /* Tighter gap for mobile */
    }

    .model-card-buttons {
        flex-direction: row;
        gap: 8px;
    }

    .model-card-buttons .btn {
        min-width: 0;
        flex: 1;
        padding: 10px;
    }

    .panel-bottom {
        display: none;
    }
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

/* Preloader */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .logo, .rtl .desktop-nav, .rtl .header-icons {
    flex-direction: row-reverse;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.loader-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #2C2C2C;
    letter-spacing: 4px;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0.5;
        transform: scale(0.98);
    }
}

.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

    100% {
        background-position: -200% 0;
    }
}

/* Premium Footer - Pic 3 Style */
footer {
    padding: 40px 0;
    background: var(--bg-light);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: center;
    /* Absolutely centered */
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    color: #5c5e62;
    font-size: 12px;
    font-weight: 500;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content a {
    color: #5c5e62;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-content a:hover {
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* Icon Dropdowns */
.icon-dropdown-container {
    position: relative;
    display: flex;
    align-items: center;
}

.icon-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
    margin-top: 10px;
}

.icon-dropdown-container:hover .icon-dropdown,
.icon-dropdown-container.active .icon-dropdown,
.nav-item:hover .mega-menu,
.nav-item.active .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.icon-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.icon-dropdown ul li a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px 20px !important;
    color: var(--text-dark) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: background 0.2s ease !important;
    width: 100% !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.icon-dropdown ul li a:hover {
    background: rgba(0, 0, 0, 0.03) !important;
}

.icon-dropdown ul li a i {
    font-size: 12px;
    width: 14px;
}

/* Tesla-style Fixed Footer Bar */
.fixed-footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px 0;
    z-index: 900;
    display: flex;
    justify-content: center;
    transition: transform 0.3s ease;
}

.footer-bar-content {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-contact-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f4f4f4;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.footer-contact-link:hover {
    background: #e2e2e2;
}

/* Checkout Overlay & Sheet */
.checkout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: flex-end;
    /* Bottom sheet by default */
}

.checkout-overlay.active {
    display: flex;
}

.checkout-sheet {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: 10px 10px 0 0;
    padding: 30px;
    position: relative;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.checkout-overlay.active .checkout-sheet {
    transform: translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: #e2e2e2;
    border-radius: 2px;
    margin: -15px auto 20px;
}

.sheet-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f4f4f4;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-step {
    display: none;
}

.checkout-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.checkout-step h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.checkout-step p {
    color: #5c5e62;
    margin-bottom: 24px;
}

.quantity-selector {
    display: inline-flex;
    align-items: center;
    background: #f5f5f7;
    border-radius: 25px;
    padding: 2px 8px;
    gap: 15px;
    margin-bottom: 25px;
}

.quantity-selector button {
    border: none !important;
    background: transparent !important;
    width: auto !important;
    height: auto !important;
    font-size: 20px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 500;
}

.quantity-selector span, .pill-counter span {
    min-width: 30px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #000;
    user-select: none;
}

.btn-step-back {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #f4f4f4;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    z-index: 10;
}

/* Summary Sheet Enhancements */
.summary-details {
    padding: 20px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 15px;
}

.summary-row .label {
    color: #86868b;
    flex: 0 0 100px;
}

.summary-row .value {
    color: #1d1d1f;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

.summary-divider {
    height: 1px;
    background: #e5e5e7;
    margin: 20px 0;
}

.total-row {
    margin-top: 10px;
}

.total-row .label {
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
}

.total-row .value {
    font-size: 20px;
    font-weight: 700;
    color: var(--tesla-blue);
}

/* Onboarding Sheet */
.onboarding-sheet {
    text-align: center;
    border-radius: 5px !important;
    /* Sharp corners as requested */
    box-shadow: none !important;
    /* No shadows */
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 450px;
}

.onboarding-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #1d1d1f;
    margin: 25px 0 35px;
}

.promises-list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
    text-align: left;
}

.promises-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    font-size: 14px;
    color: #1d1d1f;
    border-bottom: 1px solid #f5f5f7;
}

.promises-list li:last-child {
    border-bottom: none;
}

.promises-list i {
    color: var(--tesla-blue);
    font-size: 18px;
    width: 25px;
}

.onboarding-sheet h2 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 10px;
}

/* Modal/Sheet Shadow removal globally as requested */
.checkout-sheet,
.modal-content,
.admin-card,
.onboarding-sheet {
    box-shadow: none !important;
    border: 1px solid #e5e5e7;
    border-radius: 5px !important;
}

/* Add to Cart Button (Edgy Style) */
.btn-add-cart {
    background: white;
    color: black;
    border: 1px solid #000;
    width: 36px;
    height: 36px;
    border-radius: 5px;
    /* Sharp but within guidelines */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.btn-add-cart:hover {
    background: #000;
    color: #fff;
    transform: scale(1.05);
}

.btn-add-cart i {
    font-size: 14px;
}

/* Fixed Bottom Cart Bar */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid #e5e5e7;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-bar.active {
    transform: translateY(0);
}

.cart-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 32px;
    /* Increased from 20px */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cart-items-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.cart-items-list::-webkit-scrollbar {
    display: none;
}

.cart-bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fbfbfd;
    padding: 6px 12px 6px 6px;
    border: 1px solid #e5e5e7;
    border-radius: 5px;
    min-width: 200px;
    width: 200px;
    flex-shrink: 0;
    position: relative;
    overflow: visible;
    /* Ensure "X" isn't cut off */
}

.cart-bar-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 3px;
    background: white;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
}

.cart-item-info .title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.cart-item-info .price {
    font-size: 11px;
    color: #86868b;
}

.remove-item {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    background: #000;
    color: white;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Subtle shadow only for the X button to separate from white background */
}

.remove-item:hover {
    transform: scale(1.1);
}

.cart-bar-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.cart-total-preview {
    text-align: right;
}

.cart-total-preview .label {
    display: block;
    font-size: 12px;
    color: #86868b;
}

.cart-total-preview .value {
    font-size: 18px;
    font-weight: 700;
    color: var(--tesla-blue);
}

.btn-checkout {
    padding: 10px 24px;
    font-size: 14px;
}

/* Bottom sheet mobile adjustment */
@media (max-width: 768px) {
    .checkout-overlay {
        align-items: flex-end;
    }

    .checkout-sheet {
        width: 100%;
        max-width: 100%;
        border-radius: 5px 5px 0 0 !important;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .checkout-overlay.active .checkout-sheet {
        transform: translateY(0);
    }

    .cart-bar-container {
        padding: 20px 16px;
        /* Increased from 10px */
        gap: 12px;
    }

    .cart-total-preview {
        display: block;
        /* Show total on mobile */
        text-align: left;
    }

    .cart-total-preview .value {
        font-size: 14px;
    }

    .btn-checkout {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 110px;
    }

    .cart-bar-item {
        min-width: 100px;
        max-width: 140px;
        padding: 4px 8px;
    }

    .cart-item-info .title {
        max-width: 80px;
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cart-bar {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .hero-overlay-content h2 {
        font-size: 2.2rem;
        line-height: 1.1;
        margin-bottom: 20px;
    }

    .hero-overlay-content p {
        font-size: 1.1rem;
    }
}



#map-container {
    width: 100%;
    height: 250px;
    background: #f4f4f4;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.address-box {
    background: #f9f9f9;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 24px;
    border: 1px solid #eee;
}

.btn-full {
    width: 100%;
    margin-bottom: 12px;
}

.order-summary {
    background: #f9f9f9;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.summary-row.total {
    border-top: 1px solid #e2e2e2;
    padding-top: 12px;
    font-weight: 600;
    font-size: 18px;
}

/* Desktop Adjustment */
@media (min-width: 768px) {
    .checkout-overlay {
        align-items: center;
        /* Modal style */
    }

    .checkout-sheet {
        border-radius: 16px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .sheet-handle {
        display: none;
    }
}

.price-tag {
    color: white;
    font-size: 20px;
    font-weight: 400;
    margin-top: 2px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Checkout Modal Animations */
.checkout-overlay {
    transition: opacity 0.3s ease;
    opacity: 0;
}

.checkout-overlay.active {
    opacity: 1;
}

.checkout-sheet {
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}

.checkout-overlay.active .checkout-sheet {
    transform: translateY(0);
    opacity: 1;
}

@media (min-width: 768px) {
    .checkout-sheet {
        transform: scale(0.9) translateY(20px);
    }

    .checkout-overlay.active .checkout-sheet {
        transform: scale(1) translateY(0);
    }

    .model-card-buttons .btn-primary {
        max-width: 200px;
        margin: 0;
    }
}

.checkout-step {
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.checkout-step.active {
    opacity: 1;
    transform: translateX(0);
}

/* Input Groups */
.input-group {
    margin-bottom: 24px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #5c5e62;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e2e2e2;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary-blue);
}

.auth-sheet {
    max-width: 400px !important;
    text-align: center;
}

.auth-sheet h2 {
    margin-bottom: 12px;
}

.auth-sheet p {
    margin-bottom: 24px;
}

/* Map Interactions */
#map-container {
    cursor: crosshair;
}

/* Custom Marker Style (Optional override if needed) */
.leaflet-marker-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Card Info Overlay */
.model-card {
    position: relative;
    overflow: hidden;
}

.model-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    flex-direction: column;
    padding: 40px;
    z-index: 100;
    transform: translateY(100%);
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-dark);
}

.model-card-overlay.active {
    transform: translateY(0);
}

.overlay-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f4;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-dark);
    transition: var(--transition-smooth);
    z-index: 110;
}

.overlay-close:hover {
    background: #e2e2e2;
}

/* Overlay close handled above */

.overlay-content {
    margin-top: 20px;
}

.overlay-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: black;
}

.overlay-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #393c41;
}

/* Hero Section - Unified Background */
.hero {
    height: 85vh;
    /* Reduced height for desktop */
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #000;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, transparent 20%, transparent 60%, rgba(0,0,0,0.4) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    /* Focus on middle */
}

.hero-description-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-description-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-overlay-content {
    max-width: 800px;
    width: 100%;
}

.hero-overlay-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #1d1d1f;
}

.hero-overlay-content p {
    font-size: 1.4rem;
    line-height: 1.6;
    color: #424245;
    max-width: 600px;
}

.hero-description-overlay .overlay-close {
    position: absolute;
    top: 40px;
    right: 40px;
    background: #f5f5f7;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.hero-description-overlay .overlay-close:hover {
    background: #e8e8ed;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Aligned to bottom */
    padding-bottom: 12vh;
    /* Space for the arrow */
    align-items: center;
    text-align: center;
    color: white;
}

/* Home Page Emergence Animation */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.home-hero {
    margin: 0;
    padding: 0;
}

.home-hero:hover .hero-background img {
    transform: scale(1.02);
}

.hero-background img {
    transition: opacity 0.8s ease-in-out, transform 10s ease-out;
}

/* Scroll Arrow */
.scroll-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 24px;
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 10;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Hero Section Content Spacing */
.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0px;
    /* Reduced to absolute minimum as per request */
    letter-spacing: -1px;
}

@media (max-width: 768px) {
    .hero {
        height: 75vh;
        /* Decreased height for mobile */
    }

    .hero-content h1 {
        font-size: 2rem;
        /* Smaller title on mobile */
    }

    .hero-content {
        padding-bottom: 8vh;
    }
}

.price-tag {
    font-size: 1.2rem;
    margin-bottom: 10px;
    /* Tightened */
    font-weight: 500;
    opacity: 1;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-top: 0;
}

/* Desktop Header Transparency */
@media (min-width: 1024px) {

    .header-center a,
    .admin-access-btn {
        background: transparent !important;
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
        transition: all 0.3s ease;
    }

    .header-center a:hover,
    .admin-access-btn:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 255, 255, 0.4);
    }
}

/* Button Refinement */
.model-card-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

@media (min-width: 1024px) {
    .model-card-buttons .btn-secondary {
        max-width: 140px;
        /* Slimmer Learn More on Desktop */
        padding: 10px 15px;
    }

    .model-card-buttons .btn-primary {
        flex: 1;
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    .model-card-buttons {
        flex-direction: row;
        gap: 8px;
    }

    .model-card-buttons .btn {
        width: 100%;
        max-width: none;
        flex: 1;
        padding: 12px 10px;
        font-size: 13px;
    }
}

/* Checkout Validation States */
.btn-disabled {
    opacity: 0.3 !important;
    pointer-events: none;
    cursor: not-allowed;
}

/* Admin Sidebar Enhancements */
.admin-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    margin-bottom: 12px;
}

.admin-nav-header h4 {
    font-size: 12px;
    text-transform: uppercase;
    color: #86868b;
    letter-spacing: 1px;
}

.add-page-btn {
    background: none;
    border: none;
    color: var(--admin-accent);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 12px;
    transition: background 0.2s;
}

.add-page-btn:hover {
    background: rgba(62, 106, 225, 0.1);
}

.admin-sub-nav {
    margin-left: 12px;
    margin-bottom: 24px;
}

.admin-sub-item {
    display: block;
    padding: 8px 16px;
    color: var(--admin-text);
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: background 0.2s;
}

.admin-sub-item:hover,
.admin-sub-item.active {
    background: rgba(0, 0, 0, 0.05);
}

/* Editor UI */
.editor-section {
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 24px;
    background: white;
    margin-bottom: 24px;
}

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

.card-form {
    background: #fbfbfd;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e5e5e7;
}
/* Carousel Actions Bar */
.carousel-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 40px 20px;
    width: 100%;
}

.carousel-actions .btn {
    flex: 1;
    max-width: 250px;
    padding: 18px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.carousel-actions .btn-secondary {
    background: #f4f4f7 !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    color: var(--text-dark) !important;
}

@media (max-width: 768px) {
    .carousel-actions {
        flex-direction: column;
        align-items: center;
        padding: 20px 32px;
        gap: 12px;
    }
    
    .carousel-actions .btn {
        max-width: 100%;
        width: 100%;
        min-width: unset !important;
    }
}
