/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Anek Bangla', sans-serif;
    /* background-color: #f7f7f7; */
    color: #333;
    line-height: 1.6;
    padding-bottom: 64px;
    /* Space for mobile bottom nav */
}

@media (min-width: 1024px) {
    body {
        padding-bottom: 0;
    }
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* HEADER */
.header {
    position: sticky;
    top: 0;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    color: #000000;
}

.logo-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    color: #10b981;
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
    position: relative;
}

@media (min-width: 1024px) {
    .desktop-nav {
        display: flex;
        gap: 20px;
    }
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    color: #4b5563;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #1e3a8a;
    background-color: #f3f4f6;
}

/* Desktop Submenu (Simple dropdown like mobile) */
.desktop-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 101;
}

.nav-item:hover .desktop-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.desktop-submenu-link {
    display: block;
    padding: 12px 16px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.desktop-submenu-link:hover {
    background-color: #eef2ff;
    color: #1e3a8a;
}

/* Utility Icons */
.utility-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-button {
    padding: 8px;
    border-radius: 50%;
    color: #374151;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* Hide search button on mobile */
@media (max-width: 1023px) {
    .icon-button:first-child {
        display: none;
    }
}

.icon-button:hover {
    background-color: #f3f4f6;
    color: #1e3a8a;
}

.cart-icon {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 8px;
    height: 37px;
    width: 37px;
    border-radius: 50%;
    color: #374151;
    transition: all 0.2s ease;
}

.cart-icon:hover {
    background-color: #f3f4f6;
    color: #1e3a8a;
}

.cart-badge {
    position: absolute;
    top: 2px !important;
    right: -3px !important;
    display: flex;
    min-width: 20px;
    height: 19px;
    padding: 0 !important;
    font-size: 11px !important;
    line-height: 1;
    font-weight: 600;
    color: #ffffff !important;
    background-color: #ef4444 !important;
    border-radius: 50px !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    padding: 8px;
    border-radius: 6px;
    color: #374151;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background-color: #f3f4f6;
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Mobile Sidebar Menu */
.sidebar-menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
    background-color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    transform: translateX(-100%);
    z-index: 1000;
}

.sidebar-menu.open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.sidebar-link {
    display: block;
    padding: 14px 20px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background-color: #eef2ff;
    color: #1e3a8a;
}

/* Mobile Accordion */
.mobile-accordion-toggle-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0px 20px 0px 0px;
    color: #374151;
    background: none;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    text-align: left;
    transition: all 0.2s ease;
}

.mobile-accordion-toggle-wrapper:hover {
    background-color: #eef2ff;
    color: #1e3a8a;
}

.mobile-accordion-content {
    background-color: #f9fafb;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
}

.mobile-accordion-content.open {
    max-height: 500px;
    opacity: 1;
}

.mobile-accordion-link {
    display: block;
    padding: 12px 20px 12px 36px;
    color: #4b5563;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.mobile-accordion-link:hover {
    background-color: #e0e7ff;
    color: #1e3a8a;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
}

.sidebar-button {
    width: 100%;
    text-align: center;
    padding: 12px;
    font-size: 17px;
    font-weight: 500;
    color: white;
    background-color: #1e3a8a;
    border-radius: 8px;
    border: none;
    transition: all 0.2s ease;
    display: block;
}

.sidebar-button:hover {
    background-color: #4338ca;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Mobile Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

@media (min-width: 1024px) {
    .bottom-nav {
        display: none;
    }
}

.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 64px;
    max-width: 512px;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #6b7280;
    padding: 8px;
    transition: all 0.2s ease;
}

.bottom-nav-item.active {
    color: #1e3a8a;
}

.bottom-nav-item:hover {
    color: #4f46e5;
}

.bottom-nav-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 4px;
}

/* Animation for chevron */
.chevron-rotate {
    transition: transform 0.3s ease;
}

.chevron-rotate.rotate-180 {
    transform: rotate(180deg);
}