/* =========================================================
   CHANGAN MEGA DRAWER MENU v1.1.6
   ========================================================= */

.cmd-wrapper {
    display: flex !important;
    width: 100%;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    z-index: 999;
}

/* Hamburger Trigger Button */
.cmd-hamburger-trigger {
    background-color: transparent;
    border: 0 solid transparent;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 40px;
    min-height: 36px;
    padding: 8px 10px;
    color: #1A202C;
    border-radius: 4px;
    transition: color 0.25s ease, opacity 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.cmd-hamburger-trigger:hover {
    opacity: 0.92;
}

.cmd-hamburger-bars {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    flex-shrink: 0;
}

.cmd-hamburger-bars span {
    display: block !important;
    width: 100%;
    height: 2.5px;
    background-color: currentColor;
    border-radius: 2px;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.cmd-hamburger-text {
    font-size: 12px;
    letter-spacing: 0.14em;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Backdrop */
.cmd-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 999990 !important;
}

.cmd-backdrop.is-open,
.cmd-wrapper.is-open .cmd-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Drawer System Wrapper */
.cmd-drawer-system {
    position: fixed !important;
    inset: 0 !important;
    pointer-events: none;
    visibility: hidden;
    z-index: 999995 !important;
}

.cmd-drawer-system.is-open,
.cmd-wrapper.is-open .cmd-drawer-system {
    pointer-events: auto !important;
    visibility: visible !important;
}

/* Right Drawer */
.cmd-right-drawer {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 380px;
    max-width: 90vw;
    background-color: #35404E;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 34px 40px 30px;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 999999 !important;
    box-shadow: -12px 0 36px rgba(0, 0, 0, 0.35);
    overflow-y: auto;
}

.cmd-drawer-system.is-open .cmd-right-drawer,
.cmd-wrapper.is-open .cmd-right-drawer {
    transform: translateX(0);
}

.cmd-drawer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 42px;
}

.cmd-drawer-logo img {
    display: block;
    height: auto;
    max-height: 36px;
    object-fit: contain;
}

/* Drawer Close Button */
.cmd-close-btn {
    background-color: transparent;
    border: 0 solid transparent;
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    padding: 6px;
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cmd-close-btn svg {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.cmd-close-btn:hover {
    opacity: 0.9;
}

.cmd-drawer-nav {
    flex: 1;
}

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

.cmd-nav-item {
    margin-bottom: 6px;
}

.cmd-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 0;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: color 0.22s ease, padding-left 0.22s ease;
}

.cmd-nav-link:hover,
.cmd-nav-item.is-active > .cmd-nav-link {
    color: #E39B38;
}

.cmd-chevron {
    display: inline-flex;
    align-items: center;
    transition: transform 0.28s ease;
    opacity: 0.85;
}

@media (min-width: 1025px) {
    .cmd-vehicles-trigger-item.is-flyout-open .cmd-chevron {
        transform: rotate(90deg);
        color: #E39B38;
    }
}

.cmd-nav-item.is-sub-open .cmd-chevron {
    transform: rotate(180deg);
}

.cmd-sub-accordion {
    list-style: none;
    margin: 0;
    padding: 0 0 0 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s ease, margin 0.32s ease;
}

.cmd-nav-item.is-sub-open .cmd-sub-accordion {
    max-height: 320px;
    margin: 4px 0 12px;
}

.cmd-sub-accordion li a {
    display: block;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.cmd-sub-accordion li a:hover {
    color: #E39B38;
}

.cmd-drawer-footer {
    padding-top: 24px;
    margin-top: 24px;
}

.cmd-footer-email {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #E39B38;
    text-decoration: none;
    font-size: 12.5px;
    letter-spacing: 0.03em;
    transition: opacity 0.2s ease;
}

.cmd-footer-email:hover {
    opacity: 0.82;
}

.cmd-mobile-vehicles-accordion {
    display: none;
}

/* Left Vehicle Showcase Flyout (Desktop) */
.cmd-left-flyout {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 380px;
    width: calc(100vw - 380px);
    background-color: rgba(13, 15, 19, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    opacity: 0;
    visibility: hidden;
    transform: translateX(36px);
    transition: opacity 0.34s ease, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.34s ease;
    z-index: 999997 !important;
    overflow-y: auto;
    pointer-events: none;
}

.cmd-drawer-system.is-open.is-vehicles-active .cmd-left-flyout,
.cmd-wrapper.is-open.is-vehicles-active .cmd-left-flyout {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.cmd-flyout-inner {
    display: flex;
    min-height: 100%;
    padding: 56px 48px;
    gap: 44px;
    max-width: 1480px;
    margin: 0 auto;
}

.cmd-category-sidebar {
    width: 150px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding-right: 20px;
}

.cmd-cat-btn {
    background: transparent;
    border: none;
    text-align: left;
    padding: 12px 10px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    position: relative;
    transition: color 0.22s ease, transform 0.22s ease;
}

.cmd-cat-btn:hover {
    color: rgba(255, 255, 255, 0.85);
}

.cmd-cat-btn.is-active {
    color: #ffffff;
    font-weight: 600;
}

.cmd-cat-btn.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 16px;
    background-color: #C8F542;
}

.cmd-vehicles-grid-wrap {
    flex: 1;
}

.cmd-vehicles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.cmd-vehicle-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 6px;
    padding: 20px 20px 18px;
    text-decoration: none;
    color: #ffffff;
    min-height: 158px;
    overflow: hidden;
    transition: border-color 0.28s ease, background-color 0.28s ease, transform 0.28s ease;
}

.cmd-vehicle-card.is-hidden {
    display: none;
}

.cmd-vehicle-card.has-hover-bg-color:hover,
.cmd-drawer-system .cmd-vehicle-card.has-hover-bg-color:hover {
    background-color: var(--cmd-hover-bg-color) !important;
}

.cmd-vehicle-card.has-hover-bg-image:hover,
.cmd-drawer-system .cmd-vehicle-card.has-hover-bg-image:hover {
    background-image: var(--cmd-hover-bg-image) !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

.cmd-vehicle-card.has-static-bg-image::before,
.cmd-vehicle-card.has-hover-bg-image:hover::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(13, 15, 19, 0.45);
    z-index: 0;
    pointer-events: none;
    transition: background-color 0.28s ease;
}

.cmd-vehicle-card.has-static-bg-image:hover::before,
.cmd-vehicle-card.has-hover-bg-image:hover::before {
    background-color: rgba(13, 15, 19, 0.35);
}

.cmd-vehicle-card > .cmd-card-content {
    position: relative;
    z-index: 1;
}

.cmd-vehicle-card:hover {
    background-color: rgba(255, 255, 255, 0.065);
    border-color: rgba(255, 255, 255, 0.34);
    transform: translateY(-2px);
}

.cmd-vehicle-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #C8F542;
    color: #0B0D10;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-bottom-left-radius: 6px;
    z-index: 2;
}

.cmd-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 100%;
}

.cmd-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    z-index: 1;
}

