/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #cc0000;
    --dark-bg: #1a1a1a;
    --text-dark: #333;
    --text-light: #fff;
    --border-color: #eee;
    --font-family: 'Inter', sans-serif;
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    line-height: 1.5;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Top Bar */
.top-bar {
    background: #000;
    color: #fff;
    font-size: 12px;
    padding: 8px 0;
    font-weight: 600;
}

.top-bar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar__features {
    display: flex;
    gap: 30px;
}

.top-bar__features i {
    color: var(--primary-color);
    margin-right: 5px;
}

.top-bar__user a:hover {
    color: var(--primary-color);
}

/* Header */
.header {
    background: #fff;
    padding: 20px 0;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header__logo img {
    max-width: 250px;
    height: auto;
}

.header__search {
    flex: 1;
    max-width: 600px;
}

.search-form {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.search-form input {
    flex: 1;
    border: none;
    padding: 12px 15px;
    outline: none;
    font-size: 14px;
}

.search-form button {
    background: #fff;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    color: #666;
    border-left: 1px solid #ddd;
}

.header__cart a {
    display: flex;
    align-items: center;
    font-size: 24px;
    position: relative;
    color: #333;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

/* Navigation */
.main-nav {
    background: #222;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.main-nav__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
}

.nav-link {
    display: block;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    transition: background 0.3s;
}

.nav-item.has-dropdown .nav-link {
    background: #111;
}

.nav-link.active, .nav-link:hover {
    color: var(--primary-color);
}

.nav-item.has-dropdown .nav-link.active {
    color: #fff;
    border-left: 3px solid var(--primary-color);
}

.garage a {
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.garage .sub-text {
    font-weight: normal;
    color: #aaa;
    font-size: 12px;
}

/* Hero */
.hero {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 80px 0;
    text-align: center;
    color: #fff;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero__content {
    position: relative;
    z-index: 2;
}

.hero__subtitle {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.hero__title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.hero__desc {
    font-size: 16px;
    margin-bottom: 30px;
}

.vehicle-selector {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 4px;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.vehicle-selector select {
    padding: 12px 20px;
    border: none;
    border-radius: 2px;
    min-width: 150px;
    outline: none;
}

.btn-filter {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 2px;
}

.hero__bottom-links {
    margin-top: 20px;
    font-size: 14px;
    font-weight: bold;
}

.hero__bottom-links a {
    margin: 0 10px;
    color: #fff;
}

/* Promos */
.promos {
    display: flex;
    gap: 20px;
    margin-top: -30px;
    position: relative;
    z-index: 3;
}

.promo-box {
    flex: 1;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 30px;
    border-bottom: 3px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.promo-box__content {
    flex: 1;
}

.promo-box h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.promo-box p {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 20px;
}

.promo-link {
    display: inline-block;
    color: #fff;
    font-size: 18px;
}

.promo-img {
    max-width: 150px;
    height: auto;
}

/* Categories */
.categories-section {
    padding: 50px 0;
    background: #fff;
    margin-top: 30px;
}

.section-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
    overflow-x: auto;
}

.section-tabs .tab {
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.section-tabs .tab.active, .section-tabs .tab:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.category-item {
    border: 1px solid var(--border-color);
    text-align: center;
    padding: 20px;
    transition: all 0.3s ease;
    background: #fff;
    border-radius: 4px;
}

.category-item:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.category-item img {
    max-width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 15px;
}

.category-item span {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

/* Brands */
.brands-section {
    padding: 40px 0;
    background: #fff;
    margin-top: 30px;
}

.section-title {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    font-style: italic;
    margin-bottom: 30px;
    color: #333;
}

.section-title span {
    color: var(--primary-color);
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.brand-item {
    border: 1px solid var(--border-color);
    padding: 20px 10px;
    text-align: center;
    font-weight: 800;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    background: #fff;
}

.view-all {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    margin-top: 20px;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 20px;
}

/* Products Section */
.products-section {
    padding: 40px 0;
    background: #fff;
    margin-top: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header .section-title {
    margin-bottom: 0;
}

.slider-arrows button {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    margin-left: 10px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    border: 1px solid var(--border-color);
    padding: 20px;
    position: relative;
    background: #fff;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    z-index: 2;
}

.product-img-wrap {
    position: relative;
    text-align: center;
    margin-bottom: 15px;
}

.product-img-wrap img {
    max-width: 100%;
    height: 180px;
    object-fit: contain;
}

.btn-quickview {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #f5f5f5;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .btn-quickview {
    opacity: 1;
}

.product-info {
    text-align: left;
}

.product-brand {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 15px;
    height: 42px;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.price {
    font-weight: 700;
    font-size: 16px;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 12px;
}

.discount {
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 2px;
    font-weight: bold;
}

.btn-add-cart {
    display: block;
    width: 100%;
    margin-top: 15px;
    background: #000;
    color: #fff;
    border: none;
    padding: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-add-cart:hover {
    background: var(--primary-color);
}


/* Newsletter */
.newsletter-bar {
    background: var(--primary-color);
    padding: 30px 0;
    margin-top: 40px;
    color: #fff;
}

.newsletter__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.newsletter__text h3 {
    font-size: 24px;
    font-weight: 800;
    font-style: italic;
    margin-bottom: 5px;
}

.newsletter__text p {
    font-size: 14px;
}

.newsletter__form form {
    display: flex;
    width: 400px;
    max-width: 100%;
    position: relative;
}

.newsletter__form form .parsley-errors-list {
    position: absolute;
    bottom: -22px;
    left: 0;
    color: #fff;
    font-size: 13px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-weight: bold;
}

.newsletter__form input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    color: #fff;
    outline: none;
}

.newsletter__form input::placeholder {
    color: rgba(255,255,255,0.7);
}

.newsletter__form button {
    background: #111;
    color: #fff;
    border: none;
    padding: 0 25px;
    font-weight: bold;
    cursor: pointer;
}

/* Footer */
.footer {
    background: #222;
    color: #ccc;
    padding: 60px 0 20px;
    font-size: 13px;
}

.footer__inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: bold;
}

.footer-contact {
    margin-top: 20px;
}

.footer-contact p {
    margin-bottom: 15px;
}

.footer-contact i {
    color: var(--primary-color);
    margin-right: 5px;
}

.footer-contact strong {
    color: #fff;
    display: block;
    margin-top: 5px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer__bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
}

.footer__bottom p {
    margin-bottom: 20px;
    font-size: 12px;
    line-height: 1.6;
}

.footer__copyright {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #888;
}

/* Responsive */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 992px) {
    .brand-grid { grid-template-columns: repeat(4, 1fr); }
    .product-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .footer__inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .top-bar__features span { display: none; }
    .top-bar__features span:first-child { display: inline; }
    
    .header__inner {
        flex-wrap: wrap;
    }
    .header__logo { order: 1; flex: 1; }
    .header__logo img { max-width: 180px; }
    .header__cart { order: 2; margin-left: auto; }
    .header__search { order: 3; width: 100%; max-width: 100%; margin-top: 15px; flex-basis: 100%; }

    .main-nav__inner { position: relative; }
    .mobile-menu-btn { display: block; padding: 15px; }
    
    .nav-links { 
        display: none; 
        flex-direction: column; 
        width: 100%; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        background: #222; 
        z-index: 50; 
        max-height: 80vh;
        overflow-y: auto;
    }
    .nav-links.show { display: flex; }
    
    .promos { flex-direction: column; }
    .newsletter__inner { flex-direction: column; text-align: center; }
    .newsletter__form form { width: 100%; }
    
    .vehicle-selector { flex-direction: column; width: 100%; }
    .vehicle-selector select, .vehicle-selector button { width: 100%; }
    
    /* Mega Menu Mobile Fixes */
    .mega-menu {
        position: static;
        width: 100%;
        display: none;
        flex-direction: column;
        box-shadow: none;
        border-top: none;
    }
    .nav-item.has-dropdown:hover .mega-menu,
    .nav-item.has-dropdown.active .mega-menu {
        display: flex;
    }
    .mega-menu-sidebar {
        width: 100%;
        border-right: none;
        background: #333;
    }
    .mega-menu-categories {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    .mega-menu-categories::-webkit-scrollbar {
        display: none; /* Safari and Chrome */
    }
    .mega-menu-category-item {
        border-bottom: none;
        border-right: 1px solid #444;
    }
    .mega-menu-category-item a {
        color: #fff;
        padding: 12px 15px;
    }
    .mega-menu-category-item:hover a, 
    .mega-menu-category-item.active a {
        background: #444;
        color: var(--primary-color);
    }
    .mega-menu-content {
        min-height: auto;
        padding: 15px;
        background: #222;
    }
    .mega-menu-product {
        color: #fff;
    }
    .mega-menu-product:hover {
        background: #333;
    }
    .mega-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .brand-grid { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: 1fr !important; }
    .footer__inner { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
}



/* ==========================================================================
   Inner Pages (Products, Cart, Checkout) Styles restored and enhanced
   ========================================================================== */

/* Page Headers */
.page-header { 
    background: #1a1a1a; 
    padding: 40px 0; 
    color: #fff; 
    text-align: center; 
    box-shadow: inset 0 -5px 15px rgba(0,0,0,0.5);
}
.page-header h1 { 
    font-size: 32px; 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 2px;
}

/* Products Layout (products.php) */
.products-layout { 
    display: flex; 
    gap: 30px; 
    padding: 40px 0; 
    align-items: flex-start;
}

.sidebar { 
    width: 250px; 
    flex-shrink: 0; 
    background: #fff; 
    padding: 25px; 
    border: 1px solid #ddd; 
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.filter-group { margin-bottom: 25px; }
.filter-group h4 { 
    font-size: 16px; 
    margin-bottom: 15px; 
    border-bottom: 2px solid var(--primary-color); 
    padding-bottom: 8px; 
    text-transform: uppercase;
}
.filter-option { 
    display: flex; 
    align-items: center; 
    margin-bottom: 12px; 
    cursor: pointer; 
    font-size: 14px;
    transition: color 0.2s;
}
.filter-option:hover { color: var(--primary-color); }
.filter-option input { margin-right: 12px; transform: scale(1.1); }

.products-main { flex: 1; }
.products-topbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
    padding: 15px 20px; 
    background: #fff; 
    border: 1px solid #ddd; 
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.results-count { font-weight: bold; font-size: 16px; }
.results-count span { color: var(--primary-color); }
.sort-by select { 
    padding: 8px 12px; 
    border: 1px solid #ddd; 
    outline: none; 
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

/* Cart & Checkout Layout */
.cart-container, .checkout-container { 
    display: flex; 
    gap: 30px; 
    padding: 50px 0; 
    align-items: flex-start; 
}
.cart-items, .checkout-form { 
    flex: 2; 
    background: #fff; 
    padding: 30px; 
    border: 1px solid #ddd; 
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.cart-summary, .checkout-summary { 
    flex: 1; 
    background: #fcfcfc; 
    padding: 30px; 
    border: 1px solid #ddd; 
    position: sticky; 
    top: 20px; 
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.cart-item { 
    display: flex; 
    align-items: center; 
    border-bottom: 1px solid #eee; 
    padding-bottom: 25px; 
    margin-bottom: 25px; 
}
.cart-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.cart-item img { 
    width: 120px; 
    height: 120px; 
    object-fit: contain; 
    border: 1px solid #eee; 
    padding: 10px; 
    margin-right: 25px; 
    border-radius: 4px;
}
.cart-item-details { flex: 1; }
.cart-item-title { font-size: 16px; font-weight: bold; margin-bottom: 10px; color: #333; }
.cart-item-price { font-size: 20px; color: var(--primary-color); font-weight: bold; margin-bottom: 15px; }

.qty-controls { display: flex; align-items: center; }
.qty-controls button { 
    width: 35px; 
    height: 35px; 
    background: #f5f5f5; 
    border: 1px solid #ddd; 
    cursor: pointer; 
    font-weight: bold;
    transition: 0.2s;
}
.qty-controls button:hover { background: #e5e5e5; }
.qty-controls input { 
    width: 50px; 
    height: 35px; 
    text-align: center; 
    border: 1px solid #ddd; 
    border-left: none; 
    border-right: none; 
    font-weight: bold;
}
.btn-remove { 
    background: none !important; 
    border: none !important; 
    color: #999; 
    font-size: 14px; 
    cursor: pointer; 
    margin-left: 20px; 
    width: auto !important;
}
.btn-remove:hover { color: var(--primary-color); }

.summary-row { display: flex; justify-content: space-between; margin-bottom: 15px; font-size: 16px; color: #555; }
.summary-row.total { font-size: 22px; font-weight: 800; border-top: 2px solid #ddd; padding-top: 20px; margin-top: 20px; color: #000; }
.summary-row.total span:last-child { color: var(--primary-color); }

.btn-checkout, .btn-pay { 
    display: block; 
    width: 100%; 
    background: var(--primary-color); 
    color: #fff; 
    padding: 16px; 
    text-align: center; 
    font-size: 18px; 
    font-weight: 800; 
    border: none; 
    cursor: pointer; 
    margin-top: 25px; 
    transition: 0.3s; 
    border-radius: 4px;
    letter-spacing: 1px;
}
.btn-checkout:hover, .btn-pay:hover { background: #000; }

.empty-cart-msg { text-align: center; padding: 50px 0; font-size: 20px; color: #666; font-weight: bold; }
.empty-cart-msg i { font-size: 64px; color: #ddd; margin-bottom: 25px; }

/* Checkout Form */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #333; }
.form-group input, .form-group select { 
    width: 100%; 
    padding: 14px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    font-size: 15px; 
    font-family: inherit; 
    transition: border 0.3s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary-color); outline: none; }
.form-row { display: flex; gap: 20px; }
.form-row .form-group { flex: 1; }

.checkout-title { 
    font-size: 22px; 
    font-weight: 800; 
    margin-bottom: 25px; 
    padding-bottom: 10px; 
    border-bottom: 3px solid var(--primary-color); 
    color: #000;
}

.checkout-summary-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 14px; }
.checkout-summary-item img { width: 60px; height: 60px; object-fit: contain; border: 1px solid #ddd; margin-right: 15px; border-radius: 4px; padding: 5px; background: #fff;}
.summary-total { border-top: 2px solid #ddd; padding-top: 20px; margin-top: 20px; font-size: 22px; font-weight: 800; display: flex; justify-content: space-between; }

.success-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 9999; justify-content: center; align-items: center; }
.success-box { background: #fff; padding: 50px; text-align: center; max-width: 500px; border-radius: 8px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); animation: scaleIn 0.3s ease; }
@keyframes scaleIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-box i { font-size: 80px; color: #27ae60; margin-bottom: 25px; }
.success-box h2 { font-size: 28px; margin-bottom: 15px; font-weight: 800; }
.btn-home { display: inline-block; background: #000; color: #fff; padding: 15px 30px; margin-top: 25px; text-decoration: none; font-weight: 800; border-radius: 4px; transition: 0.3s; }
.btn-home:hover { background: var(--primary-color); }

/* Responsive adjustments for inner pages */
@media (max-width: 992px) {
    .products-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    
    /* Mobile Mega Menu */
    .nav-item.has-dropdown:hover .mega-menu, .nav-item.has-dropdown.active .mega-menu {
        display: flex;
        flex-direction: column;
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        border-top: 1px solid #eee;
    }
    .mega-menu-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid var(--primary-color);
    }
    .mega-menu-categories {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        background: #fdfdfd;
    }
    .mega-menu-categories::-webkit-scrollbar {
        height: 4px;
    }
    .mega-menu-categories::-webkit-scrollbar-thumb {
        background: #ddd;
    }
    .mega-menu-category-item {
        flex: 0 0 auto;
        border-bottom: none;
        border-right: 1px solid #eee;
    }
    .mega-menu-category-item a {
        padding: 12px 20px;
        font-size: 14px;
    }
    .mega-menu-content {
        padding: 15px;
        min-height: auto;
    }
    .mega-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .cart-container, .checkout-container { flex-direction: column; padding: 20px 0; gap: 20px; }
    .cart-items, .checkout-form, .cart-summary, .checkout-summary { padding: 15px; width: 100%; }
    .cart-item { flex-direction: column; text-align: center; padding-bottom: 20px; margin-bottom: 20px; }
    .cart-item img { margin: 0 auto 15px auto; width: 150px; height: 150px; }
    .qty-controls { justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
    .btn-remove { margin-top: 10px; margin-left: 0; width: 100%; text-align: center; justify-content: center; }
    .form-row { flex-direction: column; gap: 0; }
    .checkout-container { flex-direction: column-reverse; }
}

/* Mega Menu */
.nav-item.has-dropdown {
    position: relative;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 800px;
    max-width: 100vw;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: none;
    z-index: 1001;
    border-top: 3px solid var(--primary-color);
}

.nav-item.has-dropdown:hover .mega-menu {
    display: flex;
}

.mega-menu-sidebar {
    width: 280px;
    background: #f8f8f8;
    border-right: 1px solid #eee;
}

.mega-menu-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-category-item {
    padding: 0;
    border-bottom: 1px solid #eee;
}

.mega-menu-category-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.mega-menu-category-item:hover a, 
.mega-menu-category-item.active a {
    background: #fff;
    color: var(--primary-color);
    position: relative;
    z-index: 2;
    margin-right: -1px;
    border-right: 1px solid #fff;
}

.mega-menu-content {
    flex: 1;
    padding: 20px;
    background: #fff;
    min-height: 400px;
}

.mega-menu-panel {
    display: none;
}

.mega-menu-panel.active {
    display: block;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.mega-menu-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #333;
    padding: 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.mega-menu-product:hover {
    background: #f9f9f9;
}

.mega-menu-product img {
    max-width: 100%;
    height: 70px;
    object-fit: contain;
    margin-bottom: 10px;
}

.mega-menu-product span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Suspension Subcategory Cards */
.subcat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 25px 15px 20px;
    text-decoration: none;
    color: #333;
    text-align: center;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.subcat-card:hover {
    border-color: #cc0000;
    box-shadow: 0 6px 20px rgba(204,0,0,0.12);
    transform: translateY(-3px);
}
.subcat-card img {
    width: 100%;
    max-width: 160px;
    height: 130px;
    object-fit: contain;
    margin-bottom: 15px;
    transition: transform 0.25s;
}
.subcat-card:hover img { transform: scale(1.05); }
.subcat-card span {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #333;
}
.subcat-card:hover span { color: #cc0000; }

@media (max-width: 768px) {
    #subcategory-grid { grid-template-columns: repeat(2,1fr) !important; gap: 12px !important; }
    .subcat-card img { height: 90px; }
    .subcat-card { padding: 15px 10px; }
    .subcat-card span { font-size: 11px; }
}
