/* ==========================================================================
   SM EV WHEELS — PREMIUM 3D ECO-GREEN DESIGN SYSTEM
   Modern Sustainable Mobility • 3D Depth • Ambient Animations • Ultra-Responsive
   ========================================================================== */

:root {
    /* Eco-Green Color Identity (Specified by Requirements) */
    --primary-green: #16a34a;          /* Primary vibrant eco green */
    --forest-green: #14532d;           /* Deep automotive forest green */
    --secondary-green: #15803d;        /* Mid eco green */
    --accent-lime: #84cc16;            /* Accent lime green */
    --light-eco: #f0fdf4;              /* Light eco canvas background */
    --white: #ffffff;
    --dark-charcoal: #1f2937;          /* High contrast main text */
    --text-muted: #4b5563;             /* Secondary text */
    --border-eco: rgba(22, 163, 74, 0.16);
    --border-eco-strong: rgba(22, 163, 74, 0.35);

    /* 3D Depth & Lighting Palette (Eco-Green Theme) */
    --smev-bg-darkest: #f0fdf4;
    --smev-bg-dark: #f7fdf9;
    --smev-bg-surface: #ffffff;
    --smev-bg-surface-elevated: #ffffff;
    --smev-bg-surface-hover: #f0fdf4;
    --smev-bg-glass: rgba(255, 255, 255, 0.92);
    --smev-bg-glass-card: rgba(255, 255, 255, 0.96);

    /* Electric Eco & Lime Accents */
    --smev-neon: #16a34a;
    --smev-neon-glow: rgba(22, 163, 74, 0.22);
    --smev-lime: #84cc16;
    --smev-lime-bright: #a3e635;
    --smev-lime-dark: #65a30d;
    --smev-cyan: #059669;
    --smev-silver: #64748b;
    --smev-chrome: #94a3b8;
    --smev-border-metallic: rgba(22, 163, 74, 0.16);
    --smev-border-neon: rgba(22, 163, 74, 0.32);

    /* Text */
    --smev-text-primary: #1f2937;
    --smev-text-secondary: #4b5563;
    --smev-text-muted: #6b7280;

    /* 3D Shadows & Layered Depth */
    --smev-shadow-3d-sm: 0 4px 14px rgba(20, 83, 45, 0.06), 0 1px 3px rgba(20, 83, 45, 0.04);
    --smev-shadow-3d-md: 0 12px 30px rgba(20, 83, 45, 0.08), 0 4px 10px rgba(20, 83, 45, 0.04);
    --smev-shadow-3d-lg: 0 20px 48px rgba(20, 83, 45, 0.12), 0 8px 18px rgba(20, 83, 45, 0.06);
    --smev-shadow-neon: 0 0 25px rgba(22, 163, 74, 0.2), 0 8px 24px rgba(20, 83, 45, 0.08);

    /* Perspective Settings */
    --smev-perspective: 1000px;
}

/* ==========================================================================
   GLOBAL ECO-GREEN THEME BASE
   ========================================================================== */

body {
    background-color: var(--light-eco) !important;
    color: var(--dark-charcoal) !important;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    position: relative;
}

