/* ============================================
   Golfer - Product Review Website
   Primary: #7CB342 (blue) + white + light gray
   Font: Sarabun | Mobile-first, responsive
   ============================================ */

:root {
  --color-primary: #7CB342;
  --color-primary-dark: #5e8c2e;
  --color-primary-light: #eef6e3;
  --color-text: #2b2b2b;
  --color-muted: #6b7280;
  --color-bg: #ffffff;
  --color-gray: #f5f6f8;
  --color-border: #e5e7eb;
  --color-star: #ffb400;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 6px 20px rgba(124, 179, 66, 0.18);
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-primary);
}

.logo .logo-badge {
  background: var(--color-primary);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.logo .logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.nav-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--color-text);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
}

.nav-toggle:hover {
  background: var(--color-gray);
}

/* ---------- Sidebar (เมนูเลื่อน) ---------- */
.side-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 300;
}

.side-overlay.open {
  opacity: 1;
  visibility: visible;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 290px;
  max-width: 84%;
  background: var(--color-bg);
  box-shadow: 2px 0 24px rgba(0, 0, 0, 0.18);
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  z-index: 310;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-bg);
}

.sidebar-title {
  font-weight: 800;
  color: var(--color-primary);
  font-size: 1.1rem;
}

.sidebar-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-muted);
  padding: 4px 8px;
  border-radius: 8px;
}

.sidebar-close:hover {
  background: var(--color-gray);
  color: var(--color-text);
}

.sidebar-nav {
  list-style: none;
  padding: 10px;
  margin: 0;
}

.sidebar-nav li a {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.sidebar-nav .side-heading {
  padding: 14px 14px 4px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.main-nav ul {
  display: flex;
  gap: 8px;
  list-style: none;
}

.main-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--color-text);
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* ---------- Dropdown หมวดหมู่ ---------- */
.nav-dropdown {
  position: relative;
}

.nav-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  padding: 6px;
  list-style: none;
  z-index: 200;
}

.nav-dropdown:hover .nav-submenu,
.nav-dropdown.open .nav-submenu {
  display: block;
}

.nav-submenu li a {
  white-space: nowrap;
  display: block;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #aed581 100%);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
}

.hero p {
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 24px;
  opacity: 0.95;
}

.hero .btn-hero {
  display: inline-block;
  background: #fff;
  color: var(--color-primary);
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 50px;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}

.hero .btn-hero:hover {
  transform: translateY(-2px);
}

/* ---------- Section ---------- */
.section {
  padding: 48px 0;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--color-muted);
  margin-bottom: 32px;
}

/* ---------- Card Grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.review-card {
  position: relative;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
}

/* ทำให้คลิกได้ทั้งการ์ด (รูป/หัวข้อ/รายละเอียด) เข้าบทความเดียวกัน */
.review-card h2 > a::after,
.review-card h3 > a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}

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

.review-card .card-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #fff;
  overflow: hidden;
}

.review-card .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* เห็นรูปเต็ม ไม่ตัดบน-ล่าง */
}

/* คอลลาจรูปในการ์ด (บทความรวม) */
.card-collage {
  display: grid;
  width: 100%;
  height: 100%;
  gap: 2px;
}

.card-collage .cc-tile {
  overflow: hidden;
  background: var(--color-gray);
}

.card-collage .cc-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-collage.cc-2 {
  grid-template-columns: 1fr 1fr;
}

.card-collage.cc-3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.card-collage.cc-3 .cc-tile:first-child {
  grid-row: span 2;
}

.card-collage.cc-4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.review-card .card-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
}

.review-card .card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.review-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.review-card h3 a {
  color: var(--color-text);
}

.review-card h3 a:hover {
  color: var(--color-primary);
}

.review-card .card-excerpt {
  color: var(--color-muted);
  font-size: 0.92rem;
  margin-bottom: 12px;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.card-price {
  font-weight: 700;
  color: var(--color-primary);
}

/* ---------- Stars ---------- */
.stars {
  color: var(--color-star);
  font-size: 1rem;
  letter-spacing: 1px;
}

.stars .rating-num {
  color: var(--color-muted);
  font-size: 0.85rem;
  margin-left: 4px;
}

/* ---------- Review Article ---------- */
.review-article {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 16px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--color-muted);
}

.review-article h1 {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 16px;
}

.review-hero-img {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-border);
  margin-bottom: 16px;
  aspect-ratio: 16 / 9;
}

.review-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* เห็นรูปเต็ม ไม่ครอบ */
}

/* วิดีโอรีวิว (YouTube ฝัง) */
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 20px;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Carousel สไลด์รูปสินค้า */
.review-carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-border);
  margin-bottom: 10px;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: #fff;
}

.carousel-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text);
  z-index: 2;
  display: grid;
  place-items: center;
}

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

.carousel-arrow:hover {
  background: #fff;
  color: var(--color-primary);
}

.carousel-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 20px;
}

.carousel-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: #fff;
  cursor: pointer;
}

.carousel-thumb.active {
  border-color: var(--color-primary);
}

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

.review-meta-box {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: var(--color-gray);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 28px;
}

.review-meta-box .price-big {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
}

.review-meta-box .price-label {
  font-size: 0.8rem;
  color: var(--color-muted);
  display: block;
}

.review-article h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--color-primary-light);
}

.review-article h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 20px 0 8px;
}

.review-article p {
  margin-bottom: 14px;
}

.review-article ul {
  margin: 0 0 16px 20px;
}

.review-article li {
  margin-bottom: 6px;
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 20px 0;
}

.pros-cons .box {
  border-radius: var(--radius);
  padding: 16px 20px;
}

.pros-cons .pros {
  background: #ecfdf3;
  border: 1px solid #abefc6;
}

.pros-cons .cons {
  background: #fef3f2;
  border: 1px solid #fecdca;
}

.pros-cons h3 {
  margin-top: 0;
}

.pros-cons ul {
  list-style: none;
  margin-left: 0;
}

.pros-cons .pros li::before {
  content: "✓ ";
  color: #12b76a;
  font-weight: 700;
}

.pros-cons .cons li::before {
  content: "✕ ";
  color: #f04438;
  font-weight: 700;
}

/* ---------- Roundup (บทความรวมหลายสินค้า) ---------- */
.card-badge {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 50px;
}

.roundup-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
  background: #fff;
  box-shadow: var(--shadow);
  scroll-margin-top: 80px; /* กันหัวเว็บ sticky บังตอนกระโดด */
}

/* รูปปกแบบคอลลาจ (รวมรูปสินค้า) */
.roundup-cover {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--color-gray);
}

.roundup-cover .cover-tile {
  overflow: hidden;
  background: var(--color-gray);
}

.roundup-cover .cover-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* แบบตาราง (grid) — ช่องเท่ากัน */
.cover-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}
.cover-grid .cover-tile {
  aspect-ratio: 1 / 1;
}
@media (min-width: 560px) {
  .cover-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* แบบรูปเด่น (feature) — รูปแรกกว้างเต็มบน + ที่เหลือเรียงล่าง */
.cover-feature {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.cover-feature .cover-tile {
  aspect-ratio: 1 / 1;
}
.cover-feature .cover-tile:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 7;
}

/* แบบแถวเรียง (strip) — รูปเรียงแนวนอนเท่ากัน */
.cover-strip {
  display: flex;
  gap: 4px;
}
.cover-strip .cover-tile {
  flex: 1;
  min-width: 0;
  aspect-ratio: 3 / 4;
}

/* แถบสรุปสินค้า (การ์ดเรียงกัน) */
.roundup-picks-wrap {
  margin: 22px 0 28px;
}

.roundup-picks-wrap > h2 {
  font-size: 1.2rem;
  margin: 0 0 14px;
  border: none;
  padding: 0;
}

.roundup-picks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 560px) {
  .roundup-picks {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

.pick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 10px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

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

.pick-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-gray);
  margin-bottom: 8px;
}

