:root {
  /* ===== Technical Glass theme (v3) — เขียวเข้มไล่เฉด + กระจกฝ้า อ้างอิงโทน c2tech-brand (#3F654D) แบบเข้มขึ้น ===== */
  --bg-1: #0f3d2d;
  --bg-2: #08150f;
  --mint: #7CF2B4;
  --green: #3F654D;
  --green-dark: #2C4C3A;
  --glass: rgba(255,255,255,.06);
  --glass-border: rgba(255,255,255,.13);
  --glass-strong: rgba(255,255,255,.1);
  --ink: #eaf3ee;
  --muted: #9db8ab;
  --danger: #ff6b5e;
  --border: #e5e9e6;
  --shadow: 0 10px 30px rgba(0,0,0,.35);

  /* ===== โหมดสว่าง/มืด (v1) — ตัวแปรชุดนี้คุมเฉพาะ "เนื้อหา" (พื้นหลังหน้า/การ์ดสินค้า/แท็บหมวดหมู่/สถานะว่าง)
     ส่วน header/modal/overlay/แถบเลือกสินค้า ("chrome" ของแอป) ยังใช้ตัวแปรชุดบน (--bg-1/--ink/--glass ฯลฯ)
     ตรงๆ เหมือนเดิม ไม่แตะต้อง เพื่อให้แบรนด์เข้มยังคงเดิมทั้งสองโหมด ค่าเริ่มต้น (ไม่มี data-theme) = โหมดมืด ===== */
  --page-bg-1: var(--bg-1);
  --page-bg-2: var(--bg-2);
  --content-ink: var(--ink);
  --content-muted: var(--muted);
  --content-card-bg: var(--glass);
  --content-card-border: var(--glass-border);
  --content-card-shadow: var(--shadow);
  --content-img-bg: rgba(255,255,255,.04);
  --content-tab-bg: var(--glass);
  --content-tab-color: var(--muted);
}

/* โหมดสว่าง — สลับด้วยปุ่มบนหัวเว็บ (persist ผ่าน localStorage) พื้นหลังหน้า/การ์ด/แท็บ เปลี่ยนเป็นโทนสว่าง
   โดยอ้างอิงโทนขาว-เขียวอ่อนจากธีมแบรนด์ C2TECH (Sub 2 #D2DCD8) แทนสีเทาทั่วไป */
:root[data-theme="light"] {
  --page-bg-1: #eef4f0;
  --page-bg-2: #ffffff;
  --content-ink: #1b2b22;
  --content-muted: #5c7768;
  --content-card-bg: #ffffff;
  --content-card-border: #d7e3dc;
  --content-card-shadow: 0 6px 20px rgba(63,101,77,.12);
  --content-img-bg: #f2f6f4;
  --content-tab-bg: #ffffff;
  --content-tab-color: #4c6a58;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  /* ปิดการซูมทุกทาง (คำขอผู้ใช้): meta viewport กันซูมด้วยนิ้วสองนิ้ว/ปุ่ม +- ของเบราว์เซอร์อยู่แล้ว
     ส่วน touch-action: manipulation ตรงนี้กันดับเบิลแท็บซูมของ Safari/Chrome บนมือถือบางรุ่นที่บางครั้ง
     ไม่แคร์ user-scalable=no ตรงๆ (ยังปล่อยให้ลาก/สกอลปกติทำงานได้ ต่างจาก touch-action: none ที่บล็อกหมด) */
  touch-action: manipulation;
}

body {
  margin: 0;
  font-family: "Chakra Petch", "Kanit", "Segoe UI", sans-serif;
  background: radial-gradient(120% 70% at 20% 0%, var(--page-bg-1), var(--page-bg-2) 65%) fixed;
  color: var(--content-ink);
  font-size: 16px;
  overscroll-behavior-y: contain;
  min-height: 100vh;
  transition: background .25s ease;
}

.hidden { display: none !important; }
.no-scrollbar::-webkit-scrollbar { display: none; }
img { -webkit-user-drag: none; }

/* ---------- Pull to refresh ---------- */
#ptr {
  position: fixed; top: -50px; left: 0; width: 100%; height: 50px;
  display: flex; align-items: center; justify-content: center;
  color: var(--mint); font-weight: 700; font-size: 13px;
  transition: transform .2s; z-index: 40;
}

