/* ============================================================
   GUMSHOP — THEME.CSS
   Change this file to redesign the entire look of the app.
   
   What lives here:
   - Color palette (CSS variables)
   - Typography (font, sizes, weights)
   - Spacing & radius tokens
   - Product card appearance
   - Button styles
   - Hero section copy styles
   - All component visual styles
   ============================================================ */

/* ── GOOGLE FONT ─────────────────────────────────────────────
   Change the @import and --font to swap fonts globally        */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ── COLOR PALETTE ───────────────────────────────────────────
   Change these to recolor the entire app                      */
:root {
  /* Backgrounds */
  --bg:       #ffffff;
  --bg2:      #f5f4f0;
  --bg3:      #eeecea;

  /* Text */
  --text:     #1a1a18;
  --text2:    #6b6b67;
  --text3:    #a0a09c;

  /* Borders */
  --border:   rgba(0,0,0,.09);
  --border2:  rgba(0,0,0,.18);

  /* Accent (buttons, highlights, spinner) */
  --accent:   #f9a825;
  --accent-t: #3d2500;   /* text on accent bg */
  --accent-h: #ef9f27;   /* hover state */

  /* Status colors */
  --ok-bg:    #eaf3de;  --ok:   #3b6d11;
  --err-bg:   #fdecea;  --err:  #b91c1c;
  --info-bg:  #e6f1fb;  --info: #1d4ed8;
  --warn-bg:  #fffbeb;  --warn: #92400e;

  /* Shape */
  --r:        10px;    /* default border-radius */
  --rl:       14px;    /* large border-radius (cards, modals) */

  /* Shadow */
  --shadow:   0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.04);

  /* Font */
  --font:     'DM Sans', sans-serif;
}

/* ── BASE ────────────────────────────────────────────────────  */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── NAV ─────────────────────────────────────────────────────  */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo { font-size: 20px; font-weight: 700; letter-spacing: -.5px; cursor: pointer; }
.logo span { color: var(--accent); }
.nav-r { display: flex; gap: 8px; align-items: center; }

