/* ═══════════════════════════════════════════
   ShopLink — Affiliate Product Showcase
   Design System & Global Styles
   ═══════════════════════════════════════════ */

/* ─── CSS VARIABLES ─── */
:root {
  --c0: #021024;
  --c1: #052659;
  --c2: #0d3572;
  --c3: #5483B3;
  --c4: #7DA0CA;
  --c5: #C1E8FF;
  --white: #ffffff;
  --muted: #8aa8c8;
  --card-bg: #071e45;
  --card-border: rgba(93, 131, 179, 0.18);
  --tiktok: #010101;
  --shopee: #ee4d2d;
  --radius: 14px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Noto Sans Thai', 'Outfit', sans-serif;
  background: var(--c0);
  background-image:
    radial-gradient(ellipse 60% 50% at 20% 60%, rgba(5, 38, 89, 0.5) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 30%, rgba(13, 53, 114, 0.35) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 50% 90%, rgba(84, 131, 179, 0.1) 0%, transparent 70%);
  color: var(--white);
  min-height: 100vh;
  font-size: 15px;
}

/* ═══════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════ */
nav {
  position: sticky; 
  top: 0;
  z-index: 100;
  background: rgba(2, 16, 36, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(93, 131, 179, 0.15);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  transition: transform 0.28s ease, opacity 0.28s ease;
  will-change: transform;
}

nav.nav-hidden {
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
}

nav.nav-visible {
  transform: translateY(0);
  opacity: 1;
}

.nav-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.3s;
}

.nav-logo:hover {
  transform: scale(1.04);
}

.nav-logo span {
  color: var(--c4);
  transition: color 0.3s;
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c4);
  display: inline-block;
}

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

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

/* ═══════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════ */
.hero {
  padding: 72px 40px 56px;
  background: linear-gradient(160deg, #052659 0%, #021024 60%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -80px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(93, 131, 179, 0.22) 0%, transparent 70%);
  pointer-events: none;
  animation: floatOrb 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 30%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 160, 202, 0.12) 0%, transparent 70%);
  pointer-events: none;
  animation: floatOrb 10s ease-in-out infinite reverse;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(15px, -20px) scale(1.05); }
  50% { transform: translate(-10px, 10px) scale(0.97); }
  75% { transform: translate(20px, 15px) scale(1.03); }
}

.hero-label {
  display: inline-block;
  background: rgba(93, 131, 179, 0.2);
  border: 1px solid rgba(93, 131, 179, 0.3);
  color: var(--c4);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 99px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 640px;
  margin-bottom: 12px;
}

.hero h1 span {
  color: var(--c4);
}

.hero-sub {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 36px;
  max-width: 440px;
  line-height: 1.6;
}

/* ─── Search Bar ─── */
.search-bar {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(93, 131, 179, 0.25);
  border-radius: 99px;
  max-width: 520px;
  padding: 6px 6px 6px 22px;
  transition: border-color 0.2s, background 0.2s;
}

.search-bar:focus-within {
  border-color: var(--c4);
  background: rgba(255, 255, 255, 0.09);
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--white);
  font-size: 15px;
  font-family: inherit;
}

.search-bar input::placeholder {
  color: var(--muted);
}

.search-btn {
  background: var(--c3);
  color: var(--white);
  border: none;
  cursor: pointer;
  padding: 10px 22px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.2s, transform 0.1s;
}

.search-btn:hover {
  background: var(--c4);
  transform: scale(1.02);
}

/* ═══════════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════════ */
.main-wrap {
  display: flex;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ═══════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════ */
.sidebar {
  width: 200px;
  flex-shrink: 0;
  padding-right: 32px;
}

.sidebar-section {
  margin-bottom: 32px;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.cat-item:hover {
  background: rgba(93, 131, 179, 0.1);
  color: var(--white);
}

.cat-item.active {
  background: rgba(93, 131, 179, 0.18);
  color: var(--c5);
}

.cat-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.cat-count {
  margin-left: auto;
  background: rgba(93, 131, 179, 0.2);
  color: var(--c4);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}

.divider {
  height: 1px;
  background: rgba(93, 131, 179, 0.12);
  margin: 20px 0;
}

/* ═══════════════════════════════════════════
   CONTENT AREA
   ═══════════════════════════════════════════ */
.content {
  flex: 1;
  min-width: 0;
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.content-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.content-count {
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}

/* ─── Filter Pills ─── */
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.pill {
  padding: 7px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(93, 131, 179, 0.25);
  color: var(--muted);
  background: transparent;
  font-family: inherit;
  transition: all 0.15s;
}

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

.pill.active {
  background: var(--c3);
  border-color: var(--c3);
  color: var(--white);
}

/* ═══════════════════════════════════════════
   PRODUCT GRID
   ═══════════════════════════════════════════ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* ═══════════════════════════════════════════
   PRODUCT CARD
   ═══════════════════════════════════════════ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.35s,
              box-shadow 0.35s;
  cursor: pointer;
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(93, 131, 179, 0.45);
  box-shadow: 0 20px 50px rgba(5, 38, 89, 0.55),
              0 0 30px rgba(84, 131, 179, 0.08);
}

/* ─── Card Image Shine Sweep ─── */
.card-img::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.card:hover .card-img::after {
  left: 120%;
}

.card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(2, 16, 36, 0.75);
  border: 1px solid rgba(93, 131, 179, 0.3);
  color: var(--c4);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
}

.card-body {
  padding: 16px;
}

.card-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
  margin-bottom: 4px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-actions {
  display: flex;
  gap: 7px;
  flex-direction: column;
}

.btn-row {
  display: flex;
  gap: 7px;
}

.btn {
  flex: 1;
  padding: 9px 0;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
}

.btn:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

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

.btn-tiktok {
  background: #010101;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-shopee {
  background: var(--shopee);
  color: var(--white);
}

.btn-clip {
  background: transparent;
  color: var(--c5);
  border: 1px solid rgba(193, 232, 255, 0.25);
}

.btn-clip:hover {
  border-color: var(--c5);
  background: rgba(193, 232, 255, 0.06);
}

.btn-copy {
  background: transparent;
  color: var(--c4);
  border: 1px solid rgba(93, 131, 179, 0.3);
  width: 100%;
  flex: none;
  font-size: 12px;
  padding: 8px 0;
}

.btn-copy:hover {
  border-color: var(--c4);
  background: rgba(93, 131, 179, 0.08);
}

.btn-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
}

/* ─── Recommend Badge ─── */
.recommend-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════
   LOADING STATE
   ═══════════════════════════════════════════ */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  gap: 16px;
  color: var(--muted);
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(93, 131, 179, 0.2);
  border-top-color: var(--c4);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state p {
  font-size: 15px;
}

/* ═══════════════════════════════════════════
   TOAST NOTIFICATION
   ═══════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--c1);
  border: 1px solid rgba(93, 131, 179, 0.3);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.card {
  animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ─── Hero Text Entrance ─── */
.hero h1 {
  animation: slideUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.hero-sub {
  animation: slideUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.15s both;
}

.search-bar {
  animation: slideUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ─── Sidebar Entrance ─── */
.sidebar {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

/* ─── Detail Page Entrance ─── */
.detail-content {
  animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ═══════════════════════════════════════════
   PRODUCT DETAIL PAGE
   ═══════════════════════════════════════════ */
.product-detail {
  min-height: calc(100vh - 64px);
  background: var(--c0);
  animation: fadeIn 0.3s ease;
}

.detail-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.detail-back {
  background: rgba(93, 131, 179, 0.12);
  border: 1px solid rgba(93, 131, 179, 0.25);
  color: var(--c4);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  padding: 8px 20px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 28px;
}

.detail-back:hover {
  background: rgba(93, 131, 179, 0.2);
  border-color: var(--c4);
  color: var(--white);
}

.detail-content {
  display: flex;
  gap: 36px;
  align-items: flex-start;
}

.detail-image {
  flex: 1;
  min-width: 0;
  max-width: 460px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  position: relative;
}

.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  background: rgba(255, 255, 255, 0.03);
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ─── Carousel Arrows ─── */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(85, 93, 104, 0.7);
  border: 1px solid rgba(254, 254, 254, 0.35);
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
  backdrop-filter: blur(8px);
}

.carousel-arrow:hover {
  background: rgba(114, 123, 138, 0.413);
  border-color: var(--c4);
  transform: translateY(-50%) scale(1.08);
}

.carousel-arrow.prev { left: 10px; }
.carousel-arrow.next { right: 10px; }

/* ─── Carousel Dots ─── */
.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.carousel-dot.active {
  background: var(--c4);
  width: 20px;
  border-radius: 4px;
}

.carousel-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(167, 174, 184, 0.7);
  border: 1px solid rgba(93, 131, 179, 0.3);
  color: var(--c4);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  z-index: 2;
  backdrop-filter: blur(8px);
}

.detail-image .no-image {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}

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

.detail-category {
  display: inline-block;
  background: rgba(93, 131, 179, 0.15);
  border: 1px solid rgba(93, 131, 179, 0.3);
  color: var(--c4);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 99px;
  margin-bottom: 16px;
}

.detail-name {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--white);
}

.detail-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-actions .btn-row {
  display: flex;
  gap: 10px;
}

.detail-actions .btn {
  padding: 12px 0;
  font-size: 14px;
  border-radius: 10px;
}

.detail-share {
  width: 100%;
  padding: 12px 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  background: rgba(93, 131, 179, 0.1);
  border: 1px solid rgba(93, 131, 179, 0.3);
  color: var(--c4);
  transition: all 0.15s;
}

.detail-share:hover {
  background: rgba(93, 131, 179, 0.2);
  border-color: var(--c4);
  color: var(--white);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .main-wrap {
    flex-direction: column;
    padding: 24px 20px;
    gap: 20px;
  }
  .sidebar {
    width: 100%;
    position: relative;
  }
  #sidebar-categories {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 8px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  #sidebar-categories::-webkit-scrollbar {
    display: none;
  }
  .pill {
    flex: 0 0 auto;
  }
  .detail-content {
    flex-direction: column;
  }
  .detail-image {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .card {
    scroll-snap-align: none;
  }
  .card-img {
    height: 160px;
  }
  .card-name {
    font-size: 13px;
  }
  .hero {
    padding: 48px 20px 40px;
  }
  nav {
    padding: 0 20px;
  }
  .nav-links {
    gap: 16px;
  }
  .nav-links a {
    font-size: 13px;
  }
  .detail-wrap {
    padding: 20px 16px 40px;
  }
}

/* ═══════════════════════════════════════════
   Theme Override — Glass Minimal
   ═══════════════════════════════════════════ */

:root {
  --c0: #ececec;
  --c1: #f5f5f5;
  --c2: #d8d8d8;
  --c3: #1f1f1f;
  --c4: #3e3e3e;
  --c5: #101010;
  --white: #ffffff;
  --muted: #6f6f6f;
  --card-bg: rgba(255, 255, 255, 0.5);
  --card-border: rgba(255, 255, 255, 0.55);
}

body {
  background-color: #e9e9e9;
  background-image:
    radial-gradient(80% 60% at 20% 0%, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(135deg, #eeeeee 0%, #dedede 100%);
  color: #101010;
}

nav {
  position: sticky;
  top: 14px;
  width: min(1200px, calc(100% - 32px));
  margin: 14px auto 0;
  padding: 0 18px;
  border-radius: 16px;
  background: rgba(28, 28, 28, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(20px) saturate(120%);
}

.nav-logo,
.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
}

.nav-logo span {
  color: #ffffff;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.72);
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-search-icon {
  color: rgba(255, 255, 255, 0.54);
  font-size: 20px;
  line-height: 1;
}

.nav-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #f4f4f4;
  font-size: 15px;
  font-family: inherit;
}

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.nav-search .search-btn {
  flex: none;
  padding: 8px 16px;
  border-radius: 999px;
}

.hero {
  width: min(1200px, calc(100% - 32px));
  margin: 14px auto 0;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.16);
  background:
    linear-gradient(112deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.48)),
    url('../assets/รูปบนหัวข้อเลเยื่อด้านบน.jpg') center/cover no-repeat;
  padding: 52px 44px 56px;
}

.hero::before,
.hero::after {
  display: none;
}

.hero h1 {
  max-width: 780px;
  font-size: clamp(42px, 6.6vw, 86px);
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: #ffffff;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
}

.hero h1 span {
  color: #ececec;
}

.hero-sub {
  color: rgba(255, 255, 255, 0.9);
  max-width: 620px;
}

.search-btn {
  background: #f2f2f2;
  color: #111111;
  border-radius: 999px;
}

.search-btn:hover {
  background: #ffffff;
}

.main-wrap {
  width: min(1200px, calc(100% - 32px));
  margin-top: 16px;
  padding: 0 0 36px;
  gap: 16px;
}

.sidebar {
  width: 236px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(16px);
}

.sidebar-title {
  color: #303030;
}

.cat-item {
  color: #3f3f3f;
}

.cat-item:hover {
  background: rgba(255, 255, 255, 0.96);
  color: #111111;
}

.cat-item.active {
  background: rgba(255, 255, 255, 0.98);
  color: #111111;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.cat-count {
  background: rgba(0, 0, 0, 0.04);
  color: #4a4a4a;
}

.cat-item.active .cat-count {
  background: rgba(0, 0, 0, 0.05);
  color: #1f1f1f;
}

.cat-item.active .cat-icon {
  filter: saturate(0.9) brightness(1.02);
}

.product-grid {
  gap: 16px;
}

.card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.08);
}

