/**
 * Henghud — main stylesheet
 * โทน "Clean Studio": พื้นขาว/ดำ ให้รูปสินค้าเป็นพระเอก สีแบรนด์เป็น accent สีเดียว
 * animate เฉพาะ transform/opacity เท่านั้น (ข้อ 12.1)
 */

/* =========================================================
   1. Base
   ========================================================= */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	/* --hh-font-base ตั้งได้ในหน้าจัดการฟอนต์ ส่วน --hh-font-scale คือปุ่มปรับขนาดของผู้ใช้ */
	font-size: calc(var(--hh-font-base, 100%) * var(--hh-font-scale));
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--hh-header-h) + 16px);
	/* scrollbar สีอ่อนตามธีม (สืบทอดไปทุกกล่องที่เลื่อนได้ เช่น แผงตัวกรอง) */
	scrollbar-color: var(--hh-scrollbar) transparent;
}

body {
	margin: 0;
	background: var(--hh-bg);
	color: var(--hh-text);
	font-family: var(--hh-font-body);
	font-size: var(--hh-fs-base);
	line-height: var(--hh-line-height);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
	transition: background-color var(--hh-dur) var(--hh-ease), color var(--hh-dur) var(--hh-ease);
}

body.is-locked {
	overflow: hidden;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover {
	color: var(--hh-accent);
}

:focus-visible {
	outline: 2px solid var(--hh-accent);
	outline-offset: 2px;
	border-radius: var(--hh-radius-sm);
}

h1,
h2,
h3,
h4 {
	font-family: var(--hh-font-heading);
	line-height: var(--hh-heading-lh, 1.3);
	font-weight: 700;
	margin: 0 0 0.5em;
	letter-spacing: -0.01em;
}

p {
	margin: 0 0 1em;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	clip: auto;
	width: auto;
	height: auto;
	margin: 0;
	padding: 12px 18px;
	top: 12px;
	left: 12px;
	z-index: 1000;
	background: var(--hh-bg);
	color: var(--hh-text);
	box-shadow: var(--hh-shadow-2);
}

#top:focus,
#main:focus {
	outline: none;
}

/* =========================================================
   2. Layout
   ========================================================= */
.container {
	width: 100%;
	max-width: calc(var(--hh-container) + var(--hh-gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--hh-gutter);
}

.container--narrow {
	max-width: calc(var(--hh-container-narrow) + var(--hh-gutter) * 2);
}

.section {
	padding-block: var(--hh-section-y);
}

.site-main {
	min-height: 50vh;
	padding-bottom: var(--hh-bottom-nav-h);
}

.eyebrow {
	font-family: var(--hh-font-heading);
	font-size: var(--hh-fs-xs);
	font-weight: 600;
	letter-spacing: var(--hh-eyebrow-spacing, 0.16em);
	text-transform: uppercase;
	color: var(--hh-text-muted);
	margin-bottom: 0.75em;
}

.eyebrow a {
	text-decoration: none;
}

/* ข้อความไทยห้ามถ่างตัวอักษร (ข้อ 14.1) */
.eyebrow--th {
	font-family: var(--hh-font-body);
	letter-spacing: 0;
	text-transform: none;
}

.page-header {
	margin-bottom: clamp(24px, 4vw, 48px);
}

.page-title {
	font-size: var(--hh-fs-3xl);
	margin: 0;
}

.page-description {
	color: var(--hh-text-muted);
	max-width: 60ch;
	margin-top: 0.75em;
}

@media (max-width: 767px) {
	.hide-mobile {
		display: none !important;
	}
}

@media (min-width: 1024px) {
	.hide-desktop {
		display: none !important;
	}
}

/* =========================================================
   3. Buttons
   ========================================================= */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 20px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--hh-accent);
	color: var(--hh-accent-contrast);
	font-weight: 600;
	font-size: var(--hh-fs-sm);
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: translate var(--hh-dur-fast) var(--hh-ease), scale var(--hh-dur-fast) var(--hh-ease), background-color var(--hh-dur) var(--hh-ease), box-shadow var(--hh-dur) var(--hh-ease);
}

/* ใช้ translate / scale แยก (ไม่ใช่ transform) จะได้ไม่ทับ transform ที่ใช้จัดตำแหน่งปุ่ม */
.btn:hover {
	color: var(--hh-accent-contrast);
	background: var(--hh-accent-hover);
	box-shadow: var(--hh-shadow-2);
	translate: 0 -1px;
}

.btn:active {
	translate: 0 0;
	scale: 0.98;
}

.btn--sm {
	min-height: 38px;
	padding: 6px 14px;
}

.btn--block {
	width: 100%;
}

.btn--ghost {
	background: transparent;
	color: var(--hh-text);
	border-color: var(--hh-border);
}

.btn--ghost:hover {
	background: var(--hh-surface);
	color: var(--hh-text);
}

.btn--line {
	background: var(--hh-line-ui);
	color: #fff;
}

