/* ==========================================================================
   TNS RACKET SPORTS - COMPONENTS STYLES
   Navbar, Cards, Modals, Hero Section, Studio Highlights, Footer
   ========================================================================== */

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-dark);
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  border-bottom: 1px solid var(--border-gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

/* ปุ่มสลับภาษา ไทย/อังกฤษ (อยู่ตำแหน่งเดิมของปุ่ม Admin Panel) */
.lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.lang-btn {
  font-family: 'Kanit', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.9rem;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn:hover { color: var(--gold-light); }

.lang-btn.is-active {
  background: var(--gold-gradient);
  color: #070908;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-badge {
  background: var(--gold-gradient);
  color: #070908;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 800;
}

/* Circular brand mark (TNS Distributor Company logo) */
.logo-mark {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  object-fit: contain;
  padding: 0;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.logo:hover .logo-mark {
  transform: rotate(-6deg) scale(1.05);
  filter: drop-shadow(0 4px 14px rgba(212, 175, 55, 0.45));
}

.logo-mark.logo-mark-sm { width: 38px; height: 38px; }

.logo-green-accent {
  color: var(--green-bright);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-light);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold-gradient);
  border-radius: var(--radius-full);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-dark);
  color: var(--text-main);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 140px 0 80px;
  background: radial-gradient(circle at 50% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
              var(--bg-main);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3rem;
}

.hero-content h1 {
  font-size: 3.5rem;
  line-height: 1.15;
  margin: 1rem 0;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-banner-frame {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 8px;
  background: linear-gradient(135deg, var(--gold-primary), var(--green-primary), transparent 70%);
  box-shadow: var(--shadow-gold);
  transition: transform var(--transition-normal);
}

.hero-banner-frame:hover {
  transform: translateY(-50px) scale(1.01);
}

.hero-banner-frame img {
  border-radius: calc(var(--radius-lg) - 4px);
  width: 100%;
  object-fit: cover;
}

/* Feature Cards */
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gold-gradient);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-gold);
}

.feature-icon.green-icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--green-bright);
  border-color: var(--border-green);
}

/* Product Cards */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
}

.product-card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
  transform: translateY(-4px);
}

.product-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #0b0e0c;
  overflow: hidden;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.08);
}

.product-badge-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
}

.product-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  font-size: 0.75rem;
  color: var(--green-bright);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.product-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-clamp: 2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-dark);
}

.product-price {
  font-family: 'Kanit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold-light);
}

.product-price span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* ==========================================================================
   Company Profile blocks - ธีมดำ (ใช้ในหน้า /about/ และ /contact/)
   ========================================================================== */

/* Timeline ประวัติบริษัท */
.tld {
  list-style: none;
  position: relative;
  padding-left: 3.5rem;
}

.tld::before {
  content: '';
  position: absolute;
  left: 1.25rem;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 1px;
  background: var(--border-dark);
}

.tld li {
  position: relative;
  padding-bottom: 2rem;
}

.tld li:last-child { padding-bottom: 0; }

.tld-icon {
  position: absolute;
  left: -3.5rem;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border-gold);
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.tld-date {
  font-weight: 600;
  color: var(--text-gold);
  margin-bottom: 0.25rem;
}

.tld-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* กล่องแบรนด์ที่จัดจำหน่าย */
.bbox {
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
}

.bbox-head {
  font-family: 'Kanit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border-bottom: 1px solid var(--border-dark);
}

.bbox-head.is-gold {
  background: var(--gold-gradient);
  color: #070908;
  border-bottom: none;
}

