@import "./home.css";

:root {
    --maroon: #800020;
    --maroon-light: #a83252;
    --orange: #FF8C00;
    --orange-light: #ffaa40;
    --dark-gray: #2e353b;
    --medium-gray: #6c757d;
    --light-gray: #f8f9fa;
    --lighter-gray: #f5f7f9;
    --white: #ffffff;
    --black: #212529;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --jumia-orange: #800020;
    --jumia-gray: #f2f2f2;
    --jumia-dark: #333333;

    /* Font sizes — px values, Bootstrap 5 base (1rem = 16px) */
    --font-xs: 10px;
    --font-sm: 11px;
    --font-md: 13px;
    --font-lg: 15px;
    --font-xl: 17px;
    --font-xxl: 22px;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', 'Montserrat', 'Open Sans', sans-serif;

}

/* ============================================================
   BOOTSTRAP 5 FONT-SIZE NORMALISATION
   Bootstrap 3 base = 14px; Bootstrap 5 base = 16px.
   Setting html to 81.25% restores the 13px equivalent globally,
   so all rem-based BS5 components shrink back proportionally.
   ============================================================ */
html {
    font-size: 81.25%;
    /* 13px equivalent across the whole site */
}

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

body {
    font-family: var(--font-primary);
    color: var(--black);
    background-color: var(--jumia-gray);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    font-size: 13px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
}

h1 {
    font-size: var(--font-xxl);
}

h2 {
    font-size: var(--font-xl);
}

h3 {
    font-size: var(--font-lg);
}

h4 {
    font-size: var(--font-md);
}

p {
    margin-bottom: 10px;
    line-height: 1.6;
}

a {
    color: var(--maroon);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--orange);
}

/* Header styles */
.top-notification-bar {
    background-color: var(--jumia-dark);
    color: white;
    padding: 10px 0;
    font-size: var(--font-xs);
    text-align: center;
}

