/* ============================================================
   REVIEWS PAGE — "รีวิวจริงจากลูกค้าและอินฟลูเอนเซอร์"
   Themed to the storefront dark-first token system (globals.css /
   index.min.css). Card look mirrors the homepage #sec-tiktok grid
   (9:16 purple-gradient video cards) for visual continuity.
   ============================================================ */

/* Container — NOT present in the globally-loaded index.min.css, so this page
   declares its own (reviews.css only loads on /reviews, so this is safe). */
.reviews-page .container-main {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.reviews-page {
  padding-bottom: 60px;
}

/* ---------- Hero band ---------- */
.reviews-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  background:
    radial-gradient(1200px 300px at 15% -20%, rgba(91, 33, 182, 0.35), transparent 60%),
    radial-gradient(900px 260px at 90% 0%, rgba(230, 0, 0, 0.18), transparent 55%),
    linear-gradient(135deg, #14061f 0%, #1a0a2a 45%, #2a0e3f 100%);
  border-bottom: 1px solid var(--line);
}
.reviews-hero .container-main {
  position: relative;
  z-index: 1;
  padding-top: 34px;
  padding-bottom: 34px;
}
.reviews-hero-title {
  margin: 14px 0 8px;
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.25;
}
.reviews-hero-title i {
  color: #fff;
  filter: drop-shadow(0 0 10px rgba(255, 0, 80, 0.6));
}
.reviews-hero-sub {
  margin: 0;
  max-width: 720px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- Breadcrumb on dark hero ---------- */
.reviews-hero .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}
.reviews-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}
.reviews-hero .breadcrumb a:hover {
  color: #fff;
}
.reviews-hero .breadcrumb .current {
  color: rgba(255, 255, 255, 0.9);
}
.reviews-hero .breadcrumb .sep {
  margin: 0 8px;
  opacity: 0.5;
}

/* ---------- Count line ---------- */
.reviews-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 18px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.reviews-count i {
  color: var(--accent);
}

/* ---------- Grid ---------- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

/* ---------- Card (mirrors homepage tiktok-card) ---------- */
.review-card {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 14px;
  text-decoration: none;
  background: linear-gradient(135deg, #1a0a2a, #5b21b6);
  border: 1px solid var(--line);
  transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.22s;
  will-change: transform;
}
.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}
.review-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.review-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 2;
  color: #fff;
}
.review-fallback i {
  font-size: 34px;
  opacity: 0.85;
}
.review-fallback span {
  font-size: 12px;
  opacity: 0.6;
}
.review-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 60%);
}
.review-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  backdrop-filter: blur(4px);
}
.review-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
  transition: transform 0.22s, background 0.22s;
}
.review-card:hover .review-play {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(255, 255, 255, 0.26);
}
.review-play i {
  color: #fff;
  font-size: 16px;
  margin-left: 3px;
}
.review-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 14px;
}
.review-title {
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.35;
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.review-views {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

/* ---------- Loading / empty states ---------- */
.reviews-loading {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
  font-size: 15px;
}
.reviews-loading i {
  font-size: 26px;
  margin-right: 8px;
}
.reviews-empty {
  text-align: center;
  padding: 70px 24px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.reviews-empty i {
  font-size: 46px;
  color: var(--accent);
  opacity: 0.85;
  margin-bottom: 14px;
}
.reviews-empty-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.reviews-empty-sub {
  font-size: 14px;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto;
}
.reviews-empty-link {
  color: var(--accent-text, var(--accent));
  font-weight: 600;
  text-decoration: none;
}
.reviews-empty-link:hover {
  text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .reviews-hero .container-main {
    padding-top: 24px;
    padding-bottom: 24px;
  }
}
@media (max-width: 420px) {
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .review-meta {
    padding: 10px;
  }
  .review-title {
    font-size: 12px;
  }
}
