/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange: #FF9900;
  --orange-dark: #e68a00;
  --dark: #0f1117;
  --dark2: #1a1d27;
  --dark3: #22263a;
  --card: #1e2235;
  --border: #2a2f45;
  --text: #e8eaf0;
  --text-muted: #8b93ad;
  --green: #00d68f;
  --red: #ff4d6d;
  --blue: #4d9fff;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--dark);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

a { text-decoration: none; }

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-icon { font-size: 24px; }
.logo-accent { color: var(--orange); }

nav {
  display: flex;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--dark3);
}

.nav-link.active { color: var(--orange); }

.header-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  white-space: nowrap;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #0f1117 0%, #1a1a2e 50%, #16213e 100%);
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,153,0,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-tag {
  display: inline-block;
  background: rgba(255,153,0,0.12);
  color: var(--orange);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,153,0,0.25);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  max-width: 520px;
}

.accent { color: var(--orange); }

.hero p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 440px;
  margin-bottom: 28px;
}

.time-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.toggle-btn {
  background: var(--dark3);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.toggle-btn:hover {
  border-color: var(--orange);
  color: var(--text);
}

.toggle-btn.active {
  background: var(--orange);
  color: #000;
  border-color: var(--orange);
}

.hero-stats {
  display: flex;
  gap: 16px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  text-align: center;
  min-width: 110px;
}

.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--orange);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== TICKER ===== */
.ticker-wrap {
  background: var(--orange);
  overflow: hidden;
  padding: 10px 0;
}

.ticker {
  display: flex;
  gap: 0;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}

.ticker span {
  color: #000;
  font-size: 13px;
  font-weight: 600;
  padding: 0 48px;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== PRODUCT SECTIONS ===== */
main { padding: 56px 0; }

.product-section { margin-bottom: 64px; }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 14px;
}

.see-all {
  color: var(--orange);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.see-all:hover { opacity: 0.75; }

/* ===== PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* ===== PRODUCT CARD ===== */
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  border-color: rgba(255,153,0,0.4);
}

.product-card a {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.badge-hot { background: var(--red); color: #fff; }
.badge-new { background: var(--blue); color: #fff; }
.badge-deal { background: var(--green); color: #000; }
.badge-top { background: var(--orange); color: #000; }

.card-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 190px;
  overflow: hidden;
  background: var(--img-bg, linear-gradient(135deg, #1e2235, #2a2f4a));
}

/* Emoji icon shown when no image loads */
.card-img-wrap::before {
  content: attr(data-icon);
  font-size: 64px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  transition: transform 0.3s;
  z-index: 0;
}

.product-card:hover .card-img-wrap::before {
  transform: translate(-50%, -50%) scale(1.1);
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
  position: relative;
  z-index: 1;
}

.card-img-wrap img[data-failed] {
  display: none;
}

.product-card:hover .card-img-wrap img {
  transform: scale(1.06);
}

.card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-category {
  font-size: 11px;
  font-weight: 600;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-stars {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stars { color: var(--orange); font-size: 13px; letter-spacing: 1px; }

.star-count {
  font-size: 12px;
  color: var(--text-muted);
}

.card-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}

.price-current {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.price-original {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-save {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
}

.card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rank-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.rank-badge span { color: var(--orange); }

.amazon-btn {
  background: var(--orange);
  color: #000;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 8px;
  transition: background 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.amazon-btn:hover {
  background: var(--orange-dark);
  transform: scale(1.03);
}

/* ===== CATEGORY GRID ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.cat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  display: block;
  cursor: pointer;
  user-select: none;
}

.cat-card:hover {
  border-color: var(--orange);
  transform: translateY(-3px);
  background: var(--dark3);
}

.cat-card:active {
  transform: translateY(-1px);
}

.cat-icon { font-size: 36px; margin-bottom: 12px; }

.cat-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.cat-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== FOOTER ===== */
footer {
  background: var(--dark2);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
}

.footer-disclosure {
  max-width: 720px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
  background: var(--dark3);
  padding: 16px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-inner { flex-direction: column; }
  .hero-stats { justify-content: center; }
  nav { gap: 2px; }
  .nav-link { padding: 6px 10px; font-size: 13px; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .header-badge { display: none; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero h1 { font-size: 26px; }
}