.cmd-veh-title {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.02em;
    line-height: 1.25;
}

.cmd-veh-subtitle {
    margin: 0 0 18px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.35;
}

.cmd-veh-price {
    display: block;
    margin-top: auto;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 400;
}

.cmd-card-image {
    width: 52%;
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.cmd-card-image img {
    width: 100%;
    max-height: 98px;
    object-fit: contain;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cmd-vehicle-card:hover .cmd-card-image img {
    transform: scale(1.06) translateX(-3px);
}

.cmd-hover-bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.28s ease;
    z-index: 0;
    pointer-events: none;
}

.cmd-hover-bg-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(13, 15, 19, 0.38);
}

.cmd-vehicle-card.has-hover-bg-image:hover .cmd-hover-bg-layer {
    opacity: 1;
}

@media (max-width: 1320px) and (min-width: 1025px) {
    .cmd-flyout-inner {
        padding: 40px 28px;
        gap: 24px;
    }
    .cmd-vehicles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
   MOBILE / TABLET EXPERIENCE (<= 1024px)
   Flush-aligned with OFFERS & independently stylable
   ========================================================= */
@media (max-width: 1024px) {
    .cmd-left-flyout {
        display: none !important;
    }

    .cmd-right-drawer {
        padding: 28px 28px 26px;
    }

    .cmd-drawer-top {
        margin-bottom: 28px;
    }

    .cmd-vehicles-trigger-item.is-mobile-open > .cmd-vehicles-trigger {
        color: #E39B38;
    }

    .cmd-mobile-vehicles-accordion {
        display: flex;
        flex-direction: column;
        gap: 8px;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        padding-left: 0;
        margin-left: 0;
        border-left: none;
        width: 100%;
        transition: max-height 0.38s ease, opacity 0.28s ease, margin 0.32s ease;
    }

    .cmd-vehicles-trigger-item.is-mobile-open .cmd-mobile-vehicles-accordion {
        max-height: 2200px;
        opacity: 1;
        margin: 4px 0 14px;
    }

    .cmd-vehicles-trigger-item.is-mobile-open .cmd-chevron {
        transform: rotate(180deg);
        color: #E39B38;
    }

    .cmd-mobile-filter-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 4px;
    }

    .cmd-mobile-cat-btn {
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 3px;
        color: rgba(255, 255, 255, 0.72);
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        padding: 5px 8px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .cmd-mobile-cat-btn.is-active {
        background: #E39B38;
        border-color: #E39B38;
        color: #0B0D10;
    }

    .cmd-mobile-veh-row {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
        padding: 10px 12px;
        background-color: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.10);
        border-radius: 4px;
        text-decoration: none;
        color: #ffffff;
        overflow: hidden;
        transition: border-color 0.22s ease, background-color 0.22s ease;
    }

    .cmd-mobile-veh-row.is-hidden {
        display: none;
    }

    .cmd-mobile-veh-row.has-static-bg-image::before {
        content: "";
        position: absolute;
        inset: 0;
        background-color: rgba(13, 15, 19, 0.56);
        z-index: 0;
        pointer-events: none;
    }

    .cmd-mobile-veh-row > * {
        position: relative;
        z-index: 1;
    }

    .cmd-mobile-veh-row:hover {
        border-color: rgba(255, 255, 255, 0.28);
    }

    .cmd-mobile-veh-meta {
        flex: 1;
        min-width: 0;
    }

    .cmd-mobile-veh-header {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
        margin-bottom: 2px;
    }

    .cmd-mobile-veh-title {
        display: inline-block;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #ffffff;
        line-height: 1.25;
    }

    .cmd-mobile-veh-badge {
        display: inline-block;
        background-color: #C8F542;
        color: #0B0D10;
        font-size: 8.5px;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        padding: 2px 5px;
        border-radius: 2px;
        line-height: 1.1;
    }

    .cmd-mobile-veh-subtitle {
        display: block;
        font-size: 10.5px;
        color: rgba(255, 255, 255, 0.62);
        line-height: 1.3;
        margin-bottom: 3px;
    }

    .cmd-mobile-veh-price {
        display: block;
        font-size: 11px;
        color: rgba(255, 255, 255, 0.85);
        font-weight: 500;
        line-height: 1.25;
    }

    .cmd-mobile-veh-img {
        width: 68px;
        height: 42px;
        object-fit: contain;
        flex-shrink: 0;
    }
}
