* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #f5f6fa; color: #222; line-height: 1.5; }
.container { max-width: 1150px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; }

/* Header */
.site-header { background: #1f2937; color: #fff; padding: 14px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.logo { font-size: 22px; font-weight: 700; color: #fff; }
.logo span { color: #22c55e; }
.search-form { display: flex; flex: 1; max-width: 400px; }
.search-form input { flex: 1; padding: 8px 10px; border: none; border-radius: 4px 0 0 4px; }
.search-form button { padding: 8px 14px; background: #22c55e; color: #fff; border: none; border-radius: 0 4px 4px 0; cursor: pointer; }
.main-nav a { color: #e5e7eb; margin-left: 16px; font-size: 14px; }
.main-nav a:hover { color: #22c55e; }

/* Layout */
.page-content { padding: 30px 20px; min-height: 60vh; }
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-top: 20px; }
.product-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); overflow: hidden; transition: transform .15s; }
.product-card:hover { transform: translateY(-4px); }
.product-card img, .product-thumb { width: 100%; height: 180px; object-fit: cover; background: #e5e7eb; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 13px; }
.product-info { padding: 14px; }
.product-info h3 { font-size: 15px; margin-bottom: 6px; }
.product-price { color: #16a34a; font-weight: 700; font-size: 16px; margin: 6px 0; }
.btn { display: inline-block; padding: 8px 16px; background: #22c55e; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; }
.btn:hover { background: #16a34a; }
.btn-secondary { background: #6b7280; }
.btn-secondary:hover { background: #4b5563; }
.btn-danger { background: #ef4444; }
.btn-danger:hover { background: #dc2626; }
.btn-small { padding: 5px 10px; font-size: 12px; }

/* Filters */
.filters { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.filters a { padding: 6px 14px; background: #fff; border-radius: 20px; border: 1px solid #d1d5db; font-size: 13px; }
.filters a.active, .filters a:hover { background: #1f2937; color: #fff; }

/* Forms */
.form-box { max-width: 420px; margin: 30px auto; background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.form-box h2 { margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 9px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
.form-group textarea { resize: vertical; min-height: 90px; }
.form-footer-link { margin-top: 14px; font-size: 13px; text-align: center; }
.form-footer-link a { color: #16a34a; font-weight: 600; }

/* Tables */
table { width: 100%; border-collapse: collapse; background: #fff; }
table th, table td { padding: 10px 12px; border-bottom: 1px solid #e5e7eb; text-align: left; font-size: 14px; }
table th { background: #f3f4f6; }

/* Cart */
.cart-table img, .cart-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; background: #e5e7eb; }
.cart-total { text-align: right; font-size: 18px; font-weight: 700; margin: 20px 0; }
.qty-input { width: 60px; padding: 5px; }


/* Product detail */
.product-detail { display: flex; gap: 30px; background: #fff; padding: 24px; border-radius: 8px; flex-wrap: wrap; }
.product-detail .img-box { flex: 1; min-width: 280px; }
.product-detail .info-box { flex: 1; min-width: 280px; }
.product-detail .img-box img, .product-detail .img-box .product-thumb { width: 100%; height: 320px; }

/* Pagination */
.pagination { display: flex; gap: 6px; margin-top: 24px; }
.pagination a, .pagination span { padding: 6px 12px; background: #fff; border-radius: 4px; border: 1px solid #d1d5db; font-size: 13px; }
.pagination .current { background: #1f2937; color: #fff; }

/* Footer */
.site-footer { background: #1f2937; color: #9ca3af; text-align: center; padding: 18px 0; font-size: 13px; margin-top: 40px; }

/* Badges */
.badge { padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-processing { background: #dbeafe; color: #1e40af; }
.badge-shipped { background: #e0e7ff; color: #3730a3; }
.badge-delivered { background: #dcfce7; color: #166534; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