.btn--line:hover {
	background: color-mix(in srgb, var(--hh-line-ui) 85%, #000);
	color: #fff;
}

.btn--messenger {
	background: var(--hh-messenger);
	color: #fff;
}

.btn--messenger:hover {
	background: color-mix(in srgb, var(--hh-messenger) 85%, #000);
	color: #fff;
}

.btn--phone,
.btn--email {
	background: var(--hh-surface);
	color: var(--hh-text);
	border-color: var(--hh-border);
}

.btn--phone:hover,
.btn--email:hover {
	background: var(--hh-surface-2);
	color: var(--hh-text);
}

.icon-btn {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--hh-text);
	cursor: pointer;
	transition: background-color var(--hh-dur-fast) var(--hh-ease), scale var(--hh-dur-fast) var(--hh-ease);
}

.icon-btn:hover {
	background: var(--hh-surface);
}

/* scale แยก: ปุ่มที่จัดกึ่งกลางด้วย transform (เช่น ลูกศรแกลเลอรี/สไลด์) จะไม่เด้งหลุดตำแหน่งตอนกด */
.icon-btn:active {
	scale: 0.94;
}

.icon-btn--sm {
	width: 32px;
	height: 32px;
}

/* =========================================================
   4. Announcement & utility bar
   ========================================================= */
.announcement {
	background: var(--hh-text);
	color: var(--hh-bg);
	font-size: var(--hh-fs-sm);
}

.announcement[hidden] {
	display: none;
}

.announcement__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	position: relative;
	padding-right: 48px;
}

.announcement__text {
	margin: 0;
	text-align: center;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
}

.announcement__text:hover {
	color: inherit;
	text-decoration: underline;
}

.announcement__close {
	position: absolute;
	right: var(--hh-gutter);
	color: inherit;
}

.announcement__close:hover {
	background: rgb(255 255 255 / 0.12);
}

.utility-bar {
	border-bottom: 1px solid var(--hh-border);
	font-size: var(--hh-fs-xs);
	color: var(--hh-text-muted);
}

.utility-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 36px;
}

