/** Rameez Scripts — Go Phone Mate — dark cobalt storefront theme */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: oklch(0.16 0.008 255);
  --bg-2: oklch(0.20 0.010 255);
  --bg-3: oklch(0.24 0.012 255);
  --line: oklch(0.30 0.012 255);
  --ink: oklch(0.97 0.005 255);
  --ink-2: oklch(0.75 0.010 255);
  --ink-3: oklch(0.55 0.012 255);
  --accent: oklch(0.62 0.19 255);
  --accent-ink: oklch(0.98 0.02 255);
  --ok: oklch(0.72 0.15 150);
  --err: oklch(0.68 0.18 25);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body {
  background-image: radial-gradient(circle at 1px 1px, oklch(1 0 0 / 0.015) 1px, transparent 0);
  background-size: 3px 3px;
  min-height: 100vh;
}

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.font-display { font-family: "Space Grotesk", system-ui, sans-serif; letter-spacing: -0.02em; }
.font-mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

.surface { background: var(--bg-2); border: 1px solid var(--line); }
.surface-2 { background: var(--bg-3); border: 1px solid var(--line); }
.hairline { border-color: var(--line); }

.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { filter: brightness(1.08); }
.text-accent { color: var(--accent); }
.bg-accent { background: var(--accent); }

.ease-soft { transition-timing-function: cubic-bezier(.2,.7,.2,1); }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* striped placeholder for products */
.ph-stripes {
  background:
    repeating-linear-gradient(135deg, oklch(1 0 0 / 0.025) 0 2px, transparent 2px 14px),
    var(--ph-bg, oklch(0.30 0.02 255));
  position: relative;
  overflow: hidden;
}
.ph-stripes .ph-label {
  position: absolute; left: 12px; bottom: 12px;
  font-family: "JetBrains Mono", monospace; font-size: 10px;
  letter-spacing: 0.08em; color: rgba(255,255,255,0.55);
  max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ph-stripes .ph-tag {
  position: absolute; left: 12px; top: 12px;
  font-family: "JetBrains Mono", monospace; font-size: 10px;
  letter-spacing: 0.08em; color: rgba(255,255,255,0.55);
}

/* horizontal scroll rail */
.rail { scrollbar-width: none; overflow-x: auto; display: flex; }
.rail::-webkit-scrollbar { display: none; }

/* animations */
@keyframes pop { 0%{transform:scale(1)} 40%{transform:scale(1.35)} 100%{transform:scale(1)} }
.pop { animation: pop .35s cubic-bezier(.2,.7,.2,1); }
@keyframes badgePop { 0%{transform:scale(1)} 50%{transform:scale(1.4)} 100%{transform:scale(1)} }
.badge-pop { animation: badgePop .4s cubic-bezier(.2,.7,.2,1); }

@keyframes driftA { 0%,100% { transform: translate3d(0,0,0) } 50% { transform: translate3d(-10px,-6px,0) } }
@keyframes driftB { 0%,100% { transform: translate3d(0,0,0) } 50% { transform: translate3d(12px,8px,0) } }
.drift-a { animation: driftA 9s ease-in-out infinite; }
.drift-b { animation: driftB 11s ease-in-out infinite; }

.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* range slider */
input[type=range].gpm {
  -webkit-appearance: none; appearance: none; width: 100%; height: 2px;
  background: var(--line); border-radius: 999px; outline: none;
}
input[type=range].gpm::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 2px solid var(--bg);
}
input[type=range].gpm::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 2px solid var(--bg);
}

/* checkbox */
.chk { appearance: none; width: 14px; height: 14px; border: 1px solid var(--line); border-radius: 3px;
  background: var(--bg-2); display: inline-grid; place-items: center; cursor: pointer; margin: 0; }
.chk:checked { background: var(--accent); border-color: var(--accent); }
.chk:checked::after { content: ""; width: 6px; height: 3px; border-left: 1.5px solid var(--accent-ink); border-bottom: 1.5px solid var(--accent-ink); transform: rotate(-45deg) translate(0,-1px); }

.nosel { user-select: none; }

/* drawer */
.drawer-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity 200ms cubic-bezier(.2,.7,.2,1); }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 51; width: 100%; max-width: 460px;
  background: var(--bg); border-left: 1px solid var(--line); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 300ms cubic-bezier(.2,.7,.2,1);
}
.drawer.open { transform: translateX(0); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border-radius: 9999px;
  transition: all 200ms cubic-bezier(.2,.7,.2,1); border: 0; white-space: nowrap; text-decoration: none; }
