:root {
    --shopee: #EE4D2D;
    --shopee-dark: #C73E25;
    --bg: #f5f5f5;
    --white: #ffffff;
    --text: #222;
    --muted: #757575;
    --border: #e8e8e8;
    --radius: 8px;
    --shadow: 0 1px 4px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); font-size: 15px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* HEADER */
.header { background: var(--shopee); padding: 0 20px; position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1100px; margin: auto; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -0.5px; }
.logo span { opacity: 0.85; font-weight: 400; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { color: rgba(255,255,255,0.9); font-size: 14px; }
.nav-links a:hover { color: #fff; }

/* HERO */
.hero { background: #EE4D2D; color: #fff; text-align: center; padding: 22px 20px; }
.hero h1 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.hero p { font-size: 14px; opacity: 0.9; }

/* CATEGORIES */
.cats { background: var(--white); border-bottom: 1px solid var(--border); }
.cats-inner { max-width: 1100px; margin: auto; display: flex; gap: 8px; padding: 12px 20px; overflow-x: auto; }
.cats-inner::-webkit-scrollbar { display: none; }
.cat-btn { padding: 7px 16px; border-radius: 20px; font-size: 13px; border: 1px solid var(--border); background: var(--white); color: var(--muted); cursor: pointer; white-space: nowrap; transition: all 0.2s; }
.cat-btn:hover, .cat-btn.active { background: var(--shopee); color: #fff; border-color: var(--shopee); }

/* CONTAINER */
.container { max-width: 1100px; margin: auto; padding: 24px 20px; }

/* GRID */
.section-title { font-size: 17px; font-weight: 600; margin-bottom: 16px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }

/* CARD */
.card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: box-shadow 0.2s; }
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.card-img { height: 160px; background: #fafafa; display: flex; align-items: center; justify-content: center; font-size: 56px; border-bottom: 1px solid var(--border); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 12px; }
.badge { display: inline-block; font-size: 10px; background: #fff0ee; color: var(--shopee); border-radius: 4px; padding: 2px 8px; margin-bottom: 6px; font-weight: 600; }
.card-name { font-size: 13px; font-weight: 500; line-height: 1.4; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { font-size: 16px; font-weight: 700; color: var(--shopee); }
.card-orig { font-size: 12px; color: var(--muted); text-decoration: line-through; margin-left: 4px; }
.btn-shopee { display: block; background: var(--shopee); color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 9px; border-radius: 6px; margin-top: 10px; transition: background 0.2s; }
.btn-shopee:hover { background: var(--shopee-dark); }

/* EMPTY */
.empty { text-align: center; padding: 48px; color: var(--muted); }
.empty-icon { font-size: 48px; margin-bottom: 12px; }

/* FOOTER */
.footer { background: var(--white); border-top: 1px solid var(--border); text-align: center; padding: 24px; font-size: 13px; color: var(--muted); margin-top: 40px; }

/* ADMIN */
.admin-wrap { max-width: 960px; margin: 32px auto; padding: 0 20px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.admin-header h1 { font-size: 22px; font-weight: 600; }
.btn { display: inline-block; padding: 9px 18px; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: var(--shopee); color: #fff; }
.btn-primary:hover { background: var(--shopee-dark); }
.btn-secondary { background: var(--white); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: #dc3545; color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

.table-wrap { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { background: #fafafa; padding: 12px 16px; text-align: left; font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; transition: border 0.2s; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--shopee); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 24px; }

.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #d4edda; color: #155724; }
.alert-danger { background: #f8d7da; color: #721c24; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat-value { font-size: 24px; font-weight: 700; }

.badge-active { background: #d4edda; color: #155724; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-inactive { background: #f8d7da; color: #721c24; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }

@media (max-width: 600px) {
    .hero h1 { font-size: 20px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}
