/* pos/assets/pos.css — shared premium styling for the OBED POS
   Mobile-first. Dark theme, gold accent. */

:root {
  --bg:        #0a0807;
  --surface:   #14110d;
  --surface-2: #1d1813;
  --line:      rgba(201,164,92,.20);
  --line-soft: rgba(201,164,92,.10);
  --gold:      #c9a45c;
  --gold-soft: #e0c896;
  --text:      #f5ecdc;
  --muted:     #9c8f78;
  --green:     #7caf6f;
  --red:       #d08b8b;
  --amber:     #d4a06b;
  --blue:      #8aa9c9;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3 { font-family: 'Cormorant Garamond', Georgia, serif; color: var(--gold); font-weight: 600; }

.wrap { max-width: 760px; margin: 0 auto; padding: 14px 14px 120px; }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10,8,7,.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px;
}
.topbar .title { display: flex; align-items: center; gap: 9px; }
.topbar .title .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), #9c7d3f);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.topbar h1 { font-size: 1.15rem; line-height: 1; }
.topbar .sub { font-size: .68rem; color: var(--muted); letter-spacing: .04em; }

.pill {
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--gold); font-size: .74rem; text-decoration: none;
  padding: 7px 14px; border-radius: 30px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.pill:active { background: var(--surface); }

/* ---- cards ---- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px; margin-bottom: 14px;
}

/* ---- search box ---- */
.search {
  position: relative; margin-bottom: 14px;
}
.search input {
  width: 100%; padding: 13px 14px 13px 42px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 12px; color: var(--text); font-size: .95rem;
}
.search input:focus { outline: none; border-color: var(--gold); }
.search .icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 1rem;
}
.search .clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  width: 26px; height: 26px; border-radius: 50%; font-size: .9rem; display: none;
}

/* ---- category chips ---- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--gold-soft);
  padding: 9px 16px; border-radius: 30px; font-size: .82rem; white-space: nowrap;
}
.chip.active { background: var(--gold); color: var(--bg); font-weight: 600; border-color: var(--gold); }

/* ---- product grid ---- */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 560px) { .products { grid-template-columns: 1fr 1fr 1fr; } }

.product {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 13px 11px; text-align: left;
  display: flex; flex-direction: column; gap: 5px;
  position: relative; transition: transform .07s, border-color .07s;
}
.product:active { transform: scale(.96); border-color: var(--gold); }
.product .pname { font-size: .86rem; line-height: 1.3; font-weight: 500; }
.product .pprice { color: var(--gold); font-weight: 600; font-size: .92rem; }
.product .pstock { font-size: .68rem; color: var(--muted); }
.product .pstock.low { color: var(--amber); }
.product .pstock.out { color: var(--red); }
.product.disabled { opacity: .45; }
.product .badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--gold); color: var(--bg);
  font-size: .72rem; font-weight: 700; min-width: 20px; height: 20px;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

/* ---- empty state ---- */
.empty { text-align: center; color: var(--muted); padding: 28px 14px; font-size: .88rem; }

/* ---- buttons ---- */
.btn {
  border: none; border-radius: 12px; font-weight: 600;
  font-size: .92rem; padding: 14px; cursor: pointer; width: 100%;
}
.btn-gold  { background: var(--gold); color: var(--bg); }
.btn-blue  { background: var(--blue); color: var(--bg); }
.btn-line  { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
.btn-red   { background: transparent; border: 1px solid var(--red); color: var(--red); }
.btn:disabled { opacity: .4; }
.btn-row { display: flex; gap: 10px; }

/* ---- toast ---- */
.toast-host { position: fixed; left: 0; right: 0; bottom: 18px; z-index: 90;
              display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: var(--surface-2); border: 1px solid var(--gold);
  color: var(--text); padding: 11px 20px; border-radius: 30px;
  font-size: .85rem; box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.toast.ok  { border-color: var(--green); }
.toast.err { border-color: var(--red); }

/* ---- modal ---- */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 80; display: none; }
.modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%);
  background: var(--surface); border: 1px solid var(--gold);
  border-radius: 18px; padding: 22px; z-index: 85; width: 88%; max-width: 380px; display: none;
}
.modal h3 { margin-bottom: 12px; font-size: 1.2rem; }
.modal label { display: block; font-size: .7rem; text-transform: uppercase;
                letter-spacing: .12em; color: var(--gold); margin: 12px 0 5px; }
.modal input, .modal select {
  width: 100%; padding: 11px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 9px; color: var(--text); font-size: .95rem;
}
