/* ========================================
   MEGA GH - HOME PAGE STYLES
   Fully Responsive | Modern | Fast
   ======================================== */

:root {
    --primary: #d12c2c;
    --secondary: #ff9900;
    --success: #28a745;
    --info: #007bff;
    --warning: #ffc107;
    --danger: #dc3545;
    --dark: #212529;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border: #dee2e6;
    --radius: 12px;
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.08);
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
    --font-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* { box-sizing: border-box; }
body {
    font-family: var(--font-base);
    background: #fff;
    color: var(--dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

.container { max-width: 1320px; }

/* ========================================
   1. ANNOUNCEMENT BAR
   ======================================== */
.announcement-bar {
    background: var(--primary);
    color: white;
    font-size: 0.875rem;
    z-index: 1030;
    position: sticky;
    top: 0;
}
.announcement-bar a:hover {
    text-decoration: underline;
}

/* ========================================
   2. LOADER
   ======================================== */
.loader-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease-out;
}
.loader-container.hidden {
    opacity: 0;
    pointer-events: none;
}
#particle-canvas {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
}
.loading-boxes { display: flex; gap: 16px; margin-bottom: 20px; }
.box {
    width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: bold; color: #fff;
    border-radius: 12px;
    animation: bounce 1.2s ease-in-out infinite;
}
.box-red    { background: #d12c2c; animation-delay: 0s; }
.box-yellow { background: #fdd835; color: #333; animation-delay: 0.2s; }
.box-green  { background: #388e3c; animation-delay: 0.4s; }
.brand-text {
    font-size: 28px; font-weight: 700; color: #d12c2c; letter-spacing: 2px;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ========================================
   3. MAIN CONTENT BLUR
   ======================================== */
.main-content.blurred {
    filter: blur(4px) brightness(0.9);
    transition: filter 0.4s ease;
    pointer-events: none;
}



/* ========================================
   5. HERO CAROUSEL
   ======================================== */
#heroCarousel .carousel-item img {
    height: 60vh;
    object-fit: cover;
}
#heroCarousel .carousel-caption {
    background: rgba(0,0,0,0.5);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    max-width: 90%;
}
#heroCarousel .btn {
    background: var(--secondary);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}
#heroCarousel .btn:hover {
    background: #e68900;
}

/* ========================================
   6. SOCIAL PROOF COUNTERS
   ======================================== */
.social-proof {
    font-size: 0.9rem;
}
.social-proof h3 {
    font-size: 1.8rem;
    margin: 0;
}
.social-proof p {
    margin: 0;
    font-size: 0.85rem;
}

/* ========================================
   7. CATEGORIES GRID
   ======================================== */
.category-section {
    background: var(--light);
}
.category-card {
    display: block;
    background: white;
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.category-icon img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin: 0 auto 8px;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 50%;
    transition: var(--transition);
}
.category-card:hover .category-icon img {
    background: #fff3e6;
    transform: scale(1.1);
}
.category-card p {
    margin: 0;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

/* ========================================
   8. FLASH SALE & PRODUCT CARDS
   ======================================== */
.flash-sale, .trending-section, .product-section, .recommendations {
    background: white;
}
.flash-sale .timer {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}
.product-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.product-img {
    height: 160px;
    object-fit: contain;
    background: #f9f9f9;
    padding: 10px;
    transition: var(--transition);
}
.product-card:hover .product-img {
    background: #fff9f0;
}
.product-name {
    font-size: 0.9rem;
    color: var(--dark);
    margin: 8px 0 4px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}
.product-card .text-decoration-line-through {
    font-size: 0.8rem;
    color: var(--gray);
}
.product-card .h5 {
    margin: 4px 0;
    font-size: 1.1rem;
}
.product-card .btn {
    margin-top: auto;
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 8px;
}
.product-card .btn-outline-danger {
    border-color: var(--primary);
    color: var(--primary);
}
.product-card .btn-outline-danger:hover {
    background: var(--primary);
    color: white;
}

/* ========================================
   9. BANNERS
   ======================================== */
.banner-img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}
.banner-img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow);
}
.banner-img img,
.banner-img video {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

/* ========================================
   10. SELLER SPOTLIGHT
   ======================================== */
.seller-spotlight {
    background: white;
}
.spotlight-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--secondary);
    box-shadow: var(--shadow);
}

