:root {
  --bg: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-card: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-muted: #aeaeb2;
  --border: #d2d2d7;
  --primary: #0071e3;
  --primary-hover: #0077ed;
  --primary-text: #ffffff;
  --danger: #ff3b30;
  --success: #34c759;
  --warning: #ff9500;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
  --header-h: 60px;
  --font: -apple-system, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}
[data-theme="dark"] {
  --bg: #000000;
  --bg-secondary: #1c1c1e;
  --bg-card: #1c1c1e;
  --text: #f5f5f7;
  --text-secondary: #aeaeb2;
  --text-muted: #636366;
  --border: #38383a;
  --primary: #0a84ff;
  --primary-hover: #409cff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.6);
}
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: .8; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select {
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  width: 100%;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}
input[type="checkbox"], input[type="radio"] {
  width: auto;
  min-width: 16px;
  height: 16px;
  padding: 0;
  -webkit-appearance: auto;
  appearance: auto;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,113,227,.15);
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.container-sm { max-width: 840px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
[data-theme="dark"] .site-header {
  background: rgba(0,0,0,.85);
}
.header-inner {
  display: flex; align-items: center; gap: 12px;
  height: 100%;
}
.logo { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -.5px; flex-shrink: 0; }
.header-search {
  flex: 1; max-width: 480px;
  position: relative;
}
.header-search input {
  height: 38px;
  padding: 0 14px 0 40px;
  border-radius: 10px;
  background: var(--bg-secondary);
  font-size: 14px;
}
.header-search .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}
.header-actions {
  display: flex; align-items: center; gap: 4px; margin-left: auto;
}
.header-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  color: var(--text);
  transition: background var(--transition);
  position: relative;
}
.header-btn:hover { background: var(--bg-secondary); }
.badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--danger);
  color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.nav-main { display: flex; align-items: center; gap: 4px; }
.nav-main a {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.nav-main a:hover { background: var(--bg-secondary); opacity: 1; }

/* Mobile nav */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 99;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  backdrop-filter: blur(20px);
}
.mobile-bottom-nav .nav-items {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 500;
  padding: 4px 2px;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
  position: relative;
  white-space: nowrap;
}
.mobile-nav-item.active, .mobile-nav-item:hover { color: var(--primary); }
.mobile-nav-item svg { width: 22px; height: 22px; }

/* Hero slider */
.hero-slider { position: relative; overflow: hidden; border-radius: 0; }
.slider-track { display: flex; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.slide {
  min-width: 100%; position: relative;
  aspect-ratio: 16/6;
  background: var(--bg-secondary);
}
@media(max-width:768px) { .slide { aspect-ratio: 4/3; } }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 40px 60px;
  background: linear-gradient(90deg, rgba(0,0,0,.6) 0%, transparent 60%);
  color: #fff;
}
.slide-title { font-size: clamp(24px, 4vw, 52px); font-weight: 700; line-height: 1.1; margin-bottom: 12px; }
.slide-subtitle { font-size: clamp(14px, 2vw, 20px); opacity: .85; margin-bottom: 24px; max-width: 400px; }
.slider-dots {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px;
}
.dot {
  width: 8px; height: 8px; border-radius: 4px;
  background: rgba(255,255,255,.4);
  transition: all var(--transition);
}
.dot.active { width: 24px; background: #fff; }
.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  box-shadow: var(--shadow-md);
  transition: opacity var(--transition);
  z-index: 2;
}
.slider-btn:hover { opacity: .9; }
.slider-btn.prev { left: 16px; }
.slider-btn.next { right: 16px; }

