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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

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

/* Navigation */
.navbar {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

.navbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #ff6b35;
    letter-spacing: -0.5px;
}

.search-bar {
    display: flex;
    background: #f0f0f0;
    border-radius: 24px;
    padding: 8px 16px;
    flex: 1;
    max-width: 400px;
}

.search-bar input {
    background: none;
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.search-bar button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

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

.nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ff6b35;
}

.user-menu {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-menu a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

/* Pages */
.page {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.95;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #ff6b35;
    color: white;
}

.btn-primary:hover {
    background-color: #ff5722;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

/* Categories */
.categories {
    padding: 60px 0;
}

.categories h2 {
    margin-bottom: 30px;
    font-size: 28px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.category-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.category-item:hover {
    border-color: #ff6b35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.category-item-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.category-item-name {
    font-weight: 600;
    color: #333;
}

/* Features */
.features {
    padding: 60px 0;
    background: #f8f9fa;
}

.features .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

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

.feature-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.feature-item h3 {
    margin-bottom: 10px;
    color: #333;
}

.feature-item p {
    color: #666;
    font-size: 14px;
}

/* Products */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-top: 30px;
}

.products-header h2 {
    font-size: 28px;
}

.filters {
    display: flex;
    gap: 15px;
}

.filters select {
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    border-color: #ff6b35;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.product-image {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.product-body {
    padding: 15px;
}

.product-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.product-category {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 10px;
}

.product-rating {
    font-size: 12px;
    color: #ff9800;
    margin-bottom: 10px;
}

.product-card .btn {
    width: 100%;
    padding: 10px;
    font-size: 12px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button.active {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    padding: 40px 0;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-box h2 {
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

.auth-box form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-box input {
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.auth-box input:focus {
    outline: none;
    border-color: #ff6b35;
}

.auth-box p {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.auth-box a {
    color: #ff6b35;
    text-decoration: none;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.dashboard-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.dashboard-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.balance {
    font-size: 32px;
    font-weight: 700;
    color: #ff6b35;
}

.orders-list {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.order-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-item:last-child {
    border-bottom: none;
}

.order-status {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Admin Panel */
.admin-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #ff6b35;
}

.stat-card h4 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #ff6b35;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin: 30px 0;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    color: #ff6b35;
    border-bottom-color: #ff6b35;
}

.admin-tab {
    display: none;
}

.admin-tab.active {
    display: block;
}

.admin-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.admin-orders,
.admin-users {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.admin-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-item:last-child {
    border-bottom: none;
}

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

.admin-actions select,
.admin-actions input {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 12px;
}

.admin-actions .btn {
    padding: 8px 15px;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }

    .navbar-left {
        width: 100%;
    }

    .search-bar {
        max-width: 100%;
    }

    .navbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .nav-links {
        gap: 10px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .products-header {
        flex-direction: column;
        gap: 15px;
    }

    .filters {
        width: 100%;
        flex-direction: column;
    }

    .admin-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-actions {
        width: 100%;
        margin-top: 10px;
    }
}