.card-img {
  background: rgba(255, 255, 255, 0.78);
}

.card-badge {
  background: rgba(255, 255, 255, 0.94);
  color: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 1);
}

.card-name {
  color: #161616;
}

.card-desc {
  color: #6a6a6a;
}

.btn-tiktok,
.btn-shopee {
  background: #151515;
  border: 1px solid #202020;
  color: #ffffff;
}

.btn-clip,
.btn-copy {
  color: #1e1e1e;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.btn-clip:hover,
.btn-copy:hover {
  background: rgba(255, 255, 255, 0.9);
}

.product-detail {
  background: transparent;
}

.detail-back,
.detail-share {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.92);
  color: #2b2b2b;
}

.detail-back:hover,
.detail-share:hover {
  background: #1a1a1a;
  color: #ffffff;
  border-color: #1a1a1a;
}

.detail-image,
.detail-content,
.detail-info {
  color: #1a1a1a;
}

.detail-image {
  border: 1px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
}

.detail-category {
  background: rgba(255, 255, 255, 0.9);
  color: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 1);
}

.detail-name {
  color: #131313;
}

.detail-desc {
  color: #5f5f5f;
}

.toast {
  background: rgba(255, 255, 255, 0.88);
  color: #151515;
  border: 1px solid rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

@media (max-width: 900px) {
  nav,
  .hero,
  .main-wrap {
    width: calc(100% - 20px);
  }

  nav {
    flex-wrap: wrap;
    padding: 12px 14px;
    gap: 12px;
  }

  .nav-search {
    order: 3;
    width: 100%;
  }

  .hero {
    padding: 58px 20px 30px;
    border-radius: 18px;
  }

  .hero h1 {
    font-size: clamp(42px, 16vw, 80px);
  }

  .sidebar {
    width: 100%;
    padding: 12px;
  }
}