/* Section */
.section { padding: 48px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-title { font-size: clamp(20px, 3vw, 28px); font-weight: 700; letter-spacing: -.3px; }
.section-link { font-size: 14px; color: var(--primary); font-weight: 500; }

/* Product grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
@media(max-width:480px) { .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* Product card */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.product-card-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-secondary);
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-card-img img { transform: scale(1.04); }
.product-card-body { padding: 12px; }
.product-card-name {
  font-size: 13px; font-weight: 500; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.4; margin-bottom: 8px;
}
.product-card-price { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price-current { font-size: 16px; font-weight: 700; color: var(--text); }
.price-old { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.price-discount {
  font-size: 11px; font-weight: 700; color: #fff;
  background: var(--danger);
  padding: 2px 6px; border-radius: 4px;
}
.product-card-actions {
  display: flex; gap: 8px; padding: 0 12px 12px;
}
.btn-cart {
  flex: 1; height: 36px; font-size: 13px; font-weight: 600;
  background: var(--primary); color: #fff;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.btn-cart:hover { background: var(--primary-hover); }
.btn-wish {
  width: 36px; height: 36px; flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.btn-wish.active, .btn-wish:hover { color: var(--danger); border-color: var(--danger); }
.badge-new, .badge-sale {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px;
}
.badge-new { background: var(--success); color: #fff; }
.badge-sale { background: var(--danger); color: #fff; }
.product-card-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.stars { color: #ff9500; font-size: 12px; }
.rating-count { font-size: 12px; color: var(--text-muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; line-height: 1;
  cursor: pointer; transition: all var(--transition); border: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); opacity: 1; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; opacity: 1; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: var(--bg-secondary); color: var(--text); }
.btn-ghost:hover { background: var(--border); opacity: 1; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 17px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Product detail */
.product-detail { padding: 32px 0 64px; }
.product-gallery { position: relative; }
.gallery-main { aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-secondary); margin-bottom: 12px; cursor: zoom-in; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; }
.gallery-thumb {
  width: 72px; height: 72px; flex-shrink: 0;
  border-radius: var(--radius-sm); overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer; transition: border-color var(--transition);
  background: var(--bg-secondary);
}
.gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding: 0; }
.product-brand { font-size: 13px; color: var(--primary); font-weight: 600; margin-bottom: 8px; }
.product-title { font-size: clamp(22px, 3vw, 32px); font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.product-price-block { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.product-price { font-size: 28px; font-weight: 800; }
.product-old-price { font-size: 18px; color: var(--text-muted); text-decoration: line-through; }
.product-discount { font-size: 15px; font-weight: 700; color: var(--danger); }
.product-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.product-actions .btn { height: 52px; font-size: 16px; border-radius: var(--radius-md); }
.qty-control { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; width: fit-content; }
.qty-btn { width: 40px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--bg-secondary); color: var(--text); font-size: 20px; transition: background var(--transition); }
.qty-btn:hover { background: var(--border); }
.qty-input { width: 50px; height: 44px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-weight: 600; }
.variants-section { margin-bottom: 20px; }
.variants-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .5px; }
.variant-options { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-option {
  padding: 6px 14px; border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
  color: var(--text);
}
.variant-option:hover { border-color: var(--primary); color: var(--primary); }
.variant-option.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.variant-option.color-swatch { width: 32px; height: 32px; padding: 0; border-radius: 50%; }
.tabs { border-bottom: 1px solid var(--border); display: flex; gap: 0; margin-bottom: 24px; }
.tab-btn {
  padding: 12px 20px; font-size: 15px; font-weight: 600;
  color: var(--text-secondary); border-bottom: 2px solid transparent;
  transition: all var(--transition); cursor: pointer;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table td { padding: 12px 0; font-size: 14px; }
.specs-table td:first-child { color: var(--text-secondary); width: 40%; }
.specs-table td:last-child { font-weight: 500; }

/* Reviews */
.review-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px; }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.review-user { font-weight: 600; font-size: 14px; }
.review-date { font-size: 13px; color: var(--text-muted); }
.review-text { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* Cart */
.cart-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.cart-item-img { width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--bg-secondary); }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.cart-item-price { font-size: 16px; font-weight: 700; }
.cart-summary { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; }
.cart-summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 15px; }
.cart-summary-row.total { font-size: 18px; font-weight: 700; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }

/* Categories */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.category-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 20px 12px; text-align: center;
  transition: all var(--transition); cursor: pointer;
}
.category-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.category-card img { width: 60px; height: 60px; object-fit: cover; border-radius: 50%; margin: 0 auto 10px; }
.category-card-name { font-size: 13px; font-weight: 600; color: var(--text); }

/* Account */
.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
@media(max-width:768px) { .account-layout { grid-template-columns: 1fr; } }
.account-sidebar { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; height: fit-content; }
.account-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; display: block; background: var(--bg-secondary); }
.account-name { font-size: 16px; font-weight: 700; text-align: center; margin-bottom: 4px; }
.account-phone { font-size: 13px; color: var(--text-secondary); text-align: center; margin-bottom: 20px; }
.account-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text);
  transition: background var(--transition);
  margin-bottom: 2px;
}
.account-nav a:hover, .account-nav a.active { background: var(--bg-secondary); color: var(--primary); opacity: 1; }
.account-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; }
.balance-card { background: linear-gradient(135deg, var(--primary), #6e40c9); border-radius: var(--radius-md); padding: 24px; color: #fff; }
.balance-amount { font-size: 36px; font-weight: 800; margin-bottom: 4px; }

/* Admin */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--bg-card); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-logo { padding: 20px; font-size: 18px; font-weight: 700; border-bottom: 1px solid var(--border); }
.admin-menu { flex: 1; padding: 12px 8px; }
.admin-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  transition: all var(--transition); margin-bottom: 2px; cursor: pointer;
}
.admin-menu-item:hover, .admin-menu-item.active {
  background: var(--bg-secondary); color: var(--primary);
}
.admin-menu-group { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .8px; padding: 12px 12px 6px; }
.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  height: 60px; background: var(--bg-card); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; gap: 12px;
  position: sticky; top: 0; z-index: 10;
}
.admin-topbar-title { font-size: 18px; font-weight: 700; }
.admin-content { padding: 24px; }
.page-title { font-size: 24px; font-weight: 800; margin-bottom: 24px; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); }
.card-body { padding: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; }
.stat-value { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.stat-label { font-size: 13px; color: var(--text-secondary); }
.stat-change { font-size: 13px; margin-top: 8px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* Table */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); border-bottom: 1px solid var(--border); background: var(--bg-secondary); }
tbody td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-secondary); }
.table-img { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; }

