/* ===== Variables ===== */
:root {
  --primary: #1a3a6b;
  --primary-dark: #0f2347;
  --primary-light: #2a5298;
  --accent: #f5a623;
  --accent-dark: #d4891a;
  --white: #ffffff;
  --light-gray: #f5f6fa;
  --gray: #8892a4;
  --dark: #1e2532;
  --border: #e0e6f0;
  --success: #27ae60;
  --danger: #e74c3c;
  --font-th: 'Kanit', sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-th); color: var(--dark); background: var(--white); font-size: 18px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
input, select, textarea, button { font-family: var(--font-th); font-size: 18px; }

/* ===== Top Bar ===== */
.top-bar {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  padding: 6px 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar a { color: rgba(255,255,255,0.8); }
.top-bar a:hover { color: var(--accent); }
.top-bar-right { display: flex; gap: 20px; }

/* ===== Header / Navbar ===== */
header {
  background: var(--primary);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  overflow: visible; /* allow logo to float above */
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  position: absolute;
  left: max(20px, calc((100vw - 1200px) / 2 + 20px));
  top: -42px;
  z-index: 1001;
  transition: top 0.3s ease, transform 0.3s ease;
}
.logo img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.40)) drop-shadow(0 1px 3px rgba(0,0,0,0.25));
  transition: width 0.3s ease, height 0.3s ease;
}
/* When header is sticky (scrolled past announce bar) */
header.is-sticky .logo {
  top: 50%;
  transform: translateY(calc(-50% + 10px));
}
header.is-sticky .logo img {
  width: 90px;
  height: 90px;
}
.logo-icon {
  width: 50px;
  height: 50px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.logo-text h1 { font-size: 22px; font-weight: 700; line-height: 1.2; }
.logo-text span { font-size: 13px; color: rgba(255,255,255,0.7); }
.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  padding-left: 90px;
}
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(255,255,255,0.15);
  color: var(--accent);
}
.nav-links a.btn-accent {
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 600;
}
.nav-links a.btn-accent:hover {
  background: var(--accent-dark);
  color: var(--white);
}
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--white);
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s;
}

/* ===== Container ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Hero Banner ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #1a6b8a 100%);
  color: var(--white);
  padding: 60px 0 50px;
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 300px; height: 300px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -30px;
  width: 250px; height: 250px;
  background: rgba(245,166,35,0.1);
  border-radius: 50%;
}
.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-title { font-size: 40px; font-weight: 800; line-height: 1.2; margin-bottom: 12px; }
.hero-title span { color: var(--accent); }
.hero-subtitle { font-size: 20px; color: rgba(255,255,255,0.85); margin-bottom: 24px; }
.hero-info { display: flex; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.hero-info-item { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.hero-info-item .icon { font-size: 20px; }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary { background: var(--accent); color: var(--primary-dark); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }
.hero-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.hero-img-placeholder {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.1);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  border: 1px solid rgba(255,255,255,0.2);
}
.hero-img-placeholder:nth-child(1) { font-size: 60px; }
.hero-img-placeholder.tall { grid-row: span 2; aspect-ratio: auto; }

/* ===== Section Styles ===== */
section { padding: 60px 0; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.section-title span { color: var(--accent); }
.section-sub { color: var(--gray); font-size: 16px; }
.divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  border-radius: 2px;
  margin: 12px auto;
}

/* ===== Price Date Banner ===== */
.price-date-banner {
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 16px 0;
}
.price-date-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.price-date-inner h2 { font-size: 22px; font-weight: 700; }
.price-date-inner .date-badge {
  background: var(--accent);
  color: var(--primary-dark);
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 16px;
}
.price-date-inner p { color: rgba(255,255,255,0.8); font-size: 15px; }

/* ===== Category Filter ===== */
.category-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.cat-btn {
  padding: 8px 18px;
  border-radius: 25px;
  border: 2px solid var(--border);
  background: var(--white);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--gray);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cat-btn:hover, .cat-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* ===== Price Table ===== */
.price-table-wrap { overflow-x: auto; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 16px;
}
.price-table thead { background: var(--primary); color: var(--white); }
.price-table th { padding: 14px 16px; text-align: left; font-weight: 600; white-space: nowrap; }
.price-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
.price-table tbody tr:hover { background: var(--light-gray); }
.price-table tbody tr:last-child { border-bottom: none; }
.price-table td { padding: 13px 16px; }
.price-range { font-weight: 700; color: var(--primary); }
.price-range .sep { color: var(--gray); font-weight: 400; margin: 0 4px; }
.price-range .unit { font-size: 14px; color: var(--gray); font-weight: 400; }
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 14px;
  background: var(--light-gray);
  color: var(--primary);
}
.no-data { text-align: center; padding: 40px; color: var(--gray); font-size: 16px; }

