* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #8b5cf6;
    --secondary: #a78bfa;
    --dark: #1f2937;
    --light: #f9fafb;
    --white: #ffffff;
    --gray: #6b7280;
    --success: #22c55e;
    --danger: #ef4444;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header Styles */
.top-bar {
    background: var(--dark);
    color: #fff;
    padding: 10px 0;
    font-size: 0.9rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
}

.top-bar span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--dark);
}

.logo span {
    color: var(--primary);
}

.search-box {
    display: flex;
    flex: 1;
    max-width: 500px;
    margin: 0 30px;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-right: none;
    border-radius: 30px 0 0 30px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: var(--primary);
}

.search-box button {
    padding: 12px 25px;
    background: var(--primary);
    border: none;
    border-radius: 0 30px 30px 0;
    color: var(--white);
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #7c3aed;
}

.nav-actions {
    display: flex;
    gap: 20px;
}

.nav-actions > div {
    position: relative;
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.3s;
}

.nav-actions > div:hover {
    color: var(--primary);
}

.nav-actions .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-bar {
    background: var(--white);
    border-top: 1px solid #e5e7eb;
}

.category-menu {
    display: flex;
    list-style: none;
    gap: 5px;
    overflow-x: auto;
}

.category-menu a {
    display: block;
    padding: 15px 20px;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.category-menu a:hover,
.category-menu a.active {
    background: var(--primary);
    color: var(--white);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 80px 20px;
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.hero-content {
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn-primary {
    display: inline-block;
    padding: 15px 35px;
    background: var(--white);
    color: var(--primary);
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    display: inline-block;
    padding: 15px 35px;
    border: 2px solid var(--white);
    color: var(--white);
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-item .number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
}

.stat-item .label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: -40px 0 50px;
    position: relative;
    z-index: 10;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Section Titles */
.section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--dark);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.product-card .badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 5;
}

.product-card .badge.new {
    background: var(--success);
    left: auto;
    right: 10px;
}

.product-card .image {
    height: 220px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: relative;
}

.product-card .image .discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.product-card .info {
    padding: 20px;
}

.product-card .category {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.product-card .brand {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.product-card .price {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 15px;
}

.product-card .price .old-price {
    font-size: 1rem;
    color: var(--gray);
    text-decoration: line-through;
    margin-left: 10px;
}

.product-card .rating {
    color: #fbbf24;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.product-card .actions {
    display: flex;
    gap: 10px;
}

.product-card .actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.add-to-cart {
    background: var(--primary);
    color: var(--white);
}

.add-to-cart:hover {
    background: #7c3aed;
}

.add-to-wishlist {
    background: #f3f4f6;
    color: var(--gray);
}

.add-to-wishlist:hover {
    background: #fee2e2;
    color: var(--danger);
}

/* Brand Grid */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.brand-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.brand-card .logo {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 60px 0;
    text-align: center;
    color: var(--white);
    margin: 50px 0;
}

.newsletter h2 {
    margin-bottom: 15px;
}

.newsletter p {
    margin-bottom: 25px;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.newsletter-form input {
    padding: 15px 25px;
    border: none;
    border-radius: 30px;
    width: 350px;
    outline: none;
}

.newsletter-form .btn-primary {
    background: var(--dark);
    color: var(--white);
}

/* Sidebar Styles */
.cart-sidebar,
.wishlist-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: var(--white);
    z-index: 2000;
    transition: right 0.3s;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
}

.cart-sidebar.active,
.wishlist-sidebar.active {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-header h3 {
    color: var(--dark);
}

.sidebar-header button {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray);
}

.sidebar-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.sidebar-body .empty {
    text-align: center;
    color: var(--gray);
    padding: 40px 0;
}

.cart-item,
.wishlist-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.cart-item .image,
.wishlist-item .image {
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.cart-item .details,
.wishlist-item .details {
    flex: 1;
}

.cart-item h4,
.wishlist-item h4 {
    margin-bottom: 5px;
}

.cart-item .price,
.wishlist-item .price {
    color: var(--primary);
    font-weight: bold;
}

.cart-item .qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.cart-item .qty button {
    width: 25px;
    height: 25px;
    border: 1px solid #e5e7eb;
    background: var(--white);
    border-radius: 5px;
    cursor: pointer;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
}

.sidebar-footer .total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.sidebar-footer .total span:last-child {
    color: var(--primary);
}

.sidebar-footer .checkout-btn {
    width: 100%;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
}

.overlay.active {
    display: block;
}

/* Footer Styles */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 span {
    color: var(--primary);
}

.footer-col h4 {
    margin-bottom: 20px;
    color: var(--white);
}

.footer-col p {
    color: #9ca3af;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col a {
    display: block;
    color: #9ca3af;
    margin-bottom: 12px;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--primary);
}

.contact-info {
    margin-top: 20px;
}

.social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social a:hover {
    background: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-stats {
        display: none;
    }
    
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-box {
        display: none;
    }
    
    .category-menu {
        overflow-x: auto;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .features,
    .brand-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        width: 100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar,
    .wishlist-sidebar {
        width: 100%;
        right: -100%;
    }
}