:root {
    --grid-margin: 5.25rem;
    --grid-gutter: 0.75rem;
    --bmw-blue: #0066cc;
    --bmw-border-gray: #bbbbbb;
    --text-foreground: #000000;
    --text-muted: #666666;
}

/* Reset & Basics */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "BMWNeue", "Helvetica Neue", Arial, sans-serif;
    /* fallback */
}

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

img {
    display: block;
    max-width: 100%;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* Container */
.mjl-bmw-container {
    width: auto;
    margin-left: var(--grid-margin);
    margin-right: var(--grid-margin);
    padding-left: var(--grid-gutter);
    padding-right: var(--grid-gutter);
}

@media screen and (min-width: 1920px) {
    .mjl-bmw-container {
        margin-left: auto;
        margin-right: auto;
        max-width: 109.5rem;
    }
}

/* Header Common */
.mjl-main-header {
    width: 100%;
    background-color: white;
    position: relative;
    z-index: 50;
    font-size: 16px;
    font-family: sans-serif;
    /* Adjust font as needed */
}
.mjl-disclaimer-wrapper {
    width: 100%;
    background-color: white;
    position: relative;
    z-index: 50;
    font-family: "BMWNeue", "Helvetica Neue", Arial, sans-serif;
}
p.mjl-disclaimer {
    margin: 0px;
    padding: 0px;
    font-weight: 300;
    font-size: 0.75rem !important;
    color: #333333;
    text-align: end !important;
    padding: 4px 0px;
}

/* Desktop Header */
.mjl-desktop-header {
    display: none;
}

@media screen and (min-width: 1280px) {
    .mjl-desktop-header {
        display: block;
    }
}
@media screen and (max-width: 1280px) {
    :root {
        --grid-gutter: 0.75rem;
        --grid-margin: 2.25rem;
    }
}
@media screen and (max-width: 770px) {
    :root {
        --grid-gutter: 0.75rem;
        --grid-margin: 0.75rem;
    }
}

.mjl-header-row {
    display: flex;
    height: 85px;
    align-items: center;
    border-bottom: 1px solid var(--bmw-border-gray);
    position: relative;
}

.mjl-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 1.5rem;
    width: 3.25rem;
}

.mjl-nav-menu {
    display: flex;
    align-items: stretch;
    height: 100%;
    color: var(--text-muted);
    font-weight: 500;
}

.mjl-nav-item {
    position: relative;
    height: 100%;
    font-family: "BMWNeue", "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
}

.mjl-nav-link {
    display: flex;
    align-items: center;
    position: relative;
    height: 100%;
    padding: 0 0.75rem;
    transition: color 0.2s;
}

.mjl-nav-link:hover {
    color: rgba(0, 0, 0, 0.8);
}

.mjl-active-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    /* h-1 in tailwind is 0.25rem = 4px */
    background-color: var(--bmw-blue);
    opacity: 0;
    transition: opacity 0.2s;
}

.mjl-nav-link:hover .mjl-active-indicator,
.mjl-icon-btn:hover .mjl-active-indicator {
    opacity: 1;
}

.mjl-header-actions {
    display: flex;
    flex: 1;
    align-items: stretch;
    justify-content: flex-end;
    height: 100%;
}

.mjl-icon-btn {
    display: flex;
    align-items: center;
    position: relative;
    height: 100%;
    padding: 0 0.75rem;
    cursor: pointer;
    color: var(--text-foreground);
    transition: color 0.2s;
}

.mjl-icon-wrapper {
    position: relative;
}

.mjl-cart-icon {
    font-size: 1.25rem;
    /* ~text-xl */
    line-height: 1;
    color: rgba(0, 0, 0, 0.6);
    transition: color 0.2s;
}

.mjl-icon-btn:hover .mjl-cart-icon {
    color: rgba(0, 0, 0, 0.8);
}