.utility-menu {
	display: flex;
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.utility-menu a {
	text-decoration: none;
}

/* =========================================================
   5. Header
   ========================================================= */
.site-header {
	position: relative;
	z-index: 50;
	background: color-mix(in srgb, var(--hh-bg) 92%, transparent);
	border-bottom: 1px solid var(--hh-border);
	transition: transform var(--hh-dur) var(--hh-ease), box-shadow var(--hh-dur) var(--hh-ease), background-color var(--hh-dur) var(--hh-ease);
}

.site-header.is-sticky {
	position: sticky;
	top: 0;
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	backdrop-filter: saturate(1.4) blur(14px);
}

.admin-bar .site-header.is-sticky {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.site-header.is-scrolled {
	box-shadow: var(--hh-shadow-2);
}

.site-header.is-hidden {
	transform: translateY(-100%);
}

.header-row {
	display: flex;
	align-items: center;
	gap: 16px;
}

.header-row--main {
	min-height: var(--hh-header-h);
	transition: min-height var(--hh-dur) var(--hh-ease);
}

.site-header--centered .header-row--main {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
}

.site-header--centered .header-row__end {
	justify-self: end;
}

.site-header--centered .site-logo {
	justify-self: center;
}

.site-header--classic .header-row__nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.site-header--minimal .header-row--main,
.site-header--classic .header-row--main {
	justify-content: space-between;
}

.header-row--nav {
	border-top: 1px solid var(--hh-border);
}

.header-row--nav .container {
	display: flex;
	justify-content: center;
}

@media (max-width: 1023px) {
	.header-row--nav,
	.header-row__nav {
		display: none !important;
	}
}

/* Logo */
.site-logo {
	margin: 0;
	font-size: inherit;
	line-height: 1;
}

.site-logo__link {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.site-logo__img {
	height: var(--hh-logo-h);
	width: auto;
	transition: height var(--hh-dur) var(--hh-ease);
}

.site-header.is-scrolled .site-logo__img {
	height: calc(var(--hh-logo-h) * 0.82);
}

.site-logo__img--dark {
	display: none;
}

[data-theme="dark"] .site-logo__img--light:has(+ .site-logo__img--dark) {
	display: none;
}

[data-theme="dark"] .site-logo__img--dark {
	display: block;
}

.site-logo__text {
	font-family: var(--hh-font-heading);
	font-weight: 700;
	font-size: var(--hh-fs-xl);
	letter-spacing: 0.02em;
}

@media (max-width: 767px) {
	.site-logo__img {
		height: var(--hh-logo-h-mobile);
	}
}

/* Primary menu */
.primary-menu {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-menu > li {
	position: relative;
}

.primary-menu a {
	display: block;
	padding: 12px 14px;
	font-size: var(--hh-fs-sm);
	font-weight: 500;
	text-decoration: none;
	border-radius: var(--hh-radius);
	position: relative;
}

.primary-menu > li > a::after {
	content: "";
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 6px;
	height: 2px;
	background: var(--hh-accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--hh-dur) var(--hh-ease-out);
}

.primary-menu > li > a:hover::after,
.primary-menu > .current-menu-item > a::after,
.primary-menu > .current-menu-ancestor > a::after {
	transform: scaleX(1);
}

.primary-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	list-style: none;
	margin: 0;
	padding: 8px;
	background: var(--hh-bg);
	border: 1px solid var(--hh-border);
	border-radius: var(--hh-radius-lg);
	box-shadow: var(--hh-shadow-3);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity var(--hh-dur) var(--hh-ease), transform var(--hh-dur) var(--hh-ease-out), visibility var(--hh-dur);
	z-index: 10;
}

.primary-menu .sub-menu .sub-menu {
	top: -8px;
	left: 100%;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.primary-menu .sub-menu a {
	padding: 10px 12px;
}

.primary-menu .sub-menu a:hover {
	background: var(--hh-surface);
	color: var(--hh-text);
}

/* Header actions */
.header-actions {
	display: flex;
	align-items: center;
	gap: 4px;
}

.menu-toggle {
	display: none;
}

@media (max-width: 1023px) {
	.menu-toggle {
		display: inline-grid;
	}
}

.site-header--minimal .menu-toggle {
	display: inline-grid;
}

/* Centered: ปุ่มเมนูอยู่ฝั่งซ้ายของโลโก้แล้ว */
.site-header--centered .header-actions .menu-toggle {
	display: none;
}

@media (max-width: 767px) {
	.header-actions {
		gap: 0;
	}
}

.font-scale {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--hh-border);
	border-radius: 999px;
	padding: 2px;
}

.font-scale__btn {
	min-width: 34px;
	height: 34px;
	padding: 0 6px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	cursor: pointer;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1;
	transition: background-color var(--hh-dur-fast) var(--hh-ease);
}

.font-scale__btn--lg {
	font-size: 1.05rem;
}

.font-scale__btn:hover,
.font-scale__btn[aria-pressed="true"] {
	background: var(--hh-surface-2);
}

.theme-toggle .hh-icon {
	display: none;
}

[data-theme-pref="light"] .theme-toggle__light,
[data-theme-pref="dark"] .theme-toggle__dark,
[data-theme-pref="auto"] .theme-toggle__auto,
html:not([data-theme-pref]) .theme-toggle__auto {
	display: block;
	animation: hh-pop var(--hh-dur) var(--hh-ease-out);
}

@keyframes hh-pop {
	from {
		opacity: 0;
		transform: rotate(-30deg) scale(0.6);
	}
}

/* =========================================================
   6. Drawer (mobile menu)
   ========================================================= */
.drawer {
	position: fixed;
	inset: 0;
	z-index: 200;
}

.drawer[hidden] {
	display: none;
}

.drawer__backdrop {
	position: absolute;
	inset: 0;
	background: var(--hh-overlay);
	opacity: 0;
	transition: opacity var(--hh-dur) var(--hh-ease);
}

.drawer__panel {
	position: absolute;
	inset: 0 auto 0 0;
	width: min(88vw, 380px);
	display: flex;
	flex-direction: column;
	background: var(--hh-bg);
	box-shadow: var(--hh-shadow-3);
	transform: translateX(-100%);
	transition: transform var(--hh-dur-slow) var(--hh-ease-out);
	padding-bottom: env(safe-area-inset-bottom);
}

.drawer.is-open .drawer__backdrop {
	opacity: 1;
}

.drawer.is-open .drawer__panel {
	transform: translateX(0);
}

.drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px var(--hh-gutter);
	border-bottom: 1px solid var(--hh-border);
}

.drawer__body {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 16px var(--hh-gutter);
}

.drawer-menu {
	list-style: none;
	margin: 16px 0;
	padding: 0;
}

.drawer-menu li {
	border-bottom: 1px solid var(--hh-border);
}

.drawer-menu a {
	display: block;
	padding: 14px 0;
	font-weight: 500;
	text-decoration: none;
}

.drawer-menu .sub-menu {
	list-style: none;
	margin: 0 0 8px;
	padding-left: 16px;
}

.drawer-menu .sub-menu li {
	border: 0;
}

.drawer-menu .sub-menu a {
	padding: 8px 0;
	color: var(--hh-text-muted);
	font-weight: 400;
}

.drawer__prefs {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
}

.drawer__label {
	font-size: var(--hh-fs-sm);
	color: var(--hh-text-muted);
}

.drawer__foot {
	display: grid;
	gap: 8px;
	padding: 16px var(--hh-gutter);
	border-top: 1px solid var(--hh-border);
}

/* =========================================================
   7. Search
   ========================================================= */
.search-form {
	display: flex;
	align-items: center;
	border: 1px solid var(--hh-border);
	border-radius: 999px;
	background: var(--hh-surface);
	padding: 4px 4px 4px 18px;
	transition: border-color var(--hh-dur) var(--hh-ease), box-shadow var(--hh-dur) var(--hh-ease);
}

.search-form:focus-within {
	border-color: var(--hh-accent);
	box-shadow: 0 0 0 4px var(--hh-accent-soft);
}

.search-form__input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 8px 0;
	outline: none;
}

.search-form__submit {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 999px;
	background: var(--hh-accent);
	color: var(--hh-accent-contrast);
	cursor: pointer;
}

.search-overlay {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--hh-text);
}

.search-overlay::backdrop {
	background: var(--hh-overlay);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.search-overlay__inner {
	margin-top: clamp(12px, 10vh, 120px);
	max-width: calc(760px + var(--hh-gutter) * 2);
	animation: hh-modal-in var(--hh-dur) var(--hh-ease-out);
}

.search-overlay__form {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--hh-bg);
	border-radius: var(--hh-radius-lg);
	box-shadow: var(--hh-shadow-3);
	padding: 8px 8px 8px 18px;
}

.search-overlay__icon {
	color: var(--hh-text-muted);
	flex: none;
}

.search-overlay__input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	font-size: var(--hh-fs-lg);
	padding: 12px 4px;
	outline: none;
}

.search-overlay__input::-webkit-search-cancel-button {
	display: none;
}

.search-overlay__hint {
	margin-top: 12px;
	text-align: center;
	color: #fff;
	opacity: 0.8;
	font-size: var(--hh-fs-sm);
}