/* ===== Categories Grid ===== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
}
.cat-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.cat-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(26,58,107,0.12);
}
.cat-card .icon { font-size: 40px; margin-bottom: 10px; }
.cat-card .name { font-size: 15px; font-weight: 600; color: var(--primary); }
.cat-card .count { font-size: 13px; color: var(--gray); margin-top: 4px; }

/* ===== Stats Bar ===== */
.stats-bar { background: var(--light-gray); padding: 30px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat-item {
  text-align: center;
  padding: 20px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.stat-number { font-size: 36px; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-number span { color: var(--accent); }
.stat-label { font-size: 15px; color: var(--gray); margin-top: 6px; }

/* ===== News Section ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.news-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); transform: translateY(-2px); }
.news-card-img {
  height: 160px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
}
.news-card-body { padding: 20px; }
.news-date { font-size: 13px; color: var(--gray); margin-bottom: 8px; }
.news-title { font-size: 19px; font-weight: 700; color: var(--primary); margin-bottom: 8px; line-height: 1.4; }
.news-content { font-size: 15px; color: var(--gray); line-height: 1.6; }
.news-pinned {
  display: inline-block;
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

/* ===== Footer ===== */
footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 50px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand h3 { font-size: 24px; font-weight: 700; color: var(--white); margin-bottom: 12px; }
.footer-brand p { font-size: 17px; line-height: 1.8; }
.footer-col h4 { font-size: 18px; font-weight: 700; color: var(--white); margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 17px; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 0;
  text-align: center;
  font-size: 16px;
  color: rgba(255,255,255,0.5);
}

/* ===== Page Header ===== */
.page-header {
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 40px 0;
}
.page-header h1 { font-size: 34px; font-weight: 800; margin-bottom: 6px; }
.page-header p { color: rgba(255,255,255,0.8); }
.breadcrumb { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; font-size: 15px; }
.breadcrumb a { color: rgba(255,255,255,0.7); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: rgba(255,255,255,0.4); }

/* ===== Admin Panel ===== */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; gap: 0; min-height: calc(100vh - 80px); }
.admin-sidebar {
  background: var(--primary-dark);
  color: var(--white);
  padding: 24px 0;
}
.admin-sidebar h3 { padding: 0 20px; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.4); margin-bottom: 8px; }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}
.admin-nav-item:hover, .admin-nav-item.active { background: rgba(255,255,255,0.1); color: var(--accent); }
.admin-main { background: var(--light-gray); padding: 30px; }
.admin-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 24px;
  margin-bottom: 20px;
}
.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.admin-card-header h2 { font-size: 22px; font-weight: 700; color: var(--primary); }

