/* ── Theme & Global Variables ────────────────────────────────────────── */
:root {
  --primary-amber: #f59e0b;
  --primary-dark: #b45309;
  --primary-deep: #78350f;
  --accent-gold: #fbbf24;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #cbd5e1;
  --border-color: rgba(245, 158, 11, 0.15);
  --border-hover: rgba(245, 158, 11, 0.4);
  --shopee-orange: #ee4d2d;
  --shopee-hover: #ff5722;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(245, 158, 11, 0.25);
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Announcement Bar ──────────────────────────────────────────────── */
.announcement-bar {
  background: linear-gradient(90deg, #b45309, #d97706, #b45309);
  color: #ffffff;
  text-align: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ── Navbar ────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 0;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.logo-icon {
  font-size: 1.5rem;
  background: rgba(245, 158, 11, 0.15);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-amber);
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-shopee-official {
  background: linear-gradient(135deg, var(--shopee-orange), #d03e1b);
  color: #ffffff;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 14px rgba(238, 77, 45, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn-shopee-official:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(238, 77, 45, 0.5);
}

/* ── Hero Section ──────────────────────────────────────────────────── */
.hero-section {
  padding: 3rem 0 2rem;
  position: relative;
  background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.12) 0%, transparent 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.12);
  color: var(--primary-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.hero-desc {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-sub);
  margin-bottom: 1.5rem;
  max-width: 540px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  width: fit-content;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-amber);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.25rem;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-hover);
  box-shadow: var(--shadow-main), var(--shadow-glow);
}

.hero-img {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

.hero-img-badge {
  position: absolute;
  bottom: 0.85rem;
  left: 0.85rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  padding: 0.4rem 0.85rem;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-gold);
}

/* ── Products Section & Toolbar ────────────────────────────────────── */
.products-section {
  padding: 2.5rem 0 4rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: #ffffff;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.results-count {
  background: rgba(245, 158, 11, 0.1);
  color: var(--primary-amber);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.toolbar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-main);
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 0.7rem 2.5rem 0.7rem 2.5rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.clear-btn {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.custom-select {
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.view-switcher {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  padding: 0.2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.view-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-btn.active, .view-btn:hover {
  background: var(--primary-amber);
  color: #0f172a;
}

/* ── Products Grid Layout ───────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* ── Product Card Style (Grid Mode) ─────────────────────────────────── */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-main), var(--shadow-glow);
}

.card-media {
  position: relative;
  width: 100%;
  height: 210px;
  background: #090d16;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.card-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-shop {
  font-size: 0.7rem;
  color: var(--primary-amber);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.card-pricing {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  margin-bottom: 0.85rem;
}

.price-main {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.price-currency {
  font-size: 0.8rem;
  font-weight: 700;
}

.btn-affiliate-shopee {
  background: linear-gradient(135deg, var(--shopee-orange), #d03e1b);
  color: #ffffff;
  text-decoration: none;
  text-align: center;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: 0 4px 12px rgba(238, 77, 45, 0.3);
  min-height: 44px;
}

/* ── Products List View Layout ──────────────────────────────────────── */
.products-grid.list-view {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.products-grid.list-view .product-card {
  flex-direction: row;
  align-items: center;
}

.products-grid.list-view .card-media {
  width: 180px;
  height: 140px;
  flex-shrink: 0;
}

.products-grid.list-view .card-body {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.products-grid.list-view .card-info {
  flex: 1;
}

.products-grid.list-view .card-action-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  min-width: 160px;
}

.products-grid.list-view .card-pricing {
  border-top: none;
  padding-top: 0;
  margin-bottom: 0;
}

/* ── Empty State ────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.25rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.btn-primary {
  background: var(--primary-amber);
  color: #0f172a;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.footer {
  background: #090d16;
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.4rem;
  max-width: 480px;
}

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

/* ── Mobile Optimization Rules (< 768px) ────────────────────────────── */
@media (max-width: 768px) {
  .nav-content {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .btn-shopee-official .btn-text {
    display: none;
  }
  .btn-shopee-official {
    padding: 0.45rem 0.75rem;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .hero-img {
    max-height: 260px;
  }
  .hero-stats {
    width: 100%;
    justify-content: space-around;
    padding: 0.85rem 1rem;
  }
  .stat-divider {
    display: none;
  }
  .toolbar-card {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar-controls {
    justify-content: space-between;
    width: 100%;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  .card-media {
    height: 160px;
  }
  .card-body {
    padding: 0.85rem;
  }
  .card-title {
    font-size: 0.85rem;
    min-height: auto;
  }
  .price-main {
    font-size: 1.15rem;
  }
  .products-grid.list-view .product-card {
    flex-direction: column;
  }
  .products-grid.list-view .card-media {
    width: 100%;
    height: 180px;
  }
  .products-grid.list-view .card-body {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }
  .products-grid.list-view .card-action-wrap {
    align-items: stretch;
    min-width: auto;
  }
}
