/* Global Settings & Variables */
:root {
    --primary-color: #00f3ff;
    --text-color: #f1f5f9;
    --light-gray: rgba(255, 255, 255, 0.05);
    --border-color: rgba(0, 243, 255, 0.3);
    --discount-color: #ff0055;
    --new-color: #00ff87;
    --glass-bg: rgba(15, 23, 42, 0.75); /* একটু ডার্ক করা হয়েছে যেন ব্লার না থাকলেও গ্লাস লুক থাকে */
    --glass-border: rgba(255, 255, 255, 0.12);
}

/* স্মুথ স্ক্রোলিং ও পারফরম্যান্স বুস্ট */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #080c14;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 243, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 0, 127, 0.08) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-color);
    -webkit-overflow-scrolling: touch; /* iOS স্ক্রোলিং স্মুথ করার জন্য */
}

/* Header & Navbar */
.main-header {
    padding: 15px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 243, 255, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    transform: translateZ(0); /* GPU acceleration for smooth scrolling */
}

.nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: bold;
    color: #00f3ff;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.nav-icons {
    display: flex;
    gap: 18px;
    font-size: 1.25rem;
    position: relative;
    color: #38bdf8;
}

.icon-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--discount-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 50%;
    box-shadow: 0 0 8px var(--discount-color);
}

/* ওয়েলকাম লেখার স্টাইল ও অ্যানিমেশন */
.welcome {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    background: linear-gradient(120deg, #ff007f, #00f3ff, #00ff87, #ff9900, #ff007f);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shineEffect 4s linear infinite, pulseEffect 2s ease-in-out infinite alternate;
}

@keyframes shineEffect {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

@keyframes pulseEffect {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

.search-category-row {
    display: flex;
    gap: 10px;
}

.search-box {
    flex: 1;
    position: relative;
}

.search-box input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 10px 10px 35px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    color: #00f3ff;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-box input::placeholder {
    color: #a0aec0;
}

.search-box input:focus {
    border-color: #00f3ff;
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.4);
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 13px;
    color: #00f3ff;
}

.category-dropdown-btn {
    background: linear-gradient(135deg, #0055ff, #00f3ff);
    color: #ffffff;
    padding: 6px 15px; 
    border-radius: 8px;
    border: none;
    font-weight: 600;
    display: inline-flex;  
    align-items: center;
    gap: 5px;
    text-decoration: none; 
    line-height: 1;        
    box-sizing: border-box;
    font-size: 0.9rem;
    box-shadow: 0 0 12px rgba(0, 85, 255, 0.5);
    transition: transform 0.2s;
}

.category-dropdown-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(0, 243, 255, 0.8);
}

/* Swiper Container */
.hero-slider {
    width: 100%;
    max-width: 720px;
    height: 300px;
    margin: 0 auto 20px auto;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 243, 255, 0.2);
}

.swiper-slide {
    width: 100%;
    height: 100%;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* বাটন পজিশন */
.btn-shop1-now {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #00ff87, #60efff);
    color: #000;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 0 15px rgba(0, 255, 135, 0.6);
}

.btn-shop2-now {
    display: inline-block;
    width: fit-content;
    margin-top: 15px;
    background: linear-gradient(135deg, #00ff87, #60efff);
    color: #000;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 0 12px rgba(0, 255, 135, 0.5);
}

/* ক্যাটাগরি সেকশন */
.categories-section {
    padding: 15px;
    display: flex;
    gap: 15px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.categories-section::-webkit-scrollbar {
    display: none;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 65px;
    text-decoration: none;
    color: #38bdf8;
}

.category-icon-circle {
    width: 60px;
    height: 60px;
    background: var(--glass-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
    transition: transform 0.3s ease;
}

.category-item:hover .category-icon-circle {
    transform: scale(1.1);
    border-color: #ff007f;
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.6);
}

.category-icon-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-item span {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    max-width: 75px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #e2e8f0;
}

/* Features Grid Update */
.features-section {
    margin: 20px 15px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.15);
}

.feature-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    transition: background 0.3s;
}

.feature-box:hover {
    background: rgba(0, 243, 255, 0.08);
}

.feature-box i {
    font-size: 1.5rem;
    color: #00f3ff;
    background: rgba(0, 243, 255, 0.1);
    padding: 10px;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.feature-info h5 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ff9900;
}

.feature-info p {
    margin: 2px 0 0 0;
    font-size: 0.75rem;
    color: #cbd5e1;
    line-height: 1.2;
}

/* Promo Banners Grid */
.promo-section {
    margin: 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.promo-card {
    border-radius: 12px;
    padding: 15px;
    color: #fff;
    background-size: cover;
    background-position: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--glass-border);
}

.promo-1 { 
    background: linear-gradient(135deg, rgba(255, 0, 127, 0.25), rgba(15, 23, 42, 0.8));
    border-color: rgba(255, 0, 127, 0.4);
}

.promo-2 { 
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.25), rgba(15, 23, 42, 0.8));
    border-color: rgba(0, 243, 255, 0.4);
}

.promo-card h4 { 
    margin: 0; 
    font-size: 0.95rem; 
    color: #00f3ff; 
}

.promo-card p { 
    margin: 5px 0; 
    font-size: 0.75rem; 
    color: #cbd5e1; 
}