/* Eco Section Glows */
.smev-section-glow {
    position: relative;
}
.smev-section-glow::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 90px;
    background: radial-gradient(ellipse at center, rgba(132, 204, 22, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Section Header 3D Styling */
.smev-3d-title-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid rgba(22, 163, 74, 0.28);
    color: var(--primary-green);
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 14px;
    box-shadow: 0 2px 10px rgba(22, 163, 74, 0.12);
}

.smev-3d-heading {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    color: var(--forest-green);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.smev-3d-heading span {
    background: linear-gradient(135deg, var(--forest-green) 0%, var(--primary-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.smev-3d-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 680px;
    margin: 10px auto 0;
    line-height: 1.7;
}

/* Utility class for constraining hero subtitle width on large screens */
.max-w-650 {
    max-width: 650px;
}

/* ==========================================================================
   NAVIGATION & HEADER (ECO-GREEN IDENTITY)
   ========================================================================== */

.navbar-custom {
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-eco) !important;
    box-shadow: 0 2px 12px rgba(20, 83, 45, 0.05);
    transition: all 0.35s ease;
}

.navbar-custom.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 8px 24px rgba(20, 83, 45, 0.08);
    border-bottom: 1px solid var(--border-eco-strong) !important;
}

.brand-text {
    color: var(--forest-green) !important;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.navbar-custom .nav-link {
    color: var(--dark-charcoal) !important;
    font-weight: 600;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--primary-green) !important;
    background: #f0fdf4 !important;
}

/* CRITICAL: Eliminate containing-block entrapment on mobile viewports & enforce z-index */
@media (max-width: 991.98px) {
    .navbar-custom {
        z-index: 1070 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        filter: none !important;
        transform: none !important;
        contain: none !important;
    }

    body.mobile-nav-open .navbar-custom,
    .navbar-custom.open,
    .navbar-custom:has(.navbar-collapse.open),
    .navbar-custom:has(.navbar-collapse.show) {
        z-index: 1080 !important;
    }

    .mobile-nav-backdrop {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 1060 !important;
        background: rgba(20, 83, 45, 0.45) !important;
        backdrop-filter: blur(5px) !important;
        -webkit-backdrop-filter: blur(5px) !important;
        transition: opacity 0.3s ease, visibility 0.3s ease !important;
    }

    .navbar-custom .navbar-collapse,
    #navbarNav {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: 320px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: #ffffff !important;
        background-color: #ffffff !important;
        z-index: 1090 !important;
        box-shadow: -10px 0 35px rgba(20, 83, 45, 0.22) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .navbar-custom .navbar-collapse .nav-link,
    .navbar-custom .navbar-collapse.open .nav-link,
    .navbar-custom .navbar-collapse.show .nav-link {
        color: #1f2937 !important;
        display: flex !important;
        align-items: center !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .navbar-custom .navbar-collapse .nav-link i,
    .navbar-custom .navbar-collapse.open .nav-link i,
    .navbar-custom .navbar-collapse.show .nav-link i {
        color: var(--primary-green) !important;
        display: inline-block !important;
        visibility: visible !important;
    }
}

/* ==========================================================================
   CINEMATIC 3D HERO SECTION (ECO-GREEN AMBIENCE)
   ========================================================================== */

.hero-3d-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 75% 35%, rgba(132, 204, 22, 0.16) 0%, transparent 55%),
                radial-gradient(circle at 20% 75%, rgba(22, 163, 74, 0.12) 0%, transparent 45%),
                var(--light-eco);
    overflow: hidden;
    padding: 60px 0;
}

.hero-3d-grid-bg {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(22, 163, 74, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 163, 74, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
    pointer-events: none;
}

.hero-3d-card-stage {
    perspective: var(--smev-perspective);
    transform-style: preserve-3d;
    position: relative;
    padding: 20px;
}

.hero-3d-scooter-wrapper {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-3d-scooter-wrapper:hover {
    transform: rotateY(-6deg) rotateX(4deg) translateZ(20px);
}

.hero-3d-img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 25px 35px rgba(20, 83, 45, 0.25)) drop-shadow(0 0 35px rgba(132, 204, 22, 0.18));
    position: relative;
    z-index: 2;
    animation: floatScooter 6s ease-in-out infinite;
}

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

.hero-3d-ground-shadow {
    position: absolute;
    bottom: -20px;
    left: 10%;
    width: 80%;
    height: 35px;
    background: radial-gradient(ellipse at center, rgba(22, 163, 74, 0.25) 0%, rgba(20, 83, 45, 0.15) 40%, transparent 75%);
    border-radius: 50%;
    filter: blur(8px);
    z-index: 1;
}

/* Floating Spec Badges on 3D Hero */
.hero-floating-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(22, 163, 74, 0.25);
    box-shadow: 0 12px 30px rgba(20, 83, 45, 0.12);
    border-radius: 16px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 3;
    animation: badgeFloat 5s ease-in-out infinite;
}

.hero-floating-badge.badge-top-left {
    top: 10%;
    left: -5%;
}

.hero-floating-badge.badge-bottom-right {
    bottom: 12%;
    right: -5%;
    animation-delay: -2.5s;
}