/* spinner ในช่องค้นหาระหว่างรอผล */
.search-overlay__spinner {
	width: 18px;
	height: 18px;
	border: 2px solid var(--hh-border);
	border-top-color: var(--hh-accent);
	border-radius: 50%;
	opacity: 0;
	flex: none;
	transition: opacity var(--hh-dur-fast) var(--hh-ease);
}

.search-overlay.is-loading .search-overlay__spinner {
	opacity: 1;
	animation: hh-spin 0.7s linear infinite;
}

@keyframes hh-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------- Live search results ---------- */
.search-results {
	margin-top: 8px;
	max-height: min(68vh, 640px);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--hh-bg);
	border-radius: var(--hh-radius-lg);
	box-shadow: var(--hh-shadow-3);
	padding: 8px;
}

.search-results:empty {
	display: none;
}

.search-group + .search-group {
	margin-top: 4px;
	padding-top: 8px;
	border-top: 1px solid var(--hh-border);
}

.search-group__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 4px 10px 6px;
	font-family: var(--hh-font-heading);
	font-size: var(--hh-fs-xs);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hh-text-muted);
}

.search-group__action {
	border: 0;
	background: none;
	color: var(--hh-accent);
	font-size: var(--hh-fs-xs);
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
}

.search-item {
	display: grid;
	grid-template-columns: 48px 1fr auto;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	border-radius: var(--hh-radius);
	text-decoration: none;
	color: var(--hh-text);
	animation: hh-item-in var(--hh-dur) var(--hh-ease-out) both;
}

.search-item:nth-child(3) { animation-delay: 20ms; }
.search-item:nth-child(4) { animation-delay: 40ms; }
.search-item:nth-child(5) { animation-delay: 60ms; }
.search-item:nth-child(n + 6) { animation-delay: 80ms; }

@keyframes hh-item-in {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
}

.search-item:hover,
.search-item.is-active {
	background: var(--hh-surface);
	color: var(--hh-text);
}

.search-item.is-active {
	box-shadow: inset 3px 0 0 var(--hh-accent);
}

.search-item--compact {
	grid-template-columns: 1fr auto;
	padding-block: 10px;
}

.search-item--all {
	display: block;
	margin-top: 4px;
	padding: 12px 10px;
	border-top: 1px solid var(--hh-border);
	border-radius: 0 0 var(--hh-radius) var(--hh-radius);
	font-size: var(--hh-fs-sm);
	font-weight: 600;
	color: var(--hh-accent);
	text-align: center;
}

.search-item__thumb {
	width: 48px;
	height: 48px;
	border-radius: var(--hh-radius);
	background: var(--hh-card-media);
	overflow: hidden;
}

.search-item__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.search-item__body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.search-item__title {
	font-weight: 500;
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.search-item__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	font-size: var(--hh-fs-xs);
	color: var(--hh-text-muted);
}

.search-item__sku {
	font-family: var(--hh-font-mono);
	letter-spacing: 0.04em;
}

.search-item__stock--made_to_order {
	color: #b26a00;
}

.search-item__stock--out_of_stock,
.search-item__stock--discontinued {
	color: var(--hh-danger);
}

.search-item__price {
	font-size: var(--hh-fs-xs);
	font-weight: 600;
	white-space: nowrap;
}

.search-item__price--ask {
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--hh-accent-soft);
	color: var(--hh-accent);
}

.search-item__count {
	font-size: var(--hh-fs-xs);
	color: var(--hh-text-muted);
}

.search-item mark {
	background: var(--hh-accent-soft);
	color: inherit;
	border-radius: 3px;
	padding: 0 1px;
}

.search-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 4px 10px 10px;
}

.search-chip {
	padding: 6px 14px;
	border: 1px solid var(--hh-border);
	border-radius: 999px;
	background: var(--hh-bg);
	color: var(--hh-text);
	font-size: var(--hh-fs-sm);
	text-decoration: none;
	cursor: pointer;
	transition: border-color var(--hh-dur-fast) var(--hh-ease), background-color var(--hh-dur-fast) var(--hh-ease);
}

.search-chip:hover {
	border-color: var(--hh-accent);
	color: var(--hh-accent);
}

.search-empty {
	padding: 24px 16px;
	text-align: center;
}

.search-empty__title {
	font-weight: 600;
	margin-bottom: 6px;
}

.search-empty__hint {
	color: var(--hh-text-muted);
	font-size: var(--hh-fs-sm);
	margin: 0 auto 16px;
	max-width: 46ch;
	padding: 8px;
}

.search-skeleton__row {
	display: grid;
	grid-template-columns: 48px 1fr;
	gap: 12px;
	padding: 8px 10px;
}

.search-skeleton__thumb,
.search-skeleton__lines span {
	display: block;
	border-radius: var(--hh-radius);
	background: linear-gradient(90deg, var(--hh-surface) 25%, var(--hh-surface-2) 50%, var(--hh-surface) 75%);
	background-size: 200% 100%;
	animation: hh-shimmer 1.2s linear infinite;
}

.search-skeleton__thumb {
	height: 48px;
}

.search-skeleton__lines {
	display: grid;
	gap: 8px;
	align-content: center;
}

.search-skeleton__lines span {
	height: 12px;
}

.search-skeleton__lines span:last-child {
	width: 40%;
}

@keyframes hh-shimmer {
	to {
		background-position: -200% 0;
	}
}