.bbox-list {
  list-style: none;
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bbox-list li {
  text-align: center;
  font-family: 'Kanit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--text-main);
}

.bbox-list li small {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

/* ช่องทางการสั่งซื้อ (Where to Buy) */
.ch {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition-normal);
}

.ch:hover {
  border-color: var(--border-gold);
  transform: translateY(-3px);
}

.ch-icon {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
}

.ch-shopee   { background: #ee4d2d; }
.ch-tiktok   { background: #000; border: 1px solid var(--border-dark); }
.ch-facebook { background: #1877f2; }
.ch-line     { background: #06c755; }

.ch-name {
  font-family: 'Kanit', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-gold);
}

.ch-list {
  list-style: none;
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.ch-list li::before {
  content: '• ';
  color: var(--gold-primary);
}

.ch-list a:hover { color: var(--green-bright); }

/* Top Sellers strip (dark theme — ใช้ในหน้า /product/) */
.ts-tab {
  display: inline-block;
  background: var(--gold-gradient);
  color: #070908;
  font-family: 'Kanit', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.25rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.ts-tab.is-outline {
  background: transparent;
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
}

/* ใช้ flex แทน grid เพื่อให้แถวสุดท้ายที่มีของไม่ครบคอลัมน์ถูกจัดกึ่งกลางเอง
   (grid จะดันไปชิดซ้ายเสมอ ทำให้เหลือช่องว่างข้างเดียวดูไม่สมดุล) */
.ts-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.ts-row > .ts-item { flex: 0 0 calc((100% - 4rem) / 5); }

.ts-item { text-align: center; }

.ts-thumb {
  aspect-ratio: 1 / 1;
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0.6rem;
  transition: all var(--transition-normal);
}

.ts-item:hover .ts-thumb {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
  transform: translateY(-4px);
}

.ts-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ts-thumb i { font-size: 1.7rem; color: var(--text-muted); }

.ts-name {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.ts-name strong {
  display: block;
  color: var(--text-gold);
  font-weight: 600;
}

@media (max-width: 1024px) { .ts-row > .ts-item { flex-basis: calc((100% - 2rem) / 3); } }
@media (max-width: 640px)  { .ts-row > .ts-item { flex-basis: calc((100% - 1rem) / 2); } }

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  padding: 1.5rem;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content.is-wide { max-width: 940px; padding: 2.25rem; }

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  padding: 2rem;
  box-shadow: var(--shadow-gold);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-backdrop.active .modal-content {
  transform: scale(1);
}

/* ปุ่มปิดป็อปอัพ
   กากบาทวาดเองด้วยขีด 2 เส้นไขว้กัน ไม่ได้ใช้ตัวอักษร × หรือไอคอน Font Awesome
   เพราะตัว × (U+00D7) ในฟอนต์ Kanit มีหมึกกว้างแค่ 9px ในปุ่ม 44px (เล็กเกินไป)
   และวางอยู่บนแกนคณิตศาสตร์ซึ่งสูงกว่ากึ่งกลางบรรทัด ทำให้ดูลอยขึ้นข้างบน
   วาดเองแล้วได้กึ่งกลางเป๊ะด้วยเรขาคณิต และคุมขนาดได้ตามต้องการ */
.modal-close {
  position: sticky;
  top: 0.5rem;
  float: right;
  z-index: 60;
  background: var(--bg-card);
  border: 1.5px solid var(--gold-primary);
  color: var(--gold-light);
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  display: block;
  font-size: 0;                 /* ซ่อนตัวอักษร &times; ที่เขียนไว้ใน HTML */
  cursor: pointer;
  margin-top: -0.5rem;
  margin-right: -0.5rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
  transition: all var(--transition-fast);
  padding: 0;
}

/* หน้าหลังบ้านใส่ <i class="fas fa-times"> ไว้ ซ่อนทิ้งเพื่อให้กากบาทเหมือนกันทุกที่ */
.modal-close i { display: none; }

.modal-close::before,
.modal-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  /* ขีดยาว 24px พอหมุน 45 องศาแล้วกากบาทจะกว้างจริงราว 18px (~40% ของปุ่ม)
     สูตร: ความกว้างจริง = (ยาว + หนา) x cos45 */
  width: 24px;
  height: 2px;
  margin: -1px 0 0 -12px;       /* ดึงกลับครึ่งหนึ่งของขนาดขีด = อยู่กึ่งกลางพอดี */
  background: currentColor;
  border-radius: 2px;
}

.modal-close::before { transform: rotate(45deg); }
.modal-close::after  { transform: rotate(-45deg); }

.modal-close:hover {
  background: var(--gold-gradient);
  color: #070908;
  border-color: #ffffff;
  transform: scale(1.12);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-gold);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  color: var(--text-main);
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* Footer */
.footer {
  background: #040504;
  border-top: 1px solid var(--border-dark);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

/* เดิมเขียนเป็น .footer-col h4 แต่ในหน้าเว็บไม่มี element ไหนใช้คลาส footer-col
   กฎจึงไม่เคยทำงาน หัวข้อเลยชิดกับลิงก์ด้านล่าง — เปลี่ยนมาอิงจาก .footer-grid แทน */
.footer-grid h4,
.footer-col h4 {
  color: var(--gold-light);
  font-size: 1.1rem;
  margin-bottom: 1.35rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--green-bright);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-content h1 { font-size: 2.5rem; }
  .hero-actions { justify-content: center; }
  /* แท็บเล็ต: เอาบล็อกโลโก้ขึ้นไปกินเต็มแถวบน แล้วให้คอลัมน์ลิงก์สองอันลงมาอยู่แถวเดียวกัน
     ไม่งั้น "หมวดหมู่สินค้า" จะตกไปอยู่แถวล่างลำพัง เหลือที่ว่างข้างขวาโล่ง ๆ */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 3rem;
  }

  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--bg-surface);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transition: left var(--transition-normal);
  }

  .nav-links.active { left: 0; }
  .mobile-menu-btn { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

/* ==========================================================================
   หน้านโยบายความเป็นส่วนตัว + ลิงก์นโยบายที่ท้ายทุกหน้า
   ========================================================================== */
.policy-lead {
  color: var(--text-muted);
  line-height: 1.9;
  padding-bottom: 2rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-dark);
}

.policy-block { margin-top: 2.5rem; }

.policy-block h2 {
  color: var(--gold-light);
  font-size: 1.15rem;
  margin-bottom: 0.9rem;
}

.policy-block p {
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 0.85rem;
}

.policy-block strong { color: var(--text-main); }

.policy-block ul {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
}

.policy-block li {
  position: relative;
  color: var(--text-muted);
  line-height: 1.8;
  padding: 0.15rem 0 0.15rem 1.35rem;
}

/* จุดนำหน้ารายการ ใช้สีทองให้เข้ากับธีมแทน bullet มาตรฐาน */
.policy-block li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.85rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-primary);
}

.footer-policy-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-policy-link:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

/* ==========================================================================
   ป็อปอัพรายละเอียดสินค้า (เปิดจากการกดที่การ์ดสินค้า)
   ========================================================================== */
.product-card.is-clickable { cursor: pointer; }
.product-card.is-clickable:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 3px;
}

/* ป้ายบอกว่ากดดูได้ ขึ้นเฉพาะตอนชี้เมาส์ */
.product-view-hint {
  position: absolute;
  left: 50%;
  bottom: 0.85rem;
  transform: translate(-50%, 0.4rem);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(7, 9, 8, 0.82);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  font-size: 0.78rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.product-card:hover .product-view-hint,
.product-card:focus-visible .product-view-hint {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* เนื้อหาในป็อปอัพ: รูปซ้าย รายละเอียดขวา */
.pd-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2.25rem;
  align-items: start;
}

.pd-photo {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-gold);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--bg-card);
}