/* ===== Forms ===== */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 14px; font-weight: 600; color: var(--primary); }
.form-control {
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
  color: var(--dark);
  background: var(--white);
}
.form-control:focus { outline: none; border-color: var(--primary); }
.form-control.error { border-color: var(--danger); }
.form-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.btn-sm { padding: 8px 16px; font-size: 15px; }
.btn-success { background: var(--success); color: var(--white); border-color: var(--success); }
.btn-success:hover { background: #219a52; border-color: #219a52; }
.btn-danger { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn-danger:hover { background: #c0392b; border-color: #c0392b; }
.btn-secondary { background: var(--gray); color: var(--white); border-color: var(--gray); }
.btn-secondary:hover { background: #6b7584; border-color: #6b7584; }

/* ===== Admin Table ===== */
.admin-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.admin-table th { background: var(--light-gray); padding: 12px 14px; text-align: left; font-weight: 600; color: var(--primary); white-space: nowrap; }
.admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
.admin-table tbody tr:hover { background: #f8f9ff; }
.actions { display: flex; gap: 6px; }

/* ===== Toast ===== */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--white);
  border-radius: 10px;
  padding: 14px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  animation: slideIn 0.3s ease;
  border-left: 4px solid var(--success);
}
.toast.error { border-left-color: var(--danger); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { to { transform: translateX(120%); opacity: 0; } }
.toast-icon { font-size: 22px; }
.toast-msg { font-size: 15px; font-weight: 500; }

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 5000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: 16px;
  padding: 30px;
  max-width: 550px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-size: 22px; font-weight: 700; color: var(--primary); }
.modal-close { background: none; border: none; font-size: 26px; cursor: pointer; color: var(--gray); line-height: 1; }
.modal-close:hover { color: var(--danger); }

/* ===== Search Bar ===== */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.search-input input { padding-left: 40px; width: 100%; }
.search-input .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray); font-size: 18px; }

/* ===== Date Tabs ===== */
.date-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.date-tab {
  padding: 8px 16px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--white);
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s;
}
.date-tab:hover { border-color: var(--primary); color: var(--primary); }
.date-tab.active { background: var(--primary); border-color: var(--primary); color: var(--white); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-image-grid { display: none; }
  .hero-title { font-size: 30px; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--primary-dark); flex-direction: column; padding: 10px 20px 20px; gap: 2px; }
  .nav-links.open { display: flex; }
  .hamburger { display: block; }
  header { position: relative; }
  .navbar { position: relative; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .section-title { font-size: 26px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  /* Fix 3&4: Logo ให้อยู่ใน navbar ปกติบน mobile */
  .logo {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
  }
  .logo img { width: 56px !important; height: 56px !important; }
  .main-nav { padding-left: 0 !important; }
  header.is-sticky .logo { top: auto !important; transform: none !important; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 26px; }
  .price-table th, .price-table td { padding: 10px 12px; font-size: 15px; }
}

/* ===== Banner Slider ===== */
.banner-slider {
  position: relative;
  width: 100%;
  height: 620px;
  overflow: hidden;
  background: var(--primary-dark);
}
.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}
.banner-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 60%, rgba(0,0,0,0.1) 100%);
}
/* Banner text — align left to container grid (same as logo) */
.banner-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  text-align: left;
  color: var(--white);
  padding-left: max(20px, calc((100vw - 1200px) / 2 + 20px));
  padding-right: 20px;
  max-width: 60%;
}

/* ===== PRICE WIDGET (floats between banner & yellow bar) ===== */
.banner-section-wrap { position: relative; }

/* Right column: desktop absolute column */
.right-widgets-col {
  position: absolute;
  top: 20px;
  right: max(20px, calc((100vw - 1200px) / 2 + 20px));
  width: 320px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-widget {
  width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 56px rgba(0,0,0,0.25), 0 4px 12px rgba(0,0,0,0.10);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.3s, transform 0.3s;
}
.price-widget.hidden {
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  pointer-events: none;
}

/* YouTube card */
.yt-card {
  position: relative;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 56px rgba(0,0,0,0.25), 0 4px 12px rgba(0,0,0,0.10);
  overflow: visible;
  padding: 10px;
}
.yt-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8faff;
  pointer-events: none;
}

/* Header: blue bg, white text */
.price-widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 16px 12px;
  background: var(--primary);
  flex-shrink: 0;
}
.price-widget-title {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1px;
  line-height: 1.2;
}
.price-widget-date {
  font-size: 13px;
  color: rgba(255,255,255,0.80);
  font-weight: 500;
  margin-top: 0;
  line-height: 1.3;
}
.price-widget-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.20);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
  margin-top: 2px;
}
.price-widget-close:hover { background: rgba(255,255,255,0.40); }