/* Products Grid Section */
.section-header {
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.section-header h3 { 
    margin: 0; 
    font-size: 1.1rem; 
    color: #ff007f;
    text-shadow: 0 0 8px rgba(255, 0, 127, 0.4);
}

.view-all { 
    color: #00f3ff; 
    text-decoration: none; 
    font-size: 0.85rem; 
}

/* Default Mobile Grid Layout (মোবাইলে ২টি করে দেখাবে) */
.products-grid {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Product Card - RGB Glowing Border & Glass Look */
.product-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    position: relative;
    background: var(--glass-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    border-color: #ff007f;
    box-shadow: 0 0 18px rgba(255, 0, 127, 0.5);
    transform: translateY(-4px);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.7rem;
    padding: 3px 6px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    z-index: 2;
}

.badge-discount { background: var(--discount-color); box-shadow: 0 0 8px var(--discount-color); }
.badge-new { background: var(--new-color); color: #000; box-shadow: 0 0 8px var(--new-color); }

.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #ff007f;
    font-size: 1.1rem;
    z-index: 2;
}

/* ==========================================
   Product Image 1:1 Aspect Ratio Fix
   ========================================== */
.product-img-wrapper {
    text-align: center;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1; /* নিখুঁত ১:১ স্কয়ার রেশিও নিশ্চিত করে */
    overflow: hidden;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover; /* প্রডাক্ট ইমেজ সম্পূর্ণ ফ্রেমজুড়ে ১:১ এ পারফেক্ট দেখাবে */
    object-position: center;
    border-radius: 8px;
}

.product-card h4 {
    margin: 5px 0;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #38bdf8;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0;
}

.current-price { 
    font-weight: bold; 
    color: #00ff87; 
    font-size: 0.9rem; 
    text-shadow: 0 0 6px rgba(0, 255, 135, 0.3);
}

.old-price { 
    text-decoration: line-through; 
    color: #64748b; 
    font-size: 0.75rem; 
}

.rating-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #cbd5e1;
}

.rating-row i { color: #ffcc00; }

.add-to-cart-btn {
    border: 1px solid #00f3ff;
    color: #00f3ff;
    background: rgba(0, 243, 255, 0.1);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    background: #00f3ff;
    color: #000;
    box-shadow: 0 0 10px #00f3ff;
}

/* ==========================================
   Desktop Responsive Layout (৪টি করে দেখাবে)
   ========================================== */

@media (min-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        padding: 20px 15px;
    }

    .section-header h3 {
        font-size: 1.3rem;
    }

    .product-card h4 {
        font-size: 0.95rem;
    }

    .current-price {
        font-size: 1rem;
    }
}

/* Exclusive Banner */
.exclusive-banner {
    margin: 15px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(0, 34, 68, 0.8));
    color: white;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 999;
    transform: translateZ(0); /* Smooth UI Layering */
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.bottom-nav-item.active {
    color: #00f3ff;
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.6);
}

.bottom-nav-item i {
    font-size: 1.2rem;
}

/* Spacer for bottom nav fixed position */
.bottom-spacer {
    height: 70px;
}

/* সাইডবার ড্রয়ার (Glass Drawer) */
.sidebar-drawer {
    position: fixed;
    top: 55px;
    left: -260px;
    width: 230px;
    height: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    z-index: 99999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    border-radius: 0 8px 8px 0;
    transition: left 0.3s ease;
    overflow: hidden;
}

.sidebar-drawer.active {
    left: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-menu li:last-child {
    border-bottom: none;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}

.sidebar-menu a:hover {
    background: rgba(0, 243, 255, 0.1);
    color: #00f3ff;
}

.sidebar-menu i {
    width: 18px;
    color: #00f3ff;
}

/* Latest Products Grid Layout */
.latest-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px;
    padding: 0 15px;
    margin-bottom: 20px;
}

/* মোবাইল রেসপনসিভ */
@media (max-width: 768px) {
    .hero-slider {
        height: 200px !important; 
    }

    .features-section {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
        padding: 10px !important;
        gap: 10px !important;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .product-card-link,
    .product-card {
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ডেস্কটপ ভার্সন (Latest Products এ ডেস্কটপে ৪টি প্রডাক্ট কার্ড) */
@media (min-width: 992px) {
    .latest-products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/*------------------animation--------------*/
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   Random/Featured Products Slider Custom Styling & Fixes
   ========================================== */
.random-products-section {
    margin: 20px 0;
    width: 100%;
    overflow: hidden;
}

.randomProductsSwiper {
    width: 100% !important;
    padding: 10px 10px 45px 10px !important;
    box-sizing: border-box !important;
}

/* Swiper Wrapper & Slide Alignment */
.randomProductsSwiper .swiper-wrapper {
    display: flex !important;
    align-items: stretch !important;
}

.randomProductsSwiper .swiper-slide {
    height: auto !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    box-sizing: border-box !important;
}

.randomProductsSwiper .swiper-slide .product-card-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-decoration: none;
}

.randomProductsSwiper .swiper-slide .product-card {
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
}

/* Mobile Screen Layout Optimization */
@media (max-width: 639px) {
    .randomProductsSwiper .swiper-slide {
        padding: 0 5px;
    }
    
    .randomProductsSwiper .swiper-slide .product-card {
        width: 100% !important; 
        max-width: 320px;
    }
}

/* Swiper Pagination (Dots) Neon Glow Effect */
.randomProductsSwiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.4);
    opacity: 0.6;
}

.randomProductsSwiper .swiper-pagination-bullet-active {
    background: #00f3ff !important;
    opacity: 1;
    box-shadow: 0 0 10px #00f3ff;
    width: 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* ==========================================
   Floating WhatsApp Button with Pulse Glow
   ========================================== */
.whatsapp-float {
    position: fixed;
    bottom: 8%;
    right: 20px;
    width: 55px;
    height: 55px;
    background-color: #25d366;
    color: #fff !important;
    border-radius: 50%;
    text-align: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: whatsapp-pulse 2s infinite;
    transform: translateZ(0); /* Hardware acceleration */
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px #25d366, 0 0 30px #25d366;
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@media (max-width: 639px) {
    .whatsapp-float {
        bottom: 9%;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
}