.main-header-container {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Unified Header Styles --- */
.main-header-container {
    background: #fff;
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1100;
    /* Must be above site-navbar (1050) so account dropdown is never clipped */
    position: relative;
    width: 100%;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-container img {
    height: 45px;
    width: auto;
    border-radius: 4px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--maroon, #800020);
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.search-container {
    flex-grow: 1;
    max-width: 650px;
    margin: 0 15px;
}

.search-flow {
    display: flex;
    align-items: center;
    gap: 12px;
}

.jumia-search {
    display: flex;
    width: 100%;
    border: 2px solid #800020;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.search-input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 13px;
    z-index: 5;
}

.jumia-search input {
    flex-grow: 1;
    padding: 10px 15px 10px 40px;
    border: none;
    font-size: 13px;
    outline: none;
}

.jumia-search button {
    padding: 0 20px;
    background: #800020;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.jumia-search button:hover {
    background: #6a001a;
}

.seller-flow-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    background: #800020;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 11px 16px;
    border-radius: 6px;
    box-shadow: 0 10px 20px rgba(128, 0, 32, 0.14);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.seller-flow-link:hover {
    background: #6a001a;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(128, 0, 32, 0.2);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-shrink: 0;
}

.account-wrapper {
    position: relative;
    z-index: 1200;
    /* Ensures dropdown stacking context sits above navbar (1050) */
    isolation: isolate;
}

.account-action,
.cart-action {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Increased to compensate for Tailwind 4 resets */
    color: #333;
    text-decoration: none !important;
    background: none;
    border: none;
    font-weight: 500;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.account-action:hover,
.cart-action:hover {
    background: #f5f5f5;
}

.account-action i,
.cart-action i {
    font-size: 20px;
    color: #800020;
}

.cart-action {
    position: relative;
}

.cart-count {
    background: #800020;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 2px;
    right: 2px;
    border: 2px solid #fff;
}

.account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    min-width: 210px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 9999;
    /* Above header (1100), navbar (1050), and mega panel (1040) */
    padding: 8px 0;
    pointer-events: none;
    /* Prevent interaction when hidden */
}

.account-dropdown.show {
    pointer-events: auto;
}

.account-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #444;
    text-decoration: none !important;
    font-size: 13px;
    transition: background 0.2s;
}

.account-dropdown a:hover {
    background: #f8f9fa;
    color: #800020;
}

.account-dropdown a i {
    width: 18px;
    text-align: center;
    font-size: 16px;
    color: #666;
}

/* Navigation */
.main-navigation {
    background-color: white;
    border-top: 1px solid #eee;
    padding: 10px 0;
}

.nav-categories {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-category {
    font-size: var(--font-sm);
    color: var(--jumia-dark);
    text-decoration: none;
    position: relative;
    padding: 5px 0;
}

.nav-category:hover {
    color: var(--jumia-orange);
}

.all-categories {
    display: flex;
    align-items: center;
    background-color: var(--jumia-orange);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 500;
}

.all-categories i {
    margin-right: 5px;
}

/* Hero Banner */
.hero-container,
.content-wrapper {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.hero-container {
    margin: 20px auto 0;
    position: relative;
    padding: 0;
}

.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.hero-container .swiper {
    width: 100%;
    height: 450px;
}

.hero-banner {
    background-color: transparent;
    border-radius: 0;
    overflow: hidden;
    height: 450px;
    position: relative;
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.68), rgba(20, 20, 20, 0.52));
    padding: 16px 18px;
    border-radius: 18px;
    backdrop-filter: blur(12px);
    max-width: min(92%, 560px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.hero-content h2 {
    font-size: 25px;
    font-weight: 800;
    margin-bottom: 9px;
    letter-spacing: 0.02em;
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.hero-content p {
    font-size: 11px;
    line-height: 1.6;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.hero-content .btn {
    background: linear-gradient(135deg, #ff9800, #ffb347);
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    letter-spacing: 0.04em;
    box-shadow: 0 10px 24px rgba(255, 152, 0, 0.28);
}

.hero-content .btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 14px 28px rgba(255, 152, 0, 0.38);
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-chip::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #ffb347;
    box-shadow: 0 0 0 4px rgba(255, 179, 71, 0.18);
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    flex-wrap: wrap;
}

.hero-note {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Universal Swiper Navigation Styles */
.swiper-button-next,
.swiper-button-prev {
    color: white !important;
    background: rgba(0, 0, 0, 0.5) !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    margin-top: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    transition: all 0.3s ease !important;
    opacity: 0.8 !important;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 20px !important;
    font-weight: bold !important;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.7) !important;
}

/* Hero specific navigation adjustments */
.hero-container .swiper-button-next,
.hero-container .swiper-button-prev {
    background: rgba(0, 0, 0, 0.3) !important;
}

.hero-container .swiper-pagination {
    bottom: 20px;
}

.hero-container .swiper-pagination-bullet {
    background: white;
    opacity: 0.7;
}

.hero-container .swiper-pagination-bullet-active {
    opacity: 1;
}

/* Responsive Hero Slider */
@media (max-width: 768px) {
    .hero-banner {
        height: 350px;
    }

    .hero-container .swiper {
        height: 350px;
    }

    .hero-content {
        padding: 10px;
        width: 90%;
    }

    .hero-content h2 {
        font-size: 18px;
    }

    .hero-content p {
        font-size: 10px;
    }

    .hero-content .btn {
        padding: 5px 15px;
        font-size: 9px;
    }

    /* Tablet container adjustments */
    .content-wrapper {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .hero-banner {
        height: 280px;
    }

    .hero-container .swiper {
        height: 280px;
    }

    .hero-content {
        padding: 8px;
        width: 95%;
    }

    .hero-content h2 {
        font-size: 15px;
        margin-bottom: 5px;
    }

    .hero-content p {
        font-size: 9px;
        margin-bottom: 10px;
    }

    .hero-content .btn {
        padding: 4px 12px;
        font-size: 8px;
    }

    .hero-container .swiper-button-next,
    .hero-container .swiper-button-prev {
        width: 30px;
        height: 30px;
        margin-top: -15px;
    }

    .hero-container .swiper-button-next::after,
    .hero-container .swiper-button-prev::after {
        font-size: 13px;
    }

    /* Ensure container fits screen on mobile */
    .content-wrapper {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Mobile navigation adjustments */
    .swiper-button-next,
    .swiper-button-prev {
        width: 35px !important;
        height: 35px !important;
        margin-top: -17.5px !important;
    }

    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 16px !important;
    }
}

/* Flash Sales */
.flash-sales {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 450px;
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    background-color: var(--jumia-orange);
    padding: 10px 16px;
    border-radius: 4px;
    color: white;
}

.section-title {
    font-size: var(--font-lg);
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
}

.section-title img {
    height: 20px;
    margin-right: 10px;
}

.countdown {
    display: flex;
    align-items: center;
    background-color: #f2f2f2;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: var(--font-sm);
    color: var(--jumia-dark);
}

.countdown span {
    font-weight: 600;
    color: var(--jumia-orange);
    margin: 0 2px;
}

.view-all {
    color: white;
    font-size: var(--font-sm);
    text-decoration: none;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.product-card {
    background-color: white;
    border-radius: 4px;
    padding: 10px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.product-card:hover {
    border-color: var(--jumia-orange);
    box-shadow: var(--shadow-hover);
}

.product-image {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.product-image img {
    max-height: 100%;
    max-width: 100%;
}

.product-name {
    font-size: var(--font-sm);
    height: 40px;
    overflow: hidden;
    margin-bottom: 5px;
    color: var(--jumia-dark);
}

.product-price {
    font-weight: 600;
    color: var(--jumia-dark);
    margin-bottom: 5px;
}

.product-discount {
    background-color: var(--jumia-orange);
    color: white;
    padding: 2px 5px;
    border-radius: 2px;
    font-size: var(--font-xs);
    font-weight: 500;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: var(--font-xs);
    margin-left: 5px;
}

/* Categories Section */
.categories-section {
    background-color: white;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 15px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.category-icon {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: var(--lighter-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.category-icon img {
    max-width: 100%;
    max-height: 100%;
    width: 150px;
    height: 150px;
}

.category-name {
    font-size: var(--font-xs);
    text-align: center;
    color: var(--jumia-dark);
}

/* Featured Products */
.featured-products {
    background-color: white;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .header-actions {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .logo-text {
        display: none;
    }

    .search-container {
        margin: 10px 0;
    }

    .search-flow {
        flex-direction: column;
        align-items: stretch;
    }

    .header-main {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .nav-categories {
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .all-categories {
        display: none;
    }
}

.account-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 200px;
    z-index: 1000;
    padding: 10px 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.account-wrapper:hover .account-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-dropdown a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--jumia-dark);
    text-decoration: none;
    transition: var(--transition);
    font-size: var(--font-sm);
}

.account-dropdown a i {
    margin-right: 10px;
    font-size: var(--font-md);
    width: 20px;
    text-align: center;
}

.account-dropdown a:hover {
    background-color: var(--lighter-gray);
    color: var(--jumia-orange);
}

.cart-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: var(--font-xs);
    color: var(--jumia-dark);
    text-decoration: none;
    position: relative;
    transition: var(--transition);
}

.cart-action i {
    font-size: var(--font-lg);
    margin-bottom: 3px;
}

.cart-count {
    background-color: var(--jumia-orange);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-xs);
    position: absolute;
    top: -5px;
    right: -5px;
}

.cart-action:hover {
    color: var(--jumia-orange);
}

/* Main navigation */
.main-navigation {
    background-color: white;
    border-top: 1px solid #eee;
    padding: 12px 0;
}

.nav-categories {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-category {
    font-size: var(--font-sm);
    color: var(--jumia-dark);
    text-decoration: none;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

.nav-category:hover {
    color: var(--jumia-orange);
}

.all-categories {
    display: flex;
    align-items: center;
    background-color: var(--jumia-orange);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: 500;
    font-size: var(--font-sm);
}

.all-categories i {
    margin-right: 5px;
}

/* Hero section */
.hero-container {
    margin: 20px 0;
    position: relative;
}

.hero-banner {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    height: 320px;
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content sections */
.flash-sales,
.categories-section,
.featured-products {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

/* Mobile responsive sections */
@media (max-width: 768px) {

    .flash-sales,
    .categories-section,
    .featured-products {
        min-height: 350px;
        padding: 15px;
    }

    .flash-sales {
        min-height: 380px;
        padding: 15px;
    }
}

@media (max-width: 480px) {

    .flash-sales,
    .categories-section,
    .featured-products {
        min-height: 300px;
        padding: 10px;
    }

    .flash-sales {
        min-height: 320px;
        padding: 10px;
    }
}

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

.section-title {
    font-size: var(--font-lg);
    font-weight: 600;
    color: var(--jumia-dark);
    display: flex;
    align-items: center;
    background-color: var(--jumia-orange);
    padding: 10px;
    border-radius: 4px;
    color: white;
}

.section-title img {
    height: 24px;
    margin-right: 10px;
}

.countdown {
    display: flex;
    align-items: center;
    background-color: #f2f2f2;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: var(--font-sm);
}

.countdown span {
    font-weight: 600;
    color: var(--jumia-orange);
    margin: 0 2px;
}

.view-all {
    color: var(--jumia-orange);
    font-size: var(--font-sm);
    text-decoration: none;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

/* Products grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.product-card:hover {
    border-color: var(--jumia-orange);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.product-image {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.product-image img {
    max-height: 100%;
    max-width: 100%;
}

.product-name {
    font-size: var(--font-sm);
    height: 44px;
    overflow: hidden;
    margin-bottom: 8px;
    color: var(--jumia-dark);
    line-height: 1.4;
}

.product-price {
    font-weight: 600;
    color: var(--jumia-dark);
    margin-bottom: 5px;
    font-size: var(--font-md);
}

.product-discount {
    background-color: var(--jumia-orange);
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: var(--font-xs);
    font-weight: 500;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: var(--font-xs);
    margin-left: 5px;
}

/* Categories grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 20px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.category-icon {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: var(--lighter-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: var(--transition);
}

.category-icon:hover {
    background-color: #e6e6e6;
}

.category-icon img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 50%;
}

.category-name {
    font-size: var(--font-xs);
    text-align: center;
    color: var(--jumia-dark);
    font-weight: 500;
}

/* Footer */
.footer {
    background-color: #070506;
    color: #f8f8f8;
    padding-top: 48px;
}

.footer-main {
    padding-bottom: 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr;
    gap: 32px;
    align-items: start;
}

.footer-logo {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #d1123d;
}

.footer-brand p,
.footer-newsletter p {
    max-width: 360px;
    color: #c7c7c7;
    line-height: 1.8;
    margin-top: 18px;
}

.footer-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.footer-social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: var(--transition);
}

.footer-social-links a:hover {
    background: #d1123d;
    transform: translateY(-2px);
}

.footer-social-links a svg,
.footer-social-links a i {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
}

.footer-nav-group h5,
.footer-newsletter h5 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f8f8f8;
    margin-bottom: 18px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #b8b8b8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(2px);
}

.footer-sell-intro {
    margin: 0 0 14px;
    color: #c7c7c7;
    font-size: 13px;
    line-height: 1.7;
}

.footer-sell-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-sell-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.footer-sell-button:hover {
    color: #fff;
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.26);
}

.footer-sell-button-primary {
    background: #d1123d;
    border-color: #d1123d;
}

.footer-sell-button-primary:hover {
    background: #b50f34;
    border-color: #b50f34;
}

.footer-newsletter {
    min-width: 0;
}

.newsletter-form {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}

.newsletter-form input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 14px;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

.newsletter-cta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.newsletter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #d1d1d1;
}

.newsletter-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: #d1123d;
    border-radius: 4px;
}

.newsletter-form button {
    background-color: #d1123d;
    color: white;
    border: none;
    padding: 14px 22px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    opacity: 0.55;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.newsletter-form button:enabled {
    opacity: 1;
}

.newsletter-form button:enabled:hover {
    transform: translateY(-1px);
}

.footer-payments {
    margin-top: 18px;
    color: #9e9e9e;
    font-size: 13px;
    line-height: 1.6;
}

.footer-bottom {
    background-color: #060405;
    padding: 18px 0 28px;
    text-align: center;
    color: #8a8a8a;
    font-size: 13px;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-cta {
        grid-template-columns: 1fr;
    }
}

/* Responsive styles */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .header-actions {
        gap: 15px;
    }

    .search-container {
        flex: 0 1 500px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
        /* Slightly smaller base font on mobile */
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .logo-text {
        font-size: var(--font-lg);
    }

    .search-container {
        margin: 15px 0;
        flex: 0 0 100%;
        order: 3;
    }

    .header-main {
        flex-wrap: wrap;
    }

    .logo-container {
        order: 1;
        flex: 0 0 50%;
    }

    .header-actions {
        order: 2;
        flex: 0 0 50%;
        justify-content: flex-end;
    }

    .section-title {
        font-size: var(--font-md);
    }

    .product-name {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .logo-text {
        display: none;
    }

    .header-actions {
        gap: 15px;
    }

    .account-action span,
    .cart-action span {
        display: none;
    }

    .account-action,
    .cart-action {
        flex-direction: row;
    }

    .account-action i,
    .cart-action i {
        margin-bottom: 0;
        margin-right: 0;
        font-size: var(--font-xl);
    }

    .nav-categories {
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .all-categories {
        display: none;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .countdown {
        align-self: flex-start;
    }

    .view-all {
        align-self: flex-start;
    }
}

/* Navigation Arrows */
.categories-slider .owl-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.categories-slider .owl-nav button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white !important;
    color: var(--jumia-dark) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    transition: var(--transition);
}

.categories-slider .owl-nav button:hover {
    background: var(--jumia-orange) !important;
    color: white !important;
}

.categories-slider .owl-nav button.owl-prev {
    margin-left: -18px;
}

.categories-slider .owl-nav button.owl-next {
    margin-right: -18px;
}

/* Dots */
.categories-slider .owl-dots {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.categories-slider .owl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd !important;
    margin: 0 5px;
    transition: var(--transition);
}

.categories-slider .owl-dot.active {
    background: var(--jumia-orange) !important;
    transform: scale(1.2);
}

/* Responsive styles */
@media (max-width: 768px) {
    .categories-slider {
        padding: 0 30px;
    }

    .categories-slider .owl-nav button {
        width: 32px;
        height: 32px;
    }

    .categories-slider .owl-nav button.owl-prev {
        margin-left: -16px;
    }

    .categories-slider .owl-nav button.owl-next {
        margin-right: -16px;
    }

    .category-icon {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 576px) {
    .categories-slider {
        padding: 0 25px;
    }

    .categories-slider .owl-nav button {
        width: 28px;
        height: 28px;
        font-size: 12px !important;
    }

    .categories-slider .owl-nav button.owl-prev {
        margin-left: -14px;
    }

    .categories-slider .owl-nav button.owl-next {
        margin-right: -14px;
    }
}

/* Flash Sales Section */
.flash-sales {
    margin: 0 auto;
    padding: 10px 0;
    /* minimal vertical padding */
}

/* Section header */
.flash-sales .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

/* Swiper container */
.flash-sales .swiper {
    width: 100%;
    /* never exceed parent */
    max-width: 100%;
    /* prevent horizontal overflow */
    overflow: hidden;
    /* cut any accidental overflow */
    box-sizing: border-box;
}

/* Slides align to content height */
.flash-sales .swiper-wrapper {
    align-items: flex-start;
    /* don’t stretch */
}

/* Each slide adapts to card height */
.flash-sales .swiper-slide {
    height: auto !important;
    display: flex;
    justify-content: center;
    align-items: stretch;
}

/* Product card fills slide */
.flash-sales .product-card,
.flash-sales .product-item {
    height: 100%;
    flex: 1;
}

/* Section-specific navigation positioning */
.flash-sales .swiper-button-next {
    right: 10px;
}

.flash-sales .swiper-button-prev {
    left: 10px;
}

.flash-sales .swiper-pagination-bullet {
    background: var(--maroon, #800000);
    /* your brand maroon */
    opacity: 0.5;
    transition: opacity 0.3s;
}

.flash-sales .swiper-pagination-bullet-active {
    opacity: 1;
}

/* Pagination dots */
.flash-sales .swiper-pagination {
    position: relative;
    /* sits right below cards */
    margin-top: 10px;
    /* spacing from cards */
    text-align: center;
}

.flash-sales .swiper-pagination-bullet {
    background: #000;
    /* black by default */
    opacity: 0.4;
    /* subtle */
    width: 10px;
    height: 10px;
    margin: 0 4px;
    border-radius: 50%;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.flash-sales .swiper-pagination-bullet:hover {
    opacity: 0.7;
    background: #4d0000;
    /* darker maroon on hover */
}

.flash-sales .swiper-pagination-bullet-active {
    background: var(--maroon, #800000);
    /* brand maroon */
    opacity: 1;
    transform: scale(1.2);
    /* slight enlarge effect */
}

.featured-products .swiper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.featured-products .swiper-slide {
    height: auto !important;
    display: flex;
    justify-content: center;
}

.featured-products .product-item {
    flex: 1;
    height: 100%;
}

/* Featured products specific positioning */
.featured-products .swiper-button-next {
    right: 10px;
}

.featured-products .swiper-button-prev {
    left: 10px;
}

/* Homepage spacing overrides */
.hero-container {
    margin: 20px auto 12px;
    max-width: 1400px;
    padding: 0;
}

.hero-container .swiper,
.hero-banner {
    height: clamp(280px, 38vw, 360px);
}

.flash-sales,
.categories-section,
.featured-products {
    min-height: 0;
    padding: 12px;
    margin-bottom: 6px;
}

.flash-sales .section-header,
.categories-section .section-header,
.featured-products .section-header {
    margin-bottom: 12px;
}

.section-title {
    padding: 8px 12px;
}

.categories-slider .owl-dots {
    margin-top: 12px;
}

.flash-sales .swiper-pagination {
    margin-top: 6px;
}

/* Homepage content width tuning */
.content-wrapper {
    width: min(99vw, 1400px);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.content-wrapper .flash-sales,
.content-wrapper .categories-section,
.content-wrapper .featured-products {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 8px;
    padding: 16px 18px 18px;
    border-radius: 14px;
}

.content-wrapper .flash-sales .section-header,
.content-wrapper .categories-section .section-header,
.content-wrapper .featured-products .section-header {
    padding: 12px 16px;
    border-radius: 10px;
    gap: 12px;
}

.content-wrapper .flash-sales .section-title,
.content-wrapper .categories-section .section-title,
.content-wrapper .featured-products .section-title {
    margin-bottom: 0;
    padding: 0;
    font-size: clamp(10px, 6.5px + 0.8vw, 12px);
    line-height: 1.3;
}

.content-wrapper .flash-sales .view-all,
.content-wrapper .categories-section .view-all,
.content-wrapper .featured-products .view-all {
    font-size: 8px;
    letter-spacing: 0.04em;
}

.content-wrapper .flash-sales .countdown {
    padding: 6px 12px;
    font-size: 9px;
}

@media (min-width: 1200px) {
    .content-wrapper {
        width: min(99vw, 1400px);
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        width: calc(100vw - 6px);
    }

    .content-wrapper .flash-sales,
    .content-wrapper .categories-section,
    .content-wrapper .featured-products {
        max-width: 100%;
        padding: 14px;
    }

    .content-wrapper .flash-sales .section-header,
    .content-wrapper .categories-section .section-header,
    .content-wrapper .featured-products .section-header {
        padding: 10px 12px;
    }
}

/* Jumia-Style Navigation */
.jumia-navbar {
    background: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    padding: 0;
    position: relative;
    z-index: 100;
}

/* Fix visibility conflict between Tailwind 4 and Bootstrap */
/* Desktop: always show the navbar */
@media (min-width: 992px) {
    .navbar-collapse.collapse {
        display: block !important;
        visibility: visible !important;
        overflow: visible !important;
    }
}

.nav-outer {
    width: 100%;
}

.jumia-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    flex-wrap: nowrap;
    align-items: stretch;
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.jumia-nav::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.jumia-nav>li {
    position: relative;
    flex-shrink: 0;
    min-width: 0;
}

.jumia-nav>li>a {
    display: flex;
    align-items: center;
    padding: 14px 10px;
    color: var(--black);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jumia-nav>li>a:hover {
    color: var(--jumia-orange);
}

.jumia-nav>li.dropdown:hover>a {
    color: var(--jumia-orange);
}

/* Show menu on hover */
.dropdown:hover .dropdown-menu.mega-menu {
    display: block;
    opacity: 1;
}

/* Horizontal grid layout for subcategories */
.mega-menu-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mega-menu-header {
    font-size: var(--font-md);
    font-weight: 700;
    color: var(--jumia-dark);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--jumia-orange);
    width: 100%;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* 5 columns for subcategories */
    gap: 12px;
    width: 100%;
}

.mega-menu-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 10px;
    gap: 2px;
}

.mega-menu-category-link {
    display: block;
    color: var(--dark-gray);
    font-size: var(--font-md);
    font-weight: 700;
    padding: 4px 0 2px;
    text-decoration: none;
}

.mega-menu-category-link:hover {
    color: var(--jumia-orange);
}

.mega-menu-sub-link {
    display: block;
    color: #666;
    font-size: 0.8rem;
    padding: 1px 0 1px 8px;
    text-decoration: none;
    line-height: 1.4;
}

.mega-menu-sub-link::before {
    content: "›";
    margin-right: 4px;
    color: var(--jumia-orange);
}

.mega-menu-sub-link:hover {
    color: var(--jumia-orange);
    padding-left: 12px;
}

.mega-menu-footer {
    border-top: 1px solid #eee;
    margin-top: 12px;
    padding-top: 8px;
    text-align: right;
}

.mega-menu-footer a {
    color: var(--jumia-orange);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.mega-menu-footer a:hover {
    text-decoration: underline;
}

/* Ensure the dropdown stays visible when hovering over it */
.dropdown-menu.mega-menu:hover {
    display: block;
    opacity: 1;
}

/* Fix for dropdown positioning */
.jumia-nav>li.dropdown {
    position: static;
}

.yamm .dropdown-menu {
    left: 0;
    right: 0;
}

/* Responsive adjustments for the mega menu */
@media (max-width: 1200px) {
    .mega-menu-grid {
        grid-template-columns: repeat(4, 1fr);
        /* 4 columns on smaller screens */
    }
}

@media (max-width: 992px) {
    .mega-menu-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 3 columns on tablets */
    }

    .dropdown-menu.mega-menu {
        position: static;
        width: 100%;
        max-width: 100%;
    }

    .jumia-nav>li.dropdown {
        position: relative;
    }
}

@media (max-width: 768px) {
    .mega-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on mobile */
    }
}

@media (max-width: 576px) {
    .mega-menu-grid {
        grid-template-columns: 1fr;
        /* 1 column on small mobile */
    }
}

/* Desktop navbar: allow overflow for mega-menu dropdowns */
@media (min-width: 992px) {
    .navbar-collapse {
        overflow: visible !important;
    }
}

.nav-outer {
    position: static;
}

.jumia-nav>li {
    position: static;
}

/* Container for proper alignment */
.nav-bg-class {
    position: relative;
}

.jumia-navbar .container {
    position: static;
}

/* Layout overrides to keep the page fitting the viewport */
html,
body {
    width: 100%;
    max-width: 100%;
}

.main-content {
    overflow-x: hidden;
}

.container {
    width: 100%;
    min-width: 0;
}

/* --- Header Responsive Fixes --- */
.navbar-toggle.mobile-only {
    display: none !important;
}

@media (max-width: 991px) {
    .main-header-container {
        padding: 12px 0;
        position: sticky;
        top: 0;
        z-index: 2100;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .header-main {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        gap: 0 !important;
    }

    .navbar-toggle.mobile-only {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        order: 1 !important;
        flex: 0 0 auto !important;
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 1px solid rgba(128, 0, 0, 0.18) !important;
        border-radius: 14px !important;
        background: #fff !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
        transition: all 0.25s ease !important;
        cursor: pointer !important;
    }

    .navbar-toggle.mobile-only:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12) !important;
    }

    .logo-container {
        display: flex !important;
        order: 2 !important;
        flex: 0 0 auto !important;
        align-items: center;
        padding-left: 10px;
        margin: 0;
    }

    .logo-container img {
        height: 32px;
        width: auto;
    }

    .header-actions {
        display: flex !important;
        order: 3 !important;
        flex: 1 !important;
        justify-content: flex-end !important;
        align-items: center;
        gap: 15px;
        margin-left: auto;
    }

    .navbar-toggle.mobile-only .hamburger-line {
        display: block !important;
        width: 20px !important;
        height: 2px !important;
        background-color: #800000 !important;
        border-radius: 999px !important;
        transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease !important;
        margin: 3px 0 !important;
        flex-shrink: 0 !important;
    }

    .navbar-toggle.mobile-only[aria-expanded="true"] {
        background: #800000 !important;
        border-color: rgba(255, 255, 255, 0.18) !important;
    }

    .navbar-toggle.mobile-only[aria-expanded="true"] .hamburger-line {
        background-color: #fff !important;
    }

    .navbar-toggle.mobile-only[aria-expanded="true"] .hamburger-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg) !important;
    }

    .navbar-toggle.mobile-only[aria-expanded="true"] .hamburger-line:nth-child(2) {
        opacity: 0 !important;
    }

    .navbar-toggle.mobile-only[aria-expanded="true"] .hamburger-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg) !important;
    }

    .search-container {
        order: 4 !important;
        flex: 0 0 100% !important;
        width: 100%;
        margin-top: 10px;
        position: relative;
    }

    .search-flow {
        flex-direction: column;
        align-items: stretch;
    }

    .jumia-search {
        position: relative;
    }

    .seller-flow-link {
        justify-content: center;
    }

    /* Mobile Menu Overlay System */
    .navbar-collapse {
        position: fixed !important;
        top: 105px !important;
        left: 0 !important;
        width: 100% !important;
        height: calc(100vh - 105px) !important;
        background: #fff !important;
        z-index: 2000 !important;
        overflow-y: auto !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        transform: translateX(-100%) !important;
        display: block !important;
        padding: 0 !important;
        border-top: 1px solid #eee !important;
        visibility: visible !important;
    }

    .navbar-collapse.show {
        transform: translateX(0) !important;
    }

    .navbar-collapse.collapse:not(.show) {
        display: block !important;
        transform: translateX(-100%) !important;
    }

    .jumia-nav {
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
        gap: 0;
    }

    .jumia-nav>li {
        width: 100%;
        border-bottom: 1px solid #f8f9fa;
        position: relative;
    }

    .jumia-nav>li>a {
        padding: 15px 20px !important;
        font-size: 16px;
        color: #333;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        text-align: left;
    }

    .dropdown-menu.mega-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        padding: 0 20px 15px;
        display: none;
    }

    .dropdown.show .dropdown-menu.mega-menu {
        display: block;
    }
}

/* Improved Mega Menu with Full Background Coverage */
.dropdown-menu.mega-menu {
    width: 100%;
    max-width: min(1200px, calc(100vw - 30px));
    left: 0;
    right: 0;
    padding: 25px;
    border-radius: 4px;
    border: none;
    border-top: 3px solid var(--jumia-orange);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    margin-top: 0;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1001;
    background: white;
    position: absolute;
}

/* Show menu on hover */
.dropdown:hover .dropdown-menu.mega-menu {
    display: block;
    opacity: 1;
}

/* Horizontal grid layout for subcategories */
.mega-menu-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mega-menu-header {
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--jumia-dark);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--jumia-orange);
    width: 100%;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* 5 columns for subcategories */
    gap: 12px;
    width: 100%;
}

.mega-menu-item {
    display: flex;
    align-items: center;
    min-height: 10px;
}

.mega-menu-item a {
    color: var(--dark-gray);
    font-size: var(--font-lg);
    transition: var(--transition);
    display: block;
    padding: 8px 0;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    width: 100%;
}

.mega-menu-item a:before {
    content: "•";
    color: var(--jumia-orange);
    margin-right: 8px;
    font-size: 16px;
    vertical-align: middle;
}

.mega-menu-item a:hover {
    color: var(--jumia-orange);
    padding-left: 5px;
}

/* Ensure the dropdown stays visible when hovering over it */
.dropdown-menu.mega-menu:hover {
    display: block;
    opacity: 1;
}

/* Fix for dropdown positioning */
.jumia-nav>li.dropdown {
    position: static;
}

.yamm .dropdown-menu {
    left: 0;
    right: 0;
}

/* Responsive adjustments for the mega menu */
@media (max-width: 1200px) {
    .mega-menu-grid {
        grid-template-columns: repeat(4, 1fr);
        /* 4 columns on smaller screens */
    }
}

@media (max-width: 992px) {
    .mega-menu-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 3 columns on tablets */
    }

    .dropdown-menu.mega-menu {
        position: static;
        width: 100%;
        max-width: 100%;
    }

    .jumia-nav>li.dropdown {
        position: relative;
    }
}

@media (max-width: 768px) {
    .mega-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on mobile */
    }
}

@media (max-width: 576px) {
    .mega-menu-grid {
        grid-template-columns: 1fr;
        /* 1 column on small mobile */
    }
}

/* Desktop navbar: allow overflow for mega-menu dropdowns */
@media (min-width: 992px) {
    .navbar-collapse {
        overflow: visible !important;
    }
}

.nav-outer {
    position: static;
}

.jumia-nav>li {
    position: static;
}

/* Container for proper alignment */
.nav-bg-class {
    position: relative;
}

.jumia-navbar .container {
    position: static;
}

/* Subcategory quick-links bar */
.subcategory-bar {
    background: #f8f8f8;
    border-top: 1px solid #eee;
    padding: 6px 0;
    overflow-x: auto;
}

.subcategory-bar-inner {
    display: flex;
    gap: 0;
    align-items: flex-start;
    flex-wrap: nowrap;
}

.subcategory-group {
    display: flex;
    flex-direction: column;
    padding: 4px 14px;
    border-right: 1px solid #e5e5e5;
    min-width: 0;
    flex-shrink: 0;
}

.subcategory-group:last-child {
    border-right: none;
}

.subcategory-parent {
    font-size: 0.75rem;
    font-weight: 700;
    color: #800000;
    text-decoration: none;
    white-space: nowrap;
    margin-bottom: 2px;
}

.subcategory-parent--service {
    color: #444;
}

.subcategory-parent:hover {
    text-decoration: underline;
}

.subcategory-children {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.subcategory-child {
    font-size: 0.68rem;
    color: #666;
    text-decoration: none;
    white-space: nowrap;
}

.subcategory-child:hover {
    color: #800000;
    text-decoration: underline;
}

.subcategory-child:not(:last-child)::after {
    content: "·";
    margin-left: 4px;
    color: #ccc;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    margin: 0;
    vertical-align: middle;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
    appearance: button;
    cursor: pointer;
}

img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

/* Firefox specific fixes */
@-moz-document url-prefix() {

    button,
    input,
    select,
    textarea {
        filter: none !important;
        /* Remove any unexpected filters */
    }

    .main-header-container {
        width: 100% !important;
        /* Explicit width for Firefox flex containers */
    }
}

/* =============================================================
   SITE NAVBAR — single row, icons + short labels, eBay mega
   ============================================================= */

/* ── Wrapper ── */
.site-navbar {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1050;
    padding: 0;
}

.site-navbar__inner {
    display: flex;
    align-items: stretch;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.site-navbar__inner::-webkit-scrollbar {
    display: none;
}

/* ── Generic nav item (link or dropdown wrapper) ── */
.snav-item {
    position: static;
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
}

/* Direct <a> items (Home, Deals) */
a.snav-item,
.snav-item--home,
.snav-item--deals {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 14px;
    color: #333;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color 0.18s, border-color 0.18s;
    cursor: pointer;
}

a.snav-item:hover,
.snav-item--home:hover,
.snav-item--deals:hover {
    color: #800020;
    border-bottom-color: #800020;
    text-decoration: none !important;
}

.snav-item--deals {
    color: #800020;
}

.snav-item--deals .snav-icon {
    color: #e85d04;
}

/* ── Dropdown wrapper ── */
.snav-item--dropdown {
    position: static;
    /* mega panel is full-width */
    display: flex;
    align-items: stretch;
}

/* The trigger link inside a dropdown */
.snav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 46px;
}

.snav-link:hover,
.snav-item--dropdown.snav-open .snav-link {
    color: #800020;
    border-bottom-color: #800020;
    text-decoration: none !important;
}

/* Icon + label + caret */
.snav-icon {
    font-size: 13px;
    color: #800020;
    flex-shrink: 0;
}


.snav-caret {
    font-size: 9px;
    opacity: 0.5;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.snav-item--dropdown.snav-open .snav-caret {
    transform: rotate(180deg);
}

/* ── Mega panel ── */
.snav-mega {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    /* Clamp width to navbar container */
    max-width: 100vw;
    background: #fff;
    border-top: 3px solid #800020;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.13);
    z-index: 1040;
    /* below site-navbar (1050) and header (1100); mega panel is nav-level only */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.snav-item--dropdown.snav-open>.snav-mega,
.snav-item--dropdown:hover>.snav-mega {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
}

/* Inner flex layout */
.snav-mega__inner {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 280px;
    max-height: 440px;
}

/* Left: subcategory groups */
.snav-mega__links {
    flex: 1;
    padding: 22px 28px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 32px;
    overflow-y: auto;
    align-content: start;
}

.snav-mega__group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.snav-mega__group-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none !important;
    padding-bottom: 5px;
    margin-bottom: 4px;
    border-bottom: 2px solid #800020;
    display: block;
    letter-spacing: 0.01em;
    transition: color 0.18s;
}

.snav-mega__group-title:hover {
    color: #800020;
}

.snav-mega__class-link {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #555;
    text-decoration: none !important;
    padding: 2px 0;
    transition: color 0.15s, padding-left 0.15s;
    line-height: 1.4;
}

.snav-mega__class-link::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ccc;
    flex-shrink: 0;
    transition: background 0.15s;
}

.snav-mega__class-link:hover {
    color: #800020;
    padding-left: 4px;
}

.snav-mega__class-link:hover::before {
    background: #800020;
}

.snav-mega__empty {
    font-size: 12px;
    color: #aaa;
    font-style: italic;
}

/* Right: spotlight panel */
.snav-mega__feature {
    flex: 0 0 260px;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.snav-mega__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0.08) 100%);
}

.snav-mega__feature-body {
    position: relative;
    z-index: 2;
    padding: 20px 18px;
    color: #fff;
}

.snav-mega__badge {
    display: inline-block;
    background: #800020;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
    margin-bottom: 7px;
}

.snav-mega__feature-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 5px;
    color: #fff;
}

.snav-mega__feature-sub {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 14px;
    line-height: 1.5;
}

.snav-mega__feature-btn {
    display: inline-block;
    padding: 7px 16px;
    background: #fff;
    color: #800020;
    font-weight: 700;
    font-size: 11.5px;
    border-radius: 4px;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s;
}

.snav-mega__feature-btn:hover {
    background: #800020;
    color: #fff;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
    .snav-mega__links {
        grid-template-columns: repeat(2, 1fr);
    }

    .snav-mega__feature {
        flex: 0 0 220px;
    }
}

@media (max-width: 991px) {

    /* On mobile, hide the mega panel entirely; rely on mobile nav */
    .snav-mega {
        display: none !important;
    }

    .snav-item--dropdown {
        position: relative;
    }

    .snav-caret {
        display: none;
    }
}

.jumia-navbar {
    background: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: none;
    padding-top: 5px;
    position: relative;
    z-index: 1050;
}

.nav-bg-class {
    position: static;
}

.navbar-collapse {
    overflow: visible !important;
}

.nav-outer {
    position: static;
}

.jumia-nav {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.jumia-nav::-webkit-scrollbar {
    display: none;
}

.jumia-nav>li {
    position: relative;
    flex-shrink: 0;
}

.jumia-nav>li>a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 14px 16px;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    white-space: nowrap;
    transition: color 0.2s;
    border-bottom: 2px solid transparent;
}

.jumia-nav>li>a i {
    display: none;
}

.jumia-nav>li.mega-menu>a>i.fa-home {
    display: inline-block;
}

.jumia-nav>li>a::after {
    content: '\f107';
    font-family: 'FontAwesome';
    font-size: 10px;
    opacity: 0.55;
}

.jumia-nav>li.mega-menu:first-child>a::after {
    display: none;
}

.jumia-nav>li>a:hover,
.jumia-nav>li.dropdown:hover>a {
    color: #800000;
    border-bottom-color: #800000;
    text-decoration: none !important;
}

/* ── Mega Menu Panel ── */
.mega-menu-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 820px;
    max-width: min(1100px, calc(100vw - 40px));
    background: #fff;
    border: 1px solid #e8e8e8;
    border-top: 3px solid #800000;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
    padding: 0;
    margin: 0;
    list-style: none;
    z-index: 1100;
    /* hidden by default — shown via JS class or :hover */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    display: block;
}

/* CSS :hover reveal (works without JS) */
.jumia-nav>li.dropdown:hover>.mega-menu-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

/* JS-driven reveal (class toggled by our script) */
.jumia-nav>li.dropdown.mmp-open>.mega-menu-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

/* Inner flex layout */
.mmp-inner {
    display: flex;
    min-height: 320px;
    max-height: 460px;
}

/* Left: subcategory groups + classification links */
.mmp-links {
    flex: 1;
    padding: 24px 28px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 36px;
    overflow-y: auto;
    align-content: start;
}

.mmp-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mmp-group-title {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none !important;
    padding-bottom: 6px;
    margin-bottom: 4px;
    border-bottom: 2px solid #800000;
    display: block;
    letter-spacing: 0.01em;
    transition: color 0.18s;
}

.mmp-group-title:hover {
    color: #800000;
}

.mmp-class-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #555;
    text-decoration: none !important;
    padding: 3px 0;
    transition: color 0.15s, padding-left 0.15s;
    line-height: 1.4;
}

.mmp-class-link::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ccc;
    flex-shrink: 0;
    transition: background 0.15s;
}

.mmp-class-link:hover {
    color: #800000;
    padding-left: 4px;
}

.mmp-class-link:hover::before {
    background: #800000;
}

.mmp-empty {
    font-size: 12px;
    color: #aaa;
    font-style: italic;
}

/* Right: category image feature panel */
.mmp-feature {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.mmp-feature-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.85) 0%,
            rgba(0, 0, 0, 0.4) 55%,
            rgba(0, 0, 0, 0.1) 100%);
}

.mmp-feature-content {
    position: relative;
    z-index: 2;
    padding: 24px 20px;
    color: #fff;
}

.mmp-feature-badge {
    display: inline-block;
    background: #800000;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.mmp-feature-title {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 6px;
    color: #fff;
}

.mmp-feature-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 16px;
    line-height: 1.5;
}