@keyframes badgeFloat {
    0%, 100% { transform: translateY(0) translateZ(30px); }
    50% { transform: translateY(-8px) translateZ(30px); }
}

.hero-badge-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #f0fdf4;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.12);
}

.hero-badge-info h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--forest-green);
}

.hero-badge-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ==========================================================================
   BUTTONS WITH 3D DEPTH (ECO-GREEN IDENTITY)
   ========================================================================== */

.btn-3d-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    border: none;
    box-shadow: 0 10px 25px rgba(22, 163, 74, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.35);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-3d-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 35px rgba(22, 163, 74, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.5);
    color: #ffffff !important;
}

.btn-3d-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
    color: var(--forest-green) !important;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    border: 1.5px solid rgba(22, 163, 74, 0.28);
    box-shadow: 0 6px 18px rgba(20, 83, 45, 0.08);
    transition: all 0.3s ease;
}

.btn-3d-secondary:hover {
    background: #f0fdf4;
    border-color: var(--primary-green);
    color: var(--primary-green) !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(20, 83, 45, 0.12);
}

/* ==========================================================================
   3D PRODUCT & SCOOTER CARDS (CRISP WHITE ON LIGHT ECO)
   ========================================================================== */

.smev-3d-card {
    background: #ffffff;
    border: 1px solid var(--border-eco);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--smev-shadow-3d-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.smev-3d-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--smev-shadow-3d-lg), 0 0 25px rgba(22, 163, 74, 0.15);
    border-color: var(--border-eco-strong);
}

.smev-card-img-wrap {
    position: relative;
    height: 240px;
    background: radial-gradient(circle at center, rgba(132, 204, 22, 0.12) 0%, rgba(240, 253, 244, 0.85) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.smev-card-img-wrap img {
    max-height: 200px;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    filter: drop-shadow(0 12px 18px rgba(20, 83, 45, 0.18));
}

.smev-3d-card:hover .smev-card-img-wrap img {
    transform: scale(1.08) rotate(-1deg);
}

.smev-card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #ffffff;
    color: var(--primary-green);
    border: 1px solid rgba(22, 163, 74, 0.35);
    box-shadow: 0 2px 8px rgba(20, 83, 45, 0.1);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    z-index: 2;
}

.smev-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.smev-card-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--forest-green);
    margin-bottom: 6px;
    line-height: 1.3;
}

.smev-card-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Specs Strip */
.smev-specs-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px 10px;
    background: #f0fdf4;
    border-radius: 12px;
    border: 1px solid rgba(22, 163, 74, 0.14);
}

.smev-spec-item {
    text-align: center;
}

.smev-spec-item i {
    color: var(--primary-green);
}

.spec-val {
    color: var(--forest-green);
    font-weight: 700;
}

.spec-lbl {
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.smev-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-eco);
    margin-top: auto;
}

.smev-price-lbl {
    font-size: 0.74rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.smev-price-num {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--forest-green);
}

.smev-card-actions {
    display: flex;
    gap: 8px;
}

.btn-card-view {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--forest-green);
    background: #f0fdf4;
    text-decoration: none;
    border: 1px solid rgba(22, 163, 74, 0.2);
    transition: all 0.2s;
}

.btn-card-view:hover {
    background: rgba(22, 163, 74, 0.15);
    color: var(--forest-green);
}

.btn-card-enquire {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--primary-green);
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
    transition: all 0.2s;
}

.btn-card-enquire:hover {
    background: #15803d;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ==========================================================================
   DYNAMIC PARTS & COMPONENTS SHOWCASE (ECO-GREEN PALETTE)
   ========================================================================== */

.parts-section-3d {
    background: linear-gradient(180deg, var(--light-eco) 0%, #ffffff 50%, var(--light-eco) 100%);
    padding: 90px 0;
    position: relative;
}

/* Part Card */
.part-3d-card {
    background: #ffffff;
    border: 1px solid var(--border-eco);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--smev-shadow-3d-sm);
    transition: all 0.35s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.part-3d-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-eco-strong);
    box-shadow: var(--smev-shadow-3d-md), 0 0 25px rgba(22, 163, 74, 0.12);
}