.pd-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pd-name {
  font-size: 1.35rem;
  line-height: 1.45;
  margin: 0.4rem 0 0.75rem;
  color: var(--text-main);
}

.pd-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.pd-price-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-top: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
  margin-bottom: 1.25rem;
}

.pd-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold-light);
}

.pd-stock {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-bright);
}

.pd-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pd-btn {
  padding: 0.7rem 1.35rem;
  font-size: 0.9rem;
}

/* ปุ่มย้อนกลับจากหน้าฟอร์มไปหน้ารายละเอียด */
.pd-back {
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.pd-back:hover { color: var(--gold-light); }

/* แถบสรุปสินค้าเหนือฟอร์มสอบถาม */
.pd-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.pd-summary img {
  width: 72px;
  height: 72px;
  flex: none;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-gold);
}

.pd-summary-name {
  color: var(--text-main);
  font-weight: 600;
  line-height: 1.5;
  margin: 0.25rem 0;
}

.pd-summary-price {
  color: var(--gold-light);
  font-weight: 700;
}

@media (max-width: 640px) {
  .pd-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .pd-actions .pd-btn { width: 100%; justify-content: center; }
}

/* ==========================================================================
   ป็อปอัพเลือกแพ็กเกจสตูดิโอ
   ========================================================================== */