.pick-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pick-noimg {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--color-muted);
  font-size: 0.8rem;
}

.pick-name {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--color-text);
  margin-bottom: 6px;
}

.pick-name:hover {
  color: var(--color-primary);
}

.pick-rate .stars {
  font-size: 0.85rem;
}

.pick-price {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.9rem;
  margin: 4px 0;
}

.pick-readmore {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 10px;
}

.pick-readmore:hover {
  color: var(--color-primary);
}

.pick-buy {
  margin-top: auto;
  width: 100%;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 6px;
  border-radius: 8px;          /* ไม่เอาทรงเม็ดยาแล้ว */
  box-shadow: none;            /* ตัดเงาหนา ๆ ออก */
  white-space: nowrap;         /* ให้ "🛒 Shopee" อยู่บรรทัดเดียว */
  animation: none;             /* ไม่ต้องกระพริบในการ์ดเล็ก */
}

.pick-buy:hover {
  box-shadow: 0 3px 10px rgba(124, 179, 66, 0.3);
}

.roundup-item h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  border: none;
  padding: 0;
  font-size: 1.3rem;
}

.roundup-rank {
  background: var(--color-primary);
  color: #fff;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.roundup-thumb {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-gray);
  margin: 0 auto 14px;   /* จัดรูปให้อยู่กึ่งกลาง */
  max-width: 460px;
}

.roundup-thumb img {
  width: 100%;
  height: auto;
}

.roundup-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.roundup-meta .card-price {
  font-size: 1.1rem;
}

.roundup-item .pros-cons h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

/* ---------- CTA Button ---------- */
.cta-wrap {
  text-align: center;
  margin: 36px 0;
}

.btn-cta {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  padding: 18px 40px;
  border-radius: 50px;
  box-shadow: 0 6px 18px rgba(124, 179, 66, 0.4);
  transition: transform 0.15s, background 0.15s;
  animation: pulse 2.2s infinite;
}

.btn-cta:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

@keyframes pulse {
  0%   { box-shadow: 0 6px 18px rgba(124, 179, 66, 0.4); }
  50%  { box-shadow: 0 6px 28px rgba(124, 179, 66, 0.65); }
  100% { box-shadow: 0 6px 18px rgba(124, 179, 66, 0.4); }
}

.cta-note {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 10px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #1f2937;
  color: #d1d5db;
  padding: 36px 0;
  margin-top: 48px;
  font-size: 0.9rem;
}

.site-footer .footer-logo {
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.disclosure {
  background: rgba(124, 179, 66, 0.1);
  border-left: 4px solid var(--color-primary);
  padding: 14px 18px;
  border-radius: 8px;
  margin: 16px 0;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 18px;
  list-style: none;
  flex-wrap: wrap;
  margin-top: 16px;
}

.footer-links a {
  color: #d1d5db;
}

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

.footer-copy {
  margin-top: 16px;
  color: #9ca3af;
  font-size: 0.82rem;
}

.footer-note {
  margin: 12px 0;
  color: #9ca3af;
  font-size: 0.8rem;
  line-height: 1.6;
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pros-cons {
    grid-template-columns: 1fr 1fr;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
}

@media (min-width: 960px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .review-article h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }
  .main-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.open {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    padding: 8px 16px;
  }
  /* บนมือถือ: กางหมวดทั้งหมดเป็นรายการเยื้องเข้า (ไม่ใช้ dropdown ลอย) */
  .nav-submenu {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
    min-width: 0;
  }
  .nav-dropdown > .nav-dropdown-toggle {
    pointer-events: none; /* บนมือถือไม่ต้องกดเปิด-ปิด แสดงเลย */
  }
}