.part-img-wrap {
    height: 200px;
    background: radial-gradient(circle at center, rgba(132, 204, 22, 0.1) 0%, rgba(240, 253, 244, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
}

.part-img-wrap img {
    max-height: 160px;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    filter: drop-shadow(0 10px 15px rgba(20, 83, 45, 0.15));
}

.part-3d-card:hover .part-img-wrap img {
    transform: scale(1.08);
}

.part-badge-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ffffff;
    border: 1px solid rgba(22, 163, 74, 0.25);
    color: var(--primary-green);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    box-shadow: 0 2px 6px rgba(20, 83, 45, 0.06);
}

.part-badge-stock {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
}

.badge-stock-in { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.badge-stock-low { background: #fef9c3; color: #a16207; border: 1px solid #fde047; }
.badge-stock-out { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.badge-stock-demand { background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }

.part-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.part-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--forest-green);
    margin-bottom: 6px;
    line-height: 1.4;
}

.part-name a {
    color: var(--forest-green) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.part-name a:hover {
    color: var(--primary-green) !important;
}

.part-code-sku {
    font-size: 0.72rem;
    font-family: monospace;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.part-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.part-compatibility-tag {
    font-size: 0.75rem;
    background: #f0fdf4;
    border-left: 3px solid var(--primary-green);
    padding: 6px 10px;
    border-radius: 4px;
    color: #15803d;
    margin-bottom: 14px;
    font-weight: 600;
}

.part-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-eco);
}

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

.part-price-current {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-green);
}

.part-price-original {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* ==========================================================================
   INDIVIDUAL PRODUCT (SCOOTER.PHP) SHOWCASE
   ========================================================================== */

.product-showcase-section {
    padding: 60px 0 90px;
    background: radial-gradient(circle at 40% 20%, rgba(132, 204, 22, 0.1) 0%, transparent 45%),
                var(--light-eco);
}

.product-hero-card {
    background: #ffffff;
    border: 1px solid var(--border-eco);
    border-radius: 28px;
    padding: 40px;
    box-shadow: var(--smev-shadow-3d-lg);
    position: relative;
    overflow: hidden;
}

.product-gallery-stage {
    position: relative;
    min-height: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: radial-gradient(circle at center, rgba(132, 204, 22, 0.12) 0%, rgba(240, 253, 244, 0.9) 100%);
    border: 1px solid var(--border-eco);
    padding: 30px;
}

.product-main-3d-image {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(20, 83, 45, 0.2));
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.product-gallery-stage:hover .product-main-3d-image {
    transform: scale(1.05) translateY(-5px);
}

.product-thumbnails-row {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.product-thumb-item {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    background: #f0fdf4;
    border: 2px solid transparent;
    padding: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-thumb-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-thumb-item:hover,
.product-thumb-item.active {
    border-color: var(--primary-green);
    background: #ffffff;
    box-shadow: 0 0 15px rgba(22, 163, 74, 0.25);
}

/* Spec Matrix Cards */
.spec-matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin: 24px 0;
}

.spec-matrix-box {
    background: #f0fdf4;
    border: 1px solid var(--border-eco);
    border-radius: 16px;
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.spec-matrix-box:hover {
    border-color: var(--primary-green);
    background: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(20, 83, 45, 0.08);
}

.spec-box-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #ffffff;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(20, 83, 45, 0.06);
}

.spec-box-lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: block;
}

.spec-box-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--forest-green);
    margin-top: 2px;
}

/* ==========================================================================
   DEALERSHIP CALL TO ACTION CARD
   ========================================================================== */