@media (max-width: 767px) {
	.search-overlay__inner {
		margin-top: 8px;
	}

	.search-results {
		max-height: calc(100dvh - 120px);
	}

	.search-item {
		grid-template-columns: 44px 1fr;
	}

	.search-item__thumb {
		width: 44px;
		height: 44px;
	}

	.search-item__price {
		grid-column: 2;
		justify-self: start;
	}
}

@keyframes hh-modal-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.96);
	}
}

/* =========================================================
   8. Cards & grid
   ========================================================= */
.card-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(12px, 2.4vw, 28px);
}

@media (min-width: 768px) {
	.card-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.card-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	container-type: inline-size;
}

.card__media {
	display: block;
	aspect-ratio: 1;
	border-radius: var(--hh-radius-lg);
	overflow: hidden;
	background: var(--hh-card-media);
}

.card__img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform var(--hh-dur-slow) var(--hh-ease-out);
}

.card:hover .card__img {
	transform: scale(1.04);
}

.card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
}

.card__body {
	padding: 12px 2px 0;
}

.card__sku,
.card__meta {
	font-family: var(--hh-font-mono);
	font-size: var(--hh-fs-xs);
	color: var(--hh-text-muted);
	letter-spacing: 0.04em;
	margin: 0 0 4px;
}

.card__meta {
	font-family: inherit;
	letter-spacing: 0;
}

.card__title {
	font-family: var(--hh-font-body);
	font-size: var(--hh-fs-base);
	font-weight: 600;
	line-height: 1.45;
	margin: 0;
}

.card__title a {
	text-decoration: none;
}

/* ทั้งการ์ดกดได้ */
.card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.card__excerpt {
	margin: 6px 0 0;
	font-size: var(--hh-fs-sm);
	color: var(--hh-text-muted);
}

@container (max-width: 200px) {
	.card__title {
		font-size: var(--hh-fs-sm);
	}
}

/* =========================================================
   9. Entry / prose
   ========================================================= */
.entry__header {
	padding-top: var(--hh-section-y);
	padding-bottom: 24px;
}

.entry__title {
	font-size: var(--hh-fs-3xl);
	margin: 0;
}

.entry__hero img {
	width: 100%;
	border-radius: var(--hh-radius-lg);
}

.entry__content {
	padding-block: 32px var(--hh-section-y);
}

.entry__footer {
	padding-bottom: var(--hh-section-y);
}

.prose {
	font-size: var(--hh-fs-lg);
}

.prose > * + * {
	margin-top: 1.2em;
}

.prose h2 {
	font-size: var(--hh-fs-2xl);
	margin-top: 2em;
}

.prose h3 {
	font-size: var(--hh-fs-xl);
	margin-top: 1.6em;
}

.prose img {
	border-radius: var(--hh-radius);
}

.prose a {
	color: var(--hh-accent);
}

.prose blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--hh-accent);
	color: var(--hh-text-muted);
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--hh-fs-sm);
}

.prose th,
.prose td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--hh-border);
	text-align: left;
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 32px;
}

.post-navigation a {
	display: block;
	padding: 16px;
	border: 1px solid var(--hh-border);
	border-radius: var(--hh-radius-lg);
	text-decoration: none;
}

.post-navigation .nav-next {
	text-align: right;
}

/* Pagination */
.pagination {
	margin-top: 48px;
}

.pagination .nav-links {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
}

.pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 10px;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 500;
}

.pagination .page-numbers:hover {
	background: var(--hh-surface);
}

.pagination .page-numbers.current {
	background: var(--hh-text);
	color: var(--hh-bg);
}

/* Empty state */
.empty-state {
	text-align: center;
	max-width: 560px;
	margin-inline: auto;
	padding-block: 48px;
}

.empty-state .search-form {
	margin: 24px 0;
}

.empty-state__title {
	font-size: var(--hh-fs-2xl);
}

.empty-state__alt {
	color: var(--hh-text-muted);
	margin-top: 24px;
}

/* =========================================================
   10. Footer
   ========================================================= */
.site-footer {
	margin-top: var(--hh-section-y);
	background: var(--hh-surface);
	border-top: 1px solid var(--hh-border);
	font-size: var(--hh-fs-sm);
}

.site-footer__grid {
	display: grid;
	gap: 32px;
	padding-block: clamp(40px, 6vw, 72px);
}

@media (min-width: 768px) {
	.site-footer__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.site-footer__grid {
		grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
	}
}

.site-footer .wp-block-heading,
.site-footer .widget-title {
	font-family: var(--hh-font-heading);
	font-size: var(--hh-fs-xs);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--hh-text-muted);
	margin-bottom: 16px;
}

.site-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ลิงก์ในรายการ (widget หมวด / คลังบทความ / เมนู) ต้องกดง่ายบนมือถือ: สูงอย่างน้อย 24px (WCAG 2.5.8) */
.site-footer li > a {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
}

/* หลาย widget ในคอลัมน์เดียว (เช่น block widget เริ่มต้นของ WordPress) */
.site-footer .widget + .widget,
.site-footer .wp-block-group + .wp-block-group {
	margin-top: 28px;
}

.site-footer .primary-menu {
	display: block;
}

.site-footer .primary-menu a {
	padding: 4px 0;
}

.site-footer .primary-menu a::after {
	display: none;
}

.site-footer__desc {
	color: var(--hh-text-muted);
	margin-top: 16px;
}

.footer-line,
.footer-contact a {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	text-decoration: none;
}

