* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark: #1f2937;
    --light: #f3f4f6;
    --white: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.logo p {
    font-size: 0.9rem;
    color: #6b7280;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--primary-color);
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.user-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    margin-top: 0.5rem;
}

.user-menu:hover .dropdown {
    display: block;
}

.dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--dark);
    text-decoration: none;
    transition: background 0.3s;
}

.dropdown a:hover {
    background: var(--light);
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--light);
    color: var(--dark);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Features */
.features {
    padding: 4rem 0;
    background: var(--white);
}

.features h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    background: var(--light);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* Products Section */
.products-section {
    padding: 4rem 0;
}

.products-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.product-description {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-seller {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.seller-photo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

/* Products Page */
.products-page {
    padding: 2rem 0;
    min-height: 70vh;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.filters {
    display: flex;
    gap: 1rem;
}

.filters select {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
}

/* Profile Page */
.profile-page {
    padding: 2rem 0;
    min-height: 70vh;
}

.profile-header {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.profile-info p {
    color: #6b7280;
}

.member-since {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stat h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.profile-sections .section {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.profile-sections h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
    font-size: 2rem;
    color: var(--primary-color);
}

/* Text Utilities */
.text-center {
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filters {
        width: 100%;
        flex-direction: column;
    }
    
    .filters select {
        width: 100%;
    }
}


/* Enhanced Filters */
.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.filter-group i {
    color: var(--primary-color);
}

.filter-group select {
    border: none;
    background: transparent;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Stats Badge */
.stat-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    color: var(--dark);
}

.stat-badge i {
    color: var(--primary-color);
}

.stat-badge span {
    font-weight: 700;
    color: var(--primary-color);
}

/* No Products */
.no-products {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.no-products h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.no-products p {
    color: #6b7280;
}

/* Enhanced Loading */
.loading {
    text-align: center;
    padding: 3rem;
}

.loading i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.loading p {
    color: #6b7280;
    margin-top: 1rem;
}

/* Enhanced Product Card */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card .product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
}

.product-card .seller-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.product-card .seller-badge img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.product-card .seller-badge span {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Enhanced Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.page-header h2 {
    font-size: 2rem;
    color: var(--dark);
    margin: 0;
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .products-stats {
        flex-direction: column;
    }
    
    .stat-badge {
        width: 100%;
        justify-content: center;
    }
}