/* Status badges */
.status { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.status-new { background: #e3f2fd; color: #1976d2; }
.status-paid { background: #e8f5e9; color: #388e3c; }
.status-processing { background: #fff8e1; color: #f57c00; }
.status-shipping { background: #f3e5f5; color: #7b1fa2; }
.status-completed { background: #e8f5e9; color: #2e7d32; }
.status-cancelled { background: #ffebee; color: #c62828; }
.status-active { background: #e8f5e9; color: #2e7d32; }
.status-inactive { background: #f5f5f5; color: #757575; }

[data-theme="dark"] .status-new { background: rgba(25,118,210,.2); color: #64b5f6; }
[data-theme="dark"] .status-paid { background: rgba(56,142,60,.2); color: #81c784; }
[data-theme="dark"] .status-completed { background: rgba(46,125,50,.2); color: #81c784; }
[data-theme="dark"] .status-cancelled { background: rgba(198,40,40,.2); color: #ef9a9a; }
[data-theme="dark"] .status-active { background: rgba(46,125,50,.2); color: #81c784; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width:640px) { .form-grid { grid-template-columns: 1fr; } }
.toggle { position: relative; width: 44px; height: 26px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 13px;
  background: var(--border); cursor: pointer;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; left: 3px; top: 3px;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Alert / Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg);
  padding: 12px 24px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg); z-index: 9999;
  animation: slideUp .3s ease;
  white-space: nowrap;
}
.toast.success { background: var(--success); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }
@keyframes slideUp { from { transform: translateX(-50%) translateY(20px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 32px; width: 100%; max-width: 480px;
  transform: scale(.96) translateY(10px);
  transition: transform var(--transition);
  max-height: 90vh; overflow-y: auto;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.modal-close { position: absolute; top: 16px; right: 16px; font-size: 20px; color: var(--text-muted); background: var(--bg-secondary); border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }

/* Pagination */
.pagination { display: flex; gap: 4px; justify-content: center; padding: 24px 0; }
.page-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500; color: var(--text);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.page-btn.active, .page-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Filter */
.filter-sidebar { width: 220px; flex-shrink: 0; }
.filter-group { margin-bottom: 24px; }
.filter-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range input { text-align: center; }
.filter-checkbox { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; font-size: 14px; }
.filter-checkbox input { width: auto; }

/* Gallery zoom overlay */
.zoom-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.9);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.zoom-overlay.open { opacity: 1; pointer-events: all; }
.zoom-img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius-md); }

/* Skeleton loading */
.skeleton { background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border) 50%, var(--bg-secondary) 75%); background-size: 200% 100%; animation: skeleton 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Empty state */
.empty-state { text-align: center; padding: 64px 20px; }
.empty-state svg { width: 80px; height: 80px; color: var(--text-muted); margin: 0 auto 16px; }
.empty-state h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }

/* Order detail */
.order-timeline { position: relative; padding-left: 24px; }
.order-timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-dot { position: absolute; left: -20px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--border); border: 2px solid var(--bg-card); }
.timeline-item.done .timeline-dot { background: var(--success); }
.timeline-item.current .timeline-dot { background: var(--primary); }
.timeline-title { font-size: 14px; font-weight: 600; }
.timeline-time { font-size: 12px; color: var(--text-muted); }

/* Image upload zone */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-md);
  padding: 32px; text-align: center; cursor: pointer;
  transition: all var(--transition);
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--primary); background: rgba(0,113,227,.05); }
.upload-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.preview-item { position: relative; width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.6); color: #fff; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; }

/* Responsive */
@media(max-width:1024px) { .admin-sidebar { width: 200px; } }
@media(max-width:768px) {
  .admin-sidebar { display: none; }
  .admin-sidebar.open { display: flex; position: fixed; inset: 0 auto 0 0; z-index: 200; width: 240px; box-shadow: var(--shadow-lg); }
  .mobile-bottom-nav { display: flex; }
  body { padding-bottom: 70px; }
  .desktop-only { display: none !important; }
  .nav-main { display: none; }
  .header-search { display: none; }
  .slide-content { padding: 20px; }
  .filter-sidebar { display: none; }
}
@media(min-width:769px) {
  .mobile-only { display: none !important; }
}
@media(max-width:480px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .modal { padding: 24px; }
}

/* Scroll */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Catalog layout */
.catalog-layout { display: flex; gap: 24px; align-items: flex-start; }
.catalog-content { flex: 1; min-width: 0; }
.sort-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sort-bar select { width: auto; font-size: 14px; height: 36px; padding: 0 32px 0 12px; }
.result-count { font-size: 14px; color: var(--text-secondary); }

/* Video embed */
.product-video { position: relative; padding-top: 56.25%; border-radius: var(--radius-md); overflow: hidden; margin-top: 12px; }
.product-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* Range input */
input[type="range"] {
  padding: 0; background: transparent; border: none; height: auto;
  -webkit-appearance: auto; accent-color: var(--primary);
}

/* Search autocomplete */
.search-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  z-index: 50; max-height: 400px; overflow-y: auto;
}
.search-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; transition: background var(--transition); }
.search-item:hover { background: var(--bg-secondary); }
.search-item img { width: 40px; height: 40px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.search-item-name { font-size: 14px; font-weight: 500; }
.search-item-price { font-size: 13px; color: var(--text-secondary); }

.admin-mobile-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:199;}
@media(max-width:768px){.admin-mobile-overlay.open{display:block;}}
.notification-dot{position:absolute;top:2px;right:2px;width:8px;height:8px;border-radius:50%;background:var(--danger);}
.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.flex-center{display:flex;align-items:center;justify-content:center;}
.gap-8{gap:8px;} .gap-12{gap:12px;} .gap-16{gap:16px;}
.mt-0{margin-top:0;} .mb-0{margin-bottom:0;}
.fw-700{font-weight:700;} .fw-800{font-weight:800;}
.fs-12{font-size:12px;} .fs-13{font-size:13px;} .fs-14{font-size:14px;}
.color-muted{color:var(--text-muted);} .color-secondary{color:var(--text-secondary);}
.color-success{color:var(--success);} .color-danger{color:var(--danger);} .color-primary{color:var(--primary);}

.product-card:hover .btn-cart{background:var(--primary-hover);}

.inline-label{display:inline-flex;align-items:center;gap:6px;font-size:14px;cursor:pointer;}
.form-row{display:flex;gap:12px;align-items:flex-end;}

.alert{padding:12px 16px;border-radius:var(--radius-sm);font-size:14px;margin-bottom:16px;}
.alert-success{background:rgba(52,199,89,.15);color:var(--success);border:1px solid rgba(52,199,89,.3);}
.alert-error{background:rgba(255,59,48,.12);color:var(--danger);border:1px solid rgba(255,59,48,.25);}
.alert-info{background:rgba(0,113,227,.1);color:var(--primary);border:1px solid rgba(0,113,227,.2);}

.tag{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:20px;font-size:12px;font-weight:600;background:var(--bg-secondary);color:var(--text-secondary);border:1px solid var(--border);}
.tag-primary{background:rgba(0,113,227,.12);color:var(--primary);border-color:rgba(0,113,227,.2);}

table th[onclick]{cursor:pointer;user-select:none;}
table th[onclick]:hover{background:var(--border);}

.admin-content input:focus,.admin-content select:focus,.admin-content textarea:focus{box-shadow:0 0 0 3px rgba(0,113,227,.15);}

@media print{.admin-sidebar,.admin-topbar,.btn{display:none!important;}.admin-main{width:100%!important;}}

.skeleton-table td{padding:12px 16px;}<br>
.skeleton-row{animation:skeleton 1.5s infinite;background:linear-gradient(90deg,var(--bg-secondary) 25%,var(--border) 50%,var(--bg-secondary) 75%);background-size:200% 100%;height:20px;border-radius:4px;}

input[type="datetime-local"],input[type="date"],input[type="time"]{padding:10px 12px;}
select option{background:var(--bg-card);color:var(--text);}

.product-card .badge-new,.product-card .badge-sale{z-index:1;}

.checkout-grid>div:last-child .cart-summary{max-height:calc(100vh - 100px);overflow-y:auto;}

.account-content .empty-state svg{color:var(--border);}

@media(max-width:480px){
  .stat-cards{grid-template-columns:1fr 1fr;}
  .form-grid{grid-template-columns:1fr;}
  .products-grid{grid-template-columns:repeat(2,1fr);}
  .section-title{font-size:20px;}
}


.cart-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
@media(max-width:768px) { .cart-grid { grid-template-columns: 1fr !important; } }

.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media(max-width:768px) { .product-layout { grid-template-columns: 1fr !important; gap: 24px !important; } }