.dealership-cta-card {
    background: linear-gradient(135deg, #14532d 0%, #15803d 60%, #16a34a 100%);
    border: 1px solid rgba(132, 204, 22, 0.35);
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: 0 25px 60px rgba(20, 83, 45, 0.25), 0 0 35px rgba(22, 163, 74, 0.15);
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.dealership-cta-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(132, 204, 22, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

/* ==========================================================================
   ECO-GREEN AMBIENT BACKGROUND ANIMATIONS
   Lightweight, GPU-Accelerated, Non-blocking (pointer-events: none)
   ========================================================================== */

.eco-animated-bg {
    position: fixed;
    inset: 0;
    pointer-events: none !important;
    z-index: -1;
    overflow: hidden;
    opacity: 0.85;
}

.eco-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    -webkit-filter: blur(60px);
    pointer-events: none !important;
    will-change: transform, opacity;
}

.eco-orb-1 {
    width: 450px;
    height: 450px;
    top: -80px;
    right: -80px;
    background: radial-gradient(circle, rgba(132, 204, 22, 0.15) 0%, rgba(22, 163, 74, 0.05) 70%, transparent 100%);
    animation: floatEcoOrb1 18s ease-in-out infinite;
}

.eco-orb-2 {
    width: 500px;
    height: 500px;
    bottom: -100px;
    left: -100px;
    background: radial-gradient(circle, rgba(22, 163, 74, 0.14) 0%, rgba(20, 83, 45, 0.04) 70%, transparent 100%);
    animation: floatEcoOrb2 22s ease-in-out infinite;
    animation-delay: -5s;
}

.eco-orb-3 {
    width: 320px;
    height: 320px;
    top: 45%;
    left: 20%;
    background: radial-gradient(circle, rgba(132, 204, 22, 0.09) 0%, transparent 70%);
    animation: pulseEcoGlow 14s ease-in-out infinite alternate;
}

/* Floating Eco Leaf Shapes */
.eco-leaf-floater {
    position: absolute;
    width: 38px;
    height: 38px;
    border-radius: 70% 0 70% 0;
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.12), rgba(132, 204, 22, 0.08));
    border: 1px solid rgba(22, 163, 74, 0.15);
    pointer-events: none !important;
    will-change: transform;
}

.eco-leaf-1 {
    top: 25%;
    right: 8%;
    animation: floatLeaf1 16s ease-in-out infinite;
}

.eco-leaf-2 {
    top: 65%;
    left: 6%;
    width: 28px;
    height: 28px;
    animation: floatLeaf2 20s ease-in-out infinite;
    animation-delay: -7s;
}

.eco-leaf-3 {
    top: 85%;
    right: 18%;
    width: 22px;
    height: 22px;
    animation: floatLeaf1 14s ease-in-out infinite;
    animation-delay: -3s;
}

@keyframes floatEcoOrb1 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-40px, 60px, 0) scale(1.12); }
}

@keyframes floatEcoOrb2 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(50px, -50px, 0) scale(1.08); }
}

@keyframes pulseEcoGlow {
    0% { transform: translate3d(0, 0, 0) scale(0.9); opacity: 0.35; }
    100% { transform: translate3d(30px, -30px, 0) scale(1.15); opacity: 0.7; }
}

@keyframes floatLeaf1 {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    50% { transform: translate3d(-25px, -35px, 0) rotate(25deg); }
}

@keyframes floatLeaf2 {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    50% { transform: translate3d(30px, 40px, 0) rotate(-30deg); }
}

/* ==========================================================================
   RESPONSIVENESS & ACCESSIBILITY
   ========================================================================== */

@media (max-width: 991px) {
    .hero-3d-section {
        padding: 40px 0;
        min-height: auto;
    }
    .hero-floating-badge {
        display: none;
    }
    .product-hero-card {
        padding: 24px;
    }
    .product-gallery-stage {
        min-height: 320px;
    }
}

