:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #e94560;
    --light: #f5f5f7;
    --text: #1a1a1a;
    --text-muted: #6e6e73;
    --border: #d2d2d7;
    --success: #34c759;
    --warning: #ff9500;
    --error: #ff3b30;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background: var(--primary);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.navbar-nav a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.navbar-nav a:hover {
    color: white;
}

.navbar-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cart-link {
    color: white;
    text-decoration: none;
    position: relative;
    padding: 0.5rem;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

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

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-price {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 700;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-error {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
}

/* Cart */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.cart-table th {
    background: var(--primary);
    color: white;
}

.cart-summary {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: 700;
    padding-top: 1rem;
    border-top: 2px solid var(--border);
    margin-top: 1rem;
}

/* Footer */
.footer {
    background: var(--primary);
    color: white;
    padding: 2rem;
    margin-top: 4rem;
    text-align: center;
}

/* Admin */
.admin-sidebar {
    background: var(--primary);
    min-height: 100vh;
    padding: 2rem 1rem;
    color: white;
}

.admin-sidebar a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-content {
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-card h3 {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--light);
    font-weight: 600;
}

.data-table tr:hover {
    background: #fafafa;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending { background: #fff3cd; color: #856404; }
.badge-confirmed { background: #cce5ff; color: #004085; }
.badge-processing { background: #d4edda; color: #155724; }
.badge-shipped { background: #e2e3e5; color: #383d41; }
.badge-delivered { background: #d1e7dd; color: #0f5132; }
.badge-cancelled { background: #f8d7da; color: #721c24; }

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 2rem 0;
}

.pagination a {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
}

.pagination a.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb span {
    color: var(--text-muted);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
}

/* Two Column Layout */
.two-col {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .two-col {
        grid-template-columns: 1fr;
    }

    .navbar-nav {
        display: none;
    }

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