/* =========================================================
   Suriya9 — main stylesheet
   แปลงจาก Figma (node 264:907 "Home") ให้ตรงดีไซน์
   ========================================================= */

/* ---------- Fonts ---------- */
/* Sao Chingcha — ฟอนต์ display สำหรับหัวข้อใหญ่ */
@font-face {
  font-family: "Sao Chingcha";
  src: url("../fonts/SaoChingcha-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sao Chingcha";
  src: url("../fonts/SaoChingcha-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sao Chingcha";
  src: url("../fonts/SaoChingcha-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Sukhumvit Set — ฟอนต์ body/UI */
@font-face {
  font-family: "Sukhumvit Set";
  src: url("../fonts/SukhumvitSet-Thin.woff2?v=2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sukhumvit Set";
  src: url("../fonts/SukhumvitSet-Light.woff2?v=2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sukhumvit Set";
  src: url("../fonts/SukhumvitSet-Text.woff2?v=2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sukhumvit Set";
  src: url("../fonts/SukhumvitSet-Medium.woff2?v=2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sukhumvit Set";
  src: url("../fonts/SukhumvitSet-SemiBold.woff2?v=2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sukhumvit Set";
  src: url("../fonts/SukhumvitSet-Bold.woff2?v=2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --font-display: "Sao Chingcha", "Sukhumvit Set", sans-serif;
  --font-body: "Sukhumvit Set", -apple-system, "Segoe UI", sans-serif;

  --gold:        #cea934;
  --gold-text:   #bd9a4b;
  --gold-deep:   #94641e;
  --gold-soft:   #a67c1e;
  --ink:         #2e2e2e;
  --white:       #ffffff;
  --glass-bg:    rgba(149, 149, 149, 0.2);
  --glass-border:#ffffff;

  --pad-x: 64px;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px; /* header สูง 83px → กดลิงก์ไปส่วนอื่น (#anchor) เว้นด้านบน 90px ทั้งเว็บ */
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

/* ===== Scroll-reveal อนิเมชั่น (ใช้ทุกหน้า) ===== */
.has-reveal .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.has-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .has-reveal .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* เต็มความกว้างจอ — เนื้อหาแต่ละ section จัดกึ่งกลางเอง */
.s9-page {
  position: relative;
  width: 100%;
  margin: 0 auto;
  background: var(--white);
}

/* =========================================================
   HEADER  (Figma node 264:1750)
   ========================================================= */
.s9-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 90;
  display: flex;
  align-items: center;
  padding: 24px var(--pad-x) 0;
  transition: padding 0.25s ease;
}
/* ย่อ padding ลงเล็กน้อยเมื่อเลื่อน (ผ่าน JS ใส่ .is-scrolled) */
.s9-header.is-scrolled { padding-top: 12px; padding-bottom: 12px; }

.s9-header__inner {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* กล่องโลโก้ทรงกระจกฝ้า */
.s9-logo {
  position: relative;
  flex-shrink: 0;
  width: 100px;
  height: 83px;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.s9-logo img {
  width: 56px;
  height: 63px;
  object-fit: contain;
  object-position: bottom;
  opacity: 0.8;
}

/* แถบเมนูทรงกระจกฝ้า */
.s9-nav {
  flex: 1 0 0;
  min-width: 0;
  height: 83px;
  display: flex;
  align-items: center;
  padding: 10px 54px;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.s9-nav__row {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}
.s9-nav__menu {
  display: flex;
  align-items: center;
  gap: 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  line-height: 26.25px;
  text-align: center;
  white-space: nowrap;
}
.s9-nav__menu a {
  color: var(--ink);
  transition: color 0.2s ease;
}
.s9-nav__menu a:hover { color: var(--gold-deep); }
/* หน้าปัจจุบัน — รองรับทั้ง fallback (.is-active) และเมนู WordPress จริง (current-*) */
.s9-nav__menu > li > a.is-active,
.s9-nav__menu > li.current-menu-item > a,
.s9-nav__menu > li.current_page_item > a,
.s9-nav__menu > li.current-menu-parent > a,
.s9-nav__menu > li.current-menu-ancestor > a,
.s9-nav__menu > li.current_page_parent > a,
.s9-nav__menu > li.current_page_ancestor > a {
  color: var(--gold-deep);
  text-shadow: 0 4px 20px rgba(255, 255, 255, 0.5);
}

/* ===== Dropdown เมนู (hover) ===== */
.s9-nav__menu { height: 100%; }
.s9-nav__menu > li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
/* ลูกศรบอกว่ามีเมนูย่อย */
.s9-nav__menu > li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
  opacity: 0.75;
}
/* กล่องเมนูย่อยเปิด → ลูกศรหมุนกลับหัวชี้ขึ้น */
.s9-nav__menu > li.menu-item-has-children:hover > a::after {
  transform: translateY(2px) rotate(-135deg);
}
/* ปุ่มพับ/กางเมนูย่อย — ใช้เฉพาะในลิ้นชักมือถือ (main.js สร้าง) */
.s9-sub-toggle { display: none; }
/* กล่อง dropdown */
.s9-nav__menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0; /* ขอบซ้ายของกล่อง = จุดเริ่มของชื่อเมนู */
  transform: translateY(10px);
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  padding: 6px;
  background: var(--white);
  border: 1px solid rgba(206, 169, 52, 0.3);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 100;
}
/* สะพาน hover กันเมนูปิดตอนเลื่อนเมาส์ลง */
.s9-nav__menu .sub-menu::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}
.s9-nav__menu > li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(2px);
}
.s9-nav__menu .sub-menu li { width: 100%; }
.s9-nav__menu .sub-menu a {
  display: block;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
  text-align: left;
  transition: background 0.18s ease, color 0.18s ease;
}
.s9-nav__menu .sub-menu a:hover,
.s9-nav__menu .sub-menu > li.menu-item-has-children:hover > a {
  background: #f7f0e1;
  color: var(--gold-deep);
}

/* ===== เมนูชั้นที่ 3 (สินค้า › หีบศพ › หมวด) — กางออกด้านขวาของกล่องแรก ===== */
.s9-nav__menu .sub-menu > li { position: relative; }
.s9-nav__menu .sub-menu > li.menu-item-has-children > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.s9-nav__menu .sub-menu > li.menu-item-has-children > a::after {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #b8923a;
  border-bottom: 1.5px solid #b8923a;
  transform: rotate(-45deg);
}
.s9-nav__menu .sub-menu .sub-menu {
  top: -7px;
  left: 100%;
  min-width: 190px;
  margin-left: 10px;
  transform: translateX(6px);
}
.s9-nav__menu .sub-menu .sub-menu::before {
  top: 0;
  bottom: 0;
  left: -12px;
  right: auto;
  width: 12px;
  height: auto;
}
.s9-nav__menu .sub-menu > li:hover > .sub-menu,
.s9-nav__menu .sub-menu > li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

/* ===== Animation ของ header ===== */
@media (prefers-reduced-motion: no-preference) {
  /* (3) เปิดหน้า: โลโก้ + แถบเมนูค่อย ๆ เลื่อนลงมา 1 ครั้ง
     จบแล้วไม่เหลือ transform ค้าง (fill: backwards) — ลิ้นชักเมนูมือถือที่เป็น position:fixed จึงไม่ถูกขัง */
  .s9-header__inner { animation: s9-header-in 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) 0.05s backwards; }

  /* (4) เมนูย่อย: รายการไล่ขึ้นทีละบรรทัดตอนกล่องเปิด — เฉพาะจอใหญ่ (ลิ้นชักมือถือกางตลอด) */
  @media (min-width: 1200px) {
    .s9-nav__menu .sub-menu > li {
      opacity: 0;
      transform: translateY(6px);
      transition: opacity 0.15s ease, transform 0.15s ease;
    }
    .s9-nav__menu li:hover > .sub-menu > li,
    .s9-nav__menu li:focus-within > .sub-menu > li {
      opacity: 1;
      transform: none;
      transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
    }
    .s9-nav__menu li:hover > .sub-menu > li:nth-child(1), .s9-nav__menu li:focus-within > .sub-menu > li:nth-child(1) { transition-delay: 0.04s; }
    .s9-nav__menu li:hover > .sub-menu > li:nth-child(2), .s9-nav__menu li:focus-within > .sub-menu > li:nth-child(2) { transition-delay: 0.08s; }
    .s9-nav__menu li:hover > .sub-menu > li:nth-child(3), .s9-nav__menu li:focus-within > .sub-menu > li:nth-child(3) { transition-delay: 0.12s; }
    .s9-nav__menu li:hover > .sub-menu > li:nth-child(4), .s9-nav__menu li:focus-within > .sub-menu > li:nth-child(4) { transition-delay: 0.16s; }
    .s9-nav__menu li:hover > .sub-menu > li:nth-child(5), .s9-nav__menu li:focus-within > .sub-menu > li:nth-child(5) { transition-delay: 0.2s; }
    .s9-nav__menu li:hover > .sub-menu > li:nth-child(6), .s9-nav__menu li:focus-within > .sub-menu > li:nth-child(6) { transition-delay: 0.24s; }
    .s9-nav__menu li:hover > .sub-menu > li:nth-child(n+7), .s9-nav__menu li:focus-within > .sub-menu > li:nth-child(n+7) { transition-delay: 0.28s; }
  }
}
@keyframes s9-header-in {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: none; }
}

/* ปุ่มติดต่อเรา */
.s9-btn-contact {
  flex-shrink: 0;
  width: 190px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  background: var(--white);
  border: 1px solid var(--gold);
  border-radius: 100px;
  filter: drop-shadow(0 10px 12px rgba(166, 124, 30, 0.4));
  color: var(--gold-text);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.16px;
  line-height: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* แถบเมนูจอใหญ่: เมนูหลัก 9 รายการ (เพิ่ม "จัดดอกไม้งานศพ") — บีบระยะ/ปุ่มให้พอดี ไม่ทับปุ่มติดต่อเรา
   (≤1199px เป็นลิ้นชักมือถือ ไม่เกี่ยว) */
@media (min-width: 1200px) {
  .s9-nav { padding: 10px 28px; }
  .s9-nav__row { gap: 20px; padding: 0; }
  .s9-nav__menu { gap: 20px; font-size: 16px; }
  .s9-btn-contact { width: auto; padding: 13px 26px; }
}
@media (min-width: 1200px) and (max-width: 1439px) {
  .s9-nav { padding: 10px 20px; }
  .s9-nav__menu { gap: 14px; font-size: 15px; }
  .s9-btn-contact { padding: 12px 20px; font-size: 15px; }
}
@media (min-width: 1200px) and (max-width: 1299px) {
  .s9-nav { padding: 10px 18px; }
  .s9-nav__row { gap: 14px; }
  .s9-nav__menu { gap: 11px; font-size: 14px; }
}
.s9-btn-contact:hover { transform: translateY(-1px); }

/* =========================================================
   ปุ่ม reusable
   ========================================================= */
.s9-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  border-radius: 100px;
  border: 1px solid var(--glass-border);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.16px;
  line-height: 16px;
  white-space: nowrap;
  cursor: pointer;
  filter: drop-shadow(0 10px 12px rgba(166, 124, 30, 0.4));
  transition: transform 0.2s ease, filter 0.2s ease;
}
.s9-btn:hover { transform: translateY(-1px); }

.s9-btn--gold {
  background-image: linear-gradient(93.55deg, #a67c1e 1.52%, #d4af37 99.43%);
  color: #fffdf6;
}
.s9-btn--outline {
  width: 190px;
  background: var(--white);
  border-color: var(--gold);
  color: var(--gold-text);
}

/* =========================================================
   HERO  (Figma nodes 264:911 / 264:912 / 473:2969)
   ========================================================= */
.s9-hero {
  position: relative;
  width: 100%;
  height: 720px;
  background-image: url("../images/home/funeral-hero-background.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.s9-hero::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
  to bottom,
  #d9d9d900 20%,
  #e8e8e840 50%,
  #e8e8e855 80%,
  #e8e8e850 90%,
  #ffffff 100%
);
  z-index: 0;
  pointer-events: none;
}

/* บล็อกเนื้อหา hero — เริ่มที่ y=246 ตาม Figma */
.s9-hero__content {
  position: absolute;
  top: 246px;
  left: 0;
  width: 100%;
  height: 232px;
}

.s9-hero__text {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 593px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.s9-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 70px;
  line-height: 84px;
  color: #5c3a21;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  -webkit-text-stroke: 1.5px #ffffff90;
}
.s9-hero__subtitle {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 24px;
  line-height: 1.35;
  color: #333333;
  text-shadow: 0 4px 16px #fff0da;
  -webkit-text-stroke: .5px #fff;
}

.s9-hero__actions {
  position: absolute;
  top: 192px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
}

/* =========================================================
   ปุ่มลอยติดต่อ (sticky/fixed)  (Figma node 348:2818)
   ========================================================= */
.s9-floating {
  position: fixed;
  right: 24px;
  bottom: 40px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.s9-floating a {
  display: block;
  width: 90px;
  height: 90px;
  transition: transform 0.2s ease;
}
.s9-floating a:hover { transform: scale(1.06); }
.s9-floating img { width: 90px; height: 90px; }

/* =========================================================
   QUOTE / แนะนำบริการ  (Figma node 331:1074 + bg 2010:2516)
   ========================================================= */
.s9-quote {
  position: relative;
  padding: 40px 0 56px;
  overflow: hidden;
  background: var(--white);
}
/* เฟดขาวไล่จางด้านล่าง — กลบขอบกรอบพื้นหลังลายดอกไม้ */
.s9-quote::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--white) 85%);
  z-index: 0;
  pointer-events: none;
}
/* พื้นหลังลายดอกไม้ทอง (flatten จาก Figma) — ยืดเต็มความกว้างจอ */
.s9-quote__bg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  min-width: 1440px;
  height: auto;
  max-width: none;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.s9-quote__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
}
.s9-quote__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.2;
  color: #8c0e0f;
  text-align: center;
  white-space: nowrap;
}
.s9-quote__row {
  display: flex;
  align-items: flex-start;
  gap: 64px;
  width: 958px;
  max-width: 100%;
}
.s9-quote__photo {
  flex-shrink: 0;
  width: 424px;
  height: 335px;
  border: 4px solid var(--white);
  border-radius: 0 100px 0 100px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  background: #d9d9d9;
}
.s9-quote__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.s9-quote__content {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 9px;
}
.s9-quote__lead {
  margin: 0;
  font-family: var(--font-body);
  font-size: 24px;
  letter-spacing: 0.24px;
  color: #333333;
  font-weight: 500;
}
.s9-quote__lead strong {
  color: #8c0e0f;
  font-weight: 600;
}
.s9-quote__desc {
  margin: 0;
  max-width: 476px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.18px;
  color: #333333;
}
.s9-quote__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.s9-quote__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.18px;
  color: #333333;
}
/* ไอคอนลายดอก (crop จากสไปรต์ Figma) */
.s9-emblem {
  position: relative;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.s9-emblem img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

/* =========================================================
   ส่วนที่ใช้ซ้ำ: หัวข้อ section + เส้นคั่นลายทอง
   ========================================================= */
.s9-section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.s9-section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.15;
  color: #8c0e0f;
}
.s9-section-sub {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.6;
  color: #545454;
}

/* เส้นคั่นลายทอง (Figma node 264:1056) */
.s9-divider {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 0 var(--pad-x);
}
.s9-divider__line {
  flex: 1 0 0;
  min-width: 0;
  height: 1.5px;
  background: linear-gradient(to right, #bd9a4b, #d1ab35);
}
.s9-divider__orn {
  flex-shrink: 0;
  width: 150px;
  height: 73px;
  object-fit: contain;
  transform: rotate(180deg);
}

/* =========================================================
   PROMOTION  (Figma node 264:1055)
   ========================================================= */
.s9-promo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  padding: 24px 0 12px;
  background: var(--white);
  overflow: hidden;
}
/* พื้นหลังลายดอกไม้ทอง (ด้านขวา) — Figma node 264:1049 */
.s9-promo__bg {
  position: absolute;
  top: 10%;
  right: 0px;
  max-width: none;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.s9-promo > .s9-divider,
.s9-promo > .s9-promo__body {
  position: relative;
  z-index: 1;
}
.s9-promo__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}
.s9-promo__cards {
  display: flex;
  align-items: center;
  gap: 24px;
}
.s9-promo__card {
  flex-shrink: 0;
  width: 410px;
  height: 565px;
  border: 4px solid var(--white);
  border-radius: 20px;
  overflow: hidden;
  background: #f3f3f3;
}
.s9-promo__card--tall { height: 600px; }
.s9-promo__card img {
  width: 100%;
  height: 100%;
}

/* จุดสไลด์ (Figma node 331:1181) */
.s9-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.s9-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d9c48f;
  display: block;
}
.s9-dots span.is-active { background: var(--gold); }

/* =========================================================
   PACKAGES / แพ็กเกจการจัดงานศพ  (Figma nodes 331:1272 + 331:1279 + 331:1201)
   ========================================================= */
.s9-packages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 32px 0 36px;
  background: var(--white);
}
.s9-packages__grid {
  display: flex;
  gap: 24px;
  padding: 0 var(--pad-x);
}
.s9-pkg-card {
  position: relative;
  flex-shrink: 0;
  width: 421.33px;
  height: 423px;
  overflow: hidden;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.16));
}
.s9-pkg-card--start   { border-radius: 100px 0 0 8px; }
.s9-pkg-card--premium { border-radius: 0 0 100px 0; }