.footer-line .hh-icon,
.footer-contact .hh-icon {
	flex: none;
	margin-top: 0.2em;
	color: var(--hh-text-muted);
}

.footer-contact li + li {
	margin-top: 10px;
}

.site-footer__bottom {
	border-top: 1px solid var(--hh-border);
	color: var(--hh-text-muted);
	font-size: var(--hh-fs-xs);
}

.site-footer__bottom-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	padding-block: 20px;
}

.site-footer__bottom p {
	margin: 0;
}

.footer-menu {
	display: flex;
	gap: 16px;
}

.footer-menu a {
	text-decoration: none;
}

.social-icons {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
}

.social-icons a {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	text-decoration: none;
	transition: background-color var(--hh-dur-fast) var(--hh-ease), transform var(--hh-dur-fast) var(--hh-ease);
}

.social-icons a:hover {
	background: var(--hh-surface-2);
	transform: translateY(-2px);
}

.social-icons--sm {
	margin: 0;
}

.social-icons--sm a {
	width: 32px;
	height: 32px;
}

.social-icons--sm .hh-icon {
	width: 16px;
	height: 16px;
}

/* =========================================================
   11. Floating: contact FAB, scroll-to-top, bottom nav
   ========================================================= */
@media (max-width: 1023px) {
	.has-bottom-nav {
		--hh-bottom-nav-h: calc(64px + env(safe-area-inset-bottom));
		--hh-fab-offset: var(--hh-bottom-nav-h);
	}
}

.contact-fab {
	position: fixed;
	right: 16px;
	bottom: calc(16px + var(--hh-fab-offset) + env(safe-area-inset-bottom));
	z-index: 90;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
}

.has-bottom-nav .contact-fab {
	bottom: calc(16px + var(--hh-fab-offset));
}

.contact-fab__toggle {
	position: relative;
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border: 0;
	border-radius: 999px;
	background: var(--hh-line-ui);
	color: #fff;
	box-shadow: var(--hh-shadow-3);
	cursor: pointer;
	transition: transform var(--hh-dur) var(--hh-ease-out);
}

.contact-fab__toggle:hover {
	transform: scale(1.06);
}

.contact-fab__toggle::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: var(--hh-line-ui);
	animation: hh-pulse 2.6s var(--hh-ease) infinite;
	z-index: -1;
}

.contact-fab.is-open .contact-fab__toggle::before {
	animation: none;
}

@keyframes hh-pulse {
	0% {
		transform: scale(1);
		opacity: 0.5;
	}

	70%,
	100% {
		transform: scale(1.6);
		opacity: 0;
	}
}

.contact-fab__close,
.contact-fab.is-open .contact-fab__open {
	display: none;
}

.contact-fab.is-open .contact-fab__close {
	display: block;
}

.contact-fab__list {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.contact-fab__list[hidden] {
	display: none;
}

.contact-fab__list li {
	opacity: 0;
	transform: translateY(12px) scale(0.9);
	transition: opacity var(--hh-dur) var(--hh-ease), transform var(--hh-dur) var(--hh-ease-out);
}

.contact-fab.is-open .contact-fab__list li {
	opacity: 1;
	transform: none;
}

/* stagger จากปุ่มล่างขึ้นบน */
.contact-fab.is-open .contact-fab__list li:nth-last-child(2) { transition-delay: 40ms; }
.contact-fab.is-open .contact-fab__list li:nth-last-child(3) { transition-delay: 80ms; }
.contact-fab.is-open .contact-fab__list li:nth-last-child(4) { transition-delay: 120ms; }
.contact-fab.is-open .contact-fab__list li:nth-last-child(5) { transition-delay: 160ms; }

.contact-fab__item {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
}

.contact-fab__label {
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--hh-bg);
	color: var(--hh-text);
	box-shadow: var(--hh-shadow-2);
	font-size: var(--hh-fs-sm);
	font-weight: 500;
	white-space: nowrap;
}

.contact-fab__icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	background: var(--hh-bg);
	color: var(--hh-text);
	box-shadow: var(--hh-shadow-2);
	transition: transform var(--hh-dur-fast) var(--hh-ease);
}

.contact-fab__item:hover .contact-fab__icon {
	transform: scale(1.08);
}

.contact-fab__item--line .contact-fab__icon {
	background: var(--hh-line-ui);
	color: #fff;
}

.contact-fab__item--messenger .contact-fab__icon {
	background: var(--hh-messenger);
	color: #fff;
}

/* มือถือที่มี bottom nav: ใช้ปุ่ม "ติดต่อ" ใน bottom nav แทนปุ่มลอย */
@media (max-width: 1023px) {
	.has-bottom-nav .contact-fab__toggle {
		display: none;
	}
}

/* Scroll to top (ข้อ 12.6) */
.scroll-top {
	--hh-st-size: 48px;
	position: fixed;
	bottom: calc(16px + var(--hh-fab-offset) + env(safe-area-inset-bottom));
	z-index: 80;
	display: grid;
	place-items: center;
	width: var(--hh-st-size);
	height: var(--hh-st-size);
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--hh-bg);
	color: var(--hh-text);
	box-shadow: var(--hh-shadow-2);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px) scale(0.85);
	transition: opacity var(--hh-dur) var(--hh-ease), transform var(--hh-dur) var(--hh-ease-out), visibility var(--hh-dur);
}

.has-bottom-nav .scroll-top {
	bottom: calc(16px + var(--hh-fab-offset));
}

