:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f4fb;
  --text: #111827;
  --muted: #6b7280;
  --border: #dde3ef;
  --primary: #1d4ed8;
  --primary-2: #0f172a;
  --danger: #dc2626;
  --success: #15803d;
  --shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}
html[data-theme="dark"] {
  --bg: #0b1020;
  --surface: #121a2d;
  --surface-2: #182236;
  --text: #f3f4f6;
  --muted: #94a3b8;
  --border: #27324a;
  --primary: #60a5fa;
  --primary-2: #dbeafe;
  --danger: #f87171;
  --success: #4ade80;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
img { width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
input, textarea, select {
  width: 100%; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); border-radius: 14px; padding: 12px 14px;
}
textarea { min-height: 100px; resize: vertical; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.navbar, .nav-links, .row { display: flex; align-items: center; }
.navbar { justify-content: space-between; gap: 16px; min-height: 74px; }
.brand { font-weight: 900; letter-spacing: 0.03em; }
.nav-links { gap: 14px; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-weight: 600; }
.nav-links a.active, .nav-links a:hover { color: var(--text); }
.theme-toggle { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: 999px; cursor: pointer; }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 999px; padding: 0 6px; background: var(--primary); color: white; font-size: 12px; font-weight: 800; }
.announcement { background: linear-gradient(135deg, var(--primary), #7c3aed); color: white; text-align: center; padding: 10px 16px; font-weight: 700; }
.hero { padding: 72px 0 36px; }
.hero-grid, .admin-layout, .grid { display: grid; gap: 20px; }
.hero-grid { grid-template-columns: 1.2fr 1fr; align-items: center; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section { padding: 32px 0 64px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  padding: 22px; box-shadow: var(--shadow);
}
.hero-card { padding: 28px; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); line-height: 1; margin: 0 0 16px; }
.hero p, .muted { color: var(--muted); }
.lead { font-size: 1.1rem; max-width: 55ch; }
.btn { border: 0; cursor: pointer; border-radius: 14px; padding: 12px 18px; font-weight: 800; transition: transform .15s ease, opacity .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--danger); color: white; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.wrap-between { justify-content: space-between; align-items: center; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.product-card { display: grid; gap: 12px; }
.image-wrap { position: relative; }
.image-wrap img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; }
.wishlist-btn { position: absolute; top: 12px; right: 12px; width: 42px; height: 42px; border-radius: 999px; border: 0; background: rgba(255,255,255,0.92); cursor: pointer; font-size: 18px; }
.wishlist-btn.active { background: #fecdd3; }
.meta-row, .review-row, .filters, .field, .order-actions { display: flex; gap: 10px; }
.meta-row { flex-wrap: wrap; }
.review-row { align-items: center; font-size: 14px; }
.tag { border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 6px 10px; font-size: 13px; font-weight: 700; }
.price { font-size: 1.35rem; font-weight: 900; }
.empty { padding: 20px; border: 1px dashed var(--border); border-radius: 18px; color: var(--muted); background: var(--surface-2); }
.cart-layout, .about-grid { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 22px; }
.cart-item, .admin-order, .admin-product-item, .list-row { display: flex; justify-content: space-between; gap: 16px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--border); }
.order-actions { flex-direction: column; min-width: 190px; }
.notice { display: none; margin-top: 14px; padding: 12px 14px; border-radius: 14px; font-weight: 700; }
.notice.show { display: block; }
.notice.success { background: rgba(34,197,94,.15); color: var(--success); }
.notice.error { background: rgba(239,68,68,.15); color: var(--danger); }
.stat strong { font-size: 1.6rem; }
.filters { flex-wrap: wrap; margin: 12px 0 20px; }
.filters > * { flex: 1; min-width: 180px; }
.feature-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.footer { padding: 22px 0 50px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.newsletter-form { display: flex; gap: 10px; align-items: start; }
.toast-tray { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 10px; z-index: 100; }
.toast { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 12px 14px; border-radius: 14px; min-width: 220px; }
.toast.error { border-color: rgba(239,68,68,.4); }
.skeleton-card { display: grid; gap: 12px; }
.skeleton { border-radius: 16px; background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: pulse 1.4s infinite; }
.skeleton.image { aspect-ratio: 4 / 3; }
.skeleton.line { height: 18px; }
.skeleton.short { width: 60%; }
.fade-in { animation: rise .25s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: translateY(0);} }
@keyframes pulse { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (max-width: 980px) {
  .hero-grid, .cart-layout, .about-grid, .admin-layout, .product-grid, .feature-band, .footer-grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
}
