/* =========================================
   Global Variables & Reset
   ========================================= */
:root {
    --bg-main: #0d0d12;
    --bg-card: #16161f;
    --red: #e50914;
    --green: #00ff88;
    --txt-w: #ffffff;
    --txt-g: #cccccc;
    --font-main: 'Poppins', sans-serif;
    --font-head: 'Orbitron', sans-serif;
    --trans: 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    background: var(--bg-main);
    color: var(--txt-w);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, .logo, .tab-btn, .glow-btn { font-family: var(--font-head); }
a { text-decoration: none; color: inherit; }
.hide { display: none !important; }

/* =========================================
   Navbar Styles
   ========================================= */
.navbar {
    position: fixed; top: 0; width: 100%; 
    padding: 15px 80px; 
    display: flex; justify-content: space-between; align-items: center; 
    background: rgba(13, 13, 18, 0.85); backdrop-filter: blur(10px);
    z-index: 1000; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-brand { display: flex; align-items: center; gap: 15px; }

.brand-logo img { height: 45px; width: auto; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.brand-logo:hover img {
    transform: scale(1.15);
    filter: drop-shadow(0 0 10px var(--red)) drop-shadow(0 0 20px var(--red));
}

.logo { font-size: 24px; font-weight: 700; letter-spacing: 2px; }
.logo span { color: var(--red); }

.social-links { display: flex; gap: 35px; }
.social-icon { font-size: 20px; color: var(--txt-w); transition: var(--trans); }
.social-icon:hover { 
    color: var(--red); 
    transform: scale(1.4) translateY(-3px); 
    filter: drop-shadow(0 0 8px var(--red));
}

/* =========================================
   Hero Section
   ========================================= */
.hero { position: relative; height: 100vh; width: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.hero-video, .hero-overlay, #bg-sweep { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.hero-video { object-fit: cover; object-position: center top; z-index: -2; }
.hero-overlay { background: rgba(0, 0, 0, 0.75); z-index: -1; }
#bg-sweep { z-index: -1; transition: 0.5s ease; opacity: 0.1; }
.sweep-red { background: radial-gradient(circle at top center, var(--red) 0%, transparent 60%); }
.sweep-green { background: radial-gradient(circle at top center, var(--green) 0%, transparent 60%); }

.hero-content { text-align: center; z-index: 1; padding: 0 20px; }
.hero-content h1 { font-size: 4rem; font-weight: 700; margin-bottom: 15px; letter-spacing: 3px; text-shadow: 2px 2px 15px rgba(229, 9, 20, 0.7); }
.hero-desc { font-size: 1.2rem; margin-bottom: 30px; color: var(--txt-g); }

.glow-btn {
    display: inline-block; padding: 12px 35px; background: var(--red); color: var(--txt-w);
    font-weight: 700; letter-spacing: 1px; border-radius: 30px;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.6); transition: var(--trans);
}
.glow-btn:hover { background: #ff0f1a; box-shadow: 0 0 25px rgba(229, 9, 20, 0.9); transform: scale(1.05); }

/* =========================================
   Shop Section & Tabs
   ========================================= */
.shop-section { position: relative; padding: 80px 50px; min-height: 100vh; }
.tab-container {
    display: flex; justify-content: center; gap: 40px; margin-bottom: 50px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1); padding-bottom: 15px;
}
.tab-btn { font-size: 1.5rem; cursor: pointer; color: #777; transition: var(--trans); position: relative; }
.tab-btn:hover, .tab-btn.active { color: var(--txt-w); }
.tab-btn.active::after { content: ''; position: absolute; bottom: -17px; left: 0; width: 100%; height: 3px; background: var(--red); box-shadow: 0 0 10px var(--red); }
.tab-btn:last-child.active::after { background: var(--green); box-shadow: 0 0 10px var(--green); }

.tab-content { display: none; }
.tab-content.active-content { display: block; animation: fadeIn 0.5s ease; }

/* =========================================
   Layout, Sidebar & Trending Category
   ========================================= */
.shop-layout { display: flex; gap: 30px; }
.category-sidebar { width: 250px; background: var(--bg-card); padding: 25px; border-radius: 12px; height: fit-content; border: 1px solid rgba(255, 255, 255, 0.05); }
.sidebar-title { font-size: 1.2rem; color: #aaa; display: flex; align-items: center; gap: 10px; margin-bottom: 0; }
.cat-list { list-style: none; }

/* ETAY ALIGNMENT FIX KORA HOYESE JATE TRENDING MAJHE THAKE */
.cat-item { 
    padding: 12px 15px; 
    margin-bottom: 8px; 
    cursor: pointer; 
    border-radius: 6px; 
    transition: var(--trans); 
    color: #ccc; 
    font-weight: 300; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}
.cat-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--txt-w); }
.cat-item.active { background: rgba(229, 9, 20, 0.15); color: var(--red); font-weight: 600; border-left: 3px solid var(--red); }

/* Trending Style */
.trending-cat { display: flex; align-items: center; gap: 8px; color: #ffcc00 !important; }
.fire-icon {
    color: #ff4500; font-size: 1.1rem; filter: drop-shadow(0 0 5px #ff4500);
    animation: flicker 1s infinite alternate;
}
@keyframes flicker {
    0% { transform: scale(1); opacity: 0.8; filter: drop-shadow(0 0 5px #ff4500); }
    100% { transform: scale(1.2) rotate(-5deg); opacity: 1; filter: drop-shadow(0 0 12px #ff0000); }
}

.product-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 25px; }

/* Product Card Base */
.product-card {
    background: var(--bg-card); border-radius: 12px; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05); transition: 0.4s ease; display: flex; flex-direction: column; cursor: pointer;
}
.product-card:hover {
    transform: translateY(-5px) scale(1.03); border-color: rgba(229, 9, 20, 0.3);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.6), 0 0 25px rgba(229, 9, 20, 0.4), 0 10px 30px rgba(0, 0, 0, 0.6);
}

.img-container { width: 100%; height: 250px; background: #111; padding: 5px; display: flex; justify-content: center; align-items: center; }
.img-container img { width: 100%; height: 100%; object-fit: contain; transition: 0.5s ease; }
.product-card:hover .img-container img { transform: scale(1.08); }

.card-info { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.card-info h3 { font-size: 1.1rem; margin-bottom: 10px; }
.price { font-size: 1.3rem; font-weight: 600; color: var(--red); margin-bottom: 15px; }
.old-price { font-size: 0.9rem; color: #888; text-decoration: line-through; margin-bottom: 2px; }

.delivery-info { display: flex; justify-content: space-between; font-size: 0.8rem; color: #aaa; margin-bottom: 20px; background: var(--bg-main); padding: 10px; border-radius: 6px; text-align: center; }
.delivery-info .left { border-right: 1px solid #333; flex: 1; }
.delivery-info .right { flex: 1; }

/* Normal Button State */
.order-btn { 
    display: block; text-align: center; padding: 12px; background: #222; 
    border-radius: 6px; font-weight: 600; margin-top: auto; 
    transition: var(--trans); border: 2px solid transparent; 
}

/* In Stock Button Hover Effect */
.product-card:hover .order-btn { background: var(--red); color: var(--txt-w); border-color: var(--red); }
.product-card .order-btn:hover { background: #222 !important; color: var(--txt-w); border-color: var(--red); }

/* Pre-Order Section Styles */
#pre-order-items .price { color: var(--green); }
#pre-order-items .cat-item.active { background: rgba(0, 255, 136, 0.15); color: var(--green); border-left-color: var(--green); }
#pre-order-items .product-card:hover {
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.6), 0 0 25px rgba(0, 255, 136, 0.4), 0 10px 30px rgba(0, 0, 0, 0.6);
    border-color: rgba(0, 255, 136, 0.3);
}

/* Pre-Order Button Hover Effect */
#pre-order-items .product-card:hover .order-btn { background: var(--green); color: #000; border-color: var(--green); }
#pre-order-items .product-card .order-btn:hover { background: #222 !important; color: var(--txt-w); border-color: var(--green); }

/* Pre-Order Trending Green Theme */
#pre-order-items .trending-cat { color: var(--green) !important; }
#pre-order-items .trending-cat .fire-icon {
    color: var(--green); filter: drop-shadow(0 0 5px var(--green));
    animation: flicker-green 1s infinite alternate;
}
@keyframes flicker-green {
    0% { transform: scale(1); opacity: 0.8; filter: drop-shadow(0 0 5px var(--green)); }
    100% { transform: scale(1.2) rotate(-5deg); opacity: 1; filter: drop-shadow(0 0 12px #00ff00); }
}

.policy-note { background: rgba(0, 255, 136, 0.1); border: 1px solid rgba(0, 255, 136, 0.3); padding: 20px; border-radius: 8px; margin-bottom: 30px; }
.policy-note h4 { color: var(--green); margin-bottom: 8px; }
.policy-note p { color: var(--txt-g); font-size: 0.9rem; }

/* =========================================
   Footer Styles
   ========================================= */
.custom-footer { background: #0a0a0e; padding: 60px 80px 20px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.footer-container { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 40px; }
.about-us-section { max-width: 600px; }
.highlight { color: var(--red); }
.about-us-section p { color: #999; line-height: 1.6; font-size: 0.95rem; }

.footer-links { display: flex; flex-direction: column; gap: 15px; }
.footer-links a { color: var(--txt-g); font-size: 1.1rem; display: flex; align-items: center; gap: 10px; transition: var(--trans); }
.footer-links a:hover { color: var(--red); transform: translateX(10px) scale(1.15); text-shadow: 0 0 10px var(--red); }

.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.1); color: #666; font-size: 0.9rem; }

/* =========================================
   Animations
   ========================================= */
.show-anim { animation: scaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

/* =========================================
   POPUP MODAL CSS (Quick View)
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center;
    z-index: 2000; opacity: 0; pointer-events: none; transition: var(--trans);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-box {
    background: var(--bg-card); width: 90%; max-width: 900px;
    border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative; transform: translateY(50px) scale(0.9);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; flex-direction: column; overflow: hidden; max-height: 90vh;
}
.modal-overlay.active .modal-box { transform: translateY(0) scale(1); }

.close-modal {
    position: absolute; top: 15px; right: 20px; background: rgba(0, 0, 0, 0.5);
    border: none; color: #fff; font-size: 1.5rem; cursor: pointer;
    z-index: 10; width: 40px; height: 40px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center; transition: var(--trans);
}
.close-modal:hover { background: var(--red); color: white; transform: rotate(90deg); }

.modal-body { display: flex; flex-direction: row; width: 100%; overflow-y: auto; }

.modal-left {
    width: 50%; background: #08080c; position: relative;
    display: flex; justify-content: center; align-items: center;
    min-height: 400px; padding: 20px; border-right: 1px solid rgba(255,255,255,0.05);
}

.modal-left img { 
    max-width: 100%; max-height: 400px; object-fit: contain; 
    transition: transform 0.2s ease-out; z-index: 1; cursor: grab;
}
.modal-left img:active { cursor: grabbing; }

.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.6); border: none; color: #fff;
    font-size: 1.2rem; width: 40px; height: 40px; border-radius: 50%;
    cursor: pointer; transition: var(--trans); z-index: 5;
}
.theme-red .slider-btn:hover { background: var(--red); }
.theme-green .slider-btn:hover { background: var(--green); color: #000; }

.prev-btn { left: 15px; }
.next-btn { right: 15px; }

/* =========================================
   Sliding Pagination Dots for Modal
   ========================================= */
.slider-dots-window {
    position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%);
    width: 150px; height: 35px; overflow: hidden; z-index: 10;
    display: none; align-items: center;
}
.slider-dots {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 10px 0;
    display: flex; justify-content: center; align-items: center; gap: 8px; 
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    padding-left: 70px; 
}
.dot {
    width: 10px; height: 10px; border-radius: 50%; 
    background-color: var(--txt-w); opacity: 0.4;
    transition: all 0.3s ease; flex-shrink: 0; cursor: pointer;
}
.dot.active {
    opacity: 1; transform: scale(1.2);
    border: 2px solid var(--red); background: transparent;
}
.theme-green .dot.active { border-color: var(--green); }

.modal-right { width: 50%; padding: 40px; display: flex; flex-direction: column; }
.modal-right h2 { font-size: 2rem; margin-bottom: 15px; font-family: var(--font-head); }
.modal-price-box { margin-bottom: 25px; display: flex; align-items: center; }

.theme-red .modal-price-box .price { font-size: 1.8rem; color: var(--red); font-weight: 700; }
.theme-green .modal-price-box .price { font-size: 1.8rem; color: var(--green); font-weight: 700; }

.modal-price-box .old-price { font-size: 1.1rem; color: #888; text-decoration: line-through; margin-right: 15px; }

.modal-details { margin-bottom: 30px; font-size: 0.95rem; color: #ccc; line-height: 1.8; }
.modal-details p { margin-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 5px; }
.modal-details strong { color: #fff; font-weight: 600; margin-right: 5px; }

.modal-delivery-style { margin-bottom: 25px; font-size: 0.9rem; border: 1px solid rgba(255,255,255,0.1); }

.modal-order-btn { text-align: center; margin-top: auto; padding: 15px; font-size: 1.1rem; border-radius: 8px; width: 100%; display: block; font-weight: bold; transition: var(--trans); cursor: pointer;}

.theme-red .modal-order-btn { background: var(--red); color: white; box-shadow: 0 0 15px rgba(229, 9, 20, 0.4); }
.theme-red .modal-order-btn:hover { background: #ff0f1a; box-shadow: 0 0 25px rgba(229, 9, 20, 0.8); }

.theme-green .modal-order-btn { background: var(--green); color: black; box-shadow: 0 0 15px rgba(0, 255, 136, 0.4); }
.theme-green .modal-order-btn:hover { background: #00e077; box-shadow: 0 0 25px rgba(0, 255, 136, 0.8); }

/* =========================================
   FLOATING GAME BUTTON CSS
   ========================================= */
.floating-game-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    background: linear-gradient(45deg, var(--red), #ff4500);
    padding: 10px 20px 10px 10px;
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    z-index: 1000;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: floatGlow 2s infinite alternate;
}

.floating-game-btn:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 0 25px rgba(229, 9, 20, 0.8);
    color: #fff;
}

.game-btn-icon {
    background: rgba(0,0,0,0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    margin-right: 12px;
    animation: shakeIcon 3s infinite;
}

.game-btn-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.game-btn-text span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    font-family: var(--font-main);
}

.game-btn-text strong {
    font-family: var(--font-head);
    font-size: 1rem;
    color: #ffcc00;
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
}

@keyframes floatGlow {
    0% { box-shadow: 0 0 15px rgba(229, 9, 20, 0.5); }
    100% { box-shadow: 0 0 25px rgba(229, 9, 20, 0.9), 0 0 40px rgba(255, 69, 0, 0.6); }
}

@keyframes shakeIcon {
    0%, 80%, 100% { transform: rotate(0); }
    85% { transform: rotate(-15deg); }
    90% { transform: rotate(15deg); }
    95% { transform: rotate(-15deg); }
}

/* =========================================
   Responsive Design & Mobile Category Toggle
   ========================================= */

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.mobile-toggle-icon {
    display: none; /* PC te hide thakbe */
    color: var(--txt-w);
    font-size: 1.2rem;
    transition: 0.3s ease;
}
.selected-cat-name {
    display: none; /* PC te hide thakbe */
    color: var(--red);
    font-size: 0.9rem;
    font-weight: 600;
}
#pre-order-items .selected-cat-name {
    color: var(--green); /* Pre-order tab er jonno green theme */
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
    .navbar { gap: 20px; justify-content: space-between; }
    .shop-layout, .category-sidebar, .footer-container { flex-direction: column; width: 100%; gap: 30px; }
    .cat-list { display: flex; flex-wrap: wrap; gap: 10px; }
    /* Ekhane justify-content: center add kora hoyese */
    .cat-item { margin-bottom: 0; flex: 1; text-align: center; border-left: none; border-bottom: 2px solid transparent; justify-content: center; }
    .cat-item.active { border-bottom: 3px solid var(--red); }
    #pre-order-items .cat-item.active { border-bottom-color: var(--green); }
}

@media (max-width: 768px) {
    .navbar { padding: 15px 20px; }
    .hero-content h1 { font-size: 2.5rem; }
    .shop-section { padding: 60px 10px; }
    
    .category-sidebar {
        width: 100%;
        padding: 15px;
        margin-bottom: 15px;
    }
    .sidebar-header {
        margin-bottom: 0;
        cursor: pointer;
    }
    .mobile-toggle-icon {
        display: block; /* Mobile e down icon show korbe */
    }
    .selected-cat-name {
        display: inline-block; /* Mobile e select kora nam show korbe */
    }
    .cat-list {
        display: none; /* Mobile e list prothome hide thakbe */
        margin-top: 15px;
        border-top: 1px solid rgba(255,255,255,0.1);
        padding-top: 10px;
    }
    .cat-list.show {
        display: flex;
        flex-direction: column;
        animation: slideDown 0.3s ease forwards;
        padding: 10px; /* Charpashe ektu space toiri korbe */
    }
    .cat-item {
        justify-content: flex-start; 
        padding-left: 15px; /* Bamer kinara theke lekha ta 15px dan dike shore ashbe */
        margin-bottom: 5px; /* Ekta theke arektar majhe chotto faka thakbe */
    }
    .mobile-toggle-icon.rotate {
        transform: rotate(180deg);
    }
    
    /* ২ কলামের জন্য আগের মডিফিকেশন */
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .img-container { height: 170px; padding: 5px; } 
    .card-info { padding: 12px; }
    .card-info h3 { font-size: 0.9rem; }
    .price { font-size: 1rem; }
    .delivery-info { flex-direction: column; gap: 5px; font-size: 0.65rem; padding: 8px; }
    .delivery-info .left { border-right: none; border-bottom: 1px solid #333; padding-bottom: 5px; }
    .order-btn { padding: 8px 5px; font-size: 0.8rem; }
    
    .modal-body { flex-direction: column; }
    .modal-left { width: 100%; min-height: 250px; padding: 10px; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .modal-right { width: 100%; padding: 25px; }
    .modal-left img { max-height: 220px; }
    .modal-box { max-height: 85vh; width: 88%; margin: 15px; } 
    .modal-right h2 { font-size: 1.5rem; }

    /* Mobile Floating Button adjustments */
    .floating-game-btn {
        bottom: 15px;
        left: 15px;
        padding: 5px 10px 5px 5px;
    }
    .game-btn-icon { 
        width: 28px; 
        height: 28px; 
        font-size: 0.8rem; 
        margin-right: 6px; 
    }
    .game-btn-text strong { 
        font-size: 0.7rem; 
    }
    .game-btn-text span { 
        font-size: 0.55rem; 
    }
}