/* ============================================
   CodeMall - Modern Digital Marketplace Theme
   ============================================ */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --dark: #0f0f1a;
    --darker: #0a0a0f;
    --card-bg: rgba(18, 18, 30, 0.95);
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-muted: #a1a1aa;
    --success: #10b981;
    --gradient-1: linear-gradient(135deg, #6366f1, #ec4899);
    --gradient-2: linear-gradient(135deg, #06b6d4, #3b82f6);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--darker);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Animation */
.bg-gradient-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.gradient-1, .gradient-2, .gradient-3 {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.gradient-1 {
    background: var(--primary);
    top: -20%;
    left: -20%;
    width: 60%;
    height: 60%;
    animation-delay: 0s;
}

.gradient-2 {
    background: var(--secondary);
    bottom: -20%;
    right: -20%;
    width: 50%;
    height: 50%;
    animation-delay: -7s;
}

.gradient-3 {
    background: var(--accent);
    top: 50%;
    left: 50%;
    width: 40%;
    height: 40%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(5%, 5%) rotate(5deg); }
    66% { transform: translate(-5%, -5%) rotate(-5deg); }
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
}

.nav-brand i {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-img {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-light);
}

.cart-link {
    position: relative;
    padding: 0.5rem;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 20px;
}

.btn-login, .btn-signup, .btn-logout {
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
}

.btn-login {
    border: 1px solid var(--border);
}

.btn-signup {
    background: var(--gradient-1);
    color: white !important;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444 !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    padding: 5rem 0 3rem;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
}

.btn-outline {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Hero Image / Floating Cards */
.hero-image {
    position: relative;
    min-height: 400px;
}

.floating-card {
    position: absolute;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: floatCard 4s infinite ease-in-out;
}

.floating-card i {
    font-size: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.card-1 { top: 10%; left: 0; animation-delay: 0s; }
.card-2 { top: 40%; right: 0; animation-delay: -1s; }
.card-3 { bottom: 20%; left: 10%; animation-delay: -2s; }
.card-4 { bottom: 5%; right: 15%; animation-delay: -3s; }

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent);
    transform: translate(-50%, -50%);
    filter: blur(60px);
    z-index: -1;
}

/* Ticker Section */
.ticker-section {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 2rem 0;
}

.ticker-wrap {
    overflow: hidden;
    padding: 0.75rem 0;
}

.ticker {
    display: flex;
    animation: ticker 40s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.ticker-item i {
    color: var(--success);
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    background: rgba(99, 102, 241, 0.15);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Categories Grid */
.categories-section {
    padding: 4rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem 1rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.category-icon i {
    font-size: 1.8rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.category-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.category-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Products Section */
.products-section {
    padding: 4rem 0;
}

.bg-dark {
    background: rgba(0, 0, 0, 0.3);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.product-card a {
    text-decoration: none;
    color: inherit;
}

.product-image {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    text-align: center;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient-1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 1;
}

.product-badge.new {
    background: var(--accent);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-rating {
    margin-bottom: 0.75rem;
    color: #fbbf24;
    font-size: 0.8rem;
}

.product-rating span {
    color: var(--text-muted);
    margin-left: 0.25rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.price-old {
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: 0.85rem;
}

.price-new {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-light);
}

.w-full {
    width: 100%;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    text-align: center;
    background: var(--gradient-1);
    margin: 2rem 0;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary-dark);
    box-shadow: none;
}

.cta-section .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    background: rgba(5, 5, 10, 0.95);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin: 1rem 0;
    line-height: 1.7;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.3s;
}

.footer-social a:hover {
    transform: translateY(-3px);
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-contact li {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-contact i {
    width: 20px;
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-bottom i {
    color: #ef4444;
}

/* Floating WhatsApp */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 100;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    background: #25D366;
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s;
    position: relative;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

.tooltip {
    position: absolute;
    left: 70px;
    background: var(--dark);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.whatsapp-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        min-height: 300px;
        display: none;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--darker);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-contact li {
        justify-content: center;
    }
    
    .floating-whatsapp {
        left: 20px;
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 1rem;
    }
}