/* .text-gold-gradient เป็น inline-block (จำเป็นสำหรับไล่สีตัวอักษร)
   ถ้าไม่ครอบป้ายด้วย div ชื่อแพ็กเกจจะไปต่อท้ายป้ายในบรรทัดเดียวกัน */
.pkg-modal-badge {
  margin-bottom: 0.6rem;
}

.pkg-modal-title {
  font-size: 1.6rem;
  margin: 0 0 0.25rem;
}

.pkg-modal-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 1.25rem;
}

.pkg-modal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0 0 1.5rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--border-dark);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pkg-modal-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  line-height: 1.5;
}

.pkg-modal-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.pkg-modal-actions {
  display: flex;
  gap: 0.85rem;
}

.pkg-modal-actions .btn {
  flex: 1;
  justify-content: center;
}

@media (max-width: 480px) {
  .pkg-modal-actions { flex-direction: column; }
}

/* ---------------------------------- ข้อความชวนติดต่อในป็อปอัพรายละเอียดสินค้า */
.pd-contact-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   แกลเลอรีรูปสินค้าในป็อปอัพ (รองรับสินค้าที่มีหลายรูป)
   ========================================================================== */
.pd-photo { position: relative; }

/* ปุ่มลูกศรเลื่อนรูป ซ่อนไว้จาง ๆ จนกว่าจะชี้เมาส์ที่รูป */
.pd-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  background: rgba(7, 9, 8, 0.72);
  color: var(--gold-light);
  font-size: 0.9rem;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity var(--transition-fast), background var(--transition-fast);
}

.pd-photo:hover .pd-nav { opacity: 1; }
.pd-nav:hover { background: rgba(7, 9, 8, 0.95); }
.pd-nav:focus-visible { opacity: 1; outline: 2px solid var(--gold-primary); outline-offset: 2px; }

.pd-prev { left: 0.65rem; }
.pd-next { right: 0.65rem; }

/* ตัวเลขบอกว่าดูอยู่รูปที่เท่าไหร่ */
.pd-counter {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(7, 9, 8, 0.78);
  border: 1px solid var(--border-dark);
  color: var(--text-muted);
  font-size: 0.75rem;
}

.pd-thumbs {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.pd-thumb {
  flex: none;
  width: 62px;
  height: 62px;
  padding: 0;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
  opacity: 0.6;
  transition: all var(--transition-fast);
}

.pd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pd-thumb:hover { opacity: 1; }

.pd-thumb.is-active {
  opacity: 1;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 1px var(--gold-primary);
}

@media (max-width: 640px) {
  .modal-content.is-wide { padding: 1.5rem; }
  .pd-gallery { max-width: 320px; margin: 0 auto; }
  .pd-nav { width: 34px; height: 34px; opacity: 1; }
}

/* ==========================================================================
   แท็บเล็ตแนวตั้ง (769-1024px เช่น iPad Air 820px)
   ของในแถบเมนูรวมกันต้องใช้ 802px แต่พื้นที่จริงมีแค่ 772px
   เลยล้นและตัดคำขึ้นบรรทัดใหม่ทั้งโลโก้และเมนู
   แก้โดยบีบระยะห่างกับขนาดตัวอักษรลงเล็กน้อย และห้ามตัดคำ
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav-container { gap: 0.75rem; }

  .logo {
    font-size: 1.15rem;
    gap: 0.5rem;
  }

  .logo span { white-space: nowrap; }

  .logo-mark {
    width: 38px;
    height: 38px;
  }

  .nav-links { gap: 1.15rem; }

  .nav-link {
    font-size: 0.875rem;
    white-space: nowrap;
  }

  .nav-actions { gap: 0.6rem; }

  .lang-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.78rem;
  }
}