.mmp-feature-btn {
    display: inline-block;
    padding: 8px 18px;
    background: #fff;
    color: #800000;
    font-weight: 700;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s;
    letter-spacing: 0.02em;
}

.mmp-feature-btn:hover {
    background: #800000;
    color: #fff;
}

/* ── Yellow subcategory slider bar ── */
.subcategory-slider-bar {
    background: #ffcc00;
    padding: 12px 0;
    position: relative;
    border-bottom: 1px solid #e5e5e5;
}

.subcategory-slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.subcategory-slider-container::-webkit-scrollbar {
    display: none;
}

.slider-item {
    color: #111;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.slider-item:hover {
    opacity: 0.75;
}

.slider-item i {
    font-size: 11px;
    opacity: 0.7;
}

.slider-navigation {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    left: 0;
}

.slider-arrow {
    position: absolute;
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s;
}

.slider-arrow:hover {
    background: #f8f8f8;
    transform: scale(1.1);
}

.slider-arrow.prev {
    left: 16px;
}

.slider-arrow.next {
    right: 16px;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
    .mega-menu-panel {
        left: 0;
        transform: translateY(8px);
    }

    .jumia-nav>li.dropdown:hover>.mega-menu-panel,
    .jumia-nav>li.dropdown.mmp-open>.mega-menu-panel {
        transform: translateY(0);
    }

    .mmp-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .mmp-feature {
        flex: 0 0 240px;
    }
}

@media (max-width: 992px) {
    .mega-menu-panel {
        display: none !important;
    }

    .subcategory-slider-bar {
        display: none !important;
    }
}

/* Mobile nav */
@media (max-width: 991px) {
    .navbar-collapse {
        position: fixed !important;
        top: 105px !important;
        left: 0 !important;
        width: 100% !important;
        height: calc(100vh - 105px) !important;
        background: #fff !important;
        z-index: 2000 !important;
        overflow-y: auto !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        transform: translateX(-100%) !important;
        display: block !important;
        padding: 0 !important;
        border-top: 1px solid #eee !important;
        visibility: visible !important;
    }

    .navbar-collapse.show {
        transform: translateX(0) !important;
    }

    .navbar-collapse.collapse:not(.show) {
        display: block !important;
        transform: translateX(-100%) !important;
    }

    .jumia-nav,
    .site-navbar__inner {
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
        gap: 0;
    }

    .jumia-nav>li,
    .snav-item {
        width: 100%;
        border-bottom: 1px solid #f8f9fa;
    }

    .jumia-nav>li>a,
    .snav-item {
        padding: 14px 20px !important;
        font-size: 15px;
        justify-content: flex-start;
        width: 100%;
        border-bottom: none;
    }
}
