/* ekkamaibkk: สไตล์กลางของทุกหน้า
   เปลี่ยนสีทั้งเว็บได้จากตัวแปรด้านล่าง */
:root {
  color-scheme: light;
  --rose: #f7c5c4;
  --rose-pale: #fdeceb;
  --bottle: #0f3a30;
  --bottle-deep: #0a2a23;
  --wine: #a5152f;
  --wine-deep: #84102a;
  --foil: #f4c542;
  --white: #ffffff;
  --ink: #12302a;
  --ink-soft: #45605a;
  --line: #d9e1de;
  --line-green: #057a3c;
  --display: "Chonburi", "Noto Serif Thai", Georgia, serif;
  --text: "Anuphan", "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif;
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 17px/1.7 var(--text); overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.3; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(29px, 3.6vw, 44px); }
h3 { font-size: 23px; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--wine); outline-offset: 3px; }
.dark :focus-visible { outline-color: var(--foil); }

.wrap { width: min(1240px, 100% - 40px); margin-inline: auto; }
.band { padding-block: clamp(56px, 7vw, 100px); }
.dark { background: var(--bottle); color: var(--white); }
.pale { background: var(--rose-pale); }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 40px; margin-bottom: 36px; }
.head p { max-width: 46ch; color: var(--ink-soft); }
.dark .head p { color: #cfe0da; }

.skip { position: absolute; left: 12px; top: -80px; z-index: 60; background: var(--white); padding: 10px 16px; }
.skip:focus { top: 12px; }

/* ปุ่ม */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 10px 24px; border-radius: 6px; border: 2px solid transparent; font-weight: 600; text-decoration: none; transition: background-color .18s, color .18s; }
.btn-wine { background: var(--wine); color: var(--white); }
.btn-wine:hover { background: var(--wine-deep); }
.btn-line { background: var(--line-green); color: var(--white); }
.btn-line:hover { background: #046331; }
.btn-edge { border-color: currentColor; }
.btn-edge:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.dark .btn-edge:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.more { font-weight: 600; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.more:hover { color: var(--wine); }
.dark .more:hover { color: var(--foil); }

/* เมนูบน */
.top { position: sticky; top: 0; z-index: 40; background: var(--bottle); color: var(--white); }
.top .wrap { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.logo { font: 400 25px/1.3 var(--display); text-decoration: none; margin-right: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 10px 13px; text-decoration: none; font-weight: 500; border-radius: 6px; white-space: nowrap; }
.nav a:hover { background: rgb(255 255 255 / .12); }
.nav a[aria-current] { color: var(--foil); }
.top .btn { min-height: 44px; padding: 6px 18px; white-space: nowrap; }
.menu-btn { display: none; min-height: 44px; padding: 6px 14px; border: 2px solid rgb(255 255 255 / .5); border-radius: 6px; background: none; color: inherit; font: 600 16px var(--text); cursor: pointer; }

/* หน้าแรก */
.hero { background: var(--rose); overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-height: min(100svh - 72px, 860px); }
.hero-text { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 20px 56px; padding-top: clamp(30px, 4vw, 56px); position: relative; z-index: 1; }
.hero h1 { font-size: min(9.6vw, 134px); line-height: 1.1; letter-spacing: -.02em; }
.hero-text p { font-size: 20px; line-height: 1.6; max-width: 30ch; margin-bottom: 18px; }
.scene { position: relative; min-height: 320px; margin-top: 16px; }
.scene svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.train { animation: arrive 4s cubic-bezier(.16, .8, .3, 1) both; }
@keyframes arrive { from { transform: translateX(-1100px); } }

/* หมวดสินค้า */
.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.cat { text-decoration: none; display: block; }
.cat .pic { overflow: hidden; border-radius: 6px; }
.cat img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .4s; }
.cat:hover img { transform: scale(1.04); }
.cat h3 { font-size: 27px; margin: 18px 0 4px; }
.cat p { color: #cfe0da; }
.cat:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ขวดสินค้า */
.shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; }
.shelf a { display: block; text-decoration: none; }
.shelf img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--rose-pale); }
.shelf b { display: block; font-weight: 600; line-height: 1.45; margin-top: 12px; }
.shelf span { display: block; font-size: 15px; color: var(--ink-soft); }
.shelf a:hover b { color: var(--wine); text-decoration: underline; text-underline-offset: 4px; }
.shelf.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.tabs a { padding: 9px 18px; border: 2px solid var(--line); border-radius: 6px; text-decoration: none; font-weight: 600; }
.tabs a:hover { border-color: var(--ink); }
.tabs a[aria-current] { background: var(--bottle); border-color: var(--bottle); color: var(--white); }
.next { margin-top: 48px; }