/* ---------- Header (ล็อคไม่ให้เลื่อนตาม — sticky top:0 คำขอผู้ใช้) ---------- */
.hdr {
  background: rgba(8,21,15,.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 16px 10px;
  position: sticky; top: 0; z-index: 30;
}
.hdr-inner { max-width: 1000px; margin: 0 auto; }
.hdr-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.hdr-brand { display: flex; align-items: center; gap: 9px; min-width: 0; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.hdr-badge {
  width: 36px; height: 36px; border-radius: 10px; background: var(--glass); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hdr-badge img { width: 20px; height: 20px; }
.hdr-title { font-family: "Space Grotesk", "Chakra Petch", sans-serif; color: #fff; font-weight: 700; font-size: 16px; letter-spacing: .5px; line-height: 1.15; }
.hdr-sub { color: var(--muted); font-size: 10.5px; margin-top: 1px; }
.hdr-icons { display: flex; gap: 6px; flex-shrink: 0; }
.hdr-icon-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--glass-border); background: var(--glass);
  color: #fff; font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.hdr-icon-btn.admin { background: var(--mint); color: #08150f; border-color: var(--mint); }
.hdr-icon-btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.hdr-icon-btn:active { transform: scale(.94); }

.search-box {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 12px; display: flex; align-items: center;
  gap: 8px; padding: 10px 13px;
}
.search-box i { color: var(--muted); font-size: 13px; }
.search-box input {
  background: transparent; border: none; outline: none; color: #fff; font-size: 14px;
  font-family: inherit; flex: 1; min-width: 0;
}
.search-box input::placeholder { color: var(--muted); }

.offline-chip {
  max-width: 1000px; margin: 10px auto 0; background: rgba(255,200,80,.12); border: 1px solid rgba(255,200,80,.35);
  color: #ffd581; font-size: 11.5px; padding: 7px 12px; border-radius: 10px;
  display: flex; align-items: center; gap: 7px;
}

.tabs { display: flex; gap: 7px; overflow-x: auto; padding: 12px 0 2px; max-width: 1000px; margin: 0 auto; }
.tab-pill {
  flex-shrink: 0; padding: 7px 16px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--content-card-border); background: var(--content-tab-bg); color: var(--content-tab-color);
  white-space: nowrap; cursor: pointer;
}
.tab-pill.active { background: var(--mint); color: #08150f; border-color: var(--mint); font-weight: 700; }

/* ---------- หมวด "Staff เท่านั้น" — แยกแถวต่างหากใต้แถวหมวดหมู่ปกติ ซ่อนสนิทถ้ายังไม่ปลดล็อก ---------- */
.staff-tabs-wrap { max-width: 1000px; margin: 0 auto; padding: 6px 0 2px; border-top: 1px dashed rgba(240,185,58,.35); }
.staff-tabs-label {
  font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #f0b93a;
  padding: 7px 0 4px; display: flex; align-items: center; gap: 5px;
}
.staff-tabs .tab-pill { background: rgba(240,185,58,.12); border-color: rgba(240,185,58,.45); color: #f0b93a; font-weight: 700; }
.staff-tabs .tab-pill.active { background: linear-gradient(90deg,#f0b93a,#c9931e); color: #3a2a04; border-color: #c9931e; }
#staffLockBtn.unlocked { background: linear-gradient(135deg,#f0b93a,#c9931e); color: #3a2a04; border-color: #c9931e; }
.staff-card-tag {
  position: absolute; top: 7px; left: 7px; background: linear-gradient(90deg,#f0b93a,#c9931e); color: #3a2a04;
  font-size: 8px; font-weight: 800; padding: 3px 9px; border-radius: 20px; z-index: 2; box-shadow: 0 3px 8px rgba(0,0,0,.3);
}
.card.staff-product { border-color: rgba(240,185,58,.5); background: rgba(240,185,58,.05); }
.staff-mini-tag {
  display: inline-block; background: linear-gradient(90deg,#f0b93a,#c9931e); color: #3a2a04; font-size: 8.5px;
  font-weight: 800; padding: 2px 7px; border-radius: 20px; margin-left: 6px; vertical-align: middle;
}
.staff-check-row { margin-top: 8px; margin-bottom: 10px; }

/* ---------- กติกา CSS ขั้นต่ำที่ Bootstrap Carousel (bootstrap.bundle.min.js) ต้องพึ่งเพื่อให้กลไกเลื่อนสไลด์
   ทำงานได้ — คัดมาเฉพาะส่วนนี้จาก bootstrap.css แทนการโหลดทั้งไฟล์ เพื่อไม่ให้ไปทับดีไซน์ธีมเข้มของทั้งเว็บ
   (ปุ่ม/ฟอนต์/สีลิงก์ ฯลฯ) คลาสพวกนี้ (.carousel-item, .carousel-item-next ฯลฯ) ตัว JS เป็นคนเติม/ลบให้เองอัตโนมัติ
   ตอนเปลี่ยนสไลด์ ห้ามลบทิ้งแม้จะดูเหมือนไม่ได้ใช้ตรงๆ ในโค้ด HTML/JS ของเรา */
.carousel { position: relative; }
.carousel.pointer-event { touch-action: pan-y; }
.carousel-inner { position: relative; width: 100%; overflow: hidden; }
.carousel-inner::after { display: block; clear: both; content: ""; }
.carousel-item {
  position: relative; display: none; float: left; width: 100%; margin-right: -100%;
  backface-visibility: hidden; transition: transform .6s ease-in-out;
}
@media (prefers-reduced-motion: reduce) { .carousel-item { transition: none; } }
.carousel-item.active, .carousel-item-next, .carousel-item-prev { display: block; }
.carousel-item-next:not(.carousel-item-start), .active.carousel-item-end { transform: translateX(100%); }
.carousel-item-prev:not(.carousel-item-end), .active.carousel-item-start { transform: translateX(-100%); }

/* ---------- Hero slider (ไม่ sticky — เลื่อนหายไปพร้อมเนื้อหาปกติ) ----------
   หมายเหตุ: เปลี่ยนมาใช้ Bootstrap Carousel (bootstrap.bundle.min.js) เป็นตัวจัดการเลื่อนสไลด์/หมุนอัตโนมัติ/
   ปัดนิ้วให้ทั้งหมด (ไลบรารีสำเร็จรูปที่ผ่านการทดสอบมาดีแล้ว) แทนโค้ด carousel ที่เขียนเอง — ส่วนนี้เป็นแค่การ
   ปรับหน้าตา (สี/ขนาด/มุมโค้ง) ให้เข้ากับธีมเข้มของแอป ตัว track/item ปล่อยให้ Bootstrap คุมกลไกเอง */
.hero-slider {
  max-width: 1000px; margin: 14px auto 4px; padding: 0 16px;
}
/* เดิมกำหนดความสูงตายตัวคนละค่าตามขนาดจอ (190/280/340/400px) ทำให้อัตราส่วนกรอบ (กว้าง:สูง) เปลี่ยนไปเรื่อยๆ
   ตามความกว้างจอ ไม่ตรงกับอัตราส่วนภาพที่ทีมสื่อผลิตมา (1424×736 ≈ 1.93:1) เลยโดนครอปคนละด้านในแต่ละขนาดจอ
   (มือถือครอปซ้าย-ขวา / คอมพิวเตอร์ครอปบน-ล่าง) เปลี่ยนมาใช้ aspect-ratio ล็อกสัดส่วนกรอบให้ตรงกับภาพเป๊ะแทน
   ความสูงจะปรับตามความกว้างจออัตโนมัติ แต่สัดส่วนคงที่ทุกขนาดจอ — ถ้าสไลด์ใบไหนผลิตมาที่อัตราส่วนนี้พอดี
   จะเต็มภาพไม่มีส่วนไหนถูกตัดทั้งบนมือถือและคอมพิวเตอร์ */
#heroCarousel .carousel-inner {
  aspect-ratio: 1424 / 736; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--glass-border); background: var(--glass);
}
#heroCarousel .carousel-item { height: 100%; cursor: pointer; }
#heroCarousel .carousel-item img {
  width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none;
}
#heroCarousel .carousel-item::after {
  content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.5), rgba(0,0,0,0) 60%); pointer-events: none;
}
/* ป้ายบอกใบ้ว่ากดดูได้ — ลอยอยู่มุมล่างซ้ายของทุกสไลด์ */
.hero-hint {
  position: absolute; left: 12px; bottom: 12px; z-index: 1;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 20px;
  background: rgba(8, 21, 15, .55); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .2px;
  pointer-events: none;
}
.hero-hint i { color: var(--mint); font-size: 11px; }
/* แถบนับเวลาสไลด์อัตโนมัติ — วิ่งเต็มความกว้างใน 1 รอบของ autoplay แล้วรีเซ็ตทุกครั้งที่ Bootstrap เปลี่ยนสไลด์ */
.hero-progress { height: 3px; border-radius: 3px; background: var(--glass-border); margin-top: 10px; overflow: hidden; }
.hero-progress-fill { height: 100%; width: 0%; background: var(--mint); border-radius: 3px; }
.hero-progress-fill.animate { transition: width 4.5s linear; width: 100%; }
/* จุดบอกตำแหน่งสไลด์ — ปุ่มพวกนี้ผูกกับ Bootstrap ผ่าน data-bs-target/data-bs-slide-to (ไม่ต้องอยู่ใน #heroCarousel ก็ได้) */
.hero-dots { display: flex; justify-content: center; gap: 5px; margin-top: 9px; padding: 0; list-style: none; }
.hero-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--glass-border); cursor: pointer; transition: width .2s, background .2s; border: none; padding: 0; }
.hero-dot.active { background: var(--mint); width: 16px; border-radius: 4px; }