.mjl-cart-badge {
    position: absolute;
    top: -0.75rem;
    right: -0.75rem;
    height: 1.25rem;
    width: 1.25rem;
    border-radius: 9999px;
    background-color: var(--bmw-blue);
    color: white;
    font-size: 9px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Header */
.mjl-mobile-header-wrapper {
    display: block;
}

@media screen and (min-width: 1280px) {
    .mjl-mobile-header-wrapper {
        display: none;
    }
}

.mjl-mobile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    background-color: white;
}

@media screen and (min-width: 768px) {
    .mjl-mobile-row {
        height: 85px;
    }
}

.mjl-mobile-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 1.5rem;
    width: 2.25rem;
    /* w-9 */
}

@media screen and (min-width: 768px) {
    .mjl-mobile-logo {
        width: 3.25rem;
        /* md:w-[3.25rem] */
    }
}

.mjl-mobile-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    /* space-x-1 */
}

.mjl-menu-btn {
    padding: 0.5rem;
    color: rgba(0, 0, 0, 0.6);
    transition: all 0.2s;
    box-shadow: none;
}

.mjl-menu-btn:hover {
    color: rgba(0, 0, 0, 0.8);
}

/* Custom font setup from existing css (preserved if needed but simplified above) */
[data-icon]:not([data-icon=""]):before {
    word-wrap: normal;
    speak: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "liga";
    content: attr(data-icon);
    direction: ltr;
    display: block;
    font-family: bmw_next_icons;
    font-style: normal;
    height: 1em;
    line-height: 1;
    outline: 1px solid #0000;
    text-align: left;
    text-rendering: optimizeLegibility;
    text-transform: none;
    white-space: nowrap;
    width: auto;
}

/* Offcanvas Menu */
.mjl-offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.6);
    /* Lighter overlay based on typical modern design, or keep dark. Image background is white menu. Let's stick to dark overlay but maybe lighter? The image shows the menu itself. I'll keep default dark overlay for contrast unless specified. */
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mjl-offcanvas-overlay.mjl-open {
    opacity: 1;
    visibility: visible;
}

.mjl-offcanvas-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    /* Full width on mobile often? Image looks like a modal or full width. Let's make it typical side drawer but maybe wider. Or full width < md. */
    background-color: white;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

@media (min-width: 480px) {
    .mjl-offcanvas-menu {
        max-width: 400px;
        /* Limit width on larger screens */
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    }
}

.mjl-offcanvas-menu.mjl-open {
    transform: translateX(0);
}

.mjl-offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    /* Align layout */
    height: 85px;
    /* Match main header height */
    border-bottom: 1px solid var(--bmw-border-gray);
    flex-shrink: 0;
}

.mjl-offcanvas-logo {
    width: 24px;
    height: auto;
}

.mjl-close-btn {
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.5rem;
    /* Large X */
    color: #666;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.mjl-close-btn:hover {
    color: black;
}

.mjl-close-icon {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}

.mjl-offcanvas-content {
    padding: 1.5rem;
    /* Indented content */
    overflow-y: auto;
    flex: 1;
}

.mjl-offcanvas-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mjl-offcanvas-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    /* Spacing */
    border-bottom: 1px solid #e6e6e6;
    /* Light separator */
    color: #000;
    font-weight: 600;
    /* Semantic/Bold */
    font-size: 1.125rem;
    cursor: pointer;
    transition: color 0.2s;
}

.mjl-offcanvas-nav-item:hover {
    color: var(--bmw-blue);
}

.mjl-chevron-right {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: #999;
    /* Lighter chevron */
}

.mjl-offcanvas-nav-item:hover .mjl-chevron-right {
    color: var(--bmw-blue);
}


/* Overlay */
.mjl-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
    z-index: 998;
}

.mjl-cart-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Cart Panel */
.mjl-cart-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100vh;
    background: #fff;
    z-index: 999;
    padding: 20px;
    box-shadow: -4px 0 15px rgba(0,0,0,0.1);
    transition: 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mjl-cart-panel.open {
    right: 0;
}

/* Header */
.mjl-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.mjl-cart-close-btn {
    background: none;
    border: none;
    cursor: pointer;
}

/* Cart content scroll */
.mjl-cart-items {
    overflow-y: auto;
    flex: 1;
}
