/* ========================================
   PROFESSIONAL BURUNDI ONLINE MARKET E-COMMERCE STYLES
   ======================================== */

/* Root Variables */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #1f2937;
    --accent-color: #0369a1;
    --success-color: #059669;
    --light-bg: #f9fafb;
    --white: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-light: #9ca3af;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease-in-out;
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
    overflow-x: hidden;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

header {
    background-color: var(--white);
    color: var(--text-primary);
    padding: 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
    pointer-events: none;
}
/* Navbar CSS settings */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    background-color: #fff;
}

/* Navigation links */
.nav-links {
    display:flex;
    list-style: none;
    gap: 20px;
}

/* Hamburger CSS settings */
.hamburger {
    display:none;
    flex-direction: column;
    cursor: pointer
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: #000;
    margin: 4px 0;
}



nav {
    padding: 20px 0;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

nav ul li {
    display: inline-block;
}

nav ul li a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 16px 24px;
    display: inline-block;
    position: relative;
    transition: var(--transition);
    letter-spacing: 0px;
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

nav ul li a:hover {
    color: var(--accent-color);
    transform: none;
    cursor: pointer;
}

nav ul li a:hover::before {
    width: 70%;
} 

/* ========================================
   MAIN CONTENT
   ======================================== */

   /* page in preparation -- Start */
#pageInPreparation {
    text-align: center;
    font-size: 1.2em;
    margin-top: 2em;
}

.pageInPreparation {
    display: none
}
/* page in preparation -- End */

main {
    padding: 50px 30px 80px;
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
    /* flex-wrap: nowrap; // look a way to make the items remainng in the same line, not jumping in the second line when it becomes longer
    overflow-x: auto;
    gap: 10px;
    white-space: nowrap; */
}

h1 {
    font-size: 44px;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    color: var(--primary-color);
    scroll-margin-top: 90px;
}

h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 40px 0 20px 0;
    text-align: center;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 12px;
    scroll-margin-top: 90px;
}
h3 {
    text-align: center;
    color: var(--primary-color);
    padding-bottom: 5px
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 1px;
}


main > p {
    font-size: 15px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.8;
}

main > p:first-of-type {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ========================================
   PRODUCTS SECTION
   ======================================== */
main .home-products-list,
main .home-products-list .product-item {
    display: block !important;
    flex: none !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

main .home-products-list {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden;
    padding: 0;
    margin: 8px 0 0;
    list-style: none;
}

main .home-products-list .product-item {
    padding: 20px;
    align-items: flex-start;
    text-align: left;
    height: auto;
    margin-bottom: 16px;
}

main .home-products-list .product-item a {
    justify-content: flex-start;
    padding: 0 0 8px 0;
}

main .home-products-list .product-item p {
    justify-content: flex-start;
    text-align: left;
    padding: 0;
    margin: 0;
}

.scroll-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 12px 0 8px;
}

.scroll-btn {
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--primary-color);
    border-radius: 999px;
    width: 42px;
    height: 42px;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.scroll-btn:hover {
    background: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
}

.horizontal-list {
    display: grid;
    grid-template-rows: repeat(auto-fill, minmax(280px, 1fr));
    align-content: center;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding: 8px 4px 18px;
    gap: 15px;
}

.horizontal-list::-webkit-scrollbar {
    height: 8px;
}

.horizontal-list::-webkit-scrollbar-track {
    background: rgba(3, 105, 161, 0.15);
    border-radius: 999px;
}

.horizontal-list::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 999px;
}

.products-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    justify-content: flex-start;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    min-width: max-content;
}

/* div li a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
    background-color: var(--success-color);
} */

.product-item {
    background: var(--white);
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 280px;
    min-width: 280px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    scroll-snap-align: start;
}

.product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: left;
}

.product-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.product-item:hover::before {
    transform: scaleX(1);
}

.product-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    padding: 20px;
    display: block;
    transition: var(--transition);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-item a:hover {
    color: var(--accent-color);
}

.product-item img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    display: block;
}

/* .product-item figcaption {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 0 20px 15px;
}
 */
.product-item p {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    padding: 0 20px 20px;
    line-height: 1.7;
    flex: 1;
    display: flex;
    align-items: center;
}

.product-item .nowrap {
    white-space: nowrap;
}

/* ========================================
   LISTS & CONTENT
   ======================================== */

main ul {
    list-style: none;
    padding: 0;
}

.home-products-list {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-top: 8px;
    overflow: hidden;
}

.home-products-list .product-item {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 20px;
    align-items: flex-start;
    text-align: left;
    height: auto;
}

.home-products-list .product-item a {
    justify-content: flex-start;
    padding: 0 0 8px 0;
}

.home-products-list .product-item p {
    justify-content: flex-start;
    text-align: left;
    padding: 0;
    margin: 0;
}

main ul li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-secondary);
    font-size: 15px;
}

main ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 20px;
}

main a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

main a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: var(--white);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    width: 80%;
    max-width: 600px;
}

.close {
    color: var(--text-secondary);
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close:hover {
    color: var(--accent-color);
}

.modal-image {
    margin: auto;
    display: block;
    max-width: 100%;
    height: auto;
}

.modal-whatsapp-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: var(--success-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
}

/* Cart Section */

.cart {
    display: none
}

/* ====================================
CONTACT US
=======================================*/
form {
    text-align: center;
    width: 100%;
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 20px;
    position: relative;
    width: 100%;
    margin-top: auto;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    font-weight: 500;
    letter-spacing: 0px;
}

footer p {
    margin: 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 22px;
    }

    main {
        padding: 30px 20px;
    }

    .products-list {
        gap: 20px;
        justify-content: center;
    }

    .product-item {
        width: 100%;
        max-width: 280px;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        display:none;
        flex-direction: column;
        position:absolute;
        top: 70px;
        right: 20px;
        background: white;
        width: 220px;
        padding: 20px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active {
        display: flex
    }

    /* nav ul {
        gap: 0;
    }

    nav ul li a {
        padding: 12px 18px;
        font-size: 14px;
    } */
} 

@media (max-width: 480px) {
    body {
        padding-bottom: 120px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    main {
        padding: 20px 15px;
    }

    .products-list {
        gap: 15px;
        flex-direction: column;
        align-items: center;
    }

    .product-item {
        width: 100%;
        max-width: 280px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li a {
        padding: 10px 20px;
    }

    nav ul li a::before {
        display: none;
    }

    nav ul li a:hover::before {
        display: none;
    }

    footer {
        font-size: 12px;
        padding: 12px 10px;
    }
}