/* เส้นทองไล่เฉดด้านล่าง — เหมือนกันทั้ง 3 ใบ */
.s9-pkg-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  background: linear-gradient(to right, #a67c1e, #d4af37);
  z-index: 1;
  pointer-events: none;
}
/* กรอบเส้นด้านใน (margin frame) */
.s9-pkg-card::before {
  content: "";
  position: absolute;
  inset: 10px 10px 16px 10px;
  background: linear-gradient(to bottom, #ffffff, rgb(255 255 255 / 0%) 250px), linear-gradient(to top, #ffffff85, rgba(255, 255, 255, 0));
  border-radius: 0;
  z-index: 1;
  pointer-events: none;
}
.s9-pkg-card--start::before   { border-radius: 88px 0 0 0; }
.s9-pkg-card--premium::before { border-radius: 0 0 88px 0; }

.s9-pkg-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* white wash เพื่อให้อ่านข้อความได้ (2 gradient ซ้อน ตาม Figma) */
.s9-pkg-card__wash {
  background: linear-gradient(to bottom, #ffffff00, rgb(255 255 255 / 10%) 264px), linear-gradient(to top, #ffffff, rgb(255 255 255 / 0%));
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.s9-pkg-card__body {
  position: absolute;
  top: 117px;
  left: 0;
  width: 100%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  padding: 0 8px;
  text-align: center;
}
.s9-pkg-card__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}
.s9-pkg-card__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.1;
  color: #71490e;
}
.s9-pkg-card__desc {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  color: #545454;
}
.s9-pkg-card__price {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 48px;
  line-height: 1;
  color: #8c0e0f;
}
.s9-packages__action {
  display: flex;
  justify-content: center;
}

/* =========================================================
   PRODUCTS / โลงศพคุณภาพ  (Figma node 331:1408)
   ========================================================= */
.s9-products {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 28%, #faf4ec 52%, #f6eee1 78%, #f4ebdd 100%);
  padding: 24px 0 24px;
  overflow: hidden;
  border-bottom: 1.5px solid rgba(206, 169, 52, 0.4);
}
.s9-products__bottom-divider { width: 100%; margin-top: 40px; }
.s9-products__inner {
  position: relative;
  max-width: 1294px;
  margin: 0 auto;
  padding: 0 12px;
}
/* ลายมุม (crop จากสไปรต์ 4096 — คมชัด) วางอิงขอบ section ที่ x=64 */
.s9-products__corner {
  position: absolute;
  top: 170px;
  width: 112px;
  height: auto;
  z-index: 1;
  pointer-events: none;
}
.s9-products__corner--tl { left: 64px; }
.s9-products__corner--tr { right: 64px; }

.s9-products .s9-section-head { margin: 65px 0; }

.s9-cat { margin-top: 8px; }
.s9-cat + .s9-cat { margin-top: 40px; }
.s9-cat__label {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
  color: #8c0e0f;
}
.s9-cat__labelrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.s9-cat__labelrow .s9-cat__label { margin: 0; }

.s9-cat__row {
  display: flex;
  align-items: flex-start;
  gap: 46px;
  margin-bottom: 36px;
}
.s9-cat__intro {
  flex-shrink: 0;
  width: 209px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-top: 40px;
}
.s9-cat__intro p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
  color: #000000;
}
.s9-cat__intro .s9-brand { color: var(--gold-text); }
.s9-cat__intro .s9-btn { align-self: flex-start; }

