/****** Global CSS ******/
/* ------------------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Hind Siliguri", "Bangla", sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
}

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

a {
    text-decoration: none;
    color: inherit;
}


.section-title {
    text-align: left;
    margin: 20px 0 20px;
    font-size: 22px;
    font-weight: 600;
    color: #333;
    position: relative;
    padding-right: 20px;
}

.section-title:after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100px;
    height: 2px;
    background-color: #e44d26;
}


/******* Header Styles *******/
/* ------------------------ */

header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.logo h1 {
    font-size: 24px;
    color: #e44d26;
}

.search-bar {
    flex-grow: 1;
    margin: 0 20px;
}

.search-bar form {
    display: flex;
}

.search-bar input {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-bar button {
    padding: 8px 15px;
    background: #e44d26;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.user-actions a {
    margin-left: 15px;
    font-size: 18px;
    color: #555;
}

.logo-h {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}


/****** Navigation Styles ******/
/* -------------------------- */

nav {
    padding: 10px 0;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu>li {
    position: relative;
    margin-right: 20px;
}

.nav-menu>li>a {
    display: block;
    padding: 8px 0;
    font-weight: 500;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 10px 0;
    display: none;
    z-index: 100;
}

.nav-menu>li:hover .submenu {
    display: block;
}

.submenu li a {
    display: block;
    padding: 8px 15px;
}

.submenu li a:hover {
    background: #f5f5f5;
}


/******* Hero Slider *******/
/* --------------------- */

.hero-slider {
    /* margin: 20px 0; */
    margin: 10px 0;
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
}

.slide.active {
    opacity: 1;
}

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

.slide-link {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.slide-content {
    position: absolute;
    bottom: 50px;
    left: 50px;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 8px;
}

.slide-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.slide-description {
    margin-bottom: 15px;
}

.slide-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #e44d26;
    color: white;
    border-radius: 4px;
    font-weight: 500;
}

.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.hero-slider:hover .slider-controls {
    opacity: 1;
}

.slider-controls button {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.slider-controls button:hover {
    background: #e44d26;
    color: white;
}

.slider-controls button i {
    font-size: 18px;
}

.slider-controls .prev-slide {
    margin-right: auto;
}

.slider-controls .next-slide {
    margin-left: auto;
}

.hero-slider-ad-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .hero-slider-ad-row {
        flex-direction: row;
        align-items: stretch;
    }
    .hero-slider-ad-row .hero-slider {
        width: 65%;
    }
    .hero-slider-ad-row .ad-image-container {
        width: 35%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .hero-slider-ad-row .ad-image-container img {
        max-height: 400px;
        width: 100%;
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
}


/******* Categories Section *******/
/* ----------------------------- */

.categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.category-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-img {
    height: 100px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-img i {
    font-size: 30px;
    color: #e44d26;
}

.category-name {
    padding: 10px;
    font-weight: 500;
}



/******* Products CSS *******/
/* ------------------------ */
.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    cursor: pointer;
}

.product-img {
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 250px;
    /* Fixed height for consistency */
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Maintains aspect ratio while filling container */
    transition: opacity 0.8s ease, transform 0.3s ease;
}

.product-img .hover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    object-fit: cover;
    /* Maintains aspect ratio while filling container */
    transition: opacity 0.9s ease;
}

.product-card:hover .hover-img {
    opacity: 1;
}

.product-card:hover .default-img {
    opacity: 0;
}

.product-badge {
    position: absolute;
    top: 9px;
    right: 9px;
    background: #e44d26;
    color: white;
    padding: 10px 6px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 11px;
    text-align: center;
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
}

.product-actions button {
    background: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-bottom: 5px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #555;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-weight: 500;
    margin-bottom: 8px;
}

.product-price {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.current-price {
    font-weight: bold;
    font-size: 16px;
    color: #e44d26;
    margin-right: 10px;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.discount {
    color: #4caf50;
    font-size: 14px;
    margin-left: auto;
}

.product-rating {
    color: #ffd700;
    font-size: 14px;
    margin-bottom: 12px;
}

.add-to-cart {
    display: block;
    width: 100%;
    padding: 8px;
    background: #e44d26;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.order-now {
    display: block;
    width: 192px;
    padding: 8px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.add-to-cart:hover {
    background: #c53d20;
}



/****** Mobile Navigation ******/
/* --------------------------- */

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.mobile-menu {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
}

.mobile-menu a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
}

.mobile-menu i {
    font-size: 20px;
    margin-bottom: 5px;
}



/****** Mobile Menu Toggle Button ******/
/* ---------------------------------- */

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #333;
    font-size: 24px;
    cursor: pointer;
}

/****** Mobile Menu Styles ******/
.mobile-nav-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: #fff;
    z-index: 1000;
    overflow-y: auto;
}

.mobile-nav-menu:before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}


/* Menu Tab Mobile Menu */
/* ------------------- */

.nav-tab {
    display: inline-block;
    padding: 16px;
    font-weight: 600;
    font-size: 13px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
    width: 50%;
    text-align: center;
}

.nav-tab-non-active {
    background: #f5f5f5;
}

.nav-tab-active {
    background: #e9e9e9;
}

.nav-tab-active::after {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    content: "";
    background: #000000;
}

.mobile-nav-menu.active {
    display: block;
}

.mobile-nav-menu .close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.mobile-nav-menu ul {
    list-style: none;
}

.mobile-nav-menu>ul>li {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-menu>ul>li>a {
    display: block;
    color: white;
    font-size: 18px;
    padding: 10px 0;
    font-weight: 500;
}

.mobile-nav-menu .submenu {
    position: static;
    width: 100%;
    background: transparent;
    box-shadow: none;
    display: none;
}

.mobile-nav-menu .submenu.active {
    display: block;
}

.mobile-nav-menu .submenu li a {
    color: #ddd;
    background: #ffffff;
    margin: 10px 5px;
    border-radius: 5px;
    color: #000;
    padding: 7px 13px;
}

.mobile-nav-menu .has-submenu {
    position: relative;
}

.mobile-nav-menu .submenu-toggle {
    position: absolute;
    right: 0;
    top: 10px;
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

/****** Footer ******/
/* ---------------- */

footer {
    background: #222;
    color: white;
    padding: 40px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #e44d26;
}

.footer-links {
    list-style: none;
}

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

.footer-links a:hover {
    color: #e44d26;
}

.payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.payment-methods i {
    font-size: 24px;
    color: #ddd;
}

.footer-bottom {
    text-align: center;
    padding: 15px 0;
    border-top: 1px solid #444;
    font-size: 14px;
}


/********** Mobile Responsive CSS *************/
/*********************************************/

@media (max-width: 768px) {

    /********** Products - Mobile *************/
    .products {
        grid-template-columns: repeat(2, 1fr);
        /* 2 cards per row */
    }

    .product-img {
        height: 200px;
        /* Fixed height for consistency */
    }

    /********** Top Header - Mobile *************/
    .top-header {
        flex-wrap: wrap;
    }

    .logo {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    .search-bar {
        order: 3;
        width: 100%;
        margin: 10px 0 0;
    }

    .user-actions {
        order: 2;
    }

    /********** Navigation - Mobile *************/
    nav .container .nav-menu {
        display: none;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 15px;
    }

    /********** Hero Slider - Mobile *************/
    .hero-slider {
        height: 160px;
    }

    .slide-content {
        left: 20px;
        bottom: 20px;
        max-width: 80%;
    }

    .mobile-nav {
        display: block;
    }

    /********** Body - Mobile *************/
    body {
        padding-bottom: 60px;
    }

    /********** Order Now - Mobile *************/
    .order-now {
        width: 100%;
        font-size: 14px;
        padding: 9.5px 30px;
    }

    /********** Footer - Mobile *************/
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .footer-column {
        margin-bottom: 20px;
    }

    .footer-column h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }

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

    .payment-methods {
        gap: 8px;
    }

    .payment-methods i {
        font-size: 20px;
    }
}

@media (max-width: 517px) {
    .order-now {
        width: 100%;
        font-size: 14px;
        padding: 9.5px 19px;
    }
}


@media (max-width: 420px) {
    .order-now {
        width: 100%;
        font-size: 15px;
        padding: 8.5px 10px;
    }
}

/********** WhatsApp Marquee Mobile *************/
.whatsapp-marquee-mobile {
    display: block;
    background: linear-gradient(135deg, #da5f40 0%, #e44d26 100%);
    color: white;
    padding: 9px 0px 0px;
    /* margin: 8px 0px 0px; */
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(37, 211, 102, 0.15);
    border: 2px solid #fff;
    overflow: hidden;
    white-space: nowrap;
}

.whatsapp-marquee-mobile i {
    font-size: 16px;
}

/* Cart badge in mobile footer nav */
.mobile-menu .fa-shopping-cart {
    position: relative;
}

@media (min-width: 1024px) {
    .desktop-nav-menu {
        overflow-x: visible !important;
        white-space: normal !important;
    }
    .desktop-nav-menu .nav-menu {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
        white-space: normal !important;
    }
    .submenu {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
}