* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f0eb;
  color: #1a1a1a;
  min-height: 100vh;
}
/* Header */
.header {
  background: #fff;
  border-bottom: 1px solid #e8e3dc;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 36px; height: 36px;
  background: #1a1a1a; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px; letter-spacing: -0.5px;
}
.brand-name { font-size: 17px; font-weight: 700; }
.brand-sub { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 1px; margin-left: 4px; }
.header-right { display: flex; align-items: center; gap: 16px; }
.company-badge {
  background: #f5f0eb; border: 1px solid #e0dbd5;
  padding: 5px 12px; border-radius: 20px;
  font-size: 13px; font-weight: 500; color: #555;
}
.btn-ghost {
  background: none; border: 1.5px solid #e0dbd5;
  padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 500;
  cursor: pointer; text-decoration: none; color: #555; transition: all 0.15s;
}
.btn-ghost:hover { border-color: #aaa; color: #1a1a1a; }
.btn-primary-outline {
  background: #1a1a1a; color: #fff; border: none;
  padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
/* Layout */
.layout { display: flex; max-width: 1200px; margin: 0 auto; min-height: calc(100vh - 64px); }
/* Sidebar */
.sidebar { width: 240px; padding: 24px 20px; flex-shrink: 0; }
.sidebar-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: #999; margin-bottom: 12px; }
.filter-group { margin-bottom: 20px; }
.filter-label { font-size: 13px; font-weight: 500; color: #444; margin-bottom: 8px; display: block; }
.filter-select, .filter-input {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid #e0dbd5; border-radius: 8px;
  font-size: 14px; background: #fff; outline: none; transition: border-color 0.15s;
}
.filter-select:focus, .filter-input:focus { border-color: #1a1a1a; }
.filter-btn {
  width: 100%; padding: 9px;
  background: #1a1a1a; color: #fff; border: none; border-radius: 8px;
  font-size: 14px; font-weight: 500; cursor: pointer; transition: background 0.15s;
}
.filter-btn:hover { background: #333; }
.filter-btn-outline {
  width: 100%; padding: 8px;
  background: none; color: #888; border: none; font-size: 13px;
  cursor: pointer; text-align: center; margin-top: 6px;
}
.filter-btn-outline:hover { color: #555; text-decoration: underline; }
/* Main */
.main { flex: 1; padding: 24px 32px 80px; min-width: 0; }
.main-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.main-title { font-size: 22px; font-weight: 600; }
.product-count { font-size: 14px; color: #888; font-weight: 400; margin-left: 8px; }
/* Product list */
.product-list { display: flex; flex-direction: column; gap: 20px; }
.product-card { background: #fff; border-radius: 12px; border: 1px solid #e8e3dc; overflow: hidden; }
.product-header {
  padding: 16px 20px 12px;
  display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 1px solid #f0ebe5;
}
.product-info { flex: 1; min-width: 0; }
.product-name { font-size: 16px; font-weight: 600; color: #1a1a1a; }
.product-meta { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.product-type {
  background: #f5f0eb; padding: 3px 8px; border-radius: 4px;
  font-size: 12px; font-weight: 500; color: #666; text-transform: capitalize;
}
.product-gender { font-size: 12px; color: #888; text-transform: capitalize; }
.product-price { font-size: 16px; font-weight: 600; color: #1a1a1a; white-space: nowrap; }
.product-price span { font-size: 13px; font-weight: 400; color: #999; }
/* Variant table */
.variant-table { width: 100%; }
.variant-table th {
  text-align: left; padding: 10px 20px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: #aaa; background: #faf8f5; border-bottom: 1px solid #f0ebe5;
}
.variant-table th:last-child { text-align: right; }
.variant-table td {
  padding: 12px 20px; font-size: 14px;
  border-bottom: 1px solid #f5f0eb; vertical-align: middle;
}
.variant-table tr:last-child td { border-bottom: none; }
.sku-text { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; color: #888; }
.variant-text { color: #555; }
.stock-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.stock-in { background: #f0fdf4; color: #15803d; }
.stock-low { background: #fefce8; color: #a16207; }
.stock-out { background: #fef2f2; color: #dc2626; }
.velocity { font-size: 12px; color: #999; }
.qty-input {
  width: 64px; padding: 6px 10px;
  border: 1.5px solid #e0dbd5; border-radius: 6px;
  font-size: 14px; text-align: center; outline: none;
}
.qty-input:focus { border-color: #1a1a1a; }
.qty-input:disabled { background: #f5f0eb; color: #aaa; cursor: not-allowed; }
.order-section { padding: 16px 20px; background: #faf8f5; border-top: 1px solid #f0ebe5; }
.order-section-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #888; margin-bottom: 12px; }
/* Order panel */
.order-panel {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 2px solid #1a1a1a;
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
  z-index: 200;
  transform: translateY(100%); transition: transform 0.2s ease;
}
.order-panel.visible { transform: translateY(0); }
.order-panel-info { display: flex; align-items: center; gap: 20px; }
.order-count { font-size: 14px; color: #555; }
.order-count strong { color: #1a1a1a; }
.order-total { font-size: 18px; font-weight: 700; }
.order-actions { display: flex; gap: 12px; align-items: center; }
.btn-clear {
  padding: 10px 18px; background: none; border: 1.5px solid #e0dbd5;
  border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; color: #666;
}
.btn-clear:hover { border-color: #aaa; color: #1a1a1a; }
.btn-submit-order {
  padding: 10px 24px; background: #1a1a1a; color: #fff;
  border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-submit-order:hover { background: #333; }
/* Modal */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 300;
  align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.visible { display: flex; }
.modal {
  background: #fff; border-radius: 16px; width: 100%;
  max-width: 560px; max-height: 90vh; overflow-y: auto; padding: 32px;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-title { font-size: 20px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #aaa; line-height: 1; }
.modal-close:hover { color: #333; }
.order-items-list { margin-bottom: 20px; }
.order-item-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid #f0ebe5; font-size: 14px;
}
.order-item-row:last-child { border-bottom: none; }
.order-item-name { flex: 1; }
.order-item-variant { font-size: 12px; color: #888; }
.order-item-qty { color: #666; margin-left: 12px; white-space: nowrap; }
.order-item-price { font-weight: 600; margin-left: 16px; }
.form-field { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: #444; margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 10px 12px; border: 1.5px solid #e0dbd5;
  border-radius: 8px; font-size: 14px; outline: none;
}
.form-input:focus { border-color: #1a1a1a; }
textarea.form-input { resize: vertical; min-height: 80px; }
.modal-footer { display: flex; gap: 12px; margin-top: 24px; }
.modal-footer button { flex: 1; padding: 12px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn-cancel-modal { background: none; border: 1.5px solid #e0dbd5; color: #555; }
.btn-confirm-order { background: #1a1a1a; color: #fff; border: none; }
.btn-confirm-order:hover { background: #333; }
/* Alert */
.alert { padding: 12px 20px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
/* Empty */
.empty-cart { text-align: center; padding: 48px 24px; color: #888; }
.empty-cart-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }