/* ════════════════════════════════
   home.css — Home page styles
   ════════════════════════════════ */

/* ── HERO ── */
.hero {
  background: linear-gradient(160deg, var(--ord), var(--or) 50%, var(--orl));
  padding: 48px 18px 68px; text-align: center;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 50px; background: var(--bg); clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-r { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.06); pointer-events: none; }
.hero-r1 { width: 200px; height: 200px; top: -60px; right: -40px; }
.hero-r2 { width: 100px; height: 100px; bottom: 40px; left: 10px; }
.hero h1 {
  font-weight: 900; font-size: clamp(1.7rem, 6vw, 2.8rem); color: #fff;
  line-height: 1.2; text-shadow: 0 2px 16px rgba(0,0,0,0.2); margin-bottom: 8px;
}
.hero p { color: rgba(255,255,255,0.9); font-size: .9rem; max-width: 380px; margin: 0 auto 24px; line-height: 1.65; }
.hero-stats { display: flex; justify-content: center; gap: 32px; margin-bottom: 28px; }
.hs { display: flex; flex-direction: column; align-items: center; }
.hs-num { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 2rem; color: #fff; line-height: 1; }
.hs-div { width: 1px; height: 40px; background: rgba(255,255,255,0.25); align-self: center; }
.hs-lbl { font-size: .7rem; color: rgba(255,255,255,0.8); margin-top: 4px; font-weight: 500; }
.hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--ord); font-weight: 700; font-size: .92rem;
  padding: 12px 28px; border-radius: 50px; border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2); transition: transform .2s; text-decoration: none;
}
.hero-cta:hover { transform: translateY(-3px); }

/* ── CATEGORY SECTION ── */
.cat-section { padding: 16px 16px 0; }
.cat-title {
  font-size: .95rem; font-weight: 900; color: var(--orl);
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.cat-row { display: flex; flex-direction: column; gap: 10px; }
.cat-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat-item {
  cursor: pointer; border-radius: 14px; overflow: hidden;
  border: 2px solid rgba(255,107,26,0.18); background: #162444;
  transition: border-color .2s, transform .18s;
}
.cat-item:hover { border-color: var(--or); transform: scale(1.02); }
.cat-img { width: 100%; display: block; }
.cat-img img { width: 100%; height: auto; display: block; object-fit: cover; }

/* ── ALL IDS TITLE ── */
.all-ids-title {
  font-size: .95rem; font-weight: 900; color: var(--orl);
  margin: 18px 0 0; display: flex; align-items: center; gap: 6px;
}

/* ── PRODUCT GRID ── */
.grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; padding-bottom: 60px;
}

/* ── SLIDE-IN ANIMATION ── */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-44px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* เริ่มต้น hidden — รอ observer */
.card {
  opacity: 0;
  transform: translateX(-44px);
}

/* เข้า viewport → animate */
.card.slide-in {
  animation: slideInLeft .42s cubic-bezier(.25,.46,.45,.94) both;
}
.card.slide-in:nth-child(even) { animation-delay: .09s; }

/* ไม่มี slide-out — เลื่อนขึ้นไม่ต้องซ่อน */

/* ── PRODUCT CARD ── */
.card {
  background: #fff; border-radius: 18px; overflow: hidden;
  border: 1.5px solid rgba(0,0,0,0.07);
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  transition: transform .22s, box-shadow .22s, border-color .22s;
  text-decoration: none; color: inherit; display: block; cursor: pointer;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
  border-color: rgba(255,107,26,0.3);
}
.card-img-wrap { padding: 10px 10px 0; position: relative; }
.card-img {
  width: 100%; aspect-ratio: 16/10;
  background: linear-gradient(135deg, #e8edf5, #f0f4fb);
  border-radius: 12px; overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-img svg { width: 44px; height: 44px; opacity: .25; }
.stag {
  position: absolute; top: 5px; right: 5px;
  display: inline-flex; align-items: center; gap: 2px;
  padding: 1px 6px; border-radius: 50px;
  font-size: .5rem; font-weight: 700; line-height: 1.6; backdrop-filter: blur(6px);
}
.stag.avail { background: rgba(22,163,74,0.85); color: #fff; }
.stag.sold  { background: rgba(192,57,43,0.85);  color: #fff; }
.badge-new {
  position: absolute; top: 8px; left: 8px;
  background: var(--or); color: #fff;
  font-size: .6rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; letter-spacing: .04em;
}
.card-stats {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 18px 8px 6px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  display: flex; gap: 5px; border-radius: 0 0 12px 12px;
}
.cs {
  display: flex; align-items: center; gap: 3px;
  font-size: .62rem; font-weight: 700; color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.3); border-radius: 4px; padding: 2px 6px; backdrop-filter: blur(4px);
}
.card-body { padding: 10px 12px 12px; }
.card-id   { font-weight: 700; font-size: .98rem; color: #1a1a1a; margin-bottom: 2px; }
.card-game { font-size: .68rem; color: #888; margin-bottom: 8px; display: flex; align-items: center; gap: 4px; }
.card-price     { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--or); }
.card-price-old { font-size: .68rem; color: #bbb; text-decoration: line-through; margin-left: 5px; }
.card-date  { font-size: .65rem; color: #999; margin-top: 4px; display: flex; align-items: center; gap: 3px; }
.card-btn {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  margin-top: 10px; padding: 8px; border-radius: 10px;
  background: rgba(255,107,26,0.08); border: 1px solid rgba(255,107,26,0.2);
  color: var(--or); font-size: .75rem; font-weight: 700; transition: all .18s;
}
.card:hover .card-btn { background: var(--or); color: #fff; border-color: var(--or); }
.card-btn.sold-btn { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); color: #aaa; }

@media (max-width: 500px) { .grid { grid-template-columns: repeat(2,1fr); gap: 10px; } }
