/* ============================================================
   THROWD — SKELL-UI DESIGN SYSTEM
   Clean editorial marketplace · monochrome + sneaker accent
   Large image feed, thin top bar, high-fashion minimalism
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Neutral canvas */
  --bg:            #ffffff;
  --bg-alt:        #f6f6f4;
  --bg-elevated:   #fbfbfa;
  --line:          #e9e8e4;
  --line-strong:   #d6d5d0;

  --text:          #161616;
  --text-secondary:#4b4b48;
  --text-tertiary: #8b8a86;
  --text-faint:    #b9b8b3;

  /* Sneaker accent — muted but present */
  --accent:        #1d7a3d;
  --accent-strong: #14582d;
  --accent-soft:   rgba(29,122,61,0.09);
  --sale:          #c43d2f;

  /* Crisp shadows (very subtle — editorial) */
  --shadow-xs:  0 1px 1px rgba(20,20,18,0.04);
  --shadow-sm:  0 1px 2px rgba(20,20,18,0.06);
  --shadow-md:  0 4px 16px rgba(20,20,18,0.08);
  --shadow-lg:  0 12px 32px rgba(20,20,18,0.10);
  --shadow-lg: 0 16px 40px rgba(20,20,18,0.12);

  --font: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 12px;
  --radius-full: 999px;

  --nav-h: 62px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; outline: none; color: var(--text); }
ul, ol { list-style: none; }
.hidden { display: none !important; }

::selection { background: var(--accent); color: #fff; }

/* ---------- Layout ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 48px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.section-link { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.section-link:hover { color: var(--text); }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-tertiary); }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.flex { display: flex; } .between { justify-content: space-between; } .center { align-items: center; }
.gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .wrap { flex-wrap: wrap; }
.text-center { text-align: center; }

/* ---------- Top navigation (Skell style) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 900;
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 24px;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  width: 100%; display: flex; align-items: center; gap: 20px;
}
.brand { font-weight: 900; font-size: 18px; letter-spacing: -0.03em; white-space: nowrap; }
.brand .dot { color: var(--accent); }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  padding: 8px 12px; font-size: 13.5px; font-weight: 600; color: var(--text-secondary);
  border-radius: var(--radius-m); transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--text); background: var(--bg-alt); }
.nav-links a.active { color: var(--text); }
.nav-links .nav-item { position: relative; }
.nav-links .nav-item > a { padding: 8px 12px; font-size: 13.5px; font-weight: 600; color: var(--text-secondary); border-radius: var(--radius-m); transition: color .15s ease, background .15s ease; display: inline-flex; align-items: center; }
.nav-links .nav-item > a:hover { color: var(--text); background: var(--bg-alt); }
.nav-links .nav-item > a.active { color: var(--text); }
.nav-links .nav-item .caret { margin-left: 3px; font-size: 9px; color: var(--text-tertiary); }
.nav-links .nav-drop {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, 8px);
  min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 950;
  opacity: 0; visibility: hidden; transition: opacity .16s var(--ease), transform .16s var(--ease), visibility .16s;
}
.nav-drop::before { content: ''; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.nav-links .nav-item:hover .nav-drop,
.nav-links .nav-item:focus-within .nav-drop { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav-drop .nav-drop-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-tertiary); padding: 5px 12px 7px; }
.nav-links .nav-drop a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-s);
  font-size: 13.5px; font-weight: 600; color: var(--text-secondary);
  transition: background .13s ease, color .13s ease;
}
.nav-links .nav-drop a:hover { background: var(--bg-alt); color: var(--text); }
.nav-drop .nd-ico { width: 18px; text-align: center; font-size: 13px; color: var(--text-tertiary); flex-shrink: 0; }
.topbar .search { flex: 1; max-width: 320px; margin-left: auto; }
.search-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--radius-full); padding: 7px 14px; height: 38px;
}
.search-wrap:focus-within { border-color: var(--line-strong); }
.search-wrap input { border: none; background: none; flex: 1; font-size: 13.5px; }
.search-wrap svg { color: var(--text-tertiary); flex-shrink: 0; }
.topbar .actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: background .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--bg-alt); color: var(--text); }
.btn-signin { font-size: 13.5px; font-weight: 600; color: var(--text-secondary); padding: 8px 14px; border-radius: var(--radius-m); }
.btn-signin:hover { color: var(--text); background: var(--bg-alt); }
.btn-sell { font-size: 13.5px; font-weight: 700; color: #fff; background: var(--text); padding: 9px 16px; border-radius: var(--radius-m); transition: opacity .15s ease; }
.btn-sell:hover { opacity: 0.85; }

/* Mobile nav */
.burger { display: none; }
.mobile-menu {
  display: none; flex-direction: column; gap: 2px; padding: 8px;
  position: fixed; top: var(--nav-h); left: 12px; right: 12px; z-index: 890;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l);
  box-shadow: var(--shadow-lg);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 12px 14px; font-weight: 600; font-size: 15px; border-radius: var(--radius-m); }
