:root {
  --cream-bg: #FAF4EB;
  --cream-soft: #F4E9D8;
  --card-bg: #FFFFFF;
  --border-warm: #E9DCCB;
  --terracotta: #C67B44;
  --terracotta-dark: #A55D2B;
  --espresso: #3E2314;
  --espresso-muted: #705543;
  --sage: #5E7D3F;
  --sage-soft: #EEF4E7;
  --gold: #E5A94C;
  --gold-soft: #FDF5E4;
  --shopee: #EE4D2D;
  --shopee-dark: #D53A1C;
  --shadow-sm: 0 2px 8px rgba(62, 35, 20, 0.06);
  --shadow-md: 0 8px 24px rgba(62, 35, 20, 0.09);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-pill: 999px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--cream-bg);
  color: var(--espresso);
  line-height: 1.45;
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0 0 auto 0;
  height: 360px;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(198, 123, 68, 0.17), transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Header / Hero */
.hero {
  padding: 22px 0 14px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-ring {
  flex-shrink: 0;
  width: 78px;
  height: 78px;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--terracotta), var(--gold), var(--terracotta-dark));
  box-shadow: 0 6px 18px rgba(198, 123, 68, 0.28);
}

.logo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--cream-soft);
  border: 2px solid #fff;
}

.brand-text {
  min-width: 0;
  flex: 1;
}

.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--sage-soft);
  color: var(--sage);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}

.badge-verified svg {
  width: 14px;
  height: 14px;
}

.brand-title {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 28px;
  line-height: 1.1;
  color: var(--espresso);
  letter-spacing: -0.02em;
}

.brand-subtitle {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--espresso-muted);
}

.social-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--card-bg);
  border: 1px solid var(--border-warm);
  color: var(--espresso);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.social-chip:hover {
  transform: translateY(-1px);
  border-color: var(--terracotta);
}

.social-chip svg {
  width: 15px;
  height: 15px;
  color: var(--terracotta);
}

.stats-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--cream-soft);
  color: var(--espresso);
  font-size: 12px;
  font-weight: 700;
}

.stats-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
}

/* Sticky Search & Categories */
.sticky-controls {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 10px 0 12px;
  background: rgba(250, 244, 235, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(233, 220, 203, 0.8);
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--terracotta);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 42px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-warm);
  background: var(--card-bg);
  color: var(--espresso);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  appearance: none;
}

.search-input:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(198, 123, 68, 0.18);
}

.search-input::placeholder {
  color: #9A816E;
  font-weight: 400;
}

.clear-btn {
  position: absolute;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--cream-soft);
  color: var(--espresso);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-btn[hidden] {
  display: none;
}

.categories-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 2px 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.categories-scroll::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-warm);
  background: var(--card-bg);
  color: var(--espresso);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-pill .cat-count {
  font-size: 11px;
  opacity: 0.72;
  font-weight: 700;
}

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

.cat-pill.active {
  background: var(--espresso);
  border-color: var(--espresso);
  color: #FAF4EB;
  box-shadow: 0 4px 12px rgba(62, 35, 20, 0.2);
}

.cat-pill.active .cat-count {
  opacity: 0.85;
}

/* Main content */
.main-content {
  padding-top: 14px;
  padding-bottom: 40px;
}

/* Spotlight (when linked directly via ?item=157) */
.spotlight-section {
  margin-bottom: 18px;
}

.spotlight-card {
  background: linear-gradient(135deg, #FFFBF5, #FFF4E4);
  border: 2px solid var(--terracotta);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-md);
}

.spotlight-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--terracotta-dark);
  margin-bottom: 10px;
}

.spotlight-close {
  border: none;
  background: transparent;
  color: var(--espresso-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.spotlight-body {
  display: flex;
  gap: 14px;
  align-items: center;
}

.spotlight-thumb {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-warm);
}

.spotlight-info {
  flex: 1;
  min-width: 0;
}

.spotlight-title {
  margin: 4px 0 10px;
  font-size: 16px;
  font-weight: 800;
  color: var(--espresso);
}

/* Results Bar */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.results-info {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--espresso-muted);
}

.sort-select {
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-warm);
  background: var(--card-bg);
  color: var(--espresso);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(198, 123, 68, 0.55);
}

.card-media-link {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--cream-soft);
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

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

.badge-num {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(62, 35, 20, 0.86);
  color: #FAF4EB;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

.badge-hot {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #FF7A18, #EE4D2D);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(238, 77, 45, 0.35);
}

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

.card-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--terracotta-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.card-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--espresso);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 35px;
}

.btn-shopee {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--shopee), #FF6337);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px rgba(238, 77, 45, 0.25);
  transition: transform 0.14s ease, filter 0.14s ease;
}

.btn-shopee:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.btn-shopee:active {
  transform: scale(0.98);
}

.btn-shopee svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Empty & Load More */
.empty-state {
  text-align: center;
  padding: 44px 18px;
  background: var(--card-bg);
  border: 1px dashed var(--border-warm);
  border-radius: var(--radius-lg);
}

.empty-emoji {
  font-size: 38px;
  margin-bottom: 8px;
}

.empty-state h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.empty-state p {
  margin: 0 0 16px;
  color: var(--espresso-muted);
  font-size: 14px;
}

.btn-reset, .btn-load-more {
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--espresso);
  color: #FAF4EB;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.btn-load-more:hover, .btn-reset:hover {
  background: var(--terracotta-dark);
}

.load-more-wrap {
  text-align: center;
  margin-top: 22px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-warm);
  background: var(--cream-soft);
  padding: 24px 0 36px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  border-radius: 50%;
  border: 1.5px solid var(--terracotta);
}

.footer-brand strong {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 16px;
}

.footer-brand span {
  display: block;
  font-size: 12px;
  color: var(--espresso-muted);
}

.footer-disclaimer {
  margin: 0;
  font-size: 12px;
  color: var(--espresso-muted);
  max-width: 680px;
}

.footer-meta {
  margin: 0;
  font-size: 11px;
  color: var(--terracotta-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-warm);
  background: var(--espresso);
  color: #FAF4EB;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

/* Tablet & Desktop */
@media (min-width: 640px) {
  .container { padding: 0 22px; }
  .brand-title { font-size: 34px; }
  .logo-ring { width: 88px; height: 88px; }
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
  .card-body { padding: 12px; }
  .card-title { font-size: 14.5px; min-height: 38px; }
}

@media (min-width: 920px) {
  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }
}
