/* ============================================================
   MYFINDS  –  Storefront Styles
   ============================================================ */

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

:root {
  --bg:       #1C1C1C;
  --surface:  #111111;
  --surface2: #181818;
  --border:   #222222;
  --border2:  #2e2e2e;
  --text:     #efefef;
  --muted:    #777;
  --accent:   #12B500;
  --accent2:  #474747;
  --card-bg:  #141414;
  --radius:   10px;
}



html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Header ── */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9,9,9,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px;
  letter-spacing: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-links { display: flex; gap: 10px; }

.header-btn {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border2);
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s;
}
.header-btn:hover { border-color: #555; color: var(--text); }

/* ── Marquee ── */

.marquee-bar {
  background: var(--accent);
  overflow: hidden;
  white-space: nowrap;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.marquee-track {
  display: inline-block;
  animation: marquee 28s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Main layout ── */

.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ── Hero ── */

.hero {
  padding: 60px 0 40px;
  text-align: center;
}

.hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(48px, 8vw, 96px);
  letter-spacing: 4px;
  line-height: 0.95;
  color: var(--text);
}

.hero h1 .accent {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  margin-top: 14px;
  font-size: 16px;
  color: var(--muted);
}

/* ── Controls ── */

.controls {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 10px 16px 10px 42px;
  color: var(--text);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}
.search-wrap input:focus { border-color: #444; }
.search-wrap input::placeholder { color: var(--muted); }

.sort-wrap select {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  cursor: pointer;
}

/* ── Category pills ── */

.cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.cat-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.cat-btn:hover { border-color: #555; color: var(--text); }
.cat-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.cat-icon { font-size: 14px; }

.cat-count {
  background: rgba(255,255,255,0.15);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
}
.cat-btn.active .cat-count { background: rgba(0,0,0,0.25); }

/* ── Stats bar ── */

.stats-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-val { font-size: 20px; font-weight: 500; color: var(--text); }
.stat-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Product grid ── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

/* ── Product card ── */

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: #3a3a3a; transform: translateY(-3px); }

.card-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface2);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.card:hover .card-img img { transform: scale(1.04); }

.card-placeholder {
  font-size: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cat-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.65);
  color: rgba(255,255,255,0.65);
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.card-body { padding: 12px 14px 14px; }

.card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-price {
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 12px;
}

.card-link {
  display: block;
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 8px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s;
}
.card-link:hover { opacity: 0.85; }

/* ── Loading spinner ── */

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 20px;
  gap: 16px;
  color: var(--muted);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error ── */

.error-msg {
  background: #1a0a0a;
  border: 1px solid #3a1a1a;
  border-radius: var(--radius);
  padding: 24px;
  color: #ff8888;
  margin: 20px 0;
  line-height: 1.8;
}
.error-msg code {
  background: rgba(255,255,255,0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: #ffb3b3;
}

/* ── Empty state ── */

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.empty-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  color: #2a2a2a;
  margin-bottom: 8px;
}

/* ── Footer ── */

.footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--muted);
}
.footer a { color: var(--muted); text-decoration: underline; }
.footer a:hover { color: var(--text); }

/* ── Responsive ── */

@media (max-width: 600px) {
  .main { padding: 0 16px 40px; }
  .hero { padding: 36px 0 28px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .controls { flex-direction: column; }
  .sort-wrap select { width: 100%; }
}

/* ── Finds page hero (compact) ── */
.hero {
  padding: 48px 0 32px;
  text-align: center;
}
.hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(40px, 7vw, 80px);
  letter-spacing: 4px;
  line-height: 0.95;
  color: var(--text);
}
.hero h1 .accent {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  margin-top: 12px;
  font-size: 15px;
  color: var(--muted);
}

/* ── Brand filter bar ── */
.brands-section {
  margin-bottom: 0;
}

.brands-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 10px;
  display: block;
}

.stat-brand .stat-val {
  font-size: 14px;
  color: var(--accent);
}