.btn-sm { height: 2.25rem; padding: 0 0.75rem; font-size: 13px; }
.btn-md { height: 2.75rem; padding: 0 1.25rem; font-size: 14px; font-weight: 500; }
.btn-lg { height: 3rem; padding: 0 1.5rem; font-size: 15px; font-weight: 500; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-soft { background: var(--bg-3); border: 1px solid var(--line); color: var(--ink); }
.btn-soft:hover { filter: brightness(1.1); }
.btn-dark { background: #000; color: #fff; }
.btn-dark:hover { background: #111; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* form inputs */
.gpm-field { display: block; }
.gpm-field-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.gpm-field-label > span:first-child { font-size: 12px; font-weight: 500; }
.gpm-field-label > .err { font-size: 11px; color: var(--err); }
.gpm-input-wrap {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 0.75rem; height: 2.75rem;
  display: flex; align-items: center; padding: 0 1rem; transition: border-color 200ms;
}
.gpm-input-wrap:focus-within { border-color: var(--accent); }
.gpm-input-wrap input {
  flex: 1; background: transparent; outline: none; border: 0; color: var(--ink); font-size: 14px; height: 100%; width: 100%;
  min-width: 0;
}
.gpm-input-wrap input::placeholder { color: var(--ink-3); }

/* chip / pill */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 2rem; padding: 0 0.75rem; border-radius: 9999px;
  font-size: 12px; border: 1px solid var(--line); color: var(--ink-2); background: transparent; transition: all 200ms; }
.chip:hover { color: var(--ink); }
.chip.active { background: var(--ink); color: #000; border-color: transparent; }

/* admin table */
.gpm-table { width: 100%; border-collapse: collapse; }
.gpm-table th { text-align: left; font-size: 11px; font-family: "JetBrains Mono", monospace;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); padding: 14px 16px;
  border-bottom: 1px solid var(--line); font-weight: 500; }
.gpm-table td { padding: 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.gpm-table tr:hover td { background: var(--bg-3); }
.gpm-table tr:last-child td { border-bottom: 0; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; height: 22px;
  border-radius: 9999px; font-size: 10px; font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.08em; text-transform: uppercase; }
.badge-accent { background: var(--accent); color: var(--accent-ink); }
.badge-surface { background: var(--bg-3); color: var(--ink-2); border: 1px solid var(--line); }
.badge-ok { background: color-mix(in oklch, var(--ok) 15%, transparent); color: var(--ok); }
.badge-warn { background: color-mix(in oklch, var(--err) 15%, transparent); color: var(--err); }

/* heart toggle button */
.heart-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9999px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-2); transition: all 200ms; }
.heart-btn:hover { border-color: var(--ink-3); }
.heart-btn.active { color: var(--accent); }

/* product card hover lift */
.product-card { transition: transform 300ms cubic-bezier(.2,.7,.2,1); cursor: pointer; }
.product-card:hover { transform: translateY(-2px); }
.product-card .card-media { overflow: hidden; border-radius: 20px; position: relative; border: 1px solid var(--line); background: var(--bg-2); }
.product-card .card-media .ph-stripes { transition: transform 500ms cubic-bezier(.2,.7,.2,1); }
.product-card:hover .card-media .ph-stripes { transform: scale(1.03); }
.product-card .quick-add { position: absolute; left: 12px; right: 12px; bottom: 12px;
  opacity: 0; transform: translateY(8px); transition: all 300ms cubic-bezier(.2,.7,.2,1); pointer-events: none; }
.product-card:hover .quick-add { opacity: 1; transform: translateY(0); pointer-events: auto; }
.product-card .quick-add button { width: 100%; height: 40px; border-radius: 9999px;
  background: var(--ink); color: #000; font-size: 13px; font-weight: 500; border: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.product-card .quick-add button:hover { filter: brightness(0.95); }

/* toasts */
.toast-host { position: fixed; top: 80px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px;
  font-size: 13px; display: flex; align-items: center; gap: 10px; min-width: 240px;
  animation: slideIn 200ms cubic-bezier(.2,.7,.2,1); box-shadow: 0 10px 30px rgba(0,0,0,0.4); pointer-events: auto; }
.toast.ok { border-left: 3px solid var(--ok); }
.toast.err { border-left: 3px solid var(--err); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* layout */
.container { max-width: 1360px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

/* page header */
.page-crumb { font-family: "JetBrains Mono", monospace; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink-3); }
.page-crumb a:hover { color: var(--ink); }

/* admin shell */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--bg-2); border-right: 1px solid var(--line); padding: 24px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px;
  font-size: 14px; color: var(--ink-2); transition: all 200ms; width: 100%; text-align: left; border: 0; background: transparent; }
.admin-nav-item:hover { background: var(--bg-3); color: var(--ink); }
.admin-nav-item.active { background: var(--accent); color: var(--accent-ink); }
.admin-main { padding: 32px; overflow-x: auto; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; height: auto; }
}

/* utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto; padding: 28px; }

/* tabular nums for prices */
.tab-nums { font-variant-numeric: tabular-nums; }
