/* ============================================
   StudsUp.com — Shared Stylesheet
   All pages import this file
   ============================================ */

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

:root {
  --yellow:      #FFD700;
  --yellow-dark: #E6B800;
  --yellow-bg:   #FFF8DC;
  --red:         #FF4444;
  --red-dark:    #CC0000;
  --dark:        #1a1a2e;
  --dark2:       #16213e;
  --white:       #ffffff;
  --bg:          #f5f4ef;
  --card:        #ffffff;
  --border:      #e8e7e2;
  --border2:     #e0e0dc;
  --text:        #1a1a1a;
  --text2:       #555555;
  --muted:       #888888;
  --hint:        #aaaaaa;
  --green:       #22c55e;
  --blue:        #3b82f6;
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.06);
  --shadow-md:   0 4px 16px rgba(0,0,0,.09);
  --shadow-lg:   0 8px 28px rgba(0,0,0,.12);
  --nav-h:       56px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ── NAVIGATION ── */
.nav {
  background: var(--dark);
  height: var(--nav-h);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--yellow);
  margin-right: 18px;
  letter-spacing: -.5px;
  white-space: nowrap;
  text-decoration: none;
}
.nav-logo span { color: var(--red); }
.nav-links { display: flex; gap: 2px; flex: 1; overflow: hidden; }
.nav-link {
  color: rgba(255,255,255,.5);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  background: none;
  white-space: nowrap;
  transition: all .15s;
  text-decoration: none;
  display: inline-block;
}
.nav-link:hover, .nav-link.active { color: var(--yellow); background: rgba(255,255,255,.08); }
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-sell {
  background: var(--yellow);
  color: var(--dark);
  border: none;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.nav-sell:hover { background: var(--yellow-dark); }
.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── CARDS ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

/* ── BUTTONS ── */
.btn { border: none; border-radius: var(--radius-md); font-size: 13px; font-weight: 700; padding: 9px 18px; cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; gap: 6px; }
.btn-yellow  { background: var(--yellow); color: var(--dark); }
.btn-yellow:hover { background: var(--yellow-dark); transform: translateY(-1px); }
.btn-dark    { background: var(--dark); color: var(--yellow); }
.btn-dark:hover { background: #2d2d4e; }
.btn-ghost   { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.btn-ghost:hover { background: rgba(255,255,255,.18); }
.btn-outline { background: none; color: var(--text2); border: 1px solid var(--border2); }
.btn-outline:hover { background: var(--bg); border-color: #ccc; }
.btn-danger  { background: #FCEBEB; color: #791F1F; border: 1px solid #E24B4A; }
.btn-danger:hover { background: #f5d5d5; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }
.btn:disabled { opacity: .45; cursor: default; transform: none !important; }

/* ── BADGES / PILLS ── */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.pill-yellow { background: var(--yellow-bg); color: #8a6a00; border: 1px solid var(--yellow-dark); }
.pill-blue   { background: #E6F1FB; color: #185FA5; border: 1px solid #378ADD; }
.pill-green  { background: #E1F5EE; color: #085041; border: 1px solid #1D9E75; }
.pill-red    { background: #FCEBEB; color: #791F1F; border: 1px solid #E24B4A; }
.pill-purple { background: #EEEDFE; color: #3C3489; border: 1px solid #7F77DD; }
.pill-grey   { background: var(--bg); color: var(--muted); border: 1px solid var(--border2); }

/* ── LIVE DOT ── */
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1s infinite; display: inline-block; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.25} }

/* ── SECTION HEADER ── */
.sec-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sec-hd h2 { font-size: 17px; font-weight: 700; }
.sec-hd a, .sec-hd .sec-more { font-size: 13px; color: var(--muted); cursor: pointer; background: none; border: none; }
.sec-hd a:hover, .sec-hd .sec-more:hover { color: var(--text); }

/* ── INFO TABLE ── */
.info-table { width: 100%; }
.info-table .row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #f5f4ef; font-size: 13px; }
.info-table .row:last-child { border-bottom: none; }
.info-table .lbl { color: var(--muted); }
.info-table .val { font-weight: 600; text-align: right; }

/* ── MODAL ── */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.48);
  display: none; align-items: center; justify-content: center;
  z-index: 500; padding: 16px;
}
.modal-bg.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-xl);
  max-width: 480px; width: 100%; padding: 22px;
  position: relative; max-height: 90vh; overflow-y: auto;
}
.modal h3 { font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.modal-sub { font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.modal-close { position: absolute; top: 13px; right: 13px; background: none; border: none; font-size: 18px; cursor: pointer; color: var(--hint); }
.modal-close:hover { color: var(--text); }
.modal-actions { display: flex; gap: 8px; margin-top: 14px; }
.modal-actions .btn { flex: 1; justify-content: center; }

/* ── BREADCRUMB ── */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--hint); flex-wrap: wrap; }
.breadcrumb a { color: #1a73e8; cursor: pointer; }
.breadcrumb .sep { color: var(--border2); }

/* ── PROGRESS BAR ── */
.prog-wrap { position: relative; }
.prog-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--yellow); border-radius: 3px; transition: width .5s ease; }
.prog-fill.green { background: var(--green); }
.prog-fill.blue  { background: var(--blue); }

/* ── TOAST ── */
.toast-el {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--dark); color: var(--yellow);
  font-size: 13px; font-weight: 700; padding: 10px 20px;
  border-radius: var(--radius-md); z-index: 999;
  box-shadow: var(--shadow-lg); white-space: nowrap;
  pointer-events: none; transition: opacity .35s;
}

/* ── FORM ELEMENTS ── */
.inp {
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  padding: 8px 11px;
  font-size: 13px;
  outline: none;
  background: #fff;
  width: 100%;
  transition: border-color .15s;
}
.inp:focus { border-color: var(--yellow); }
.sel {
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  background: #fff;
  cursor: pointer;
}

/* ── SELLER / REVIEW CONDITION BADGES ── */
.cond-new  { background: #E1F5EE; color: #085041; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; }
.cond-used { background: #FAEEDA; color: #633806; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; }

/* ── UTILITIES ── */
.flex  { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-6  { gap: 6px; }
.gap-8  { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-14 { gap: 14px; }
.mt-8   { margin-top: 8px; }
.mt-10  { margin-top: 10px; }
.mt-12  { margin-top: 12px; }
.mt-16  { margin-top: 16px; }
.mb-8   { margin-bottom: 8px; }
.mb-12  { margin-bottom: 12px; }
.mb-16  { margin-bottom: 16px; }
.text-sm   { font-size: 12px; }
.text-xs   { font-size: 11px; }
.text-muted { color: var(--muted); }
.text-hint  { color: var(--hint); }
.font-bold  { font-weight: 700; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.relative { position: relative; }
.hidden { display: none !important; }

/* ============================================
   MOBILE RESPONSIVE — StudsUp.com
   Breakpoints: 480px (phone), 768px (tablet)
   ============================================ */

/* ── MOBILE NAV ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,.7);
  border-radius: 2px;
  transition: all .2s;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,.08);
  z-index: 99;
  padding: 12px 0 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}
.nav-drawer.open { display: block; }
.nav-drawer .nav-link {
  display: block;
  padding: 12px 24px;
  font-size: 15px;
  color: rgba(255,255,255,.7);
  border-radius: 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.nav-drawer .nav-link:hover { background: rgba(255,255,255,.06); color: var(--yellow); }
.nav-drawer .nav-drawer-bottom {
  padding: 16px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nav-drawer .nav-sell {
  width: 100%;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  border-radius: var(--radius-md);
}

/* Bottom nav bar (mobile only) */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,.1);
  z-index: 98;
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
}
.bottom-nav-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 12px;
  color: rgba(255,255,255,.4);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s;
  border: none;
  background: none;
  min-width: 54px;
}
.bn-item .bn-icon { font-size: 20px; line-height: 1; }
.bn-item.active, .bn-item:hover { color: var(--yellow); }

/* Page body padding for bottom nav */
.has-bottom-nav { padding-bottom: 64px; }

@media (max-width: 768px) {
  /* Show hamburger, hide horizontal nav links */
  .nav { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-sell { display: none; }
  .nav-hamburger { display: flex; }
  .bottom-nav { display: block; }
  body { padding-bottom: 64px; }

  /* Cards take full width */
  .card { border-radius: var(--radius-md); }

  /* Modal full screen on mobile */
  .modal-bg { padding: 0; align-items: flex-end; }
  .modal {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-width: 100%;
    max-height: 92vh;
    padding: 20px 16px 32px;
  }

  /* Section headers */
  .sec-hd h2 { font-size: 15px; }

  /* Breadcrumb */
  .breadcrumb { font-size: 11px; }

  /* Toast above bottom nav */
  .toast-el { bottom: 78px; }
}

@media (max-width: 480px) {
  .nav { padding: 0 12px; }
  .nav-logo { font-size: 18px; }
}