/* ขั้นตอน และรายการ */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 3px solid var(--wine); padding-top: 18px; }
.steps h3::before { content: counter(s) ". "; }
.steps p, .rows p, .split p, .ticks li { color: var(--ink-soft); }
.steps p { margin-top: 6px; }
.rows > li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 6px 40px; padding-block: 24px; border-top: 1px solid var(--line); }
.pale .rows > li { border-color: #ecc9c7; }
.rows > li:last-child { border-bottom: 1px solid var(--line); }
.pale .rows > li:last-child { border-color: #ecc9c7; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 72px; }
.split.mid { align-items: center; }
.split h2 { margin-bottom: 20px; }
.split p + p { margin-top: 16px; }
.split img { width: 100%; border-radius: 6px; }
.ticks li { padding: 11px 0; border-top: 1px solid var(--line); }
.pale .ticks li { border-color: #ecc9c7; }

/* หัวหน้าย่อย */
.page { background: var(--rose); overflow: hidden; }
.page .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 40px; align-items: end; min-height: 300px; }
.page .say { padding-block: 48px; align-self: center; }
.page h1 { font-size: clamp(38px, 5.2vw, 66px); line-height: 1.25; }
.page p { font-size: 19px; margin-top: 10px; max-width: 42ch; }
.page svg { display: block; width: 100%; height: auto; margin-top: 28px; }

/* ติดต่อ */
.phone { display: inline-block; font: 400 clamp(40px, 6.4vw, 78px)/1.25 var(--display); text-decoration: none; color: var(--wine); white-space: nowrap; }
.phone:hover { color: var(--wine-deep); }
.policy { max-width: 780px; }
.policy section + section { margin-top: 40px; }
.policy h2 { font-size: 25px; margin-bottom: 8px; }
.policy ul { list-style: disc; padding-left: 1.3em; }

/* ปิดท้าย */
.cta { background: var(--wine); color: var(--white); padding-block: clamp(44px, 5vw, 68px); }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.cta p { margin-top: 6px; max-width: 48ch; }
.cta :focus-visible { outline-color: var(--foil); }
.cta .btn-line { background: var(--white); color: var(--wine-deep); }
.cta .btn-line:hover { background: var(--rose); }
.foot { background: var(--bottle-deep); color: #cfe0da; padding-block: 52px 40px; }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px 48px; }
.foot .logo { display: inline-block; font-size: 32px; color: var(--white); margin-bottom: 8px; }
.foot li a { display: inline-block; padding: 5px 0; text-decoration: none; }
.foot li a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.foot .legal { grid-column: 1 / -1; border-top: 1px solid rgb(255 255 255 / .18); padding-top: 22px; font-size: 15px; }

/* ดูรูปใหญ่ */
.zoom { width: min(960px, 100vw - 24px); max-width: none; max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 8px; background: var(--white); color: var(--ink); overflow: auto; }
.zoom::backdrop { background: rgb(6 25 21 / .88); }
.zoom-in { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.zoom img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--bottle-deep); }
.zoom-text { display: flex; flex-direction: column; padding: 24px; gap: 8px; }
.zoom-text h2 { font-size: 26px; }
.zoom-text .btn-line { margin-top: 14px; }
.zoom-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 18px; }
.zoom button { flex: 1; min-height: 44px; padding: 6px 12px; border: 2px solid var(--line); border-radius: 6px; background: none; color: inherit; font: 600 16px var(--text); cursor: pointer; white-space: nowrap; }
.zoom button:hover { border-color: var(--ink); }

@media (max-width: 960px) {
  .menu-btn { display: block; }
  .top .wrap { gap: 10px; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 8px 20px 20px; background: var(--bottle); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-top: 1px solid rgb(255 255 255 / .16); border-radius: 0; }
  .hero-text { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: calc((100vw - 40px) / 7.1); }
  .hero-text p { max-width: 40ch; }
  .shelf, .shelf.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); }
}

@media (max-width: 640px) {
  .cats, .steps, .split, .rows > li, .zoom-in { grid-template-columns: minmax(0, 1fr); }
  .cat { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: center; }
  .cat h3 { font-size: 23px; margin-top: 0; }
  .cats { gap: 18px; }
  .shelf, .shelf.three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .shelf b { font-size: 16px; }
  .page .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; min-height: 0; }
  .page .say { padding-block: 32px 0; }
  .page svg { width: min(320px, 100%); margin: 20px auto 0; }
  .top .logo { font-size: min(19px, 5vw); }
  .top .btn { padding-inline: 12px; }
  .menu-btn { padding-inline: 10px; }
  .hero { min-height: calc(100svh - 72px); }
  .hero-text p { font-size: 18px; }
  .scene { min-height: 260px; }
  .foot .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot .wrap > :first-child { grid-column: 1 / -1; }
  .zoom img { max-height: 56dvh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .train { animation: none; }
  .cat img { transition: none; }
}