.s9-coffin-grid {
  display: flex;
  gap: 21px;
}
.s9-coffin {
  width: 242px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.s9-coffin__box {
  width: 242px;
  height: 233px;
  border: 2px solid #ffd066;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* รูปโลงศพ — จัดกลางกล่อง (ตาม export จริง) */
.s9-coffin__box img {
  max-width: 220px;
  max-height: 200px;
  object-fit: contain;
}
/* caption — ใต้กล่อง */
.s9-coffin__name {
  text-align: center;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.3;
  color: #000000;
}

/* หีบศพยอดนิยม — ชื่อยาว 1–2 บรรทัด: จองที่ 2 บรรทัดเท่ากันทุกใบ (ชื่อสั้นอยู่กลางแนวตั้ง) → ราคาตรงแนวเดียวกัน */
.s9-popular .s9-coffin__name {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.6em;
}
/* จอใหญ่: การ์ดกว้าง 242px — ลดเหลือ 15px ชื่อยาวสุดตอนนี้ (~238px) อยู่บรรทัดเดียว · ยาวกว่านั้นตัด … */
@media (min-width: 1200px) {
  .s9-popular .s9-coffin__name {
    display: block;
    min-height: 0;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
/* ใต้ชื่อ (หีบศพยอดนิยม): ราคาตัวใหญ่เด่น — ไม่ได้กรอก = สอบถามราคา */
.s9-coffin__price {
  margin-top: -8px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.2;
  color: #2b2b2b;
}
.s9-coffin__price.is-ask { color: var(--gold-text); } /* ขนาด/น้ำหนักเท่าราคา → แนวตรงกัน */

/* =========================================================
   POPULAR / หีบศพยอดนิยม (หน้าแรก — ในส่วนโลงศพคุณภาพ ก่อนหัวข้อ)
   ========================================================= */
.s9-popular {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 24px;
}
.s9-products .s9-popular .s9-section-head { margin: 65px 0 40px; }
/* มีหีบศพยอดนิยม: ยกลายมุมทองขึ้น (เดิม top 170px) ให้พ้นแถวการ์ด */
@media (min-width: 1200px) {
  .s9-products:has(.s9-popular) .s9-products__corner { top: 110px; }
}
.s9-popular .s9-coffin-grid { justify-content: center; width: 100%; }
.s9-popular__btn { margin-top: 36px; }

/* =========================================================
   ABOUT / เกี่ยวกับเรา  (Figma section)
   ========================================================= */
.s9-about {
  position: relative;
  overflow: hidden;
  margin-top: 56px;
  padding: 0 0 24px;
  background: var(--white);
}
.s9-about__rose {
  position: absolute;
  top: 40px;
  height: 530px;
  width: auto;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.s9-about__rose--l { left: 0; }
.s9-about__rose--r { right: 0; }

.s9-about__inner {
  position: relative;
  z-index: 1;
  max-width: 1312px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.s9-about .s9-section-head { padding-top:20px ;margin-bottom: 64px; }
.s9-about__row {
  display: flex;
  gap: 64px;
  align-items: flex-start;
}
.s9-about__photo {
  flex-shrink: 0;
  width: 460px;
  height: 460px;
  border: 4px solid var(--white);
  border-radius: 0 100px 8px 100px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}
.s9-about__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 100% 5%; }
.s9-about__text {
  flex: 1;
  padding-top: 48px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
}
.s9-about__text .s9-brand { color: #8c0e0f; font-weight: 600; }
.s9-about__text p { margin: 0; color: #001524; font-weight: 500; }
.s9-about__text p + p { margin-top: 16px; }
.s9-about__divider { margin-top: 40px; }

/* =========================================================
   PORTFOLIO / ผลงานของเรา  (Figma section)
   ========================================================= */
.s9-works {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  background: linear-gradient(to bottom, #ffffff, #fffefb 60%, #fff9ed);
}
.s9-works__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  padding: 0 var(--pad-x);
  margin-bottom: 40px;
}
.s9-works__head,
.s9-works__gallery,
.s9-works__action { position: relative; z-index: 1; }
/* แถบดอกไม้ประดับ — อยู่ล่างสุดของ section */
.s9-works__flowers {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
  z-index: 0;
}
.s9-works__rows {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px 0;
}
.s9-marquee { overflow: hidden; }
.s9-marquee__track {
  display: flex;
  gap: 20px;
  width: max-content;
}
.s9-marquee--left  .s9-marquee__track { animation: s9-marquee-left 60s linear infinite; }
.s9-marquee--right .s9-marquee__track { animation: s9-marquee-right 60s linear infinite; }
.s9-marquee:hover .s9-marquee__track { animation-play-state: paused; }
.s9-marquee__item {
  flex-shrink: 0;
  width: 222px;
  height: 167px;
  border-radius: 10px;
  overflow: hidden;
}
.s9-marquee__item img { width: 100%; height: 100%; object-fit: cover; }
a.s9-marquee__item { position: relative; display: block; cursor: zoom-in; }
a.s9-marquee__item::after { content: ""; position: absolute; inset: 0; padding: 3px; pointer-events: none; border-radius: inherit; background: linear-gradient(135deg, #a67c1e, #f3d77a 45%, #d4af37 60%, #a67c1e); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: 0; transition: opacity .25s; }
a.s9-marquee__item:hover::after, a.s9-marquee__item:focus-visible::after { opacity: 1; }
a.s9-marquee__item:focus-visible { outline: none; }
@keyframes s9-marquee-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes s9-marquee-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
.s9-works__action { display: flex; justify-content: center; margin-top: 40px; padding-bottom: 40px; }

/* =========================================================
   FOOTER  (ดีไซน์ใหม่: พื้นดำ + เส้นทองบน + แถบทองไล่เฉดล่างสุด)
   ========================================================= */
.s9-footer {
  position: relative;
  z-index: 1;
  background: #000;
  border-top: 2px solid #c8921c;
  padding: 44px var(--pad-x) 0;
}
.s9-footer__inner {
  max-width: 1312px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.s9-footer__top { display: flex; gap: 40px; align-items: flex-start; }

/* แบรนด์ (ซ้าย) */
.s9-footer__brand {
  width: 400px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.s9-footer__logo { display: flex; align-items: center; gap: 14px; }
.s9-footer__logo img { width: 72px; height: 80px; object-fit: contain; }
.s9-footer__logo span {
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.2px;
}
.s9-footer__desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.6;
}
.s9-footer__social { display: flex; align-items: center; gap: 22px; }
.s9-footer__social-label {
  margin-right: 6px;
  color: #e19c00;
  font-family: var(--font-display);
  font-size: 18px;
}
.s9-footer__social a { opacity: 0.75; transition: opacity 0.2s ease; }
.s9-footer__social a:hover { opacity: 1; }
.s9-footer__social img { width: 22px; height: 22px; }

/* คอลัมน์เมนู 4 ช่องเท่ากัน (ช่องสุดท้าย = เว็บไซต์ต่อ ไม่มีหัวข้อ) */
.s9-footer__menus {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 24px;
  padding-left: 48px;
}
.s9-footer__col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.s9-footer__col-title {
  margin: 0;
  color: #e19c00;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.2;
}
.s9-footer__col-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.5;
}
.s9-footer__col-list a { color: inherit; transition: color 0.2s ease; }
.s9-footer__col-list a:hover { color: #e19c00; }
.s9-footer__contact-item { display: flex; align-items: flex-start; gap: 12px; }
.s9-footer__phones { display: flex; flex-direction: column; gap: 4px; }
.s9-footer__phones a { color: inherit; transition: color 0.2s ease; }
.s9-footer__phones a:hover { color: #e19c00; }
.s9-footer__contact-item img { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; } /* ชิดบรรทัดแรก เมื่อที่อยู่ยาว 2 บรรทัด */

/* เส้นคั่นบาง + แถบทองล่างสุด */
.s9-footer__line { height: 1px; background: rgba(255, 255, 255, 0.12); }
.s9-footer__bar {
  height: 18px;
  margin: 18px calc(-1 * var(--pad-x)) 0;
  background: linear-gradient(90deg, #d6981c 0%, #f2c037 25%, #ffe87a 50%, #f2c037 75%, #d6981c 100%);
}

/* ลิงก์ครอบทั้งการ์ด (การ์ดสินค้า → หน้า single) */
.s9-cardlink { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.s9-coffin:has(> .s9-cardlink),
.dn-card:has(> .s9-cardlink) { position: relative; }
.s9-coffin:has(> .s9-cardlink):hover .s9-coffin__box,
.cf-card:has(> .s9-cardlink):hover { box-shadow: 0 8px 22px rgba(166, 124, 30, .28); }

/* =========================================================
   แพ็กเกจหน้าแรก (template-parts/sections/packages.php)
   คอม: การ์ดดอกไม้ 3 ใบเป็นปุ่มเลือก + สไลด์ใบปลิวของระดับที่เลือก
   มือถือ (≤767px): 3 แถว — แถบการ์ดดอกไม้เป็นหัวแถว + ใบปลิวปัดนิ้ว
   ========================================================= */
.s9-pkx { --s9-pkx-side: max(var(--pad-x), calc((100% - 1340px) / 2 + var(--pad-x))); width: 100%; }
.s9-pkx__tabs { display: flex; justify-content: center; gap: 24px; padding: 0 var(--s9-pkx-side); }

/* การ์ดดอกไม้ (ดีไซน์เดิมของการ์ดแพ็กเกจ) */
.s9-pkx-tier { position: relative; display: block; overflow: hidden; background: #f5efe2; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .16)); text-decoration: none; }
.s9-pkx-tier::before { content: ""; position: absolute; inset: 10px 10px 16px; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, #fff, rgb(255 255 255 / 0%) 60%), linear-gradient(to top, #ffffff85, rgba(255, 255, 255, 0)); }
.s9-pkx-tier::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; z-index: 1; pointer-events: none; background: linear-gradient(to right, #a67c1e, #d4af37); }
.s9-pkx-tier__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.s9-pkx-tier__wash { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, #fff, rgb(255 255 255 / 0%)); }
.s9-pkx-tier__body { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 0 14px; text-align: center; }
.s9-pkx-tier__head { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.s9-pkx-tier__name { font-family: var(--font-display); font-size: 34px; line-height: 1.1; color: #71490e; }
.s9-pkx-tier__desc { font-family: var(--font-body); font-size: 15px; line-height: 1.4; color: #545454; }
.s9-pkx-tier__price { display: flex; flex-direction: column; align-items: center; font-family: var(--font-display); font-size: 42px; line-height: 1; color: #8c0e0f; white-space: nowrap; }
.s9-pkx-tier__price small { margin-bottom: 6px; font-family: var(--font-body); font-size: 13px; color: #8a7a5c; }
.s9-pkx-tier__more { display: inline-block; padding: 6px 16px; border-radius: 100px; background: linear-gradient(93deg, #a67c1e, #d4af37); color: #fff; font-family: var(--font-body); font-size: 13px; font-weight: 600; text-decoration: none; box-shadow: 0 4px 10px rgba(166, 124, 30, .25); }
.s9-pkx-tier--start { border-radius: 100px 0 0 8px; }
.s9-pkx-tier--start::before { border-radius: 88px 0 0 0; }
.s9-pkx-tier--standard { border-radius: 8px; }
.s9-pkx-tier--premium { border-radius: 8px 0 100px 0; }
.s9-pkx-tier--premium::before { border-radius: 0 0 88px 0; }

/* ปุ่มเลือก (คอม) */
.s9-pkx__tab { flex: 1 1 0; max-width: 400px; height: 300px; cursor: pointer; transition: transform .3s ease, opacity .3s ease, filter .3s ease; }
.s9-pkx__tab:not(.is-on) { opacity: .6; filter: grayscale(.35) drop-shadow(0 4px 5px rgba(0, 0, 0, .1)); }
.s9-pkx__tab:not(.is-on):hover { opacity: .85; }
.s9-pkx__tab.is-on { transform: translateY(-6px); outline: 3px solid #d4af37; outline-offset: 4px; }
.s9-pkx__tab:focus-visible { outline: 3px solid #a67c1e; outline-offset: 4px; }
.s9-pkx__tab .s9-pkx-tier__body { gap: 20px; }

/* แผงสไลด์ */
.s9-pkx__panels { position: relative; margin-top: 34px; }
.s9-pkx__panels::before { content: ""; position: absolute; top: -26px; left: var(--s9-pkx-arrow, 50%); width: 0; height: 0; border: 12px solid transparent; border-top-color: #d4af37; transform: translateX(-50%); transition: left .3s ease; }
.s9-pkx__panel { display: none; }
.s9-pkx__panel.is-on { display: block; }
.s9-pkx__band { display: none; }
.s9-pkx__top { display: flex; align-items: center; gap: 14px; margin: 0 0 10px; padding: 0 var(--s9-pkx-side); }
.s9-pkx__title { flex: 1; margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 28px; color: #8c0e0f; }
.s9-pkx__title small { margin-left: 8px; padding: 2px 10px; border-radius: 100px; background: #fdf3e3; font-family: var(--font-body); font-size: 13px; color: #94641e; vertical-align: middle; }
.s9-pkx__all { font-size: 15px; color: var(--gold-deep); text-decoration: none; white-space: nowrap; }
.s9-pkx__all:hover { color: #8c0e0f; }
.s9-pkx__nav { display: flex; gap: 8px; }
.s9-pkx__nav button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid #e6d3a3; border-radius: 50%; background: #fff; cursor: pointer; transition: background .25s ease; }
.s9-pkx__nav button:hover { background: var(--gold); }
.s9-pkx__nav button:hover svg { stroke: #fff; }
.s9-pkx__nav svg { width: 16px; height: 16px; fill: none; stroke: var(--gold-deep); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.s9-pkx__nav button.swiper-button-disabled { opacity: .35; cursor: default; }
.s9-pkx__nav button.swiper-button-disabled:hover { background: #fff; }
.s9-pkx__nav button.swiper-button-disabled:hover svg { stroke: var(--gold-deep); }
.s9-pkx__track.swiper { padding: 6px var(--s9-pkx-side) 18px; }
.s9-pkx__track .swiper-slide { width: 260px; height: auto; }

/* ใบปลิว */
.s9-pkx-card { position: relative; display: block; width: 100%; padding: 32px 0 0; border: 0; background: none; font: inherit; text-align: left; cursor: zoom-in; }
.s9-pkx-card__head { position: absolute; top: 0; left: 0; right: 0; height: 68px; display: flex; justify-content: space-between; gap: 8px; padding: 8px 14px 0; border-radius: 16px; background: linear-gradient(93deg, #a67c1e, #d4af37); color: #fff; font-family: var(--font-body); font-weight: 600; font-size: 13.5px; white-space: nowrap; box-shadow: 0 6px 10px rgba(166, 124, 30, .3); }
.s9-pkx-card__head span:first-child { overflow: hidden; text-overflow: ellipsis; }
.s9-pkx-card__frame { position: relative; z-index: 1; display: block; border: 3px solid #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 10px rgba(0, 0, 0, .14); transition: box-shadow .3s ease, transform .3s ease; }
.s9-pkx-card__frame img { display: block; width: 100%; height: auto; }
.s9-pkx-card:hover .s9-pkx-card__frame { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(90, 60, 15, .22); }

/* รูปใหญ่ */
.s9-pkx-lb { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(20, 14, 6, .86); cursor: zoom-out; }
.s9-pkx-lb.is-open { display: flex; }
.s9-pkx-lb img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .4); }
.s9-pkx-lb button { position: absolute; top: 14px; right: 16px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #94641e; font-size: 26px; line-height: 1; cursor: pointer; }

@media (max-width: 1100px) {
	.s9-pkx__tabs { gap: 16px; }
	.s9-pkx__tab { height: 260px; }
	.s9-pkx-tier__name { font-size: 28px; }
	.s9-pkx-tier__price { font-size: 34px; }
	.s9-pkx-tier__desc { font-size: 13.5px; }
	.s9-pkx__track .swiper-slide { width: 230px; }
}

/* มือถือ: เลิกปุ่มเลือก → 3 แถวเรียงลงมา */
@media (max-width: 767px) {
	.s9-pkx__tabs, .s9-pkx__top, .s9-pkx__panels::before { display: none; }
	.s9-pkx__panels { margin-top: 0; }
	.s9-pkx__panel, .s9-pkx__panel.is-on { display: block; }
	.s9-pkx__panel + .s9-pkx__panel { margin-top: 28px; }
	.s9-pkx__band { display: block; height: 150px; margin: 0 16px 6px; }
	/* ทุกแถบใช้กรอบเดียวกับแพ็กเกจเริ่มต้น (มุมโค้งซ้ายบน) */
	.s9-pkx__band.s9-pkx-tier { border-radius: 40px 0 0 8px; }
	.s9-pkx__band.s9-pkx-tier::before { border-radius: 32px 0 0 0; }
	/* ทุกใบวางตำแหน่งเดียวกัน (ไม่ขึ้นกับความยาวชื่อ): บน = ชื่อ · ล่าง = ปุ่มซ้าย + ราคาขวา */
	.s9-pkx__band .s9-pkx-tier__body { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name name" "more price"; align-content: center; align-items: end; gap: 10px 10px; padding: 16px 20px 24px; text-align: left; }
	.s9-pkx__band .s9-pkx-tier__head { grid-area: name; align-items: flex-start; }
	.s9-pkx__band .s9-pkx-tier__name { font-size: min(26px, 7vw); white-space: nowrap; }
	.s9-pkx__band .s9-pkx-tier__desc { display: none; }
	.s9-pkx__band .s9-pkx-tier__price { grid-area: price; align-items: flex-end; font-size: min(24px, 6.4vw); }
	.s9-pkx__band .s9-pkx-tier__price small { margin-bottom: 3px; font-size: 12px; }
	.s9-pkx__band .s9-pkx-tier__more { grid-area: more; justify-self: start; align-self: end; padding: 4px 12px; font-size: 12px; }
	.s9-pkx__track.swiper { padding: 8px 16px 14px; }
	.s9-pkx__track .swiper-slide { width: 70%; }
	.s9-pkx-card { padding-top: 28px; }
	.s9-pkx-card__head { height: 58px; padding: 7px 12px 0; border-radius: 14px; font-size: 12px; }
}

/* แพ็กเกจหน้าแรก: 4 กลุ่ม (เพิ่มโปรโมชั่นแนะนำ) + การ์ดแบบตัวอักษร (ยังไม่มีรูป) */
.s9-pkx__tabs--n4 { gap: 18px; padding: 0 max(var(--pad-x), calc((100% - 1340px) / 2 + 40px)); } /* 4 ใบ: ขยายออกซ้ายขวาเล็กน้อย (จอ 1440 = ข้างละ 90px) */
.s9-pkx__tabs--n4 .s9-pkx__tab { max-width: 400px; height: 280px; }
.s9-pkx__tabs--n4 .s9-pkx-tier__name { font-size: 30px; }
.s9-pkx__tabs--n4 .s9-pkx-tier__price { font-size: 36px; }
.s9-pkx__tabs--n4 .s9-pkx-tier__desc { font-size: 13px; text-wrap: balance; }
.s9-pkx-tier:not(:has(.s9-pkx-tier__img)) { background: radial-gradient(120% 90% at 50% 0%, #fffaf0 0%, #f6ead0 60%, #ecd9ad 100%); }
@media (max-width: 1100px) {
	.s9-pkx__tabs--n4 { gap: 12px; }
	.s9-pkx__tabs--n4 .s9-pkx__tab { height: 240px; }
	.s9-pkx__tabs--n4 .s9-pkx-tier__name { font-size: 24px; }
	.s9-pkx__tabs--n4 .s9-pkx-tier__price { font-size: 28px; }
	.s9-pkx__tabs--n4 .s9-pkx-tier__desc { display: none; }
}

/* โปรโมชั่นยอดนิยม 2 ใบ: วางคู่กันขนาดเท่ากัน (คอม) — มือถือยังเป็นสไลด์ */
@media (min-width: 768px) {
	.s9-promo__cards--duo { justify-content: center; align-items: flex-start; gap: 40px; }
	.s9-promo__cards--duo .s9-promo__card { height: auto; aspect-ratio: 1075 / 1521; }
	.s9-promo__cards--duo + .s9-dots { display: none; }
}
/* คำโปรยบนการ์ดแพ็กเกจ: บรรทัดเดียวเสมอ (ยาวเกิน = …) */
.s9-pkx-tier__head { max-width: 100%; }
.s9-pkx-tier__desc { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s9-pkx__tabs--n4 .s9-pkx-tier__desc { text-wrap: nowrap; }

/* ===== กดรูปดูใหญ่ (works.js) — แถบบน: ตัวนับ / ซูม / ปิด · รูปกลาง · แถบรูปย่อ ===== */
.s9-lb { position: fixed; inset: 0; z-index: 2147483000; display: flex; flex-direction: column; padding: 0; background: #0d0a06; color: #fff; opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s linear .25s; -webkit-tap-highlight-color: transparent; }
.s9-lb.is-open { opacity: 1; visibility: visible; transition: opacity .25s; }
.s9-lb__bar { position: relative; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; height: 60px; padding: 0 10px 0 16px; padding-top: env(safe-area-inset-top); }
/* กล่องตัวนับ / กล่องซูม: สูง 36px ขอบทอง ตัวอักษร 14px เท่ากัน */
.s9-lb__c { position: static; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; height: 36px; min-width: 64px; padding: 0 14px; border: 1px solid rgba(226, 197, 106, .45); border-radius: 100px; color: #f0dca0; font: 14px/1 var(--font-body, sans-serif); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.s9-lb__c:empty { visibility: hidden; }
.s9-lb button { position: static; display: flex; align-items: center; justify-content: center; width: auto; height: auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: #fff; font: inherit; cursor: pointer; }
.s9-lb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.s9-lb__x { width: 44px; height: 44px; border-radius: 50% !important; }
.s9-lb__x:hover, .s9-lb__x:focus-visible { background: rgba(255, 255, 255, .1); outline: none; }
/* กล่องซูม: [−] 100% [+] */
.s9-lb__zoom { position: absolute; left: 50%; top: calc(50% + env(safe-area-inset-top) / 2); display: flex; align-items: stretch; box-sizing: border-box; height: 36px; border: 1px solid rgba(226, 197, 106, .45); border-radius: 100px; transform: translate(-50%, -50%); overflow: hidden; }
.s9-lb__zoom button { width: 36px; height: 34px; color: #f0dca0; transition: background .2s; }
.s9-lb__zoom button:hover:not(:disabled) { background: rgba(212, 175, 55, .18); }
.s9-lb__zoom button:disabled { opacity: .3; cursor: default; }
.s9-lb__zoom svg { width: 18px; height: 18px; }
.s9-lb__pct { width: 64px !important; border-left: 1px solid rgba(226, 197, 106, .3) !important; border-right: 1px solid rgba(226, 197, 106, .3) !important; color: #f0dca0 !important; font: 14px/1 var(--font-body, sans-serif) !important; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.s9-lb__stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; cursor: zoom-in; }
.s9-lb.is-zoomed .s9-lb__stage { cursor: grab; }
.s9-lb.is-zoomed .s9-lb__stage:active { cursor: grabbing; }
.s9-lb__img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; border-radius: 0; object-fit: contain; user-select: none; -webkit-user-drag: none; will-change: transform; transform-origin: 50% 50%; }
.s9-lb__img.is-anim { transition: transform .28s cubic-bezier(.2, .7, .3, 1), opacity .28s; }
.s9-lb__p, .s9-lb__n { position: absolute !important; top: 50%; z-index: 2; width: 48px !important; height: 48px !important; margin-top: -24px !important; border: 1px solid rgba(226, 197, 106, .5) !important; border-radius: 50% !important; background: rgba(0, 0, 0, .35) !important; color: #f0dca0 !important; transition: background .2s; }
.s9-lb__p { left: 20px; } .s9-lb__n { right: 20px; }
.s9-lb__p:hover, .s9-lb__n:hover { background: rgba(166, 124, 30, .55) !important; }
.s9-lb__thumbs { display: flex; gap: 8px; flex-shrink: 0; overflow-x: auto; padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); scrollbar-width: none; scroll-behavior: smooth; }
.s9-lb__thumbs::-webkit-scrollbar { display: none; }
.s9-lb__t { flex-shrink: 0; width: 64px !important; height: 48px !important; overflow: hidden; border-radius: 6px !important; opacity: .45; outline: 2px solid transparent; outline-offset: 2px; transition: opacity .2s, outline-color .2s; }
.s9-lb__t img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s9-lb__t.is-on { opacity: 1; outline-color: #d4af37; }
.s9-lb__thumbs[hidden] { display: none; }
@media (min-width: 768px) {
	.s9-lb__img { max-width: calc(100% - 160px); }
	.s9-lb.is-zoomed .s9-lb__img { max-width: 100%; }
	.s9-lb__thumbs { justify-content: safe center; }
}
@media (max-width: 767px) {
	.s9-lb__p, .s9-lb__n { display: none !important; } /* มือถือ: ปัดซ้าย-ขวา / กดรูปย่อแทน */
}
.s9-btn--line {
    background: #06C755;
    color: #fff;
    border: 1px solid #06C755;
}

.s9-btn--line:hover {
    background: #05B34C;
    border-color: #05B34C;
    color: #fff;
}