* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    min-height: 100vh;
    color: var(--light);
}

/* Header */
.header {
    background: rgba(30, 30, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.logo span {
    color: var(--primary);
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 30px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 25px;
    background: rgba(30, 30, 46, 0.8);
    color: white;
    font-size: 0.95rem;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 25px;
}

.hero-btns .btn {
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    margin: 0 10px;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: white;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Categories */
.categories {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.category-btn {
    padding: 10px 25px;
    background: rgba(30, 30, 46, 0.8);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 25px;
    color: white;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* Products Grid */
.section-title {
    font-size: 2rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

/* Product Card */
.product-card {
    background: rgba(30, 30, 46, 0.9);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.product-image {
    height: 200px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(245, 158, 11, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-name {
    font-size: 1.2rem;
    margin: 8px 0;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-current {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--success);
}

.price-original {
    font-size: 0.95rem;
    color: var(--gray);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-cart {
    background: var(--primary);
    color: white;
}

.btn-cart:hover {
    background: var(--primary-dark);
}

.btn-wishlist {
    background: transparent;
    border: 2px solid var(--danger) !important;
    color: var(--danger);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 60px 0;
}

.feature-card {
    background: rgba(30, 30, 46, 0.9);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--gray);
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 450px;
    background: rgba(30, 30, 46, 0.98);
    border-radius: 20px;
    display: none;
    flex-direction: column;
    border: 1px solid rgba(99, 102, 241, 0.3);
    overflow: hidden;
}

.chat-window.active {
    display: flex;
}

.chat-header {
    background: var(--primary);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    color: white;
}

.chat-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.message.bot {
    background: rgba(99, 102, 241, 0.2);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.message.user {
    background: var(--primary);
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    background: rgba(30, 30, 46, 0.8);
    color: white;
}

.chat-input button {
    padding: 12px 20px;
    background: var(--primary);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
}

/* Footer */
.footer {
    background: rgba(30, 30, 46, 0.95);
    padding: 50px 20px;
    margin-top: 80px;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(30, 30, 46, 0.98);
    padding: 30px;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.modal-content h2 {
    margin-bottom: 20px;
    text-align: center;
}

.modal-content input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    background: rgba(30, 30, 46, 0.8);
    color: white;
}

.modal-content button {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-weight: 600;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    display: none;
    z-index: 3000;
}

.toast.show {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { bottom: 50px; opacity: 0; }
    to { bottom: 100px; opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .search-bar {
        order: 3;
        max-width: 100%;
        margin: 15px 0 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .chat-window {
        width: 300px;
        right: -10px;
    }
}
