:root {
  --primary-color: #059669; /* Emerald Green for trust & growth */
  --primary-hover: #047857;
  --accent-color: #f59e0b;  /* Warm Amber/Gold */
  --accent-light: #fef3c7;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #475569;
  --border-color: #e2e8f0;
  --badge-low-stock: #ef4444;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --radius: 12px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
}

/* Header */
.site-header {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  background: var(--accent-color);
  color: #ffffff;
  font-weight: 800;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  color: #ffffff;
}

.brand p {
  margin: 2px 0 0;
  font-size: 11px;
  color: #cbd5e1;
}

/* Actions & Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.small-btn, .primary-btn, .add-btn, .qty-btn {
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.primary-btn {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 18px;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

.primary-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.primary-btn.alt {
  background-color: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.small-btn {
  background: #334155;
  color: #ffffff;
}

.small-btn.ghost {
  background: transparent;
  color: #f8fafc;
  border: 1px solid #475569;
}

.icon-btn {
  background: #334155;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  position: relative;
  font-size: 16px;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--badge-low-stock);
  color: white;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 24px;
  margin: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stamp-badge {
  background: #b45309;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-bottom: 8px;
}

/* Search Bar & Category Tabs */
.search-wrap {
  position: relative;
  margin: 16px;
}

.search-wrap input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 15px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.search-wrap input:focus {
  border-color: var(--primary-color);
  outline: none;
}

.search-wrap .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
}

.cat-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 12px;
}

.cat-tab {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  color: var(--text-muted);
}

.cat-tab.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

/* Product Cards Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  padding: 0 16px 24px;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.product-img-wrap {
  position: relative;
  height: 130px;
  background: #f1f5f9;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stock-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

.product-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-cat {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: bold;
}

.product-name {
  margin: 4px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}

.product-unit {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.product-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-color);
}

.add-btn {
  background: var(--accent-light);
  color: #b45309;
  border: 1px solid #fcd34d;
  padding: 6px 12px;
}

.add-btn:hover {
  background: var(--accent-color);
  color: #ffffff;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  background: #e2e8f0;
  color: var(--text-dark);
}

.qty-btn.primary {
  background: var(--primary-color);
  color: white;
}

/* Card & Ticket Styling */
.card, .ticket {
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}