.scroll-top--right {
	right: 20px;
}

.scroll-top--left {
	left: 20px;
}

/* อยู่เหนือปุ่มติดต่อลอยเมื่ออยู่ฝั่งเดียวกัน */
.has-contact-fab .scroll-top--right {
	bottom: calc(16px + 56px + 12px + var(--hh-fab-offset) + env(safe-area-inset-bottom));
	right: 20px;
}

@media (max-width: 1023px) {
	.has-contact-fab.has-bottom-nav .scroll-top--right {
		bottom: calc(16px + var(--hh-fab-offset));
	}
}

.scroll-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

/* ซ่อนชั่วคราวตอนรายการติดต่อกางอยู่ เพื่อไม่ให้ทับกัน */
.contact-fab.is-open ~ .scroll-top {
	opacity: 0;
	visibility: hidden;
}

.scroll-top:hover {
	transform: translateY(-2px);
	color: var(--hh-accent);
}

.scroll-top__ring {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
	pointer-events: none;
}

.scroll-top__track,
.scroll-top__progress {
	fill: none;
	stroke-width: 2.5;
}

.scroll-top__track {
	stroke: var(--hh-border);
}

.scroll-top__progress {
	stroke: var(--hh-accent);
	stroke-linecap: round;
	stroke-dasharray: 100;
	stroke-dashoffset: 100;
}

.scroll-top__icon {
	position: relative;
}

/* Bottom nav (มือถือ) */
.bottom-nav {
	position: fixed;
	inset: auto 0 0 0;
	z-index: 95;
	display: flex;
	justify-content: space-around;
	height: var(--hh-bottom-nav-h);
	padding-bottom: env(safe-area-inset-bottom);
	background: color-mix(in srgb, var(--hh-bg) 94%, transparent);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	backdrop-filter: saturate(1.4) blur(14px);
	border-top: 1px solid var(--hh-border);
}

.bottom-nav__item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	border: 0;
	background: none;
	color: var(--hh-text-muted);
	font-size: 0.6875rem;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	transition: color var(--hh-dur-fast) var(--hh-ease);
}

.bottom-nav__item.is-active,
.bottom-nav__item:hover,
.bottom-nav__item[aria-expanded="true"] {
	color: var(--hh-accent);
}

.bottom-nav__item:active .hh-icon {
	transform: scale(0.9);
}

.bottom-nav__item--contact .hh-icon {
	color: var(--hh-line-ui);
}

/* สถานะร้าน */
.store-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: var(--hh-fs-xs);
	font-weight: 600;
	color: var(--hh-text-muted);
}

.store-status:not([data-state]) { display: none; }
.store-status__dot { width: 8px; height: 8px; border-radius: 999px; background: currentColor; }
.store-status[data-state="open"] { color: var(--hh-success); }
.store-status[data-state="open"] .store-status__dot { animation: hh-pulse-dot 2s ease-in-out infinite; }
.store-status[data-state="closing"] { color: #c77700; }
.store-status[data-state="holiday"] { color: var(--hh-danger); }

[data-theme="dark"] .store-status[data-state="open"] { color: #4ad27a; }

@keyframes hh-pulse-dot {
	50% { opacity: 0.35; }
}

.contact-fab__status {
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--hh-bg);
	box-shadow: var(--hh-shadow-2);
}

.drawer__foot .store-status { justify-content: center; margin-bottom: 4px; }

/* แถบประกาศวันหยุด */
.holiday-bar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 48px;
	background: #fff4e5;
	color: #6b3d00;
	font-size: var(--hh-fs-sm);
	text-align: center;
}