/* ---------- Product grid ---------- */
.grid {
  padding: 14px 16px 100px; max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px;
}
.pb-tabbar { padding-bottom: 0; }

.loading-state, .empty-state {
  grid-column: 1 / -1; text-align: center; padding: 60px 10px; color: var(--content-muted); font-size: 13px;
}

.card {
  background: var(--content-card-bg); border: 1px solid var(--content-card-border); border-radius: 16px; box-shadow: var(--content-card-shadow); overflow: hidden;
  display: flex; flex-direction: column; position: relative; backdrop-filter: blur(10px);
  transition: background .25s ease, border-color .25s ease;
}
.card-img-wrap { position: relative; background: var(--content-img-bg); }
.card-img { width: 100%; height: 130px; object-fit: contain; padding: 10px; display: block; cursor: zoom-in; }
.pin-btn {
  position: absolute; top: 7px; right: 7px; width: 27px; height: 27px; border-radius: 50%;
  background: rgba(0,0,0,.4); border: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff;
}
.pin-btn.active { background: var(--mint); color: #08150f; border-color: var(--mint); }
.cat-tag {
  position: absolute; bottom: 7px; left: 7px; background: rgba(0,0,0,.45); color: var(--mint);
  font-size: 9px; font-weight: 700; padding: 3px 9px; border-radius: 20px; border: 1px solid rgba(124,242,180,.35);
}
.card-body { padding: 10px 11px 11px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 12.5px; font-weight: 500; line-height: 1.35; min-height: 34px; color: var(--content-ink); }
.card-actions { display: flex; gap: 5px; margin-top: auto; }
.card-actions button {
  flex: 1; min-width: 0; border: none; border-radius: 8px; font-size: 10px; font-weight: 700; padding: 8px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font-family: inherit;
}
.card-actions button i { font-size: 12px; }
/* บั๊ก: ป้ายชื่อปุ่ม 2 คำภาษาไทยติดกันไม่มีเว้นวรรค (เช่น "เปิดไฟล์") บาง Android/Chrome ตัดคำกลางคำ
   ("เปิด"/"ไฟล์" คนละบรรทัด) เพราะช่องแคบไปนิดเดียว ทำให้ปุ่มนั้นสูงขึ้น 2 เท่า แล้ว flex ยืดปุ่มข้างๆ
   ในแถวเดียวกัน (QR/แชร์) ให้สูงตามไปด้วย ดูเหมือนปุ่มยืดแปลกทั้งแถว — บังคับไม่ให้ป้ายตัดบรรทัดแทน
   (ถ้ายาวเกินพื้นที่จริงๆ ให้ตัดจบด้วย ... แทนการขึ้นบรรทัดใหม่) */
.card-actions button .btn-label {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.btn-open { background: var(--glass-strong); color: var(--ink); }
.btn-qr { background: var(--mint); color: #08150f; }
.btn-share { background: var(--glass-strong); color: var(--muted); }
.admin-actions { position: absolute; top: 7px; right: 7px; display: flex; gap: 5px; z-index: 2; }
.admin-actions button {
  width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.45); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center; font-size: 10.5px;
}
.admin-actions .edit-btn { color: #6fb4ff; }
.admin-actions .del-btn { color: var(--danger); }
/* เมื่ออยู่โหมดแอดมิน ปุ่มปักหมุดต้องขยับลงมาไม่ให้ทับปุ่มแก้ไข/ลบ */
.card.admin-mode .pin-btn { top: 40px; }

/* ---------- Video badge on card ---------- */
.play-badge { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.play-badge i { width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.type-tag {
  position: absolute; bottom: 7px; right: 7px; background: rgba(0,0,0,.6); color: #fff;
  font-size: 8.5px; font-weight: 700; padding: 3px 8px; border-radius: 20px; display: flex; align-items: center; gap: 4px;
}
.btn-play { background: var(--danger) !important; color: #fff !important; }

/* ---------- Selection floating bar ---------- */
.selection-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 968px; margin: 0 auto;
  background: rgba(8,21,15,.85); backdrop-filter: blur(14px); border: 1px solid var(--glass-border);
  color: #fff; border-radius: 16px; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,.4); z-index: 35;
}
.selection-left { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.selection-count {
  width: 24px; height: 24px; border-radius: 50%; background: var(--mint); color: #08150f;
  font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.selection-actions { display: flex; align-items: center; gap: 8px; }
.sel-btn-clear { background: var(--glass); color: #fff; border: 1px solid var(--glass-border); border-radius: 10px; width: 34px; height: 34px; }
.sel-btn-share { background: var(--mint); color: #08150f; border: none; border-radius: 10px; padding: 9px 16px; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; }

/* ---------- Admin modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 50; display: flex;
  align-items: center; justify-content: center; padding: 10px; backdrop-filter: blur(4px);
}
.modal-content { width: 94%; max-width: 440px; max-height: 90vh; overflow-y: auto; border-radius: 20px; padding: 22px; background: #10241b; border: 1px solid var(--glass-border); box-shadow: 0 20px 50px rgba(0,0,0,.5); color: var(--ink); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; border-bottom: 1px solid var(--glass-border); padding-bottom: 10px; gap: 8px; }
.modal-head h2 { margin: 0; font-size: 14px; font-weight: 700; color: var(--mint); text-transform: uppercase; display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.modal-close { border: none; background: none; font-size: 22px; font-weight: 300; color: var(--muted); cursor: pointer; line-height: 1; flex-shrink: 0; }
.modal-back-btn {
  border: none; background: var(--glass); color: var(--mint); width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-size: 13px; cursor: pointer; flex-shrink: 0;
}
.modal-back-btn:active { transform: scale(.92); }

/* ---------- เมนูหลักของ "จัดการระบบ" — grid การ์ดไอคอน (คล้าย C2 Loop) กดแล้วเข้าไปหน้านั้นๆ ทีละหน้า ---------- */
.admin-menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.admin-menu-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: rgba(255,255,255,.04); border: 1px solid var(--glass-border); border-radius: 14px;
  padding: 16px 6px 12px; cursor: pointer; font-family: inherit;
}
.admin-menu-tile:active { transform: scale(.96); }
.admin-menu-icon {
  width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 17px; box-shadow: 0 6px 14px rgba(0,0,0,.25);
}
.admin-menu-label { font-size: 11px; font-weight: 700; color: var(--ink); text-align: center; line-height: 1.3; }

/* ---------- หน้าย่อยของ "จัดการระบบ" (เข้าจากเมนูหลัก) ---------- */
.admin-section { animation: adminSectionIn .18s ease; }
@keyframes adminSectionIn { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: translateX(0); } }
/* เดิม .cat-collapse-body มี border-top เฉยๆ เพราะเคยอยู่ใต้แถบพับ-กางในกล่องเดียวกัน (.cat-collapse ครอบไว้)
   ตอนนี้แต่ละหน้าย่อยมีพื้นที่เต็มของตัวเองแล้ว จึงใส่กรอบเต็มรอบให้ดูเป็นกล่องเดียวจบในตัวแทน */
.admin-section > .cat-collapse-body {
  border-top: none; border: 1px solid var(--glass-border); border-radius: 12px; background: rgba(255,255,255,.02);
}

/* ---------- Collapsible category / slide box ---------- */
.cat-collapse { border: 1px solid var(--glass-border); border-radius: 12px; margin-bottom: 16px; overflow: hidden; }
.cat-collapse-head {
  padding: 11px 14px; display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 700; color: var(--mint); background: rgba(255,255,255,.04); cursor: pointer;
}
.cat-collapse-body { padding: 12px 14px; display: flex; gap: 6px; align-items: center; border-top: 1px solid var(--glass-border); }
.cat-collapse-body input { flex: 1; font-size: 12.5px; padding: 9px 10px; border-radius: 9px; border: 1px solid var(--glass-border); outline: none; background: rgba(255,255,255,.04); color: var(--ink); font-family: inherit; }
.cat-collapse-body input::placeholder { color: var(--muted); }
.icon-sq-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.04); border: 1px solid var(--glass-border); border-radius: 9px; color: var(--mint); font-size: 12px; flex-shrink: 0; }
.icon-sq-btn.danger { border-color: rgba(255,107,94,.4); color: var(--danger); }

/* ---------- จัดการสไลด์หน้าแรก (แอดมิน) ---------- */
.slide-collapse-body, .contact-collapse-body { flex-direction: column; align-items: stretch; gap: 10px; }
.slide-admin-list { display: flex; flex-direction: column; gap: 0; }
.slide-admin-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--glass-border);
}
.slide-admin-row:last-child { border-bottom: none; }
.slide-admin-thumb { width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0; overflow: hidden; background: rgba(255,255,255,.06); border: 1px solid var(--glass-border); }
.slide-admin-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide-admin-text { flex: 1; min-width: 0; overflow: hidden; }
.slide-admin-text div { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slide-admin-text .l { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slide-admin-actions { display: flex; gap: 4px; flex-shrink: 0; }
.slide-admin-actions button {
  width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--glass-border); background: rgba(255,255,255,.04);
  color: var(--muted); font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.slide-admin-actions button.danger { color: var(--danger); border-color: rgba(255,107,94,.4); }
.slide-admin-actions button.edit { color: #6fb4ff; }
.slide-admin-empty { font-size: 11.5px; color: var(--muted); padding: 6px 0; }

/* ---------- จัดการหมวดหมู่ (แอดมิน) — รายการหมวดทั้งหมด พร้อมไอคอนแก้ไข/ลบท้ายแถว ---------- */
.cat-admin-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--glass-border);
}
.cat-admin-row:last-child { border-bottom: none; }
.cat-admin-name {
  flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink); display: flex; align-items: center; gap: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-admin-name i { color: var(--mint); font-size: 12px; flex-shrink: 0; }
.drag-handle {
  flex-shrink: 0; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; cursor: grab; touch-action: none; /* กันเบราว์เซอร์แย่งลากไปเลื่อนหน้าจอแทน */
}
.drag-handle:active { color: var(--mint); }
.cat-admin-row.dragging, .contact-admin-row.dragging, .slide-admin-row.dragging {
  background: rgba(124,242,180,.08); border-radius: 10px; opacity: .85; cursor: grabbing;
}
.cat-admin-row.dragging .drag-handle, .contact-admin-row.dragging .drag-handle, .slide-admin-row.dragging .drag-handle { cursor: grabbing; color: var(--mint); }
.slide-admin-add { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--glass-border); }
.slide-admin-add input { width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--glass-border); background: rgba(255,255,255,.04); color: var(--ink); font-size: 12px; font-family: inherit; outline: none; }
.slide-admin-add input::placeholder { color: var(--muted); }
.slide-admin-add .btn-primary { padding: 11px; font-size: 12.5px; }

.label-mini { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 5px; display: block; letter-spacing: .3px; }
.label-mini .req { color: var(--danger); text-transform: none; }
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.form-field input, .form-field select {
  width: 100%; padding: 10px 12px; border-radius: 11px; background: rgba(255,255,255,.04); border: 1px solid var(--glass-border);
  outline: none; font-size: 14px; font-family: inherit; color: var(--ink);
}
.form-field select option { background: #10241b; color: var(--ink); }
.hint { font-size: 10.5px; color: var(--muted); margin-top: 5px; }
.form-actions { padding-top: 8px; border-top: 1px solid var(--glass-border); margin-top: 4px; }

/* ---------- ป้ายไฮไลท์ NEW/HOT ในฟอร์มเพิ่ม/แก้ไขสินค้า ---------- */
.highlight-check-row {
  display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,.04); border: 1px solid var(--glass-border);
  border-radius: 11px; padding: 9px 12px; margin-bottom: 7px;
}
.highlight-check-row .hl-ic { width: 18px; text-align: center; font-size: 13px; }
.highlight-check-row .hl-label { font-size: 12.5px; font-weight: 500; color: var(--ink); flex: 1; }
.highlight-check-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--mint); }