@media (max-width: 768px) {
    .eco-leaf-floater {
        display: none !important;
    }
    .eco-orb-3 {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .smev-3d-heading {
        font-size: 1.9rem;
    }
    .spec-matrix-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .smev-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .smev-card-actions {
        width: 100%;
    }
    .btn-card-view, .btn-card-enquire {
        flex: 1;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   HOME PAGE — COMPREHENSIVE MOBILE RESPONSIVENESS
   Only targets index.php sections. Desktop layout (≥992px) is UNCHANGED.
   ========================================================================== */

/* ── TABLET (≤ 991.98px) ─────────────────────────────────────────────────── */
@media (max-width: 991.98px) {

    /* Prevent any section from causing horizontal overflow */
    .home-page-main,
    .hero-section,
    .hero-3d-section,
    .parts-section-3d,
    section {
        overflow-x: hidden !important;
        max-width: 100vw;
    }

    /* Hero Slider height */
    .hero-slider-container {
        height: clamp(500px, 68vh, 620px) !important;
        max-height: 620px !important;
    }

    /* Slider content row — override Bootstrap min-vh-75 */
    .hero-slide-content-wrap .row.min-vh-75,
    .hero-slide-content-wrap .row {
        min-height: auto !important;
        height: 100% !important;
        padding: 3rem 0;
    }

    /* Hero 3D fallback section — badges already hidden via existing rule */
    .hero-3d-section {
        padding: 50px 0 40px;
        min-height: auto;
    }

    /* Section padding reduction */
    .parts-section-3d {
        padding: 50px 0 !important;
    }

    /* Powertrain section row gap handled via Bootstrap g-4 g-lg-5 in markup */

    /* Dealership CTA card */
    .dealership-cta-card {
        padding: 36px 28px !important;
    }

    /* Section headings — slightly smaller on tablets */
    .smev-3d-heading {
        font-size: clamp(1.7rem, 4.5vw, 2.8rem) !important;
    }
}

/* ── PHABLETS / LARGE PHONES (≤ 767.98px) ───────────────────────────────── */
@media (max-width: 767.98px) {

    /* Hero Slider */
    .hero-slider-container {
        height: clamp(420px, 62vh, 540px) !important;
        max-height: 540px !important;
    }

    /* Hero slide content: stack buttons */
    .hero-slide-buttons {
        flex-direction: column !important;
        gap: 0.6rem !important;
        width: 100% !important;
    }
    .hero-slide-buttons .btn-3d-primary,
    .hero-slide-buttons .btn-3d-secondary {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Hero 3D fallback — fix metric h4 readability on light background */
    .hero-3d-section h4.text-white {
        color: var(--forest-green) !important;
        font-size: 1.15rem !important;
    }

    /* Hero fallback button row */
    .hero-3d-section .d-flex.gap-3.flex-wrap {
        flex-direction: column;
        gap: 0.6rem !important;
    }
    .hero-3d-section .d-flex.gap-3.flex-wrap .btn-3d-primary,
    .hero-3d-section .d-flex.gap-3.flex-wrap .btn-3d-secondary {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Brand advantage cards — ensure text does not clip */
    .smev-3d-card.p-4.text-center {
        padding: 20px 16px !important;
    }

    /* Scooter card image area */
    .smev-card-img-wrap {
        height: 200px !important;
    }
    .smev-card-img-wrap img {
        max-height: 165px !important;
    }

    /* Scooter card body padding */
    .smev-card-body {
        padding: 16px 14px !important;
    }

    /* Specs strip values — prevent overflow on small cards */
    .spec-val {
        font-size: 0.82rem !important;
        word-break: break-word;
    }
    .spec-lbl {
        font-size: 0.65rem !important;
    }
    .smev-spec-item {
        padding: 0 2px;
    }

    /* Parts section */
    .parts-section-3d {
        padding: 40px 0 !important;
    }
    .part-img-wrap {
        height: 180px !important;
    }
    .part-img-wrap img {
        max-height: 145px !important;
    }
    /* Prevent badge overflow in parts cards */
    .part-badge-category,
    .part-badge-stock {
        max-width: 48%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .part-body {
        padding: 16px 14px !important;
    }

    /* Dealership CTA */
    .dealership-cta-card {
        padding: 28px 20px !important;
    }
    .dealership-cta-card h2.display-6 {
        font-size: clamp(1.4rem, 5vw, 1.85rem) !important;
    }
    .dealership-cta-card .fs-5 {
        font-size: 0.95rem !important;
    }
    .dealership-cta-card .col-lg-4 {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }
    .dealership-cta-card .col-lg-4 .btn-3d-primary,
    .dealership-cta-card .col-lg-4 .btn-3d-secondary {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Blog cards — image height */
    .smev-3d-card [style*="height: 200px"] {
        height: 170px !important;
    }

    /* Section headings */
    .smev-3d-heading {
        font-size: clamp(1.5rem, 5vw, 2.2rem) !important;
    }
    .smev-3d-subtitle {
        font-size: 0.95rem !important;
    }

    /* Section view-all link: full width on phablet */
    .d-flex.justify-content-between.align-items-end.flex-wrap {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    /* General section padding reduction */
    section.py-5 > .container.py-4 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* ── MOBILE PHONES (≤ 575.98px) ─────────────────────────────────────────── */
@media (max-width: 575.98px) {

    /* Hero Slider */
    .hero-slider-container {
        height: clamp(460px, 78vh, 560px) !important;
        min-height: 460px !important;
        max-height: 560px !important;
    }

    /* Slider title & subtitle */
    .hero-slide-title {
        font-size: clamp(1.5rem, 5.5vw, 2.1rem) !important;
        line-height: 1.25 !important;
    }
    .hero-slide-subtitle {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        -webkit-line-clamp: 3 !important;
    }

    /* Hero Fallback — image hidden to save space */
    .hero-3d-section .col-lg-6:last-child {
        display: none !important;
    }
    .hero-3d-section .col-lg-6:first-child {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    /* Section headings fluid scaling */
    .smev-3d-heading {
        font-size: clamp(1.4rem, 5.5vw, 1.85rem) !important;
    }

    /* Brand advantage cards — collapse icon size on very small screens */
    .hero-badge-icon[style*="width: 58px"] {
        width: 46px !important;
        height: 46px !important;
        font-size: 1.2rem !important;
    }

    /* Scooter cards */
    .smev-card-img-wrap {
        height: 185px !important;
    }
    .smev-card-body {
        padding: 14px 12px !important;
    }
    .smev-card-title {
        font-size: 1.15rem !important;
    }

    /* Specs strip — wrap text safely */
    .smev-specs-strip {
        gap: 6px !important;
        padding: 10px 8px !important;
    }
    .spec-val {
        font-size: 0.78rem !important;
        display: block;
        word-break: break-word;
    }
    .spec-lbl {
        font-size: 0.62rem !important;
    }

    /* Scooter card footer — vertical layout */
    .smev-card-footer {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .smev-price-block {
        text-align: left;
    }
    .smev-card-actions {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
    }
    .btn-card-view,
    .btn-card-enquire {
        flex: 1 !important;
        text-align: center !important;
        justify-content: center !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    /* Parts section */
    .parts-section-3d {
        padding: 32px 0 !important;
    }
    .part-img-wrap {
        height: 165px !important;
    }

    /* Part footer — wrap price and actions cleanly */
    .part-footer {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    .part-footer .d-flex.gap-2 {
        width: 100% !important;
    }
    .part-footer .d-flex.gap-2 .btn-card-view,
    .part-footer .d-flex.gap-2 .btn-card-enquire {
        flex: 1 !important;
        text-align: center !important;
        justify-content: center !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    /* Dealership CTA */
    .dealership-cta-card {
        padding: 24px 16px !important;
        border-radius: 18px !important;
    }
    .dealership-cta-card h2.display-6 {
        font-size: clamp(1.3rem, 5vw, 1.65rem) !important;
        line-height: 1.3 !important;
    }
    .dealership-cta-card .fs-5 {
        font-size: 0.9rem !important;
    }

    /* CTA buttons — stacked full width */
    .dealership-cta-card .col-lg-4,
    .dealership-cta-card .d-flex.gap-3.justify-content-lg-end.flex-wrap {
        flex-direction: column !important;
        gap: 0.65rem !important;
        width: 100% !important;
    }
    .dealership-cta-card .btn-3d-primary,
    .dealership-cta-card .btn-3d-secondary {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Parts & Scooters "View All" buttons — full width */
    .btn-3d-secondary.mt-3 {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Fix section padding on mobile */
    section.py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    section.py-5 > .container.py-4 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    /* Blog card image */
    .smev-3d-card [style*="height: 200px"] {
        height: 150px !important;
    }

    /* max-w-650 helper */
    .max-w-650 {
        max-width: 100% !important;
    }
}

