/* Kuekoe -- shared styles. Colors/fonts are placeholders, edit freely. */

:root {
  --brand: #c2694a;       /* TODO: swap for Kuekoe's real brand color */
  --brand-dark: #9c4f36;
  --bg: #fffaf5;
  --text: #2b2320;
  --muted: #7a6f68;
  --card-bg: #ffffff;
  --border: #eee0d6;
  --danger: #c0392b;
  --success: #2e7d32;
  --warn: #b8860b;
  --radius: 12px;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Nav */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.navbar .logo { font-weight: 700; font-size: 1.3rem; text-decoration: none; color: var(--brand-dark); }
.navbar nav a {
  text-decoration: none;
  margin-left: 20px;
  color: var(--text);
  font-weight: 500;
}
.navbar .cart-link { position: relative; }
.cart-badge {
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  padding: 1px 6px;
  position: absolute;
  top: -8px;
  right: -14px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(180deg, #fff, var(--bg));
}
.hero h1 { font-size: 2.4rem; margin-bottom: 12px; }
.hero p { color: var(--muted); max-width: 560px; margin: 0 auto 28px; }

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 12px 26px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: transparent; color: var(--brand-dark); border: 1px solid var(--brand); }
.btn.small { padding: 6px 14px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Product grid */
.section-title { font-size: 1.5rem; margin: 40px 0 20px; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding-bottom: 60px;
}
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f2e9e1; }
.product-card .body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .name { font-weight: 600; }
.product-card .price { color: var(--brand-dark); font-weight: 700; }

/* Forms */
.form-field { margin-bottom: 16px; }
.form-field label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 0.9rem; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

/* Cart */
.cart-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cart-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #f2e9e1; }
.cart-row .info { flex: 1; }
.cart-row .qty-controls { display: flex; align-items: center; gap: 8px; }
.qty-controls button { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border); background: #fff; cursor: pointer; }

.summary-row { display: flex; justify-content: space-between; padding: 6px 0; }
.summary-row.total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 6px; }

/* Status badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge.unconfirmed { background: #fff3cd; color: var(--warn); }
.badge.confirmed { background: #e3f5e6; color: var(--success); }
.badge.failed { background: #fde3e1; color: var(--danger); }

/* Admin */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: #211a17; color: #fff; padding: 20px 0; flex-shrink: 0; }
.admin-sidebar a { display: block; padding: 12px 24px; color: #d8cfc9; text-decoration: none; }
.admin-sidebar a.active, .admin-sidebar a:hover { background: #34281f; color: #fff; }
.admin-main { flex: 1; padding: 30px; max-width: 1100px; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.admin-table th { background: #f5ede6; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal { background: #fff; border-radius: var(--radius); padding: 24px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; }

.muted { color: var(--muted); font-size: 0.9rem; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