.holiday-bar p { margin: 0; }
.holiday-bar__close { position: absolute; right: 12px; color: inherit; }
[data-theme="dark"] .holiday-bar { background: #3a2a10; color: #ffcf8a; }

/* Toast */
.toast-region {
	position: fixed;
	left: 50%;
	bottom: calc(24px + var(--hh-bottom-nav-h));
	z-index: 300;
	display: grid;
	gap: 8px;
	transform: translateX(-50%);
	pointer-events: none;
	width: max-content;
	max-width: calc(100vw - 32px);
}

.toast {
	padding: 12px 18px;
	border-radius: 999px;
	background: var(--hh-text);
	color: var(--hh-bg);
	font-size: var(--hh-fs-sm);
	box-shadow: var(--hh-shadow-3);
	text-align: center;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity var(--hh-dur) var(--hh-ease), transform var(--hh-dur) var(--hh-ease-out);
}

.toast.is-in {
	opacity: 1;
	transform: none;
}

/* QR dialog (เดสก์ท็อป → LINE บนมือถือ) */
.qr-dialog {
	border: 0;
	padding: 0;
	background: transparent;
	color: var(--hh-text);
}

.qr-dialog::backdrop {
	background: var(--hh-overlay);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.qr-dialog__box {
	position: relative;
	width: min(92vw, 360px);
	padding: 28px 24px 24px;
	border-radius: var(--hh-radius-lg);
	background: var(--hh-bg);
	box-shadow: var(--hh-shadow-3);
	text-align: center;
	animation: hh-modal-in var(--hh-dur) var(--hh-ease-out);
}

.qr-dialog__close {
	position: absolute;
	top: 8px;
	right: 8px;
}

.qr-dialog__title {
	font-weight: 700;
	font-size: var(--hh-fs-lg);
	margin-bottom: 12px;
}

.qr-dialog__code {
	width: 220px;
	height: 220px;
	margin: 0 auto;
	padding: 8px;
	border-radius: var(--hh-radius);
	background: #fff; /* QR ต้องพื้นขาวเสมอ แม้อยู่ในโหมดมืด */
	display: grid;
	place-items: center;
}

.qr-dialog__code svg {
	width: 100%;
	height: 100%;
}

.qr-dialog__hint {
	margin: 14px 0 16px;
	font-size: var(--hh-fs-sm);
	color: var(--hh-text-muted);
}

.qr-dialog__actions {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
}

/* =========================================================
   12. Motion: reveal, view transitions, reduced motion
   ========================================================= */
.js-reveal [data-reveal] {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity var(--hh-dur-slow) var(--hh-ease-out), transform var(--hh-dur-slow) var(--hh-ease-out);
	transition-delay: var(--hh-reveal-delay, 0ms);
}

.js-reveal [data-reveal].is-revealed {
	opacity: 1;
	transform: none;
}

@view-transition {
	navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
	animation-duration: 300ms;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 1ms !important;
		scroll-behavior: auto !important;
	}

	.js-reveal [data-reveal] {
		opacity: 1;
		transform: none;
	}

	@view-transition {
		navigation: none;
	}
}

/* =========================================================
   13. Print
   ========================================================= */
@media print {
	.site-header,
	.site-footer,
	.contact-fab,
	.scroll-top,
	.bottom-nav,
	.drawer,
	.announcement {
		display: none !important;
	}
}

/* =========================================================
   14. บทความ: สารบัญ, เวลาอ่าน, แชร์ (README ข้อ 19)
   ========================================================= */
.read-progress {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 120;
	height: 3px;
	pointer-events: none;
}

.read-progress span {
	display: block;
	height: 100%;
	background: var(--hh-accent);
	transform: scaleX(0);
	transform-origin: 0 50%;
}

.entry__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.entry__meta a { color: inherit; }
.entry__lead { margin: 12px 0 0; font-size: var(--hh-fs-lg); color: var(--hh-text-muted); }
.entry__header .breadcrumbs { margin-bottom: 12px; }

.entry__layout { max-width: calc(var(--hh-container-narrow) + var(--hh-gutter) * 2); }
.entry__layout .entry__content { min-width: 0; }

.toc {
	margin-top: 24px;
	padding: 14px 16px;
	border: 1px solid var(--hh-border);
	border-radius: var(--hh-radius-lg);
	background: var(--hh-surface);
}

.toc__title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.toc__title::-webkit-details-marker { display: none; }
.toc[open] .toc__title .hh-icon { transform: rotate(180deg); }
.toc__list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.toc__item a { display: block; padding: 6px 10px; border-left: 2px solid transparent; border-radius: 0 var(--hh-radius-sm) var(--hh-radius-sm) 0; color: var(--hh-text-muted); font-size: var(--hh-fs-sm); line-height: 1.5; text-decoration: none; }
.toc__item--h3 a { padding-left: 24px; font-size: var(--hh-fs-xs); }
.toc__item a:hover { color: var(--hh-text); background: var(--hh-bg); }
.toc__item a.is-active { color: var(--hh-accent); border-left-color: var(--hh-accent); font-weight: 600; }

@media (min-width: 1024px) {
	.entry--toc .entry__layout {
		display: grid;
		grid-template-columns: 250px minmax(0, var(--hh-container-narrow));
		gap: 48px;
		justify-content: center;
		max-width: var(--hh-container);
	}
	.entry--toc .entry__header,
	.entry--toc .entry__footer { margin-inline: auto; }
	.entry__toc { position: relative; }
	.entry__toc .toc { position: sticky; top: calc(var(--hh-header-h) + 24px); margin-top: 32px; max-height: calc(100vh - var(--hh-header-h) - 48px); overflow: auto; }
}

.prose h2,
.prose h3 { scroll-margin-top: calc(var(--hh-header-h) + 16px); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 20px 0; border-top: 1px solid var(--hh-border); border-bottom: 1px solid var(--hh-border); margin: 24px 0; }
.share__title { margin: 0 8px 0 0; font-weight: 600; }
.share .btn[hidden] { display: none; }

.author-box { padding: 16px 20px; margin-bottom: 24px; border-radius: var(--hh-radius-lg); background: var(--hh-surface); }
.author-box__name { margin: 0; font-weight: 700; }
.author-box__bio { margin: 6px 0 0; color: var(--hh-text-muted); font-size: var(--hh-fs-sm); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.chip-row .chip { text-decoration: none; }

/* แทรกสินค้าในบทความ [hh_products] */
.prose .hh-embed { margin: 2em 0; padding: 16px; border: 1px solid var(--hh-border); border-radius: var(--hh-radius-lg); background: var(--hh-surface); font-size: var(--hh-fs-base); }
.hh-embed__title { margin: 0 0 12px; font-weight: 700; }
.hh-embed__grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hh-embed__grid--1 { grid-template-columns: minmax(0, 260px); }
@media (min-width: 768px) {
	.hh-embed__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.hh-embed__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.prose .hh-embed a { text-decoration: none; }
.prose .hh-embed .pcard__title a { color: var(--hh-text); }
.prose .hh-embed img { border-radius: 0; }

@media (prefers-reduced-motion: reduce) {
	.toc[open] .toc__title .hh-icon { transform: none; }
}