/* ── BUTTONS ─────────────────────────────────────────────────  */
.btn {
  padding: 8px 18px;
  border-radius: var(--r);
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text);
  font-weight: 500;
  transition: background .15s;
}
.btn:hover { background: var(--bg2); }
.btn-p  { background: var(--accent); border-color: var(--accent); color: var(--accent-t); font-weight: 600; }
.btn-p:hover { background: var(--accent-h); border-color: var(--accent-h); }
.btn-ok  { background: var(--ok-bg);  border-color: #86efac; color: var(--ok); }
.btn-ok:hover  { background: #dcfce7; }
.btn-err { background: var(--err-bg); border-color: #fca5a5; color: var(--err); }
.btn-err:hover { background: #fecaca; }
.btn-sm  { padding: 5px 12px; font-size: 12px; }
.fbtn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--r);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-t);
  margin-top: 8px;
  transition: background .15s;
}
.fbtn:hover    { background: var(--accent-h); }
.fbtn:disabled { opacity: .5; cursor: not-allowed; }

/* ── HERO ────────────────────────────────────────────────────  */
.hero { padding: 64px 24px 48px; text-align: center; max-width: 580px; margin: 0 auto; }
.hero h1 { font-size: 42px; font-weight: 700; line-height: 1.12; margin-bottom: 14px; letter-spacing: -1.5px; }
.hero p  { font-size: 16px; color: var(--text2); margin-bottom: 32px; line-height: 1.7; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hbtn { padding: 13px 28px; border-radius: var(--r); font-size: 15px; font-weight: 600; font-family: var(--font); cursor: pointer; border: none; transition: background .15s; }
.hbtn-sell { background: var(--accent); color: var(--accent-t); }
.hbtn-sell:hover { background: var(--accent-h); }
.hbtn-browse { background: var(--bg2); color: var(--text); border: 1px solid var(--border2); }
.hbtn-browse:hover { background: var(--bg3); }

/* ── PRODUCT GRID & CARDS ────────────────────────────────────
   Change .card, .cthumb, .cinfo etc to redesign product cards */
.section  { padding: 32px 24px; max-width: 760px; margin: 0 auto; }
.stitle   { font-size: 11px; font-weight: 600; color: var(--text3); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.grid     { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }

.card {
  border: 1px solid var(--border);
  border-radius: var(--rl);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, transform .12s, box-shadow .15s;
  background: var(--bg);
}
.card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.cthumb {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  overflow: hidden;
}
.cthumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cinfo  { padding: 12px 14px 14px; }
.cinfo h3 { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 4px; }
.cshop  { font-size: 12px; color: var(--text3); margin-bottom: 8px; }
.cprice { font-size: 14px; font-weight: 600; color: var(--text); }
.cprice.free { color: var(--ok); }

/* ── SECTION HEADER ──────────────────────────────────────────  */
.sh    { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.sh h2 { font-size: 20px; font-weight: 600; letter-spacing: -.3px; }

/* ── EMPTY STATE ─────────────────────────────────────────────  */
.empty   { text-align: center; padding: 48px 24px; color: var(--text3); }
.empty-i { font-size: 40px; margin-bottom: 12px; }
.empty p { font-size: 14px; }

/* ── AUTH CARDS ──────────────────────────────────────────────  */
.auth-wrap { max-width: 420px; margin: 48px auto; padding: 0 24px; }
.auth-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--rl); padding: 32px; box-shadow: var(--shadow); }
.auth-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; letter-spacing: -.5px; }
.auth-sub { font-size: 14px; color: var(--text2); margin-bottom: 24px; }

/* ── FORM FIELDS ─────────────────────────────────────────────  */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--text2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border2);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249,168,37,.15);
}
.toggle-text { text-align: center; font-size: 13px; color: var(--text2); margin-top: 16px; }
.toggle-text a { color: #185fa5; cursor: pointer; text-decoration: none; }
.toggle-text a:hover { text-decoration: underline; }

/* ── ALERTS ──────────────────────────────────────────────────  */
.alert { padding: 12px 14px; border-radius: var(--r); font-size: 13px; margin-bottom: 16px; font-weight: 500; }
.alert-ok   { background: var(--ok-bg);   color: var(--ok); }
.alert-err  { background: var(--err-bg);  color: var(--err); }
.alert-info { background: var(--info-bg); color: var(--info); }
.alert-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #fde68a; }

/* ── DASHBOARD ───────────────────────────────────────────────  */
.dash { max-width: 760px; margin: 0 auto; padding: 32px 24px; }
.dh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.dh-label { font-size: 13px; color: var(--text3); margin-bottom: 2px; }
.dh h2 { font-size: 22px; font-weight: 700; letter-spacing: -.5px; }

/* ── STAT CARDS ──────────────────────────────────────────────  */
.stats  { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 28px; }
.stat   { background: var(--bg2); border-radius: var(--r); padding: 16px; }
.stat-l { font-size: 12px; color: var(--text2); margin-bottom: 6px; font-weight: 500; }
.stat-v { font-size: 24px; font-weight: 700; letter-spacing: -.5px; }

/* ── LIST ROWS ───────────────────────────────────────────────  */
.rows { border: 1px solid var(--border); border-radius: var(--rl); overflow: hidden; }
.row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); gap: 12px; }
.row:last-child { border-bottom: none; }
.rthumb { width: 42px; height: 42px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.rinfo  { flex: 1; min-width: 0; }
.rtitle { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsub   { font-size: 12px; color: var(--text3); margin-top: 2px; }
.rright { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── BADGES ──────────────────────────────────────────────────  */
.badge     { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.b-live      { background: var(--ok-bg);   color: var(--ok); }
.b-pending   { background: var(--warn-bg); color: var(--warn); }
.b-rejected  { background: var(--err-bg);  color: var(--err); }
.b-hidden    { background: var(--bg3);     color: var(--text3); }
.b-active    { background: var(--info-bg); color: var(--info); }
.b-suspended { background: var(--err-bg);  color: var(--err); }

/* ── PRODUCT DETAIL PAGE ─────────────────────────────────────  */
.pd { max-width: 600px; margin: 32px auto; padding: 0 24px 48px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text2); cursor: pointer; margin-bottom: 22px; background: none; border: none; font-family: var(--font); padding: 0; }
.back:hover { color: var(--text); }
.pd-thumb {
  height: 210px;
  border-radius: var(--rl);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  margin-bottom: 22px;
  overflow: hidden;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-title { font-size: 26px; font-weight: 700; margin-bottom: 6px; letter-spacing: -.5px; }
.pd-shop  { font-size: 14px; color: var(--text3); margin-bottom: 18px; }
.pd-desc  { font-size: 15px; color: var(--text2); line-height: 1.75; margin-bottom: 28px; }
.pd-pr    { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.pd-price { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.pd-price.free { color: var(--ok); }

/* ── MODALS ──────────────────────────────────────────────────  */
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.overlay.open { display: flex; }
.modal { background: var(--bg); border-radius: var(--rl); border: 1px solid var(--border); padding: 28px; width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow); }
.mh    { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.mh h3 { font-size: 18px; font-weight: 700; }
.mclose { background: none; border: none; cursor: pointer; font-size: 22px; color: var(--text3); line-height: 1; padding: 0; font-family: var(--font); }
.mclose:hover { color: var(--text); }

/* ── UPLOAD ZONE ─────────────────────────────────────────────  */
.upzone {
  border: 1px dashed var(--border2);
  border-radius: var(--r);
  padding: 20px;
  text-align: center;
  color: var(--text3);
  font-size: 13px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: background .15s;
  position: relative;
}
.upzone:hover { background: var(--bg2); }
.upzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upzone svg { display: block; margin: 0 auto 8px; }

/* ── PAYMENT TABS ────────────────────────────────────────────  */
.ptabs { display: flex; gap: 8px; margin-bottom: 20px; }
.ptab {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--border2);
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  background: transparent;
  color: var(--text2);
  transition: all .15s;
  text-align: center;
}
.ptab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-t); }

/* ── QR CODE SECTION ─────────────────────────────────────────  */
.qr-section { text-align: center; padding: 16px 0; }
.qr-name    { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.qr-img     { width: 180px; height: 180px; object-fit: contain; border: 1px solid var(--border); border-radius: var(--r); margin: 8px auto; display: block; }
.qr-hint    { font-size: 12px; color: var(--text3); }

/* ── SUBSCRIPTION BANNER ─────────────────────────────────────  */
.sub-banner { border-radius: var(--r); padding: 14px 16px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.sub-banner.ok   { background: var(--ok-bg);   color: var(--ok); }
.sub-banner.pend { background: var(--warn-bg); color: var(--warn); }
.sub-banner.none { background: var(--err-bg);  color: var(--err); }
.sub-banner-t    { font-size: 13px; font-weight: 500; }

/* ── PURCHASE ROWS ───────────────────────────────────────────  */
.prow { display: flex; align-items: center; gap: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--rl); padding: 14px 16px; margin-bottom: 10px; }

/* ── ADMIN TABS ──────────────────────────────────────────────  */
.atabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.atab {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.atab.active { color: var(--text); border-color: var(--accent); font-weight: 600; }

/* ── LOADING SPINNER ─────────────────────────────────────────  */
.loading { text-align: center; padding: 48px; color: var(--text3); font-size: 14px; }
.sp {
  width: 18px; height: 18px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ──────────────────────────────────────────────  */
@media (max-width: 600px) {
  .hero h1 { font-size: 28px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:last-child { grid-column: span 2; }
  .pd-pr { flex-direction: column; align-items: flex-start; }
}