/* ---------- ป้ายไฮไลท์ NEW/HOT บนการ์ดสินค้า (แบบ B: แคปซูลมุมซ้ายบน — เลือกมุมซ้ายเพราะมุมขวาบนถูกใช้โดย
   ปุ่มเลือกไว้แชร์ (.pin-btn) และปุ่มแก้ไข/ลบของแอดมิน (.admin-actions) อยู่แล้ว) ---------- */
.badge-pill-wrap { position: absolute; top: 7px; left: 7px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.badge-pill {
  font-size: 8.5px; font-weight: 800; padding: 3px 9px 3px 7px; border-radius: 20px; display: flex; align-items: center;
  gap: 3px; color: #08150f; box-shadow: 0 3px 8px rgba(0,0,0,.35); white-space: nowrap;
}
.badge-pill.new { background: linear-gradient(90deg, #7CF2B4, #4fd693); }
.badge-pill.hot { background: linear-gradient(90deg, #ffb35e, #ff6b5e); color: #3a0f0a; }

/* ---------- File type pills ---------- */
.type-pills { display: flex; gap: 7px; flex-wrap: wrap; }
.type-pill {
  flex: 1; min-width: 66px; padding: 10px 6px; border-radius: 12px; border: 1.5px solid var(--glass-border); background: rgba(255,255,255,.04);
  text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); cursor: pointer;
}
.type-pill .ic { display: block; font-size: 16px; margin-bottom: 3px; }
.type-pill.active { border-color: var(--mint); background: rgba(124,242,180,.12); color: var(--mint); }

.auto-detect-chip {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; background: rgba(124,242,180,.12); color: var(--mint);
  font-size: 10.5px; font-weight: 700; padding: 5px 11px; border-radius: 20px;
}

/* ---------- Link preview ---------- */
.link-preview { margin-top: 10px; border: 1.5px dashed var(--glass-border); border-radius: 14px; padding: 10px; display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,.03); }
.lp-thumb { position: relative; width: 56px; height: 56px; flex-shrink: 0; border-radius: 9px; overflow: hidden; background: rgba(255,255,255,.06); }
.lp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lp-thumb.lp-play::after {
  content: '▶'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; background: rgba(0,0,0,.35);
}
.link-preview-text { font-size: 11px; color: var(--muted); line-height: 1.5; }
.link-preview-text b { color: var(--mint); display: block; font-size: 12px; }
.btn-primary { width: 100%; background: var(--mint); color: #08150f; border: none; padding: 13px; border-radius: 12px; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; }
.btn-primary:active { transform: scale(.98); }
.btn-text { width: 100%; background: none; border: none; color: #6fb4ff; font-size: 11px; font-weight: 700; padding: 8px; margin-top: 2px; cursor: pointer; font-family: inherit; }
.btn-secondary { width: 100%; background: rgba(255,255,255,.06); color: var(--ink); border: 1px solid var(--glass-border); padding: 13px; border-radius: 12px; font-weight: 700; font-size: 14px; margin-top: 18px; cursor: pointer; font-family: inherit; }

/* ---------- QR overlay ---------- */
.qr-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.8); z-index: 55; display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(4px); }
.qr-card { background: #10241b; border: 1px solid var(--glass-border); border-radius: 24px; padding: 26px; text-align: center; max-width: 380px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.qr-card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--mint); }
.qr-hint { font-size: 11.5px; color: var(--muted); margin-bottom: 16px; }
.qr-img-wrap { background: #fff; border-radius: 16px; padding: 16px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--glass-border); }
.qr-img-wrap img { width: 240px; height: 240px; max-width: 100%; }

/* ---------- Brochure viewer overlay (กดสไลด์แล้วเปิด) ---------- */
.brochure-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 56; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.brochure-card { width: 100%; max-width: 380px; background: #10241b; border: 1px solid var(--glass-border); border-radius: 18px; overflow: hidden; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.brochure-cover { height: 150px; overflow: hidden; background-color: rgba(255,255,255,.06); }
.brochure-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brochure-info { padding: 16px; }
.brochure-title { font-weight: 700; font-size: 13.5px; color: var(--ink); margin-bottom: 4px; }
.brochure-hint { font-size: 10.5px; color: var(--muted); line-height: 1.5; margin-bottom: 12px; }
.brochure-open-btn { display: block; text-align: center; text-decoration: none; width: 100%; border: none; background: var(--mint); color: #08150f; padding: 11px; border-radius: 10px; font-weight: 700; font-size: 12px; font-family: inherit; cursor: pointer; }
.brochure-close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(0,0,0,.4); color: #fff; font-size: 16px; cursor: pointer; z-index: 2; line-height: 1; }
/* หน้าจอใหญ่ (PC/แท็บเล็ต) — การ์ดโบรชัวร์เดิมล็อกไว้แค่ 380px ทำให้ดูเล็กจิ๋วเมื่อเทียบกับจอกว้างๆ
   ขยายทั้งกล่องและรูปปกให้สมส่วนกับหน้าจอมากขึ้นตามช่วงความกว้าง */
@media (min-width: 768px) {
  .brochure-card { max-width: 520px; }
  .brochure-cover { height: 260px; }
  .brochure-title { font-size: 16px; }
  .brochure-hint { font-size: 12px; }
  .brochure-open-btn { font-size: 13.5px; padding: 13px; }
}
@media (min-width: 1400px) {
  .brochure-card { max-width: 640px; }
  .brochure-cover { height: 320px; }
}

/* ---------- Image preview overlay ---------- */
#imageOverlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 60;
  align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(5px);
}
#imageOverlay img { max-width: 100%; max-height: 80vh; border-radius: 14px; box-shadow: 0 0 30px rgba(0,0,0,.5); }
.overlay-hint { position: absolute; bottom: 30px; color: #fff; font-size: 10px; background: rgba(0,0,0,.5); padding: 8px 16px; border-radius: 20px; }

/* ---------- ปุ่มติดต่อด่วนลอย (FAB) + แผ่นรายชื่อผู้ติดต่อ ---------- */
.contact-fab {
  position: fixed; right: 16px; bottom: 84px; width: 52px; height: 52px; border-radius: 50%;
  background: var(--mint); color: #08150f; border: none; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.4); z-index: 34; cursor: pointer;
}
.contact-fab:active { transform: scale(.94); }
.selection-bar:not(.hidden) ~ .contact-fab { bottom: 148px; }

/* ปุ่มลอยแชร์ลิงก์เว็บทั้งหมดผ่าน LINE — วางซ้อนอยู่เหนือปุ่มติดต่อด่วน (.contact-fab) เสมอ แสดงตลอดเวลา
   ไม่ต้องรอโหลดข้อมูลใดๆ ก่อน (ต่างจาก .contact-fab ที่ซ่อนไว้จนกว่าจะรู้ว่ามีช่องทาง/ผู้ติดต่อให้แสดง)
   ใช้สีเขียว LINE ตรงตามโลโก้จริง (ไม่ใช่สีมิ้นต์ของแบรนด์ ตั้งใจให้แยกจากปุ่มติดต่อด่วนชัดเจน) */
.share-web-fab {
  position: fixed; right: 16px; bottom: 146px; width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #06C755, #04a344); color: #fff; border: none; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.4); z-index: 34; cursor: pointer;
}
.share-web-fab:active { transform: scale(.94); }
.selection-bar:not(.hidden) ~ .share-web-fab { bottom: 210px; }
.contact-sheet {
  position: fixed; right: 16px; bottom: 148px; width: 260px; max-width: calc(100vw - 32px);
  background: rgba(8,21,15,.92); backdrop-filter: blur(14px); border: 1px solid var(--glass-border);
  border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.5); z-index: 35; overflow: hidden;
}
.contact-sheet-head {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 14px;
  border-bottom: 1px solid var(--glass-border); color: var(--mint); font-weight: 700; font-size: 12.5px;
}
.contact-sheet-close { border: none; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.contact-sheet-list { padding: 6px 8px; max-height: 45vh; overflow-y: auto; }
.contact-row { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px solid var(--glass-border); }
.contact-row:last-child { border-bottom: none; }
.contact-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--glass-strong); color: var(--mint);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.contact-meta { flex: 1; min-width: 0; }
.contact-name { font-size: 12.5px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-role { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-call-btn {
  display: flex; align-items: center; gap: 6px; background: var(--mint); color: #08150f; text-decoration: none;
  font-size: 11px; font-weight: 700; padding: 7px 10px; border-radius: 10px; flex-shrink: 0; white-space: nowrap;
}
.contact-no-phone { font-size: 10px; color: var(--muted); flex-shrink: 0; }

/* ---------- แบบฟอร์มแก้ไขผู้ติดต่อด่วน (แอดมิน) — เพิ่ม/ลบคนได้อิสระ ไม่ล็อกจำนวนคนตายตัวอีกต่อไป ---------- */
.contact-admin-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.contact-admin-row { display: grid; grid-template-columns: auto 1fr 1fr 1fr auto; gap: 6px; align-items: center; }
.contact-admin-row input {
  padding: 9px 8px; border-radius: 9px; border: 1px solid var(--glass-border); outline: none;
  background: rgba(255,255,255,.04); color: var(--ink); font-size: 11.5px; font-family: inherit; min-width: 0;
}
.contact-admin-row input::placeholder { color: var(--muted); }
.contact-admin-row button {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid rgba(255,107,94,.4); background: rgba(255,255,255,.04);
  color: var(--danger); font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer;
}
.contact-add-btn { margin-bottom: 4px; }

/* ---------- ปุ่มช่องทางออนไลน์ของบริษัท (LINE OA / Facebook) ในแผ่นติดต่อด่วน — อยู่บนสุด แยกจากรายชื่อพนักงานด้วย .channel-divider ---------- */
.channel-btns { display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 2px; }
.channel-btn {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 12px; text-decoration: none;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.channel-btn-line { background: linear-gradient(135deg, #06C755, #04a344); box-shadow: 0 6px 16px rgba(6,199,85,.32); }
.channel-btn-fb { background: linear-gradient(135deg, #1877F2, #0f5bc4); box-shadow: 0 6px 16px rgba(24,119,242,.32); }
.channel-btn-icon {
  width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.22); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff;
}
.channel-btn-label { font-size: 11px; font-weight: 700; color: #fff; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-btn-arrow { color: #fff; font-size: 10px; opacity: .85; flex-shrink: 0; }
.channel-divider {
  margin: 8px 10px 2px; font-size: 9px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); font-weight: 700;
}

/* ---------- เมนูหลัก: ไอคอน "ช่องทางออนไลน์" ไล่เฉดเขียว LINE → ฟ้า Facebook ให้ต่างจากไอคอนสีพื้นเดียวอื่นๆ ---------- */
.channel-menu-icon { background: linear-gradient(135deg, #06C755, #1877F2); }

/* ---------- หน้าแอดมิน "ช่องทางออนไลน์" — ตั้งค่าปุ่ม LINE OA / Facebook ---------- */
.channel-admin-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.channel-admin-block {
  border-radius: 12px; padding: 10px; border: 1px solid var(--glass-border); background: rgba(255,255,255,.03);
}
.channel-admin-line { border-color: rgba(6,199,85,.35); background: rgba(6,199,85,.07); }
.channel-admin-fb { border-color: rgba(24,119,242,.35); background: rgba(24,119,242,.08); }
.channel-admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.channel-admin-title { font-size: 11.5px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.channel-admin-line .channel-admin-title { color: #5be08c; }
.channel-admin-fb .channel-admin-title { color: #7fb1fb; }
.channel-admin-block input {
  width: 100%; padding: 9px 9px; border-radius: 9px; border: 1px solid var(--glass-border); outline: none;
  background: rgba(255,255,255,.04); color: var(--ink); font-size: 11.5px; font-family: inherit; margin-bottom: 6px;
}
.channel-admin-block input:last-of-type { margin-bottom: 0; }
.channel-admin-block input::placeholder { color: var(--muted); }
.channel-admin-hint { font-size: 10px; color: var(--muted); line-height: 1.6; padding: 2px 2px 8px; }
.channel-toggle { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; cursor: pointer; }
.channel-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.channel-toggle-track {
  position: absolute; inset: 0; border-radius: 99px; background: rgba(255,255,255,.15); transition: background .15s;
}
.channel-toggle-track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--muted); transition: transform .15s, background .15s;
}
.channel-toggle input:checked ~ .channel-toggle-track { background: var(--mint); }
.channel-toggle input:checked ~ .channel-toggle-track::after { transform: translateX(16px); background: #08150f; }

/* ---------- หน้าสรุปสำหรับแอดมิน ---------- */
.stats-loading { font-size: 11.5px; color: var(--muted); padding: 10px 2px; }
.stats-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.stats-tile {
  background: rgba(255,255,255,.04); border: 1px solid var(--glass-border); border-radius: 12px; padding: 12px 10px; text-align: center;
}
.stats-tile-num { font-size: 18px; font-weight: 800; color: var(--mint); font-family: "Space Grotesk", "Chakra Petch", sans-serif; }
.stats-tile-label { font-size: 10px; color: var(--muted); margin-top: 3px; }
.stats-bars-title { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; letter-spacing: .3px; }
.stats-bar-row { display: grid; grid-template-columns: 84px 1fr 26px; align-items: center; gap: 8px; margin-bottom: 8px; }
.stats-bar-label { font-size: 10.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-bar-track { height: 8px; border-radius: 4px; background: var(--glass-border); overflow: hidden; }
.stats-bar-fill { height: 100%; background: var(--mint); border-radius: 4px; }
.stats-bar-count { font-size: 10.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- แบนเนอร์ "เพิ่มลงหน้าจอหลัก" ---------- */
.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; max-width: 500px; margin: 0 auto;
  background: rgba(8,21,15,.92); backdrop-filter: blur(14px); border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 12px 12px 12px 14px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 14px 30px rgba(0,0,0,.4); z-index: 33; color: var(--ink);
}
.install-banner-icon { color: var(--mint); font-size: 18px; flex-shrink: 0; }
.install-banner-text { flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.4; }
.install-banner-btn {
  background: var(--mint); color: #08150f; border: none; border-radius: 9px; padding: 9px 14px;
  font-weight: 700; font-size: 11.5px; flex-shrink: 0; cursor: pointer; font-family: inherit;
}
.install-banner-close { border: none; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; flex-shrink: 0; }

@media print { .no-print { display: none !important; } }

/* ==========================================================================
   Responsive scaling — มือถือ / แท็บเล็ต / คอมพิวเตอร์ / จอทีวี
   ========================================================================== */
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
  .hdr-title { font-size: 19px; }
  .card-img { height: 160px; }
  .card-title { font-size: 13.5px; }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .hdr-title { font-size: 21px; }
}
@media (min-width: 1400px) {
  .grid { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 20px; }
  .card-img { height: 200px; }
  .hdr-title { font-size: 26px; }
  .search-box input { font-size: 16px; }
  .tab-pill { font-size: 14px; padding: 9px 20px; }
}
@media (min-width: 1800px) {
  .grid { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 26px; }
  .card-img { height: 260px; }
  .hdr-title { font-size: 32px; }
  .card-title { font-size: 17px; }
}
