/* =========================================================
   E-WON AGROTECH — ธีมเขียว เรียบ สะอาด
   ========================================================= */
:root {
  --g-900: #0f3b2c;
  --g-800: #144a37;
  --g-700: #1b5e45;
  --g-600: #23774f;
  --g-500: #2f8f5f;
  --g-300: #9cc8ad;
  --g-200: #cfe5d7;
  --g-100: #e8f3ec;
  --g-50:  #f4f9f6;
  --lime:  #b6d96b;
  --ink:   #1c2a24;
  --muted: #5f7068;
  --line:  #dfe9e3;
  --white: #ffffff;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px rgba(15, 59, 44, .08);
  --shadow-lg: 0 24px 60px rgba(15, 59, 44, .16);
  --font: "IBM Plex Sans Thai", "Prompt", system-ui, sans-serif;
  --font-head: "Noto Serif Thai", "IBM Plex Sans Thai", serif;
  --container: 1200px;
  /* สัดส่วนรูปปกสินค้า: A4 แนวตั้ง = 1 / 1.414 | จัตุรัส = 1 / 1 */
  --cover: 1 / 1.414;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink);
  background: var(--g-50); line-height: 1.65; font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px; border: 0;
  font-weight: 600; font-size: 15px; transition: .25s ease; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; transition: transform .25s; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--g-800); color: #fff; }