.mobile-menu a:hover { background: var(--bg-alt); }
.mobile-menu a.active { background: var(--bg-alt); color: var(--accent); }

.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: #e4e3de; color: var(--text);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* Headset / support button */
.headset-btn { position: relative; }
.headset-btn .dot {
  position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: head-blink 1.4s ease-in-out infinite;
}
@keyframes head-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  50% { opacity: 0.35; box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 14.5px; border-radius: var(--radius-m);
  padding: 13px 24px; transition: background .15s ease, color .15s ease, border-color .15s ease, opacity .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(0); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-md { padding: 11px 20px; }
.btn-lg { padding: 15px 28px; font-size: 15px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-strong); }
.btn-outline { background: #fff; color: var(--text); border: 1.5px solid var(--line-strong); }
.btn-outline:hover { border-color: var(--text); }
.btn-ghost { color: var(--text); border: 1.5px solid var(--text); }
.btn-ghost:hover { background: var(--text); color: #fff; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Product card (Skell feed) ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.product-card { display: block; color: inherit; }
.product-card .imgs { position: relative; overflow: hidden; background: var(--bg-alt); border-radius: var(--radius-s); aspect-ratio: 1/1; }
.product-card .imgs img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.product-card:hover .imgs img { transform: none; }
.card-wish {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 15px; box-shadow: var(--shadow-xs); transition: all .15s ease;
}
.card-wish:hover { color: var(--sale); transform: scale(1.08); }
.card-wish.wished { color: var(--sale); }
.product-card-badge {
  position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; background: rgba(255,255,255,0.92); color: var(--accent-strong);
  box-shadow: var(--shadow-xs); 
}
.product-card-info { padding: 10px 2px 0; }
.p-brand { font-size: 12px; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.02em; }
.p-name { font-size: 14.5px; font-weight: 500; color: var(--text); margin-top: 2px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.p-price { font-size: 15px; font-weight: 700; margin-top: 6px; }
.p-meta { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }

/* ---------- Pills (filters / tags) ---------- */
.pill {
  padding: 7px 16px; border-radius: var(--radius-full); background: var(--bg);
  border: 1px solid var(--line-strong); color: var(--text-secondary); font-size: 13px; font-weight: 600;
  transition: all .15s ease; white-space: nowrap;
}
.pill:hover { border-color: var(--text); color: var(--text); }
.pill.active { background: var(--text); border-color: var(--text); color: #fff; }
.pill:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Chips / tags ---------- */
.chip {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-full);
  color: var(--accent-strong); background: var(--accent-soft); display: inline-block;
}
.chip.mono { color: var(--text-secondary); background: var(--bg-alt); }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.input, .textarea, select.input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-m); background: var(--bg);
  border: 1px solid var(--line-strong); font-size: 15px; transition: border-color .15s ease, box-shadow .15s ease; color: var(--text);
}
.input:focus, .textarea:focus { border-color: var(--text); box-shadow: 0 0 0 3px rgba(0,0,0,0.04); }
.input::placeholder { color: var(--text-faint); }

/* ---------- Card ---------- */
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-l);
}
.card.pad { padding: 24px; }

/* ---------- Breadcrumb ---------- */
.crumbs { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text-tertiary); flex-wrap: wrap; }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { color: var(--text-faint); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 16px); z-index: 2000;
  padding: 12px 20px; border-radius: var(--radius-m); font-weight: 600; font-size: 14px;
  background: var(--text); color: #fff; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { background: var(--accent-strong); }
.toast.error { background: var(--sale); }
.toast.info { background: var(--text); }

/* ---------- Modal ---------- */
.modal-window { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 20px; }
.modal-window.hidden { display: none; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1400; }
.modal-backdrop.hidden { display: none; }
.modal-card { max-width: 460px; width: 100%; background: #fff; border-radius: var(--radius-l); padding: 32px; box-shadow: var(--shadow-lg); }

/* ---------- Reveal ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--text-tertiary); }
.empty .big { font-size: 34px; margin-bottom: 10px; }
.empty p { font-size: 14px; }
.empty a { margin-top: 10px; display: inline-block; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .topbar .search { display: none; }
  .burger { display: flex; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 12px; }
  .topbar-inner { padding: 0 8px; gap: 12px; }
  .topbar .actions { gap: 2px; }
  .topbar .actions .btn-signin { display: none; }
  #gSearchTopBtn { display: none; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .field-row { grid-template-columns: 1fr; }
  .field-row.cols-3 { grid-template-columns: 1fr; }
  .btn-sell { padding: 8px 12px; font-size: 12.5px; }
  .topbar .actions .btn-sm { padding: 7px 11px; font-size: 12px; }
}
