/* ================================
   GLOBAL & VARIABLES
================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #f9f8f6;
  --bg-card: #ffffff;
  --bg-about: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #6b6b6b;
  --text-muted: #9e9e9e;
  --accent: #1a1a1a;
  --accent-hover: #333333;
  --shopee: #ee4d2d;
  --shopee-hover: #d43a1e;
  --border: #e8e6e1;
  --shadow: 0 2px 16px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-btn: 50px;
  --transition: 0.25s ease;
  --max-width: 1100px;
}

/* DARK MODE */
[data-theme="dark"] {
  --bg: #111110;
  --bg-card: #1c1c1a;
  --bg-about: #161614;
  --text-primary: #f0ede8;
  --text-secondary: #a09d97;
  --text-muted: #6b6866;
  --accent: #f0ede8;
  --accent-hover: #d4d0cb;
  --border: #2a2926;
  --shadow: 0 2px 16px rgba(0,0,0,0.3);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.45);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ================================
   PRELOADER
================================ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0e0e0d;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hide {
  opacity: 0;
  visibility: hidden;
}

.preloader-inner {
  text-align: center;
  animation: preloader-enter 0.5s ease forwards;
}

@keyframes preloader-enter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.preloader-logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.preloader-logo span {
  color: #ee4d2d;
}

.preloader-tag {
  font-family: 'Poppins', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #ee4d2d;
  margin-bottom: 28px;
  animation: blink-tag 1.2s ease-in-out infinite;
}

@keyframes blink-tag {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.preloader-bar {
  width: 120px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  overflow: hidden;
  margin: 0 auto;
}

.preloader-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ee4d2d, #ff7a50);
  border-radius: 99px;
  animation: bar-fill 1.6s ease forwards;
}

@keyframes bar-fill {
  0%   { width: 0%; }
  60%  { width: 75%; }
  100% { width: 100%; }
}

/* ================================
   NAVBAR
================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249, 248, 246, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .navbar {
  background: rgba(17, 17, 16, 0.88);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-logo span {
  color: var(--shopee);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* Theme Toggle Button */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  transform: rotate(15deg);
}

/* ================================
   HERO SECTION
================================ */
.hero {
  padding: 100px 24px 80px;
  text-align: center;
  background: var(--bg);
}

.hero-inner {
  max-width: 680px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -1.5px;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--shopee), #ff7a50);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 520px;
  margin: 0 auto 40px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--bg);
  padding: 15px 36px;
  border-radius: var(--radius-btn);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

.hero-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
}

.hero-cta svg {
  transition: transform var(--transition);
}

.hero-cta:hover svg {
  transform: translateY(3px);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

/* ================================
   PRODUCT SECTION
================================ */
.products-section {
  padding: 80px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 48px;
}

.section-tag {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--shopee);
  display: block;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.section-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* Filter Pills */
.filter-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.pill {
  padding: 8px 20px;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--border);
  background: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 540px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}

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

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-image-wrap {
  position: relative;
  overflow: hidden;
  background: var(--border);
  aspect-ratio: 4/3;
}

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

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

.card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--shopee);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

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

.card-category {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.card-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.card-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--shopee);
  letter-spacing: -0.3px;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding: 13px 20px;
  background: var(--shopee);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}

.card-cta:hover {
  background: var(--shopee-hover);
  transform: translateY(-1px);
}

.card-cta svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  margin: 0 auto 16px;
  opacity: 0.3;
}

/* ================================
   ABOUT SECTION
================================ */
.about-section {
  padding: 80px 24px;
  background: var(--bg-about);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-inner {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.about-icon {
  width: 56px;
  height: 56px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 1.5rem;
}

.about-inner h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.about-inner p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.about-features {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.about-feat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.about-feat span.icon {
  font-size: 1.1rem;
}

/* ================================
   FOOTER
================================ */
footer {
  padding: 40px 24px;
  text-align: center;
  background: var(--bg);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-logo {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-logo span {
  color: var(--shopee);
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 12px;
  line-height: 1.6;
}

.footer-contact {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.footer-contact a {
  color: var(--text-primary);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition);
}

.footer-contact a:hover {
  border-color: var(--text-primary);
}

.footer-divider {
  width: 40px;
  height: 1px;
  background: var(--border);
  margin: 20px auto;
}

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

/* ================================
   LOADING SKELETON
================================ */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ================================
   RESPONSIVE – MOBILE
================================ */
@media (max-width: 640px) {
  .hero {
    padding: 72px 20px 60px;
  }

  .hero-stats {
    gap: 24px;
  }

  .navbar-inner {
    height: 56px;
  }

  .nav-links {
    gap: 18px;
  }

  /* Hide nav links on very small screens, keep theme toggle */
  @media (max-width: 360px) {
    .nav-links {
      display: none;
    }
  }

  .about-features {
    gap: 20px;
  }
}

@media (max-width: 400px) {
  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }

  .hero h1 {
    letter-spacing: -0.8px;
  }
}
