* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f4f6f8;
  color: #1f2937;
}

.page-content {
  padding: 1.5rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 { font-size: 1.8rem; }
.subtitle { color: #6b7280; font-size: 0.9rem; }

main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 800px) {
  main { grid-template-columns: 1fr; }
}

.panel {
  background: white;
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.panel h2 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.15s;
}

.card:hover { transform: translateY(-2px); }

.card h3 { font-size: 0.95rem; }
.price { color: #059669; font-weight: 600; }

.btn-add {
  margin-top: auto;
  padding: 0.5rem;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-add:hover { background: #1d4ed8; }

/* Cart */
#cart { min-height: 60px; margin-bottom: 1rem; }

.empty { color: #9ca3af; font-style: italic; font-size: 0.9rem; }

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f3f4f6;
  gap: 0.5rem;
}

.cart-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.cart-info .name {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-info .subtotal {
  font-size: 0.75rem;
  color: #6b7280;
}

.controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.controls button {
  width: 26px;
  height: 26px;
  border: 1px solid #d1d5db;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.controls button:hover { background: #f3f4f6; }

.quantity {
  min-width: 20px;
  text-align: center;
  font-weight: 600;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.15rem;
  font-weight: 700;
  padding-top: 0.75rem;
  border-top: 2px solid #e5e7eb;
}

#total { color: #059669; }