/* ========================================
   11. REVIEWS CAROUSEL
   ======================================== */
.reviews-carousel .carousel-item {
    text-align: center;
    padding: 2rem;
}
.reviews-carousel .lead {
    font-style: italic;
    color: var(--dark);
}
.reviews-carousel .text-warning {
    font-size: 1.5rem;
}

/* ========================================
   12. HOW IT WORKS
   ======================================== */
.how-it-works {
    background: white;
}
.step-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 auto 1rem;
    color: white;
}

/* ========================================
   13. NEWSLETTER
   ======================================== */
.newsletter {
    background: var(--primary);
    color: white;
}
.newsletter .form-control {
    border-radius: 8px;
    font-size: 0.9rem;
}
.newsletter .btn {
    border-radius: 8px;
    font-weight: 600;
}

/* ========================================
   14. FLOATING SELL BUTTON (MOBILE)
   ======================================== */
.floating-sell-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}
.floating-sell-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* ========================================
   15. BACK TO TOP
   ======================================== */
#backToTop {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: var(--primary);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    z-index: 1000;
    display: none;
    transition: var(--transition);
}
#backToTop:hover {
    background: #b71c1c;
    transform: scale(1.1);
}

/* ========================================
   16. LIVE CHAT WIDGET
   ======================================== */
.chat-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}
.chat-btn {
    background: var(--info);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: none;
    font-size: 1.6rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.chat-btn:hover {
    background: #0056b3;
    transform: scale(1.1);
}
.chat-box {
    background: white;
    width: 300px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    margin-top: 10px;
    overflow: hidden;
}
.chat-header {
    background: var(--info);
    color: white;
    padding: 12px;
    font-weight: 600;
}
.chat-body {
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
}
.chat-footer {
    padding: 10px;
    display: flex;
    gap: 8px;
    background: #f8f9fa;
}
.chat-footer input {
    flex: 1;
    border-radius: 20px;
    font-size: 0.9rem;
}
.chat-footer button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--info);
    color: white;
    border: none;
}

/* ========================================
   17. MOBILE APP BANNER
   ======================================== */
.mobile-app-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px;
    border-top: 1px solid var(--border);
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}
.mobile-app-banner h6 {
    margin: 0;
    font-size: 1rem;
}
.mobile-app-banner small {
    font-size: 0.8rem;
    color: var(--gray);
}
.close-app-banner {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
}

/* ========================================
   18. SECTION TITLES
   ======================================== */
.product-section h2,
.category-section h2,
.flash-sale h2,
.trending-section h2,
.recommendations h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 8px;
}
.product-section h2::after,
.category-section h2::after,
.flash-sale h2::after,
.trending-section h2::after,
.recommendations h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
}

/* ========================================
   19. RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .carousel-caption { display: block !important; font-size: 0.9rem; bottom: 15%; }
    .carousel-caption .display-5 { font-size: 1.5rem; }
    .category-icon img { width: 50px; height: 50px; }
    .product-img { height: 120px; }
    .product-name { font-size: 0.85rem; height: 36px; }
    .flash-sale .timer { font-size: 0.8rem; padding: 3px 8px; }
    .social-proof h3 { font-size: 1.4rem; }
    .step-icon { width: 50px; height: 50px; font-size: 1.4rem; }
}
@media (max-width: 576px) {
    .row.g-3 > * { padding: 8px; }
    .product-card { font-size: 0.8rem; }
    .product-img { height: 100px; }
    .category-card p { font-size: 0.8rem; }
    .floating-sell-btn { padding: 10px 16px; font-size: 0.85rem; }
}

/* ========================================
   20. ANIMATIONS & UTILITIES
   ======================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease-out; }
.text-warning { color: #ffc107 !important; }