/* ==========================================
   Premium Homepage UI (Gaming Marketplace)
   ========================================== */

/* Hero Banner */
.hero-premium {
    position: relative;
    padding: 120px 0 180px;
    background-color: var(--bg-color); /* Fallback */
    color: #fff;
    text-align: center;
    overflow: hidden;
}

.hero-slider-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.hero-slider-bg .carousel-inner, .hero-slider-bg .carousel-item {
    height: 100%;
}
.hero-slider-bg img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}
.hero-slider-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); /* dark overlay to make text pop */
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.hero-badge {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 8px 20px;
    font-weight: 600;
    border-radius: 4px;
    transform: rotate(-2deg);
    box-shadow: 0 4px 10px rgba(229, 57, 53, 0.4);
}

/* Floating Categories */
.floating-categories-wrapper {
    position: relative;
    margin-top: -80px;
    z-index: 10;
}

.floating-category-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 90px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.cat-item:hover {
    background: rgba(229, 57, 53, 0.1);
    border-color: rgba(229, 57, 53, 0.3);
    transform: translateY(-5px);
    color: #fff;
}

.cat-item i {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.cat-item span {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Trending Products Grid Section */
.trending-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, var(--bg-color) 0%, var(--section-bg) 100%);
    color: var(--text-color);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-color);
}

/* CSS Grid for the Cards */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Featured Card spans 2 rows */
.card-featured {
    grid-row: span 2;
    grid-column: span 1;
}

.price-badge {
    background: linear-gradient(135deg, #00b09b, #96c93d);
    color: #fff !important;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0, 176, 155, 0.4);
    letter-spacing: 0.5px;
}

.game-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.card-featured.game-card {
    aspect-ratio: 16/9;
}

.card-regular.game-card {
    aspect-ratio: 16/9;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    color: #fff;
}

.game-card-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0; top: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 40%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px; /* Reduced padding to fit within 16/9 */
    z-index: 2;
}

.game-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-featured .game-title {
    font-size: 1.5rem;
}

.game-offers-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    .trending-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .card-featured {
        grid-row: span 1;
        grid-column: span 2;
    }
}
@media (max-width: 575px) {
    .trending-grid {
        grid-template-columns: 1fr;
    }
    .card-featured {
        grid-column: span 1;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .floating-category-bar {
        padding: 10px;
        gap: 10px;
    }
    .cat-item {
        width: 80px;
        height: 80px;
    }
    .cat-item i {
        font-size: 1.4rem;
    }
}

/* Product Badges */
.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.badge-flash {
    background: linear-gradient(45deg, #ef4444, #f97316);
    color: #fff;
    animation: pulse-badge 2s infinite;
}

.badge-best {
    background: linear-gradient(45deg, #eab308, #f59e0b);
    color: #fff;
}

.badge-new {
    background: linear-gradient(45deg, #3b82f6, #06b6d4);
    color: #fff;
}

.badge-featured {
    background: linear-gradient(45deg, #8b5cf6, #d946ef);
    color: #fff;
}

@keyframes pulse-badge {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 15px rgba(239, 68, 68, 0.6); }
    100% { transform: scale(1); }
}

/* Sections spacing */
.product-section {
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.product-section.bg-darker {
    background: #0f1523;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.section-header .section-title {
    margin-bottom: 0;
    text-align: left;
}

/* ==========================================
   Premium Aesthetic Classes (UI Redesign)
   ========================================== */

/* Glassmorphism Overlays & Cards */
.glass-overlay {
    background: rgba(17, 24, 39, 0.75) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
    background: rgba(31, 41, 55, 0.6) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transform: translateZ(0);
    will-change: transform;
}

/* Premium Hover Effects */
.premium-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.premium-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(var(--primary-color-rgb, 229, 57, 53), 0.3);
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Buy Now Button */
.btn-buy-now {
    background: #E53935 !important;
    color: #ffffff !important;
    border: none;
    font-weight: 600;
    border-radius: 20px;
    padding: 6px 15px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(229, 57, 53, 0.4);
}

.btn-buy-now:hover {
    background: #D32F2F !important;
    box-shadow: 0 6px 15px rgba(229, 57, 53, 0.6);
    transform: scale(1.05);
}

/* Mobile specific styling */
@media (max-width: 768px) {
    .btn-buy-now {
        padding: 5px 12px;
        font-size: 0.85rem;
    }
}

/* Animated Click Indicator for Banners */
.click-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(226, 19, 110, 0.9); /* bKash pinkish/reddish */
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    z-index: 10;
    pointer-events: none; /* Allows clicking through to the banner */
    box-shadow: 0 4px 15px rgba(0,0,0,0.4), 0 0 0 0 rgba(226, 19, 110, 0.7);
    animation: pulseIndicator 2s infinite;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
}

@keyframes pulseIndicator {
    0% {
        box-shadow: 0 4px 15px rgba(0,0,0,0.4), 0 0 0 0 rgba(226, 19, 110, 0.7);
        transform: translateX(-50%) scale(1);
    }
    50% {
        box-shadow: 0 4px 15px rgba(0,0,0,0.4), 0 0 0 15px rgba(226, 19, 110, 0);
        transform: translateX(-50%) scale(1.05);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0,0,0,0.4), 0 0 0 0 rgba(226, 19, 110, 0);
        transform: translateX(-50%) scale(1);
    }
}