.btn-primary:hover { background: var(--g-900); }
.btn-light { background: #fff; color: var(--g-800); }
.btn-light:hover { background: var(--g-100); }
.btn-ghost { background: transparent; color: #fff; padding-inline: 6px; }
.btn-ghost .circle {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.7);
  display: grid; place-items: center;
}
.btn-outline { background: transparent; border: 1.5px solid var(--g-700); color: var(--g-700); padding: 9px 18px; font-size: 14px; }
.btn-outline:hover { background: var(--g-700); color: #fff; }
.btn-line { background: #06c755; color: #fff; }
.btn-line:hover { background: #05a948; }


/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50; background: var(--g-800); color: #fff;
  transition: box-shadow .3s;
}
.header.scrolled { box-shadow: 0 6px 24px rgba(0,0,0,.15); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none;
}
.logo-mark svg { width: 26px; height: 26px; color: var(--g-600); }
.logo img { height: 46px; width: auto; }
.logo-text strong { display: block; font-family: var(--font-head); font-size: 20px; line-height: 1.1; }
.logo-text small { display: block; font-size: 10.5px; letter-spacing: .18em; opacity: .75; }
.nav { display: flex; gap: 6px; }
.nav a {
  position: relative; padding: 10px 18px; font-weight: 500; font-size: 15px; letter-spacing: .02em; opacity: .85; transition: .2s;
}
.nav a:hover, .nav a.active { opacity: 1; }
.nav a.active::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: 2px; height: 2px; background: var(--lime); border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08); border: 0; color: #fff; transition: .2s;
}
.icon-btn:hover { background: rgba(255,255,255,.18); }
.icon-btn svg { width: 20px; height: 20px; }
.menu-toggle { display: none; }

/* ---------- Hero (แบบรูปที่ 2) ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(1000px 500px at 85% 30%, rgba(182,217,107,.22), transparent 60%),
    linear-gradient(120deg, var(--g-800) 0%, var(--g-600) 55%, #4fa57a 100%);
}
.hero::before { /* ลายใบไม้จาง ๆ */
  content: ""; position: absolute; inset: 0; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M20 90c0-35 25-60 60-60-2 36-25 60-60 60zm0 0 40-40' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E");
}
.hero .container {
  position: relative; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center;
  gap: 40px; min-height: 560px; padding-block: 60px 140px;
}
.eyebrow { font-size: 13px; letter-spacing: .28em; text-transform: uppercase; opacity: .85; margin-bottom: 18px; }
.hero h1 {
  font-family: var(--font-head); font-weight: 600; font-size: clamp(38px, 5vw, 62px);
  line-height: 1.18; margin: 0 0 22px;
}
.hero h1 em { font-style: normal; color: var(--lime); }
.hero .divider { display: flex; align-items: center; gap: 12px; width: 260px; margin-bottom: 20px; opacity: .6; }
.hero .divider span { flex: 1; height: 1px; background: #fff; }
.hero .divider svg { width: 16px; height: 16px; }
.hero p.lead { max-width: 460px; font-size: 17px; opacity: .92; margin: 0 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

.hero-visual { position: relative; height: 460px; }
.hero-visual .blob {
  position: absolute; inset: 20px 10px 0 40px; border-radius: 48% 52% 44% 56% / 52% 44% 56% 48%;
  background: radial-gradient(circle at 40% 35%, #f6fbf2, #d6ead9 70%);
  box-shadow: inset 0 -20px 60px rgba(15,59,44,.15), 0 30px 80px rgba(0,0,0,.18);
  animation: morph 14s ease-in-out infinite;
}
.hero-visual .leaf { position: absolute; color: var(--lime); opacity: .9; }
.hero-visual .leaf.l1 { width: 120px; top: -10px; right: 0; transform: rotate(25deg); }
.hero-visual .leaf.l2 { width: 90px; bottom: 10px; left: 0; transform: rotate(-120deg); color: #e6f4d5; }
.hero-visual .hv-item {
  position: absolute; background: #fff; border-radius: 20px; padding: 8px;
  box-shadow: var(--shadow-lg); animation: float 6s ease-in-out infinite;
}
.hero-visual .hv-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.hero-visual .hv-main img { border-radius: 20px; }
.hero-visual .hv-main { width: 54%; aspect-ratio: 1; left: 24%; top: 12%; border-radius: 28px; }
.hero-visual .hv-a { width: 30%; aspect-ratio: 1; left: 2%; top: 52%; animation-delay: -2s; }
.hero-visual .hv-b { width: 28%; aspect-ratio: 1; right: 0; top: 46%; animation-delay: -4s; }
.hero-visual .badge-float {
  position: absolute; left: 14%; top: 4%; background: rgba(255,255,255,.95); color: var(--g-800);
  border-radius: 999px; padding: 8px 16px 8px 8px; display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow); animation: float 7s ease-in-out infinite -1s;
}
.badge-float i { width: 30px; height: 30px; border-radius: 50%; background: var(--g-600); color: #fff; display: grid; place-items: center; font-style: normal; }
.badge-float i svg { width: 16px; height: 16px; }

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes morph {
  0%,100% { border-radius: 48% 52% 44% 56% / 52% 44% 56% 48%; }
  50% { border-radius: 56% 44% 52% 48% / 44% 56% 48% 52%; }
}


/* ---------- Section ---------- */
.section { padding-block: 90px; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head .kicker {
  display: inline-flex; align-items: center; gap: 14px; font-size: 13px; letter-spacing: .25em;
  color: var(--g-600); font-weight: 600; text-transform: uppercase;
}
.section-head .kicker::before, .section-head .kicker::after { content: ""; width: 40px; height: 1px; background: var(--g-300); }
.section-head h2 { font-family: var(--font-head); font-size: clamp(28px, 3.4vw, 40px); color: var(--g-900); margin: 10px 0 6px; line-height: 1.3; }
.section-head p { color: var(--muted); margin: 0; }
.section-head.left { text-align: left; display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.section-head.left .kicker::before { display: none; }

/* ---------- หมวดหมู่ ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 18px; }
.cat { text-align: center; group: cat; }
.cat .ph {
  width: 100%; max-width: 150px; padding: 5px; background: #fff !important; aspect-ratio: 1; margin: 0 auto 14px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #fff, var(--g-100)); border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden; transition: .3s;
}
.cat .ph img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; transition: transform .4s; }
.cat:hover .ph { border-color: var(--g-300); box-shadow: var(--shadow); }
.cat:hover .ph img { transform: scale(1.08) rotate(-4deg); }
.cat h4 { margin: 0; font-size: 15px; color: var(--g-900); font-weight: 600; }
.cat span { font-size: 13px; color: var(--g-600); }

/* ---------- การ์ดสินค้า ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.card {
  background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  display: flex; flex-direction: column; transition: .3s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: transparent; }
.card .media { position: relative; aspect-ratio: var(--cover); background: linear-gradient(180deg, #fff, var(--g-50)); display: grid; place-items: center; }
.card .media { overflow: hidden; }
.card .media img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s; }
.card:hover .media img { transform: scale(1.05); }
.card .tag {
  position: absolute; top: 14px; left: 14px; background: var(--g-800); color: #fff; font-size: 11px; font-weight: 600;
  letter-spacing: .06em; padding: 4px 10px; border-radius: 6px;
}
.card .tag.new { background: var(--lime); color: var(--g-900); }
.card .body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card .common-name { font-size: 12.5px; color: var(--g-600); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card h3 { font-size: 16.5px; margin: 4px 0 4px; line-height: 1.4; color: var(--g-900); }
.card .ing { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.card .actions { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card .pack { font-size: 12.5px; color: var(--muted); }

/* ---------- Page header (สินค้า / ติดต่อ) ---------- */
.page-hero {
  color: #fff; padding: 64px 0 90px; position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--g-800), var(--g-600));
}
.page-hero h1 { font-family: var(--font-head); font-size: clamp(30px, 4vw, 46px); margin: 6px 0 8px; }
.page-hero p { margin: 0; opacity: .88; max-width: 560px; }
.crumb { font-size: 14px; opacity: .8; }
.crumb a:hover { text-decoration: underline; }
.page-hero .deco { position: absolute; right: -40px; top: -40px; width: 340px; color: rgba(255,255,255,.07); }

/* ---------- หน้าสินค้า ---------- */
.shop { display: grid; grid-template-columns: 260px 1fr; gap: 32px; margin-top: -50px; position: relative; }
.sidebar {
  background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  align-self: start; position: sticky; top: 96px;
}
.sidebar h4 { margin: 0 0 12px; font-size: 15px; color: var(--g-900); }
.cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cat-list button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 0; border-radius: 12px;
  background: transparent; text-align: left; color: var(--ink); font-size: 14.5px; transition: .2s;
}
.cat-list button img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.cat-list button .count { margin-left: auto; font-size: 12px; color: var(--muted); background: var(--g-100); border-radius: 999px; padding: 1px 9px; }
.cat-list button:hover { background: var(--g-50); }
.cat-list button.active { background: var(--g-800); color: #fff; }
.cat-list button.active .count { background: rgba(255,255,255,.2); color: #fff; }
.toolbar {
  background: #fff; border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 24px;
}
.search { flex: 1; min-width: 200px; position: relative; }
.search input {
  width: 100%; border: 1px solid var(--line); background: var(--g-50); border-radius: 999px; padding: 12px 16px 12px 44px;
  font: inherit; font-size: 15px; outline: none; transition: .2s;
}
.search input:focus { border-color: var(--g-500); background: #fff; }
.search svg { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 18px; color: var(--muted); }
.result-count { font-size: 14px; color: var(--muted); }
.chips { display: none; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; font-size: 14px; color: var(--ink);
}
.chip.active { background: var(--g-800); color: #fff; border-color: var(--g-800); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); background: #fff; border-radius: var(--radius); }


/* ---------- หน้าติดต่อ ---------- */
.contact-grid { display: grid; grid-template-columns: 400px 1fr; gap: 28px; margin-top: -50px; position: relative; }
.contact-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.contact-card h3 { font-family: var(--font-head); margin: 0 0 4px; color: var(--g-900); font-size: 22px; }
.contact-card .sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.c-item { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.c-item .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--g-100); color: var(--g-700); display: grid; place-items: center; flex: none; }
.c-item .ic svg { width: 20px; height: 20px; }
.c-item small { display: block; color: var(--muted); font-size: 13px; }
.c-item b, .c-item a { font-weight: 500; font-size: 15px; }
.c-item a:hover { color: var(--g-600); }
.contact-card .btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.map-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; display: flex; flex-direction: column; }
#map { flex: 1; min-height: 460px; border-radius: 16px; z-index: 1; }
.map-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 10px 6px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.pin {
  width: 46px; height: 46px; border-radius: 50% 50% 50% 0; background: var(--g-700); rotate: -45deg;
  display: grid; place-items: center; box-shadow: 0 8px 18px rgba(15,59,44,.4); border: 3px solid #fff;
}
.pin svg { rotate: 45deg; width: 22px; color: #fff; }
.leaflet-popup-content { font-family: var(--font); }

/* ---------- Footer ---------- */

.footer { background: var(--g-900); color: #c9dfd2; margin-top: 90px; }
.footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 36px; padding-block: 56px 36px; }
.footer h5 { color: #fff; font-size: 15px; margin: 0 0 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer p { font-size: 14px; margin: 14px 0 0; }
.footer .copy { border-top: 1px solid rgba(255,255,255,.1); text-align: center; padding: 18px; font-size: 13px; opacity: .7; }


/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .footer .container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(300px, 82vw); background: var(--g-900);
    flex-direction: column; padding: 90px 20px 20px; transform: translateX(100%); transition: transform .35s; z-index: 70;
  }
  .nav.open { transform: none; box-shadow: -20px 0 60px rgba(0,0,0,.3); }
  .nav a { padding: 14px 16px; border-radius: 12px; font-size: 17px; }
  .nav a.active { background: rgba(255,255,255,.08); }
  .nav a.active::after { display: none; }
  .menu-toggle { display: grid; position: relative; z-index: 80; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 65; opacity: 0; pointer-events: none; transition: .3s; }
  .nav-backdrop.open { opacity: 1; pointer-events: auto; }

  .hero .container { grid-template-columns: 1fr; text-align: center; padding-block: 50px 130px; gap: 20px; }
  .hero .divider, .hero p.lead { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-visual { height: 360px; max-width: 460px; width: 100%; margin: 0 auto; }


  .shop { grid-template-columns: 1fr; margin-top: -40px; }
  .sidebar { display: none; }
  .chips { display: flex; }

  .contact-grid { grid-template-columns: 1fr; }
  #map { min-height: 360px; }

}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .header .container { height: 66px; }
  .logo-text strong { font-size: 17px; }
  .logo-mark { width: 38px; height: 38px; }
  .section { padding-block: 64px; }
  .hero-visual { height: 300px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 18px 10px; }
  .cat h4 { font-size: 13px; }
  .cat span { display: none; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card .body { padding: 12px 12px 14px; }
  .card h3 { font-size: 14.5px; }
  .card .ing { font-size: 12px; margin-bottom: 10px; }
  .card .actions { flex-direction: column; align-items: stretch; }
  .card .actions .btn { justify-content: center; }
  .card .pack { display: none; }
  .footer .container { grid-template-columns: 1fr; gap: 26px; }
  .contact-card { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* รายละเอียดเต็มของสินค้า (มาจาก WooCommerce) */
.rich { font-size: 14px; color: var(--ink); padding-bottom: 10px; }
.rich p { margin: 0 0 8px; }
.rich ul { margin: 0 0 8px; padding-left: 20px; }
.rich blockquote { margin: 8px 0; padding: 8px 12px; background: var(--g-50); border-left: 3px solid var(--g-500); border-radius: 6px; }
.shop > div { min-width: 0; }
.shop { grid-template-columns: 290px 1fr; }
@media (max-width: 900px) { .shop { grid-template-columns: 1fr; } }

/* ---------- แบนเนอร์หน้าแรก (รูปภาพ) ---------- */
.banner { background: #eef1ec; border-bottom: 1px solid var(--line); }
.banner img { width: 100%; max-width: 1875px; height: auto; margin: 0 auto; }
.logo img { height: 48px; width: 48px; object-fit: cover; border-radius: 8px; background: #fff; padding: 2px; }
@media (max-width: 600px) {
  .logo img { height: 40px; width: 40px; }
}



/* ---------- สไลด์หมวดหมู่ ---------- */
.cat-slider { position: relative; }
.cat-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 168px; column-gap: 14px; justify-content: safe center;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 8px 4px 14px; scrollbar-width: none; cursor: grab; user-select: none;
}
.cat-track::-webkit-scrollbar { display: none; }
.cat-track.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.cat-track .cat { scroll-snap-align: start; }
.cat-track .cat .ph { max-width: 150px; }
.cat-track .cat h4 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-btn {
  position: absolute; top: 38%; translate: 0 -50%; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--g-800); display: grid; place-items: center;
  box-shadow: var(--shadow); transition: .2s;
}
.cs-btn:hover:not(:disabled) { background: var(--g-800); color: #fff; }
.cs-btn:disabled { opacity: .35; cursor: default; }
.cs-btn svg { width: 20px; height: 20px; }
.cs-prev { left: -22px; }
.cs-next { right: -22px; }
.cat-slider.no-scroll .cs-btn { display: none; }
@media (max-width: 1100px) { .cat-track { grid-auto-columns: 150px; column-gap: 12px; } .cat-track .cat .ph { max-width: 134px; } }
@media (max-width: 900px) { .cs-prev { left: -8px; } .cs-next { right: -8px; } }
@media (max-width: 600px) {
  .cat-track { grid-auto-columns: 104px; column-gap: 8px; }
  .cat-track .cat .ph { max-width: 92px; }
  .cs-btn { width: 36px; height: 36px; }
  .cat-track .cat h4 { white-space: normal; font-size: 13px; line-height: 1.35; }
}

/* ---------- สินค้าใหม่: รูปเต็ม เฟดซ้าย (จอกว้าง) / เฟดล่าง (จอแคบ) ---------- */
.showcase-wrap { padding-top: 64px; }
.showcase {
  position: relative; overflow: hidden; border-radius: 34px; color: #fff; min-height: 600px;
  background: linear-gradient(135deg, #6f9a80, #4f7d63);
  display: grid; grid-template-columns: minmax(0, 48%) 1fr; grid-template-rows: 1fr auto;
}
.sc-stage {
  position: absolute; top: 0; right: 0; bottom: 0; height: 100%; aspect-ratio: var(--cover); max-width: 56%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.7) 14%, #000 30%);
          mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.7) 14%, #000 30%);
}
.sc-product, .sc-product .frame { width: 100%; height: 100%; }
.sc-product img { width: 100%; height: 100%; object-fit: contain; object-position: right center; }
.sc-product.spin img { animation: scIn 1s cubic-bezier(.2,.8,.2,1); }
@keyframes scIn { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }

.sc-info { position: relative; z-index: 2; grid-column: 1; align-self: end; padding: 52px 20px 0 56px; }
.sc-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; opacity: .95; margin-bottom: 12px; }
.sc-tag svg { width: 16px; height: 16px; color: var(--lime); }
.sc-info h3 { font-family: var(--font-head); font-size: clamp(24px, 2.6vw, 34px); line-height: 1.25; margin: 0 0 8px; text-shadow: 0 2px 14px rgba(0,0,0,.15); }
.sc-info .ingredient { display: inline-block; font-size: 13px; background: rgba(255,255,255,.16); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }
.sc-info p { margin: 0 0 18px; opacity: .92; max-width: 380px; }
.sc-meta { display: grid; gap: 6px; margin-bottom: 24px; font-size: 14px; }
.sc-meta div { display: flex; gap: 10px; }
.sc-meta b { min-width: 86px; font-weight: 500; opacity: .75; }
.sc-info .fade { transition: opacity .45s, transform .45s; }
.sc-info.switching .fade { opacity: 0; transform: translateY(10px); }

.sc-side { position: relative; z-index: 2; grid-column: 1; display: flex; align-items: center; gap: 14px; padding: 28px 20px 64px 56px; }
.sc-side .label { display: none; }
.sc-next {
  display: flex; align-items: center; gap: 12px; flex: 1; max-width: 320px; background: rgba(255,255,255,.95); color: var(--ink);
  border-radius: 18px; padding: 10px; box-shadow: var(--shadow-lg); cursor: pointer; transition: transform .25s;
}
.sc-next:hover { transform: translateY(-3px); }
.sc-next .thumb { width: 50px; flex: none; aspect-ratio: var(--cover); border-radius: 12px; overflow: hidden; background: var(--g-100); }
.sc-next .thumb img { width: 100%; height: 100%; object-fit: contain; }
.sc-next h5 { margin: 0; font-size: 14px; line-height: 1.35; }
.sc-next small { display: block; color: var(--muted); font-size: 12px; }
.sc-arrow {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.75); background: rgba(15,59,44,.25); color: #fff;
  display: grid; place-items: center; transition: background .2s, color .2s; backdrop-filter: blur(4px);
}
.sc-prev { left: 10px; }
.sc-nextbtn { right: 10px; }
@media (max-width: 900px) {
  /* จอแคบ: ลูกศรอยู่กึ่งกลางรูป (รูปกว้างสูงสุด 460px สัดส่วนตาม --cover) */
  .sc-arrow { top: calc(min(100vw - 40px, 460px) * 0.707); }
}
@media (max-width: 600px) { .sc-arrow { width: 36px; height: 36px; } .sc-prev { left: 8px; } .sc-nextbtn { right: 8px; } }
.sc-arrow:hover { background: #fff; color: var(--g-800); }
.sc-arrow svg { width: 18px; height: 18px; }
.sc-dots { position: absolute; left: 56px; bottom: 28px; display: flex; gap: 8px; z-index: 2; }
.sc-dots button { width: 9px; height: 9px; border-radius: 999px; border: 0; background: rgba(255,255,255,.45); padding: 0; transition: .3s; }
.sc-dots button.active { width: 28px; background: #fff; }
.sc-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; z-index: 2; }
.sc-progress span { display: block; height: 100%; width: 0; background: var(--lime); }

@media (max-width: 900px) {
  .showcase { grid-template-columns: 1fr; grid-template-rows: auto; min-height: 0; text-align: center; }
  .sc-stage {
    position: relative; order: -1; width: 100%; max-width: 460px; height: auto; aspect-ratio: var(--cover); margin: 0 auto;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
  }
  .sc-info { margin-top: -24px; padding: 0 22px; align-self: auto; }
  .sc-product img { object-position: center; }
  .sc-info p { margin-inline: auto; }
  .sc-meta { justify-content: center; }
  .sc-meta div { text-align: left; }
  .sc-side { flex-direction: column; padding: 4px 22px 56px; }
  .sc-next { width: 100%; max-width: 380px; text-align: left; }
  .sc-dots { left: 50%; translate: -50% 0; bottom: 24px; }
}
@media (max-width: 600px) {
  .showcase { border-radius: 24px; }
  .sc-info { margin-top: -20px; }
  .showcase-wrap { padding-top: 44px; }
  .sc-info h3 { font-size: 23px; }
}

/* ---------- หน้ารายละเอียดสินค้า ---------- */
.page-hero.slim { padding: 44px 0 80px; }
.page-hero.slim h1 { font-size: clamp(26px, 3.4vw, 40px); }
.pd-wrap { margin-top: -50px; position: relative; }
.pd {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px;
}
.pd-main { border-radius: 18px; overflow: hidden; background: var(--g-50); aspect-ratio: var(--cover); max-height: 80vh; margin-inline: auto; }
.pd-main img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pd-thumbs button { width: 72px; height: 72px; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: var(--g-50); }
.pd-thumbs button.active { border-color: var(--g-600); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info { align-self: center; }
.pd-cat { display: inline-block; font-size: 13px; font-weight: 600; color: var(--g-700); background: var(--g-100); padding: 4px 12px; border-radius: 999px; }
.pd-cat:hover { background: var(--g-200); }
.pd-info h2 { font-family: var(--font-head); font-size: clamp(26px, 3vw, 36px); color: var(--g-900); margin: 12px 0 8px; line-height: 1.3; }
.pd-desc { color: var(--muted); font-size: 17px; margin: 0 0 18px; }
.pd-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.pd-table td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.pd-table td:first-child { color: var(--muted); width: 130px; padding-right: 12px; }
.pd-detail { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px; margin-top: 24px; }
.pd-detail h3 { font-family: var(--font-head); color: var(--g-900); margin: 0 0 14px; font-size: 22px; }
.pd-detail .rich { font-size: 15px; }
a.card { color: inherit; }
@media (max-width: 900px) {
  .pd { grid-template-columns: 1fr; gap: 24px; padding: 18px; }
  .pd-detail { padding: 22px 18px; }
}
@media (max-width: 600px) {
  .pd-table td:first-child { width: 100px; }
  .pd-thumbs button { width: 58px; height: 58px; }
}

/* การ์ดสินค้าแบบย่อ: รูป + หมวด + ชื่อ */
.card .body { padding: 12px 16px 16px; }
.card h3 { margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 600px) { .card .body { padding: 10px 12px 12px; } }

/* รายละเอียดเต็มในคอลัมน์ข้อมูลสินค้า */
.pd-rich { font-size: 15.5px; line-height: 1.75; margin-top: 14px; }
.pd-rich p { margin: 0 0 10px; }
.pd-rich strong { color: var(--g-900); }
.pd-rich blockquote { margin: 12px 0; }

/* แฮชแท็กสินค้า */
.pd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.pd-tags a { font-size: 13px; color: var(--g-700); background: var(--g-100); padding: 3px 10px; border-radius: 999px; transition: .2s; }
.pd-tags a:hover { background: var(--g-700); color: #fff; }
.tag-filter { border: 0; background: var(--g-800); color: #fff; font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 999px; cursor: pointer; margin-right: 6px; }
.tag-filter:hover { background: var(--g-900); }