/* List */
.price-widget-list {
  overflow: hidden;
}
.price-widget-list::-webkit-scrollbar { width: 3px; }
.price-widget-list::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }
.price-widget-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-bottom: 1px solid #f0f2f5;
  transition: background 0.15s;
  cursor: default;
}
.price-widget-row:last-child { border-bottom: none; }
.price-widget-row:hover { background: #fffbeb; }
.price-widget-heart { display: none; }
.price-widget-name {
  flex: 1;
  font-size: 17px;          /* 13 + 4 */
  font-weight: 500;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.price-widget-price {
  font-size: 17px;          /* 13 + 4 */
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  flex-shrink: 0;
}
.price-widget-unit { font-size: 13px; color: #94a3b8; font-weight: 400; }
.price-widget-footer {
  display: block;
  text-align: right;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  border-top: 1px solid #f0f2f5;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.price-widget-footer:hover {
  background: #fffbeb;
  color: var(--accent);
  text-decoration: underline;
}

/* ===== SEARCH BAR — left-aligned to container grid, fixed width ===== */
.shop-search-banner .shop-search-wrap {
  max-width: 560px;
  width: 560px;
  margin-left: 0;
  margin-right: auto;
}

/* ===== MOBILE ===== */
@media (max-width: 900px) {
  .banner-content {
    max-width: 100%;
    padding: 0 20px;
    align-items: center;
    text-align: center;
  }
  /* Backdrop for mobile lightbox */
  .price-widget-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 150;
  }
  .price-widget-backdrop.active { display: block; }
  /* Mobile: container becomes static so fixed child (price-widget) can escape */
  .right-widgets-col {
    position: static !important;
    width: auto !important;
    display: block !important;
  }
  #yt-card-wrap .yt-logo-badge { display: none !important; }

  /* Hide video card default on mobile; JS shows it as button-only */
  .yt-card { display: none; }
  /* Price widget: centered fixed lightbox on mobile */
  .price-widget {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: calc(100vw - 40px) !important;
    max-width: 380px !important;
    border-radius: 16px !important;
    z-index: 160 !important;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3) !important;
  }
  .price-widget.hidden {
    opacity: 0 !important;
    transform: translate(-50%, calc(-50% + 16px)) scale(0.96) !important;
    pointer-events: none !important;
  }
  .price-widget-list { max-height: 55vh; overflow-y: auto; }
  .shop-search-banner .shop-search-wrap {
    max-width: 100%;
    margin: 0 auto;
  }
}
/* backdrop hidden on desktop */
@media (min-width: 901px) {
  .price-widget-backdrop { display: none !important; }
  #yt-card-wrap .yt-logo-badge { display: block !important; }
}

/* ===== YouTube Widget ===== */
.yt-widget { border-top: 1px solid #f0f2f5; }
.yt-widget-inner { padding: 10px 10px 6px; }
.yt-video-wrap {
  position: relative;
  width: 100%;
  max-width: 300px;
  height: 169px;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}
.yt-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
}
.yt-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 0 2px;
}
.yt-arrow {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--primary);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.yt-arrow:hover { opacity: 1; }
.yt-dots { display: flex; gap: 5px; align-items: center; }
.yt-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.yt-dot.active { background: var(--primary); transform: scale(1.3); }
.yt-mobile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: #ff0000;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  margin: 8px 0 4px;
}
.banner-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--accent);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.banner-subtitle {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 28px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  color: var(--white);
}
.banner-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 19px;
  padding: 14px 36px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  font-family: var(--font-th);
}
.banner-btn:hover {
  background: var(--accent-dark);
  color: var(--white);
  transform: scale(1.04);
}

/* Dots */
.banner-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}
.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.banner-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* Arrows */
.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.4);
  color: var(--white);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}
.banner-arrow:hover { background: rgba(255,255,255,0.3); }
.banner-arrow.prev { left: 20px; }
.banner-arrow.next { right: 20px; }

@media (max-width: 768px) {
  .banner-slider { height: 320px; }
  .banner-title { font-size: 28px; }
  .banner-subtitle { font-size: 19px; }
}

/* Footer logo circular — all pages */
/* Footer logo — circular, all pages, both HTML structures */
.footer-col-main .footer-logo,
.footer-brand .footer-logo img,
img.footer-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  padding: 6px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  display: block;
}
.footer-brand .footer-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
}

/* ===== SWIPE HINT (Mobile only) ===== */
@media (max-width: 768px) {
  .swipe-hint-wrap {
    position: relative;
  }

  /* Gradient fade ขอบขวา */
  .swipe-hint-wrap::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 48px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.92));
    pointer-events: none;
    z-index: 2;
    border-radius: 0 12px 12px 0;
    transition: opacity 0.4s;
  }
  .swipe-hint-wrap.scrolled::after {
    opacity: 0;
  }

  /* Icon นิ้ว */
  .swipe-hint-icon {
    position: absolute;
    bottom: 12px;
    right: 6px;
    z-index: 3;
    font-size: 20px;
    pointer-events: none;
    animation: swipeIconPulse 1.6s ease-in-out infinite;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.25));
  }
  .swipe-hint-wrap.scrolled .swipe-hint-icon {
    opacity: 0;
    transition: opacity 0.4s;
  }

  @keyframes swipeIconPulse {
    0%, 100% { transform: translateX(0);   opacity: 0.9; }
    40%       { transform: translateX(-8px); opacity: 1;   }
    60%       { transform: translateX(4px);  opacity: 0.8; }
  }

  /* Swipe hint บนตัวตาราง */
  .swipe-hint-wrap .swipe-nudge {
    animation: swipeNudge 1s ease 0.5s 1 forwards;
  }
  @keyframes swipeNudge {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-14px); }
    75%  { transform: translateX(6px); }
    100% { transform: translateX(0); }
  }
}
