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

:root {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --secondary: #94a3b8;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --light: #0f172a;
    --dark: #f1f5f9;
    --gray: #334155;
    --card-bg: #1e293b;
    --input-bg: #1e293b;
}

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

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Navbar */
.navbar {
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.navbar-brand:hover {
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    list-style: none;
}

.navbar-nav a {
    color: var(--secondary);
    font-weight: 500;
}

.navbar-nav a:hover {
    color: var(--primary);
    text-decoration: none;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn:hover {
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

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

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

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

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: var(--input-bg);
    color: var(--dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

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

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    overflow: hidden;
}

.card-body {
    padding: 1.5rem;
}

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

.product-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

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

.product-card-body {
    padding: 1rem;
}

.product-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

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

.product-card .category {
    font-size: 0.875rem;
    color: var(--secondary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-bottom: 1px solid var(--gray);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

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

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Flash Messages */
.flash-messages {
    padding: 1rem 0;
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 2rem 0;
}

.product-detail img {
    width: 100%;
    border-radius: 0.75rem;
}

.product-detail h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.product-detail .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.product-detail .description {
    color: var(--secondary);
    margin-bottom: 2rem;
}

/* Cart */
.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--gray);
    align-items: center;
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 0.5rem;
}

.cart-item-info {
    flex: 1;
}

.cart-total {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: right;
    padding: 1.5rem;
    border-top: 2px solid var(--gray);
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    align-items: center;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--gray);
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--dark);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray);
    border-radius: 0.5rem;
}

.pagination a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    text-decoration: none;
}

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

/* Auth Forms */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 2rem;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    background: var(--card-bg);
    font-weight: 600;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-paid {
    background: #dbeafe;
    color: #1e40af;
}

.badge-shipped {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-delivered {
    background: #dcfce7;
    color: #166534;
}

/* Responsive */
@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
}

/* Section Title */
.section-title {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--secondary);
}

.empty-state h2 {
    margin-bottom: 1rem;
}

/* Quantity Input */
.quantity-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-input input {
    width: 60px;
    text-align: center;
}

/* Placeholder image for products without images */
.placeholder-image {
    width: 100%;
    height: 200px;
    background: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 0.875rem;
}

.placeholder-image-large {
    width: 100%;
    height: 400px;
    background: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 1rem;
    border-radius: 0.75rem;
}
