/* --- Root Variables & Global Styles --- */
:root {
    --bg-color: #f4f5f7;
    --surface-color: #ffffff;
    --primary-color: #E91E63; /* Updated to a shade of pink */
    --theme-bg-light: #FBE9EE; /* Light Pink for Header/Footer */
    --theme-bg-darker: #F8CFDC; /* Darker Pink for contrast */
    --text-color: #212529;
    --secondary-text-color: #6c757d;
    --border-color: #e0e0e0;
    --discount-bg: #D32F2F; /* Red for discount */
    --font-family-english: 'Poppins', sans-serif;
    --font-family-bengali: 'Hind Siliguri', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    font-family: var(--font-family-bengali); 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main { flex-grow: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
@media (min-width: 1201px) {
    .container {
        max-width: 1360px;
        padding: 0 20px;
    }
}
a { text-decoration: none; color: inherit; }
.section-title { 
    font-size: 1.8em; 
    margin-bottom: 20px;
    font-weight: 600; 
    color: var(--text-color); 
    text-align: left;
}
.hidden { display: none !important; }

/* --- Navbar --- */
.navbar { background-color: var(--theme-bg-light); padding: 10px 0; height: auto; border-bottom: 1px solid #e9d7db; }
.navbar .container { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.logo img { height: 64px; width: 64px; object-fit: contain; }
.search-bar { position: relative; flex-grow: 1; max-width: 600px; display: flex; }
.search-bar input { width: 100%; padding: 10px 15px; border: 1px solid #180000; border-right: none; border-radius: 5px 0 0 5px; background-color: #f6f6f6; color: #030000; font-size: 1em; outline: none; }
.search-bar button { padding: 0 20px; border: none; background-color: var(--primary-color); color: #ffffff; border-radius: 0 5px 5px 0; cursor: pointer; font-size: 1.2em; }
.nav-actions { display: flex; align-items: center; }
.auth-link { color: #212529; font-weight: 600; white-space: nowrap; }
.nav-actions .icon-link { color: #212529; font-size: 1.5em; margin-left: 20px; cursor: pointer; position: relative; }

/* --- Mobile Category Bar --- */
#mobile-category-bar { display: none; } /* Hidden by default */

/* --- Cart Count Badge --- */
.cart-count-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--discount-bg);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.7em;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--theme-bg-light);
}

/* --- Main Banner with SwiperJS --- */
.main-banner-wrapper { margin-top: 20px; }
.hero-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 1200 / 300;
    overflow: hidden;
    border-radius: 10px;
    background-color: #e0e0e0;
}
.hero-slider .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slider .swiper-pagination-bullet { width: 10px; height: 10px; background-color: rgba(255, 255, 255, 0.7); opacity: 1; }
.hero-slider .swiper-pagination-bullet-active { background-color: #ffffff; }
.hero-slider .swiper-button-next, .hero-slider .swiper-button-prev { color: #fff; background-color: rgba(0, 0, 0, 0.3); width: 40px; height: 40px; border-radius: 50%; transition: background-color 0.2s; }
.hero-slider .swiper-button-next:hover, .hero-slider .swiper-button-prev:hover { background-color: rgba(0, 0, 0, 0.5); }
.hero-slider .swiper-button-next::after, .hero-slider .swiper-button-prev::after { font-size: 1.2rem; font-weight: bold; }

.secondary-promo-section { margin: 20px 0 10px; }
.secondary-promo-section img { width: 100%; display: block; border-radius: 10px; height: 200px; object-fit: cover; background-color: #e9e9e9; min-height: 50px; }

/* --- Hot Collection & Product Grid Section --- */
.hot-collection-section, .product-grid-section, .categories-section { padding: 20px 0; }
.product-grid-section .section-title { text-align: center; }
.section-header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.view-all-link { color: var(--primary-color); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.view-all-mobile { display: none; }

.horizontal-scroll-wrapper { position: relative; width: 100%; display: flex; align-items: center; }
.horizontal-scroll-track { display: flex; gap: 20px; padding: 10px 0; overflow-x: auto; scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; cursor: grab; user-select: none; }
.horizontal-scroll-track.grabbing { cursor: grabbing; scroll-behavior: auto; }
.horizontal-scroll-track::-webkit-scrollbar { display: none; }
#hot-collection-track .product-card { flex: 0 0 calc(100% / 6 - 17px); min-width: 180px; }
.scroll-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; background-color: rgba(255, 255, 255, 0.9); border: 1px solid var(--border-color); border-radius: 50%; width: 45px; height: 45px; font-size: 1.2rem; color: var(--text-color); cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.1); transition: all 0.2s ease-in-out; }
.scroll-btn:hover { background-color: #fff; transform: translateY(-50%) scale(1.1); }
.scroll-btn.prev { left: -22px; }
.scroll-btn.next { right: -22px; }

.product-grid-layout { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }

/* --- [UPDATED] Categories Section --- */
.categories-section .section-title { text-align: center; }
.category-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    justify-items: center;
    gap: 15px; /* Reduced gap */
}
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 180px;
    padding: 10px;
    background-color: transparent;
    border: none;
    transition: transform 0.2s;
}
.category-card:hover {
    transform: translateY(-5px);
}
.category-card img {
    width: 180px; /* Increased size */
    height: 180px; /* Increased size */
    border-radius: 50%; /* Makes image circular */
    object-fit: cover; /* Ensures image fills the circle */
    margin-bottom: 15px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.category-card span {
    font-weight: 500;
    font-size: 1.2em; /* Increased font size */
    color: var(--text-color);
    font-family: var(--font-family-english); /* Use English font */
}

/* --- Product Card Redesign --- */
.product-card { background-color: var(--surface-color); border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; position: relative; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.product-card .stock-info { position: absolute; top: 10px; left: 10px; background-color: rgba(211, 47, 47, 0.85); color: #fff; padding: 3px 8px; border-radius: 4px; font-size: 0.8em; font-weight: 500; z-index: 5; }
.product-card .img-container { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; }
.product-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-card:hover img { transform: scale(1.05); }
.product-card .info { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; text-align: left; }
.product-card h3 { font-size: 1.1em; font-weight: 500; color: var(--text-color); line-height: 1.4; height: 3.0em; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.product-card .price-info { margin-top: auto; }
.product-card .sale-price { color: var(--discount-bg); font-weight: 700; font-size: 1.6em; display: block; margin-bottom: 5px; }
.product-card .price-details { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.product-card .regular-price-container { display: flex; align-items: center; gap: 8px;}
.product-card .regular-price { color: var(--secondary-text-color); text-decoration: line-through; font-size: 1em; }
.product-card .discount { font-size: 0.8em; font-weight: 600; color: #fff; background-color: var(--discount-bg); padding: 2px 6px; border-radius: 4px; }
.product-card .sold-count { font-size: 0.8em; font-weight: 500; color: var(--secondary-text-color); padding: 2px 6px; border-radius: 4px; background-color: #f0f0f0; }
.sale-price, .regular-price, .cart-item-price, .cart-item-total, .summary-details span, .order-item-price, .order-total span { font-family: var(--font-family-english), sans-serif !important; }
.load-more-container { text-align: center; margin-top: 40px; }
#load-more-btn { background-color: transparent; color: var(--primary-color); border: 1px solid var(--primary-color); padding: 10px 40px; border-radius: 5px; font-weight: 600; cursor: pointer; transition: all 0.2s; }

/* --- Footer Redesign --- */
footer { background-color: var(--theme-bg-light); color: #495057; padding: 40px 0 0; margin-top: 30px; border-top: 1px solid var(--theme-bg-darker);}
.footer-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.footer-column h4 { color: #212529; font-size: 1.2em; margin-bottom: 15px; font-family: var(--font-family-english); }
.footer-column p { line-height: 1.8; margin-bottom: 10px; }
.footer-column p i { color: var(--primary-color); margin-right: 10px; width: 20px; text-align: center; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #495057; transition: color 0.2s, padding-left 0.2s; }
.footer-links a:hover { color: var(--primary-color); padding-left: 5px; }
.footer-links.footer-categories { display: grid; grid-template-rows: repeat(5, auto); grid-auto-flow: column; gap: 0 1rem; }
.social-links { display: flex; gap: 15px; margin-bottom: 20px; }
.social-links a { color: #495057; background-color: #e9ecef; width: 40px; height: 40px; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.2s, color 0.2s; }
.social-links a:hover { background-color: var(--primary-color); color: #fff; }
.social-links .fa-tiktok { font-size: 1.1em; }
.payment-title { margin-top: 20px; }
.payment-methods { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.payment-methods img { height: 35px; width: auto; max-width: 55px; object-fit: contain; background-color: white; border-radius: 5px; padding: 5px; border: 1px solid #e0e0e0; }
.footer-bottom { background-color: var(--theme-bg-darker); text-align: center; padding: 15px 0; margin-top: 30px; color: #3f2a31; }

/* --- Notification Modal --- */
.notification-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); display: none; justify-content: center; align-items: center; z-index: 1000; opacity: 0; transition: opacity 0.3s ease; }
.notification-modal.visible { display: flex; opacity: 1; }
.notification-content { background-color: #333; padding: 30px 40px; border-radius: 10px; text-align: center; max-width: 400px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); transform: scale(0.9); transition: transform 0.3s ease; }
.notification-modal.visible .notification-content { transform: scale(1); }
#notification-message { font-size: 1.2em; color: #fff; }

/* --- Category Modal Styles (Global) --- */
.category-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 1001; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.category-modal-overlay.active { opacity: 1; visibility: visible; }
.category-modal-content { position: absolute; top: 0; left: 0; width: 80%; max-width: 300px; height: 100%; background-color: var(--bg-color); padding: 20px; transform: translateX(-100%); transition: transform 0.3s ease-in-out; overflow-y: auto; }
.category-modal-overlay.active .category-modal-content { transform: translateX(0); }
.category-modal-content h3 { font-size: 1.5em; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.category-modal-content .close-btn { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 2em; color: var(--secondary-text-color); cursor: pointer; }
#modal-category-list { list-style: none; padding: 0; margin: 0; }
#modal-category-list li a { display: block; padding: 15px 10px; color: var(--text-color); font-size: 1.1em; border-bottom: 1px solid var(--border-color); }
#modal-category-list .divider { height: 1px; background-color: var(--border-color); margin: 10px 0; }

/* --- Mobile Bottom Nav --- */
.mobile-bottom-nav { display: none; }

/* --- WhatsApp Floating Button --- */
.whatsapp-float-btn {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: var(--primary-color); /* Updated to Pink */
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 2em;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease-in-out;
}
.whatsapp-float-btn:hover { transform: scale(1.1); }

/* --- Responsive Design --- */
@media (min-width: 769px) {
    .category-wrapper { grid-template-columns: repeat(5, 1fr); }
    .category-modal-content { left: auto; right: 0; transform: translateX(100%); }
    .category-modal-overlay.active .category-modal-content { transform: translateX(0); }
}

@media (max-width: 1200px) {
    #hot-collection-track .product-card { flex-basis: calc(100% / 4 - 15px); }
    .product-grid-layout { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 992px) {
    #hot-collection-track .product-card { flex-basis: calc(100% / 3 - 14px); }
    .product-grid-layout { grid-template-columns: repeat(3, 1fr); }
    .category-card img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    body { padding-bottom: 70px; overflow-x: hidden; }
    .main-banner-wrapper .container, .secondary-promo-section .container { padding-left: 0; padding-right: 0; }
    .section-title { font-size: 1.5em; margin-bottom: 15px; }
    .navbar .logo, .nav-actions, #pc-hamburger-menu-btn { display: none; }
    #user-profile { display: none; }
    .navbar .container { flex-wrap: wrap; justify-content: center; padding: 5px 15px; }
    .search-bar { order: 1; width: 100%; margin: 5px 0; max-width: 100%; }
    .search-bar input { background-color: #fff; border: 1px solid #180000; border-radius: 20px; padding: 10px 45px 10px 15px; }
    .search-bar button { position: absolute; right: 0; left: auto; background: transparent; color: var(--primary-color); border-radius: 0; padding: 0 15px; height: 100%; }
    #mobile-category-bar { display: block; background-color: var(--surface-color); padding: 8px 0; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 998; }
    #mobile-category-bar-container { display: flex; overflow-x: auto; gap: 24px; padding: 0 15px; scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: smooth; }
    #mobile-category-bar-container::-webkit-scrollbar { display: none; }
    #mobile-category-bar-container a { white-space: nowrap; font-size: 0.95em; font-weight: 500; padding-bottom: 8px; color: var(--secondary-text-color); border-bottom: 3px solid transparent; transition: color 0.2s, border-color 0.2s; }
    #mobile-category-bar-container a.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
    .main-banner-wrapper { margin-top: 10px; }
    .hero-slider { aspect-ratio: 1200 / 400; height: auto; border-radius: 10px; }
    .hero-slider .swiper-slide img { object-fit: cover; }
    .hero-slider .swiper-pagination { bottom: 8px !important; }
    .hero-slider .swiper-button-next, .hero-slider .swiper-button-prev { display: none; }
    .secondary-promo-section { margin-top: 15px; }
    .secondary-promo-section img { aspect-ratio: 1200 / 250; height: auto; object-fit: cover; border-radius: 10px; }
    .hot-collection-section { padding: 15px 0; }
    .hot-collection-section .container { display: flex; flex-direction: column; }
    .hot-collection-section .section-header-flex { order: 1; margin-bottom: 15px; }
    .hot-collection-section .horizontal-scroll-wrapper { order: 2; display: flex; align-items: center; position: relative; width: 100%; }
    #hot-collection-track { display: flex; gap: 15px; padding: 0 15px; overflow-x: auto; scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; scroll-snap-type: x mandatory; }
    #hot-collection-track::-webkit-scrollbar { display: none; }
    #hot-collection-track .product-card { flex: 0 0 45%; min-width: 0; scroll-snap-align: start; }
    .product-card .discount { font-size: 0.7em; padding: 1px 4px; }
    .hot-collection-section .horizontal-scroll-wrapper .scroll-btn { display: none; }
    .product-grid-layout { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .product-card .img-container { aspect-ratio: 1.1 / 1; }
    .product-card h3 { font-size: 1em; height: 2.8em; } 
    .product-card .sale-price { font-size: 1.4em; }
    .product-card .regular-price { font-size: 0.9em; }
    .view-all-desktop { display: none; }
    .view-all-mobile { display: inline; }
    
    .category-wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px; /* Reduced gap for mobile */
    }
    .category-card {
        padding: 10px 5px;
    }
    .category-card img {
        width: 90px; /* Increased size for mobile */
        height: 90px; /* Increased size for mobile */
    }
    .category-card span {
        font-size: 1em; /* Increased font size for mobile */
    }

    .mobile-bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; width: 100%; height: 70px; background-color: var(--theme-bg-light); justify-content: space-around; align-items: center; z-index: 999; border-top: 1px solid var(--theme-bg-darker); box-shadow: 0 -2px 10px rgba(0,0,0,0.1); }
    .mobile-bottom-nav .nav-item { display: flex; justify-content: center; align-items: center; color: #212529; flex-grow: 1; position: relative; }
    .mobile-bottom-nav .nav-item img { height: 35px; width: 35px; }
    .mobile-bottom-nav .nav-item i { font-size: 1.6em; }
    .mobile-bottom-nav .cart-count-badge { top: 8px; right: calc(50% - 28px); border: 2px solid var(--theme-bg-light); }
    .footer-container { grid-template-columns: 1fr; text-align: center; gap: 15px; }
    .footer-column { margin-bottom: 15px; }
    .footer-column h4 { margin-bottom: 10px; }
    .footer-links.footer-categories { display: block; text-align: center; }
    .footer-column p { justify-content: center; text-align: center; }
    .footer-column p i { margin-right: 8px; }
    .social-links, .payment-methods { justify-content: center; }
    .whatsapp-float-btn { width: 50px; height: 50px; bottom: 85px; right: 15px; font-size: 1.8em; }
}