/*
Theme Name: bun-theme
Theme URI: http://bun.local
Author: bun
Description: Classic PHP theme for bun bakery (products, promotions, branches, franchise). Uses Secure Custom Fields.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
License: GPLv2 or later
Text Domain: bun-theme
*/

/* ==========================================================================
   1. Tokens (from BUN Revamp 2026 design, 1920px artboard)
   ========================================================================== */
:root {
	--c-orange: #ee9a42;
	--c-orange-dark: #d9822a;
	--c-orange-soft: #f5c48a;
	--c-choco: #48301c;
	--c-choco-2: #5a3b2c;
	--c-footer: #4c3019;
	--c-cream-50: #fcfaf8;
	--c-cream-100: #f8f1e8;
	--c-cream-200: #f3ede8;
	--c-cream-300: #f8f0e4;
	--c-blog-top: #f4ece4;
	--c-blog-bottom: #fcf8f4;
	--c-branch-bar: #f4ece4;
	--c-white: #fff;
	--c-line: #ddd3ca;
	--c-muted: #8a7768;
	--c-error: #b4410f;
	--c-success: #3f7d3a;

	--radius-sm: 16px;
	--radius-card: 28px;
	--radius-lg: clamp(28px, 3vw, 48px);
	--radius-pill: 999px;
	--shadow-card: 0 8px 24px rgba(72, 48, 28, 0.12);
	--shadow-card-hover: 0 14px 32px rgba(72, 48, 28, 0.18);
	--shadow-btn: 0 4px 10px rgba(238, 154, 66, 0.35);

	--container: 1200px;
	--container-wide: 1440px;
	--gutter: 20px;
	/* Header bar (compact). Height = padding-y × 2 + control size. */
	--hdr-max: 1200px;
	--hdr-pad-y: 12px;
	--hdr-pad-x: 24px;
	--hdr-control: 40px;
	--hdr-h: calc(var(--hdr-pad-y) * 2 + var(--hdr-control));
	--hdr-radius: 24px;
	--hdr-logo-h: 36px;
	--hdr-bar-gap: 24px;
	--hdr-nav-gap: 28px;
	--hdr-nav-font: 16px;
	--hdr-pill-y: 6px;
	--hdr-pill-x: 14px;
	--hdr-tools-gap: 2px;
	--hdr-icon: 24px;
	--hdr-top: clamp(10px, 1.4vw, 24px);
	--hdr-side: calc(clamp(16px, 6vw, 120px) + 10px);

	--font-head: "Kanit", "Prompt", "Noto Sans Thai", system-ui, sans-serif;
	--font-body: "Prompt", "Noto Sans Thai", system-ui, sans-serif;

	--fs-section: clamp(28px, 2.4vw + 10px, 56px);
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

html.is-dialog-open {
	overflow: hidden;
}

body {
	margin: 0;
	overflow-x: clip;
	background: var(--c-cream-50);
	color: var(--c-choco-2);
	font-family: var(--font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--c-orange-dark);
}

a:hover {
	color: var(--c-choco);
}

h1,
h2,
h3,
h4 {
	margin: 0 0 0.5em;
	color: var(--c-choco);
	font-family: var(--font-head);
	font-weight: 600;
	line-height: 1.25;
}

p {
	margin: 0 0 1em;
}

button {
	font: inherit;
	color: inherit;
}

:focus-visible {
	outline: 3px solid var(--c-orange);
	outline-offset: 3px;
}

.icon {
	width: 1em;
	height: 1em;
	flex-shrink: 0;
}

.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;
	left: 12px;
	top: 12px;
	z-index: 1000;
	padding: 10px 18px;
	background: var(--c-white);
	color: var(--c-choco);
	border-radius: var(--radius-pill);
	box-shadow: var(--shadow-card);
}

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

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

.site-main {
	display: block;
}

.empty-state {
	padding: 40px 0;
	text-align: center;
	color: var(--c-muted);
}

/* ==========================================================================
   3. Components: buttons, pills, tabs, badge, dots, inputs
   ========================================================================== */
.btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	min-height: 44px;
	padding: 0.45em 1.5em;
	border: 0;
	border-radius: var(--radius-pill);
	font-family: var(--font-head);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}

.btn--primary {
	background: var(--c-orange);
	color: var(--c-white);
	box-shadow: var(--shadow-btn);
}

.btn--primary:hover {
	background: var(--c-orange-dark);
	color: var(--c-white);
	transform: translateY(-1px);
}

.btn--primary:disabled {
	opacity: 0.6;
	cursor: wait;
	transform: none;
}

.btn--lg {
	min-height: clamp(48px, 3.4vw, 58px);
	font-size: clamp(17px, 0.6vw + 12px, 24px);
}

.btn--sm {
	min-height: 36px;
	padding: 0.3em 1.1em;
	font-size: 16px;
}

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

.btn .icon {
	font-size: 1.2em;
}

.btn--lg:has(.btn__arrow) {
	padding-left: 2em;
	padding-right: 3em;
}

.btn__arrow {
	position: absolute;
	right: 12px;
	width: 1.45em !important;
	height: 1.45em !important;
	color: var(--c-orange);
}

.pill {
	display: inline-block;
	max-width: 100%;
	padding: 0.12em 0.9em 0.18em;
	border-radius: var(--radius-pill);
	background: var(--c-orange);
	color: var(--c-white);
	font-family: var(--font-head);
	font-weight: 500;
	line-height: 1.35;
	box-shadow: 0 3px 8px rgba(238, 154, 66, 0.3);
	text-wrap: balance;
}

.tabs {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.tabs::-webkit-scrollbar {
	display: none;
}

.tab {
	flex-shrink: 0;
	padding: 0.25em 1.1em;
	border: 0;
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--c-choco);
	font-family: var(--font-head);
	font-size: clamp(16px, 0.5vw + 12px, 22px);
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.tab:hover {
	color: var(--c-orange-dark);
}

.tab.is-active {
	background: var(--c-orange);
	color: var(--c-white);
	box-shadow: var(--shadow-btn);
}

.tabs--card {
	justify-content: space-between;
	max-width: var(--container-wide);
	margin: 0 auto;
}

/* Home "เมนูบัน" tab bar: same width and side margins as the header bar. */
.menu-section {
	container-type: inline-size;
}

.menu-section .tabs--card {
	width: min(100cqw - var(--hdr-side) * 2, var(--hdr-max));
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
}

.tabs--card {
	padding: 12px clamp(12px, 2vw, 40px);
	border-radius: 24px;
	background: var(--c-white);
	box-shadow: var(--shadow-card);
}

.tabs--card .tab {
	padding-inline: 0.8em;
	font-size: clamp(15px, 0.35vw + 11px, 20px);
}

/* Scrollable on narrow screens: fade the edge that has more tabs. */
.tabs.is-scroll-end {
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 48px);
	mask-image: linear-gradient(90deg, transparent 0, #000 48px);
}

.tabs.is-scroll-start {
	-webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
	mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
}

.tabs.is-scroll-start.is-scroll-end {
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent);
	mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent);
}

.tabs--outline {
	padding: 4px;
	border: 1.5px solid var(--c-choco);
	border-radius: var(--radius-pill);
}

.badge-best {
	position: absolute;
	z-index: 3;
	top: -22px;
	left: -24px;
	display: grid;
	place-items: center;
	width: 84px;
	height: 84px;
	background: var(--c-orange);
	color: var(--c-white);
	clip-path: polygon(50% 0%, 57.8% 10.8%, 69.1% 3.8%, 72.2% 16.7%, 85.4% 14.6%, 83.3% 27.8%, 96.2% 30.9%, 89.2% 42.2%, 100% 50%, 89.2% 57.8%, 96.2% 69.1%, 83.3% 72.2%, 85.4% 85.4%, 72.2% 83.3%, 69.1% 96.2%, 57.8% 89.2%, 50% 100%, 42.2% 89.2%, 30.9% 96.2%, 27.8% 83.3%, 14.6% 85.4%, 16.7% 72.2%, 3.8% 69.1%, 10.8% 57.8%, 0% 50%, 10.8% 42.2%, 3.8% 30.9%, 16.7% 27.8%, 14.6% 14.6%, 27.8% 16.7%, 30.9% 3.8%, 42.2% 10.8%);
	font-family: var(--font-head);
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	text-align: center;
	pointer-events: none;
}

.badge-best--lg {
	top: 16px;
	left: 16px;
	width: 104px;
	height: 104px;
	font-size: 20px;
}

.dot {
	width: 14px;
	height: 14px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--c-white);
	cursor: pointer;
	transition: background-color 0.2s, transform 0.2s;
}

.dot.is-active {
	background: var(--c-orange);
	transform: scale(1.15);
}

.carousel-dots {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-top: 28px;
}

.carousel-dots .dot {
	background: #d8c8b8;
}

.carousel-dots .dot.is-active {
	background: var(--c-orange);
}

.input,
.search-form input[type="search"] {
	width: 100%;
	height: clamp(48px, 3.2vw, 60px);
	padding: 0 24px;
	border: 1.5px solid var(--c-line);
	border-radius: var(--radius-pill);
	background: var(--c-white);
	color: var(--c-choco);
	font-family: var(--font-head);
	font-size: clamp(16px, 0.3vw + 13px, 20px);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.input::placeholder {
	color: #b3a69b;
}

.input:focus {
	outline: none;
	border-color: var(--c-orange);
	box-shadow: 0 0 0 4px rgba(238, 154, 66, 0.2);
}

.input[aria-invalid="true"] {
	border-color: var(--c-error);
}

.field-error {
	margin: 6px 0 0 20px;
	color: var(--c-error);
	font-size: 14px;
}

.field-error:empty {
	display: none;
}

.check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	line-height: 1.5;
	cursor: pointer;
}

.check input {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	accent-color: var(--c-orange);
}

.check a {
	color: inherit;
	text-decoration: underline;
}

.hp-field {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form-msg {
	margin: 12px 0 0;
	font-size: 16px;
	text-align: center;
}

.form-msg:empty {
	display: none;
}

.form-msg.is-success {
	color: var(--c-success);
	font-weight: 500;
}

.form-msg.is-error {
	color: var(--c-error);
}

.section-title {
	margin-bottom: 0.7em;
	font-size: var(--fs-section);
	text-align: center;
}

.section-title--en {
	text-transform: uppercase;
	letter-spacing: 0.01em;
}

.section-title__sub {
	display: block;
	margin-top: 0.1em;
	color: var(--c-orange);
	font-size: 0.55em;
	font-weight: 500;
	text-transform: none;
}

.link-more {
	font-family: var(--font-head);
	font-weight: 500;
}

/* Decorative background bits (hidden on small screens). */
.deco-dots {
	position: absolute;
	z-index: 0;
	width: 130px;
	height: 170px;
	background: radial-gradient(circle, #d8c2a6 9px, transparent 10px) 0 0 / 44px 44px;
	opacity: 0.8;
	pointer-events: none;
}

.deco-dots--left {
	top: 40px;
	left: -20px;
}

.deco-dots--right {
	top: 30px;
	right: 0;
}

.deco-lines::before {
	content: "";
	position: absolute;
	z-index: 0;
	left: 0;
	bottom: 0;
	width: 32%;
	height: 60%;
	background: repeating-linear-gradient(120deg, transparent 0 26px, rgba(214, 180, 130, 0.45) 26px 27.5px);
	-webkit-mask-image: linear-gradient(to top right, #000 10%, transparent 70%);
	mask-image: linear-gradient(to top right, #000 10%, transparent 70%);
	pointer-events: none;
}

.float-deco {
	position: absolute;
	z-index: 0;
	height: auto;
	pointer-events: none;
	user-select: none;
}

.float-deco--coffee {
	top: -140px;
	right: 0;
	width: 160px;
}

.float-deco--choc {
	bottom: -120px;
	left: 0;
	width: 195px;
}

.float-deco--croissant {
	top: 120px;
	right: 0;
	width: 107px;
}

@media (max-width: 1279px) {
	.float-deco,
	.deco-dots {
		display: none;
	}
}

/* ==========================================================================
   4. Header
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	/* Side margins grow with the screen (design: 245px each side at 1920). */
	padding: var(--hdr-top) var(--hdr-side) 0;
	pointer-events: none;
}

.admin-bar .site-header {
	top: 32px;
}

.site-header__bar {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--hdr-bar-gap);
	max-width: var(--hdr-max);
	height: var(--hdr-h);
	margin: 0 auto;
	padding: var(--hdr-pad-y) var(--hdr-pad-x);
	border-radius: var(--hdr-radius);
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 6px 22px rgba(72, 48, 28, 0.12);
	pointer-events: auto;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.site-header__logo {
	flex-shrink: 0;
	line-height: 0;
}

.site-header__logo img {
	display: block;
	width: auto;
	height: var(--hdr-logo-h);
}

.site-nav {
	flex: 1;
}

.site-nav__menu,
.site-nav__menu .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__menu {
	display: flex;
	align-items: center;
	gap: max(0px, var(--hdr-nav-gap) - var(--hdr-pill-x) * 2);
}

.site-nav__menu > li {
	position: relative;
	display: flex;
	align-items: center;
}

.site-nav__menu a {
	display: block;
	padding: var(--hdr-pill-y) var(--hdr-pill-x);
	border-radius: var(--radius-pill);
	color: var(--c-choco);
	font-family: var(--font-head);
	font-size: var(--hdr-nav-font);
	line-height: 1.4;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background-color 0.2s, color 0.2s;
}

.site-nav__menu > li > a:hover {
	color: var(--c-orange-dark);
}

.site-nav__menu > li.is-active > a {
	background: var(--c-orange);
	color: var(--c-white);
	box-shadow: var(--shadow-btn);
}

.submenu-toggle {
	display: inline-grid;
	place-items: center;
	width: 22px;
	height: 22px;
	margin-left: calc(var(--hdr-pill-x) * -1 + 2px);
	padding: 0;
	border: 0;
	background: none;
	color: var(--c-choco);
	cursor: pointer;
}

.submenu-toggle .icon {
	width: 16px;
	height: 16px;
	transition: transform 0.2s;
}

.is-open > .submenu-toggle .icon {
	transform: rotate(180deg);
}

.site-nav .sub-menu {
	position: absolute;
	top: calc(100% + 12px);
	left: 0;
	min-width: 220px;
	padding: 10px;
	border-radius: var(--radius-sm);
	background: var(--c-white);
	box-shadow: var(--shadow-card-hover);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}

.site-nav .sub-menu::before {
	content: "";
	position: absolute;
	inset: -14px 0 auto;
	height: 14px;
}

.site-nav .sub-menu a {
	padding: 0.5em 1em;
	border-radius: 10px;
	font-size: 16px;
	text-transform: none;
}

.site-nav .sub-menu a:hover,
.site-nav .sub-menu .current-menu-item > a {
	background: var(--c-cream-200);
	color: var(--c-orange-dark);
}

.site-header__tools {
	display: flex;
	align-items: center;
	gap: var(--hdr-tools-gap);
	margin-left: auto;
}

.icon-btn {
	display: inline-grid;
	place-items: center;
	width: var(--hdr-control);
	height: var(--hdr-control);
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--c-choco);
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.icon-btn:hover {
	background: var(--c-cream-200);
	color: var(--c-orange-dark);
}

.icon-btn .icon {
	width: var(--hdr-icon);
	height: var(--hdr-icon);
}

.lang-switch {
	position: relative;
}

.lang-switch__btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: var(--hdr-control);
	padding: 0 10px;
	border: 0;
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--c-choco);
	font-family: var(--font-head);
	font-size: var(--hdr-nav-font);
	font-weight: 600;
	cursor: pointer;
}

.lang-switch__btn:hover {
	background: var(--c-cream-200);
}

.lang-switch__btn .icon {
	width: var(--hdr-icon);
	height: var(--hdr-icon);
}

.lang-switch__menu {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	min-width: 190px;
	margin: 0;
	padding: 8px;
	list-style: none;
	border-radius: var(--radius-sm);
	background: var(--c-white);
	box-shadow: var(--shadow-card-hover);
}

.lang-switch__menu a,
.lang-switch__menu span {
	display: block;
	padding: 8px 12px;
	border-radius: 10px;
	color: var(--c-choco);
	text-decoration: none;
}

.lang-switch__menu a[aria-current] {
	background: var(--c-cream-200);
	font-weight: 500;
}

.lang-switch__menu span {
	color: var(--c-muted);
	cursor: not-allowed;
}

.nav-toggle {
	display: none;
}

.nav-toggle__close,
.is-nav-open .nav-toggle__open {
	display: none;
}

.is-nav-open .nav-toggle__close {
	display: block;
}

@media (min-width: 1024px) {
	.site-nav__menu > li:hover > .sub-menu,
	.site-nav__menu > li:focus-within > .sub-menu,
	.site-nav__menu > li.is-open > .sub-menu {
		opacity: 1;
		visibility: visible;
		transform: none;
	}
}

/* Full menu still visible but tight: keep the side margins modest. */
@media (min-width: 1024px) and (max-width: 1199px) {
	:root {
		--hdr-side: calc(clamp(20px, 2.6vw, 32px) + 10px);
	}
}

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

	.site-nav {
		position: absolute;
		top: calc(100% + 10px);
		left: 0;
		right: 0;
		display: none;
		max-height: calc(100svh - var(--hdr-h) - 40px);
		overflow-y: auto;
		padding: 12px;
		border-radius: 24px;
		background: var(--c-white);
		box-shadow: var(--shadow-card-hover);
	}

	.is-nav-open .site-nav {
		display: block;
	}

	.site-nav__menu {
		flex-direction: column;
		align-items: stretch;
		gap: 4px;
	}

	.site-nav__menu > li {
		flex-wrap: wrap;
	}

	.site-nav__menu > li > a {
		flex: 1;
		padding: 0.6em 1em;
		font-size: 18px;
	}

	.submenu-toggle {
		width: 44px;
		height: 44px;
		margin: 0;
	}

	.site-nav .sub-menu {
		position: static;
		display: none;
		flex-basis: 100%;
		min-width: 0;
		margin: 0 0 6px 12px;
		padding: 4px;
		box-shadow: none;
		background: var(--c-cream-50);
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.site-nav .is-open > .sub-menu {
		display: block;
	}

	.site-nav .sub-menu::before {
		display: none;
	}
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 0;
	}
}

@media (max-width: 479px) {
	.lang-switch__btn span:not(.screen-reader-text) {
		display: none;
	}

	.icon-btn,
	.lang-switch__btn {
		width: 40px;
		height: 40px;
	}

	.lang-switch__btn {
		padding: 0;
		justify-content: center;
	}

	.icon-btn .icon,
	.lang-switch__btn .icon {
		width: 24px;
		height: 24px;
	}
}

/* Search dialog */
.search-dialog {
	width: min(720px, calc(100% - 32px));
	margin: 12vh auto auto;
	padding: 18px 70px 18px 18px;
	border: 0;
	border-radius: 28px;
	background: var(--c-white);
	box-shadow: var(--shadow-card-hover);
}

.search-dialog::backdrop,
.product-dialog::backdrop {
	background: rgba(40, 25, 14, 0.55);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.search-dialog__form {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
}

.search-dialog__icon {
	position: absolute;
	left: 18px;
	width: 24px;
	height: 24px;
	color: var(--c-muted);
	pointer-events: none;
}

.search-dialog input[type="search"] {
	flex: 1;
	min-width: 0;
	height: 56px;
	padding: 0 20px 0 52px;
	border: 1.5px solid var(--c-line);
	border-radius: var(--radius-pill);
	font-family: var(--font-head);
	font-size: 18px;
}

.search-dialog input[type="search"]:focus {
	outline: none;
	border-color: var(--c-orange);
}

.search-dialog__close,
.product-dialog__close {
	position: absolute;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--c-cream-200);
	color: var(--c-choco);
	cursor: pointer;
}

.search-dialog__close:hover,
.product-dialog__close:hover {
	background: var(--c-orange);
	color: var(--c-white);
}

.search-dialog__close {
	top: 50%;
	right: 16px;
	transform: translateY(-50%);
}

.search-dialog__close .icon,
.product-dialog__close .icon {
	width: 22px;
	height: 22px;
}

@media (max-width: 559px) {
	.search-dialog .btn {
		display: none;
	}
}

.search-form {
	display: flex;
	gap: 10px;
	max-width: 560px;
	margin: 0 auto 32px;
}

/* ==========================================================================
   5. Hero
   ========================================================================== */
.home .site-main {
	margin-top: calc(-1 * (var(--hdr-h) + var(--hdr-top)));
}

.hero {
	position: relative;
	overflow: hidden;
	width: 100%;
	/* Full width always; height follows the 1920×1070 artboard but never exceeds the screen. */
	height: min(100vw * 1070 / 1920, 100svh);
	min-height: 360px;
	background: var(--c-choco);
	touch-action: pan-y;
}

.hero__track,
.hero__slide,
.hero__link,
.hero picture {
	position: absolute;
	inset: 0;
	display: block;
}

.hero__slide {
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.8s ease, visibility 0.8s;
}

.hero__slide.is-active {
	z-index: 1;
	opacity: 1;
	visibility: visible;
}

.hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	user-select: none;
	-webkit-user-drag: none;
}

.hero__dots {
	position: absolute;
	z-index: 2;
	left: 50%;
	bottom: clamp(16px, 2.5vw, 44px);
	display: flex;
	gap: 14px;
	transform: translateX(-50%);
}

.hero__dots .dot {
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.hero--empty {
	height: auto;
	min-height: 0;
	padding: calc(var(--hdr-h) + 80px) 0 80px;
	background: linear-gradient(160deg, var(--c-cream-100), #f2dfc6);
}

.hero__fallback {
	margin: 0;
	font-size: clamp(36px, 5vw, 80px);
	text-align: center;
}

@media (max-width: 767px) {
	.hero {
		height: min(100vw * 3 / 4, 100svh);
		min-height: 0;
	}

	.hero:has(.has-mobile) {
		height: min(100vw * 5 / 4, 100svh);
	}

	.hero__dots .dot {
		width: 10px;
		height: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero__slide {
		transition: none;
	}

	html {
		scroll-behavior: auto;
	}
}

/* ==========================================================================
   6. Home: เมนูบัน carousel
   ========================================================================== */
.menu-section {
	position: relative;
	padding: clamp(48px, 5vw, 90px) 0 clamp(60px, 7vw, 140px);
	background: linear-gradient(160deg, #fbf5ee 0%, #f3e6d6 100%);
	overflow: hidden;
}

.menu-section::after {
	content: "";
	position: absolute;
	z-index: 0;
	right: -12%;
	bottom: -1px;
	width: 72%;
	height: 38%;
	border-top-left-radius: 100% 100%;
	background: var(--c-cream-50);
}

.menu-section > .container {
	position: relative;
	z-index: 1;
	max-width: calc(var(--container-wide) + var(--gutter) * 2);
}

.menu-carousel {
	position: relative;
	margin-top: clamp(16px, 2vw, 40px);
	padding-inline: 72px;
}

.menu-carousel__track {
	position: relative;
	display: flex;
	gap: clamp(12px, 2vw, 32px);
	margin: 0;
	padding: 56px calc(50% - 118px) 36px;
	list-style: none;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.menu-carousel__track::-webkit-scrollbar {
	display: none;
}

.menu-card {
	flex: 0 0 236px;
	scroll-snap-align: center;
}

.menu-card__btn {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	width: 100%;
	height: 100%;
	padding: 24px 18px 28px;
	border: 0;
	border-radius: 32px;
	background: transparent;
	text-align: center;
	cursor: pointer;
	transition: transform 0.35s var(--ease), background-color 0.35s, box-shadow 0.35s;
}

.menu-card__media {
	display: grid;
	place-items: center;
	width: 100%;
	aspect-ratio: 5 / 4;
}

.menu-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
	transition: transform 0.35s var(--ease);
}

.menu-card__name {
	background: var(--c-white);
	color: var(--c-choco);
	font-size: 16px;
	box-shadow: 0 3px 8px rgba(72, 48, 28, 0.15);
	transition: background-color 0.3s, color 0.3s, font-size 0.3s;
}

.menu-card__desc {
	display: -webkit-box;
	min-height: 4.8em;
	overflow: hidden;
	color: var(--c-choco-2);
	font-size: 14px;
	line-height: 1.6;
	opacity: 0;
	transition: opacity 0.3s;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.menu-card .badge-best {
	opacity: 0;
	transition: opacity 0.3s;
}

.menu-card.is-center .menu-card__btn {
	z-index: 2;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: var(--shadow-card);
	transform: scale(1.12);
}

.menu-card.is-center .menu-card__name {
	background: var(--c-orange);
	color: var(--c-white);
	font-size: 22px;
	box-shadow: var(--shadow-btn);
}

.menu-card.is-center .menu-card__desc,
.menu-card.is-center .badge-best {
	opacity: 1;
}

.menu-card.is-center .menu-card__desc {
	-webkit-line-clamp: 4;
}

.menu-card:not(.is-center) .menu-card__btn:hover img {
	transform: scale(1.05);
}

.carousel-arrow {
	position: absolute;
	z-index: 3;
	top: 50%;
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--c-orange);
	color: var(--c-white);
	box-shadow: var(--shadow-btn);
	cursor: pointer;
	transform: translateY(-50%);
	transition: opacity 0.2s, background-color 0.2s;
}

.carousel-arrow:hover {
	background: var(--c-orange-dark);
}

.carousel-arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.carousel-arrow .icon {
	width: 26px;
	height: 26px;
}

.carousel-arrow--prev {
	left: 0;
}

.carousel-arrow--next {
	right: 0;
}

.menu-carousel__empty {
	text-align: center;
	color: var(--c-muted);
}

.menu-section__more {
	margin: 8px 0 0;
	text-align: center;
}

@media (max-width: 767px) {
	.menu-carousel {
		padding-inline: 0;
	}

	.menu-carousel__track {
		padding: 44px calc(50% - 100px) 28px;
	}

	.menu-card {
		flex-basis: 200px;
	}

	.menu-card.is-center .menu-card__btn {
		transform: scale(1.06);
	}

	.menu-card.is-center .menu-card__name {
		font-size: 18px;
	}

	.carousel-arrow {
		width: 40px;
		height: 40px;
	}

	.carousel-arrow .icon {
		width: 20px;
		height: 20px;
	}

	.carousel-arrow--prev {
		left: -8px;
	}

	.carousel-arrow--next {
		right: -8px;
	}
}

/* ==========================================================================
   7. Home: ลงทุนกับเรา
   ========================================================================== */
.invest {
	position: relative;
	padding: clamp(24px, 3vw, 48px) 0 clamp(40px, 4vw, 80px);
}

.invest__grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	align-items: center;
	gap: clamp(24px, 4vw, 64px);
}

.invest__media img {
	width: 100%;
	border-radius: var(--radius-card);
	-webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 62%, transparent 100%);
	mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 62%, transparent 100%);
}

.invest__title {
	margin-bottom: 1em;
	font-size: clamp(22px, 1.6vw + 10px, 40px);
	text-align: center;
}

.invest__highlight {
	color: var(--c-orange);
	font-size: 1.35em;
	margin-right: 0.2em;
}

.invest__features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
	gap: clamp(12px, 2vw, 24px);
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: center;
}

.invest__icon {
	display: block;
	width: clamp(84px, 7vw, 124px);
	margin: 0 auto 12px;
	aspect-ratio: 1;
	border-radius: 50%;
	overflow: hidden;
}

.invest__icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.invest__ftitle {
	display: block;
	color: var(--c-choco);
	font-family: var(--font-head);
	font-size: clamp(18px, 0.5vw + 14px, 24px);
	font-weight: 500;
}

.invest__fdesc {
	display: block;
	font-size: 15px;
}

@media (max-width: 899px) {
	.invest__grid {
		grid-template-columns: 1fr;
	}

	.invest__media {
		max-width: 560px;
		margin: 0 auto;
	}
}

/* ==========================================================================
   8. Home: Franchise form
   ========================================================================== */
.franchise {
	position: relative;
	padding: clamp(24px, 3vw, 48px) 0 clamp(48px, 5vw, 100px);
}

.franchise .container {
	position: relative;
	z-index: 1;
}

.franchise__card {
	max-width: 1460px;
	margin: 0 auto;
	padding: clamp(28px, 4vw, 64px) clamp(20px, 9vw, 190px);
	border-radius: var(--radius-lg);
	background: rgba(255, 255, 255, 0.82);
	box-shadow: var(--shadow-card);
}

.franchise__title {
	margin-bottom: 1em;
	font-size: clamp(24px, 2.4vw + 8px, 56px);
	text-align: center;
}

.franchise-form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(18px, 2vw, 28px) clamp(24px, 4vw, 76px);
}

.field label:not(.check) {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px 4px;
	color: var(--c-choco);
	font-family: var(--font-head);
	font-size: clamp(17px, 0.4vw + 13px, 22px);
	font-weight: 500;
}

.field label .icon {
	width: 24px;
	height: 24px;
	color: var(--c-orange);
}

.field--submit {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 14px;
}

.field--submit .field-error {
	margin-top: -6px;
}

.franchise-form.is-loading {
	opacity: 0.75;
}

@media (max-width: 767px) {
	.franchise-form__grid {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   9. Home: Snackbox
   ========================================================================== */
.snackbox {
	position: relative;
	padding: clamp(32px, 4vw, 72px) 0 clamp(48px, 5vw, 90px);
}

.snackbox .container {
	position: relative;
	z-index: 1;
}

.snackbox__list {
	position: relative;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(20px, 3.3vw, 64px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.snack-card {
	position: relative;
	padding: 16px 16px 22px;
	border-radius: 24px;
	background: var(--c-white);
	box-shadow: var(--shadow-card);
}

.snack-card__media img {
	display: block;
	width: 100%;
	aspect-ratio: 410 / 342;
	object-fit: cover;
	border-radius: 20px;
}

.snack-card__body {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: end;
	gap: 6px 12px;
	padding: 18px 6px 0;
}

.snack-card__name {
	justify-self: start;
	margin: 0;
	font-size: clamp(20px, 0.8vw + 12px, 30px);
	font-weight: 600;
	text-transform: uppercase;
}

.snack-card__desc {
	grid-column: 1;
	margin: 0;
	color: var(--c-choco);
	font-size: clamp(14px, 0.3vw + 11px, 18px);
}

.snack-card__price {
	grid-column: 2;
	grid-row: 1 / span 2;
	margin: 0;
	color: var(--c-orange);
	font-family: var(--font-head);
	font-size: clamp(28px, 1.3vw + 16px, 44px);
	font-weight: 600;
	line-height: 1;
}

.snackbox__strip {
	display: flex;
	align-items: center;
	gap: clamp(16px, 2vw, 32px);
	margin-top: clamp(32px, 3vw, 56px);
	padding: clamp(20px, 2vw, 32px) clamp(20px, 2.4vw, 44px);
	border-radius: var(--radius-card);
	background: var(--c-cream-200);
}

.snackbox__features {
	display: flex;
	flex: 1;
	margin: 0;
	padding: 0;
	list-style: none;
}

.snackbox__features li {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 14px;
	padding: 0 clamp(12px, 2vw, 32px);
	color: var(--c-choco-2);
	font-size: clamp(14px, 0.3vw + 11px, 18px);
	line-height: 1.35;
}

.snackbox__features li:first-child {
	padding-left: 0;
}

.snackbox__features li + li {
	border-left: 1.5px solid #cdbcab;
}

.snackbox__features strong {
	display: block;
	color: var(--c-choco);
	font-family: var(--font-head);
	font-size: clamp(17px, 0.5vw + 13px, 24px);
	font-weight: 500;
}

.snackbox__ficon {
	width: clamp(40px, 3vw, 56px) !important;
	height: clamp(40px, 3vw, 56px) !important;
	color: var(--c-choco);
}

@media (max-width: 1023px) {
	.snackbox__strip {
		flex-direction: column;
		align-items: stretch;
	}

	.snackbox__strip .btn {
		align-self: center;
	}
}

@media (max-width: 767px) {
	.snackbox__list {
		grid-auto-flow: column;
		grid-template-columns: none;
		grid-auto-columns: 80%;
		overflow-x: auto;
		margin-inline: calc(-1 * var(--gutter));
		padding: 4px var(--gutter) 16px;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--gutter);
		scrollbar-width: none;
	}

	.snack-card {
		scroll-snap-align: start;
	}

	.snackbox__features {
		flex-direction: column;
		gap: 16px;
	}

	.snackbox__features li {
		padding: 0;
	}

	.snackbox__features li + li {
		border-left: 0;
	}
}

/* ==========================================================================
   10. Home: BUN BLOG
   ========================================================================== */
/* Design: beige at the top fading to near-white, faint diagonal lines bottom-left.
   Ends light so the solid beige branch-finder bar below reads as its own band. */
.blog-section {
	position: relative;
	overflow: hidden;
	padding: clamp(40px, 4vw, 72px) 0 clamp(48px, 5vw, 90px);
	background: linear-gradient(180deg, var(--c-blog-top) 0%, var(--c-blog-top) 38%, var(--c-blog-bottom) 88%);
}

.blog-section::before {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 34%;
	height: 62%;
	background: repeating-linear-gradient(150deg, transparent 0 34px, rgba(214, 180, 130, 0.35) 34px 35.5px);
	-webkit-mask-image: linear-gradient(to top right, #000 0%, transparent 65%);
	mask-image: linear-gradient(to top right, #000 0%, transparent 65%);
	pointer-events: none;
}

.blog-section > .container {
	position: relative;
	z-index: 1;
}

.blog__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px clamp(16px, 2.4vw, 48px);
	margin-bottom: clamp(24px, 3vw, 48px);
}

.blog__title {
	margin: 0;
	text-align: left;
}

.blog__head .tabs--outline {
	flex: 0 1 auto;
	min-width: 0;
}

.blog__more {
	margin-left: auto;
}

.blog-carousel__track {
	display: flex;
	--blog-gap: clamp(20px, 2.4vw, 40px);
	--blog-per-view: 3;
	gap: var(--blog-gap);
	margin: 0;
	padding: 0 0 8px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	position: relative;
}

.blog-carousel__track::-webkit-scrollbar {
	display: none;
}

.post-card {
	position: relative;
	/* Whole cards only, so the row sits evenly inside the container. */
	flex: 0 0 calc((100% - var(--blog-gap) * (var(--blog-per-view) - 1)) / var(--blog-per-view));
	scroll-snap-align: start;
}

.post-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 655 / 452;
	border-radius: 30px;
	background: var(--c-cream-300);
}

.post-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s var(--ease);
}

.post-card__media:hover img {
	transform: scale(1.04);
}

.post-card__badge {
	position: absolute;
	top: 16px;
	right: 16px;
	padding: 0.1em 0.9em;
	border-radius: var(--radius-pill);
	background: var(--c-orange);
	color: var(--c-white);
	font-family: var(--font-head);
	font-size: clamp(14px, 0.4vw + 10px, 20px);
	font-weight: 500;
}

.post-card__body {
	padding: 16px 10px 0;
}

.post-card__title {
	display: -webkit-box;
	margin: 0 0 4px;
	overflow: hidden;
	font-size: clamp(19px, 0.6vw + 13px, 26px);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.post-card__title a {
	color: inherit;
	text-decoration: none;
}

.post-card__title a:hover {
	color: var(--c-orange-dark);
}

.post-card__excerpt {
	display: -webkit-box;
	margin-bottom: 10px;
	overflow: hidden;
	color: var(--c-choco);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.post-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	margin: 0 0 6px;
}

.post-card__tags a {
	color: var(--c-orange);
	font-family: var(--font-head);
	font-size: clamp(15px, 0.3vw + 12px, 20px);
	font-weight: 500;
	text-decoration: none;
}

.post-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.post-card__date {
	color: var(--c-choco);
	font-family: var(--font-head);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.02em;
}

.blog-carousel__empty {
	color: var(--c-muted);
}

@media (max-width: 1023px) {
	.blog-carousel__track {
		--blog-per-view: 2;
	}
}

@media (max-width: 639px) {
	.blog-carousel__track {
		--blog-per-view: 1.15;
	}
}

@media (max-width: 767px) {
	.blog__head .tabs--outline {
		order: 3;
		flex-basis: 100%;
	}
}

/* ==========================================================================
   11. Home: ค้นหาสาขา
   ========================================================================== */
.branches__bar {
	padding: clamp(20px, 2vw, 32px) 0;
	background: var(--c-branch-bar);
}

.branches__bar-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px clamp(16px, 2.6vw, 48px);
}

.branches__logo img {
	display: block;
	width: auto;
	height: clamp(44px, 4.2vw, 82px);
	mix-blend-mode: multiply;
}

.branch-search {
	display: flex;
	flex: 1;
	align-items: center;
	min-width: 280px;
	padding: 6px;
	border-radius: var(--radius-pill);
	background: var(--c-white);
	box-shadow: 0 2px 10px rgba(72, 48, 28, 0.06);
}

.branch-search select,
.branch-search input {
	flex: 1;
	min-width: 0;
	height: 46px;
	padding: 0 20px;
	border: 0;
	background: transparent;
	color: var(--c-choco);
	font-family: var(--font-head);
	font-size: clamp(16px, 0.3vw + 13px, 20px);
}

.branch-search select {
	flex: 0 1 220px;
	border-right: 1.5px solid var(--c-line);
	border-radius: 0;
	cursor: pointer;
}

.branch-search select:focus,
.branch-search input:focus {
	outline: none;
	background: var(--c-cream-50);
}

.branch-search .btn {
	flex-shrink: 0;
	min-width: 150px;
}

.branches > .container {
	padding-top: 8px;
	padding-bottom: clamp(48px, 3.4vw, 64px);
}

.branches__status {
	min-height: 1.6em;
	margin: 16px 0 8px;
	text-align: center;
	color: var(--c-choco);
}

.branch-results {
	display: flex;
	gap: 12px;
	margin: 0 0 16px;
	padding: 4px 2px 12px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x proximity;
}

.branch-results li {
	flex: 0 0 auto;
	scroll-snap-align: start;
}

.branch-result {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 200px;
	padding: 10px 18px;
	border: 1.5px solid var(--c-line);
	border-radius: var(--radius-sm);
	background: var(--c-white);
	color: var(--c-choco);
	text-align: left;
	cursor: pointer;
}

.branch-result strong {
	font-family: var(--font-head);
	font-weight: 500;
}

.branch-result span {
	color: var(--c-muted);
	font-size: 14px;
}

.branch-result:hover,
.branch-result.is-active {
	border-color: var(--c-orange);
	box-shadow: var(--shadow-btn);
}

.branch-map {
	position: relative;
}

.branch-map__canvas {
	position: relative;
	z-index: 0;
	height: clamp(360px, 40vw, 780px);
	border: 2px solid var(--c-orange);
	border-radius: clamp(28px, 3vw, 60px);
	overflow: hidden;
	isolation: isolate;
	background: var(--c-cream-100);
}

.branch-map__all {
	position: absolute;
	z-index: 2;
	left: 50%;
	bottom: 0;
	min-width: min(270px, 70%);
	transform: translate(-50%, 50%);
}

.branch-map__all:hover {
	transform: translate(-50%, calc(50% - 1px));
}

.map-popup {
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--c-choco-2);
}

.map-popup__title {
	display: block;
	margin-bottom: 4px;
	color: var(--c-choco);
	font-family: var(--font-head);
	font-size: 17px;
	font-weight: 500;
}

.map-popup p {
	margin: 0 0 4px !important;
}

.map-popup__actions {
	display: flex;
	gap: 14px;
}

.leaflet-container {
	font-family: var(--font-body);
}

@media (max-width: 767px) {
	.branches__bar-inner {
		flex-direction: column;
		align-items: stretch;
	}

	.branches__logo {
		align-self: center;
	}

	.branch-search {
		flex-wrap: wrap;
		min-width: 0;
		border-radius: 24px;
	}

	.branch-search select {
		flex: 1 1 100%;
		border-right: 0;
		border-bottom: 1.5px solid var(--c-line);
	}

	.branch-search .btn {
		min-width: 0;
	}
}

/* ==========================================================================
   12. Delivery partners (design: card 560×157 centred, mascot 170px hanging
       off the left edge, three 108px logos 36px apart)
   ========================================================================== */
.delivery {
	/* The card is a fixed 560px, so its contents stay at design size too (smaller on phones below). */
	--dl-logo: 108px;
	--dl-gap: 20px;
	--dl-mascot: 170px;
	padding: clamp(24px, 2.6vw, 48px) 0 clamp(64px, 6vw, 110px);
}

.delivery__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.delivery__title {
	margin-bottom: clamp(12px, 1.1vw, 20px);
}

.delivery__card {
	position: relative;
	display: flex;
	align-items: center;
	width: min(560px, 100%);
	min-height: calc(var(--dl-logo) + 50px);
	/* Tight inner spacing: logos start just past the mascot and end near the right edge. */
	padding: 0 calc(var(--dl-logo) * 0.3) 0 calc(var(--dl-mascot) * 0.47);
	border-radius: clamp(24px, 2vw, 36px);
	background: linear-gradient(180deg, #faf4ea 0%, var(--c-cream-300) 100%);
	box-shadow: 0 8px 16px rgba(72, 48, 28, 0.16);
}

.delivery__mascot {
	position: absolute;
	left: calc(var(--dl-mascot) * -0.59);
	bottom: -10px;
	width: var(--dl-mascot);
	pointer-events: none;
}

.delivery__mascot img {
	display: block;
	width: 100%;
	height: auto;
}

.delivery__list {
	display: flex;
	flex: 1;
	justify-content: center;
	gap: var(--dl-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.delivery__link {
	display: block;
	width: var(--dl-logo);
	border-radius: 18%;
	overflow: hidden;
	box-shadow: 0 4px 8px rgba(72, 48, 28, 0.22);
	transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.delivery__link:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-card-hover);
}

.delivery__link img {
	display: block;
	width: 100%;
	height: auto;
}

/* Keep the hanging mascot on screen when the card is full width. */
@media (max-width: 767px) {
	.delivery {
		--dl-logo: 64px;
		--dl-gap: 12px;
		--dl-mascot: 118px;
	}

	/* Phones: the card hugs its logos instead of stretching. */
	.delivery__card {
		width: auto;
		max-width: calc(100% - var(--dl-mascot) * 0.45);
		margin-left: calc(var(--dl-mascot) * 0.45);
		padding-block: 22px;
	}

	.delivery__list {
		justify-content: flex-start;
	}
}

@media (max-width: 379px) {
	.delivery {
		--dl-logo: 56px;
		--dl-gap: 10px;
	}
}

@media (max-width: 479px) {
	.invest__fdesc {
		font-size: 13px;
	}
}

/* ==========================================================================
   13. Products page
   ========================================================================== */
.page-products {
	position: relative;
	overflow: hidden;
	padding-bottom: 20px;
}

.page-products::before,
.page-products::after {
	content: "";
	position: absolute;
	z-index: -1;
	border-radius: 50%;
	background: var(--c-cream-100);
	pointer-events: none;
}

.page-products::before {
	top: -280px;
	left: -18%;
	width: 62%;
	height: 760px;
	transform: rotate(-12deg);
}

.page-products::after {
	right: -20%;
	bottom: 240px;
	width: 55%;
	height: 900px;
}

.cat-strip {
	padding: clamp(28px, 3.4vw, 64px) 0 clamp(28px, 3vw, 56px);
}

.cat-strip__inner {
	position: relative;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin: 0 auto;
	padding-inline: calc(var(--gutter) + 56px);
}

.cat-strip__list {
	position: relative;
	display: flex;
	gap: clamp(10px, 1.6vw, 34px);
	margin: 0;
	padding: 4px 0 8px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.cat-strip.has-prev .cat-strip__list {
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px);
	mask-image: linear-gradient(90deg, transparent 0, #000 40px);
}

.cat-strip.has-next .cat-strip__list {
	-webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
	mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
}

.cat-strip.has-prev.has-next .cat-strip__list {
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent);
	mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent);
}

/* Arrows sit level with the category circles. */
.cat-strip__arrow {
	top: calc(4px + clamp(72px, 5.3vw, 100px) / 2);
	width: 44px;
	height: 44px;
}

.cat-strip__arrow.carousel-arrow--prev {
	left: var(--gutter);
}

.cat-strip__arrow.carousel-arrow--next {
	right: var(--gutter);
}

.cat-strip__arrow .icon {
	width: 22px;
	height: 22px;
}

/* Everything fits: no sliding, no arrows. */
.cat-strip.is-static .cat-strip__arrow {
	visibility: hidden;
}

.cat-strip.is-static .cat-strip__list {
	justify-content: center;
}

.cat-strip__list::-webkit-scrollbar {
	display: none;
}

.cat-strip__list li {
	flex: 0 0 auto;
	scroll-snap-align: start;
}

.cat-strip__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	min-width: clamp(80px, 6.4vw, 112px);
	color: var(--c-choco);
	font-family: var(--font-head);
	font-size: clamp(14px, 0.3vw + 11px, 18px);
	font-weight: 500;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
}

.cat-strip__img {
	display: block;
	width: clamp(72px, 5.3vw, 100px);
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 50%;
	background: var(--c-orange-soft);
	transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.cat-strip__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cat-strip__link:hover .cat-strip__img {
	transform: translateY(-3px);
	box-shadow: var(--shadow-card);
}

.cat-strip__name {
	position: relative;
	padding-bottom: 6px;
	white-space: nowrap;
}

.cat-strip__link.is-current .cat-strip__name::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 28px;
	height: 3px;
	border-radius: 3px;
	background: var(--c-orange);
	transform: translateX(-50%);
}

.cat-strip__link.is-current {
	color: var(--c-orange-dark);
}

@media (max-width: 479px) {
	.cat-strip__inner {
		padding-inline: calc(var(--gutter) + 40px);
	}

	.cat-strip__arrow {
		width: 36px;
		height: 36px;
	}
}

.page-products__reset {
	max-width: 1180px;
	margin: 0 auto 24px;
}

.product-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: clamp(28px, 2.8vw, 52px) clamp(20px, 2.8vw, 52px);
	max-width: 1180px;
	margin: 0 auto;
	padding-top: 22px;
}

.product-card {
	position: relative;
	scroll-margin-top: 140px;
}

.product-card__btn {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	width: 100%;
	height: 100%;
	padding: 22px 18px 18px;
	border: 0;
	border-radius: var(--radius-card);
	background: #fcf9f5;
	box-shadow: var(--shadow-card);
	text-align: center;
	cursor: pointer;
	transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.product-card__btn:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-card-hover);
}

.product-card__media {
	display: grid;
	place-items: center;
	width: 100%;
	aspect-ratio: 230 / 175;
}

.product-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.product-card__name {
	font-size: clamp(15px, 0.5vw + 10px, 22px);
}

.product-card__desc {
	display: -webkit-box;
	overflow: hidden;
	color: var(--c-choco-2);
	font-size: 13px;
	line-height: 1.55;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.product-card__price {
	align-self: stretch;
	margin-top: auto;
	padding: 0 6px;
	text-align: left;
}

.price {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 10px;
	color: var(--c-choco);
	font-family: var(--font-head);
	font-weight: 500;
	line-height: 1.2;
}

.price__now {
	font-size: clamp(20px, 0.6vw + 14px, 28px);
	text-decoration: none;
}

.price__unit {
	font-size: 0.68em;
}

.price__was {
	color: var(--c-muted);
	font-size: 15px;
	font-weight: 400;
}

.price.is-sale .price__now {
	color: var(--c-orange);
	font-weight: 600;
}

.price__note {
	flex-basis: 100%;
	color: var(--c-muted);
	font-family: var(--font-body);
	font-size: 14px;
	font-weight: 400;
}

@media (max-width: 1023px) {
	.product-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 639px) {
	.product-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 28px 14px;
	}

	.product-card__btn {
		padding: 16px 10px 14px;
		border-radius: 22px;
	}

	.product-card .badge-best {
		top: -16px;
		left: -10px;
		width: 62px;
		height: 62px;
		font-size: 12px;
	}
}

/* Product popup */
.product-dialog {
	width: min(940px, calc(100% - 40px));
	max-height: calc(100svh - 40px);
	padding: 0;
	border: 0;
	border-radius: 32px;
	background: var(--c-white);
	box-shadow: 0 30px 60px rgba(40, 25, 14, 0.3);
	overflow: hidden;
}

.product-dialog[open] {
	display: flex;
	flex-direction: column;
	animation: bun-pop 0.25s var(--ease);
}

@keyframes bun-pop {
	from {
		opacity: 0;
		transform: translateY(16px) scale(0.98);
	}
}

.product-dialog__close {
	z-index: 5;
	top: 16px;
	right: 16px;
}

.product-dialog__body {
	overflow-y: auto;
	padding: clamp(20px, 3vw, 40px);
	overscroll-behavior: contain;
}

.pdetail {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: start;
	gap: clamp(20px, 3vw, 44px);
}

.pdetail__media {
	position: sticky;
	top: 0;
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	border-radius: 24px;
	background: var(--c-cream-100);
}

.pdetail__media img {
	width: 86%;
	height: 86%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.pdetail__cats {
	margin: 8px 0 6px;
	color: var(--c-orange-dark);
	font-family: var(--font-head);
	font-weight: 500;
}

.pdetail__title {
	margin-bottom: 14px;
	padding-right: 48px;
	font-size: clamp(22px, 1.2vw + 14px, 32px);
}

.pdetail__price {
	margin-bottom: 18px;
}

.pdetail__price .price__now {
	font-size: clamp(26px, 1vw + 18px, 36px);
}

.pdetail__content {
	font-size: 16px;
}

@media (max-width: 767px) {
	.product-dialog {
		width: 100%;
		max-width: none;
		height: 100%;
		max-height: none;
		margin: 0;
		border-radius: 0;
	}

	.pdetail {
		grid-template-columns: 1fr;
	}

	.pdetail__media {
		position: relative;
	}

	.product-dialog__body {
		flex: 1;
		padding: 20px 20px 40px;
	}
}

/* ==========================================================================
   14. Footer
   ========================================================================== */
.site-footer {
	position: relative;
	overflow: hidden;
	padding: clamp(56px, 5vw, 96px) 0 clamp(48px, 4vw, 80px);
	background: var(--c-footer);
	color: #d9c8b6;
}

.site-footer::before {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(125deg, transparent 0 34px, rgba(214, 180, 130, 0.14) 34px 35.5px);
	-webkit-mask-image: linear-gradient(90deg, #000 0, transparent 22%, transparent 78%, #000 100%);
	mask-image: linear-gradient(90deg, #000 0, transparent 22%, transparent 78%, #000 100%);
	pointer-events: none;
}

.site-footer__grid {
	position: relative;
	display: grid;
	grid-template-columns: 1.05fr 1.75fr 1.15fr;
	gap: 40px clamp(24px, 3vw, 56px);
	max-width: calc(var(--container-wide) + var(--gutter) * 2);
}

.site-footer__brand {
	text-align: center;
}

.site-footer__logo img {
	display: block;
	width: 100%;
	max-width: 380px;
	margin: 0 auto;
}

.site-footer__hq-title {
	margin: 18px 0 4px;
	color: var(--c-white);
	font-family: var(--font-head);
	font-size: clamp(19px, 0.5vw + 15px, 26px);
	font-weight: 500;
}

.site-footer__address {
	font-size: clamp(15px, 0.2vw + 13px, 18px);
	font-style: normal;
	line-height: 1.55;
}

.site-footer__menus {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	padding-top: clamp(0px, 2vw, 40px);
}

.footer-menu__title,
.site-footer__title {
	margin-bottom: 0.4em;
	color: var(--c-white);
	font-size: clamp(19px, 0.5vw + 15px, 26px);
	font-weight: 500;
}

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

.footer-menu__list a {
	display: inline-block;
	padding: 3px 0;
	color: #c9b6a2;
	font-size: clamp(15px, 0.2vw + 13px, 18px);
	text-decoration: none;
}

.footer-menu__list a:hover {
	color: var(--c-orange);
}

.newsletter-form__row {
	position: relative;
}

.newsletter-form input[type="email"] {
	width: 100%;
	height: 56px;
	padding: 0 64px 0 24px;
	border: 1.5px solid #fff;
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--c-white);
	font-family: var(--font-head);
	font-size: 18px;
}

.newsletter-form input[type="email"]::placeholder {
	color: #c9b6a2;
}

.newsletter-form input[type="email"]:focus {
	outline: none;
	border-color: var(--c-orange);
	box-shadow: 0 0 0 4px rgba(238, 154, 66, 0.25);
}

.newsletter-form__submit {
	position: absolute;
	top: 50%;
	right: 6px;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--c-white);
	cursor: pointer;
	transform: translateY(-50%);
}

.newsletter-form__submit:hover {
	background: var(--c-orange);
}

.newsletter-form__submit .icon {
	width: 28px;
	height: 28px;
}

.newsletter-form .check {
	margin-top: 14px;
	color: var(--c-white);
	font-size: clamp(14px, 0.2vw + 12px, 17px);
}

.newsletter-form .field-error,
.newsletter-form .form-msg.is-error {
	color: #ffb98a;
}

.newsletter-form .form-msg {
	text-align: left;
	font-size: 15px;
}

.newsletter-form .form-msg.is-success {
	color: #bfe4b5;
}

.social {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(12px, 1.6vw, 28px);
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
}

.social a {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--c-white);
	color: var(--c-footer);
	transition: background-color 0.2s, color 0.2s;
}

.social a:hover {
	background: var(--c-orange);
	color: var(--c-white);
}

.social .icon {
	width: 26px;
	height: 26px;
}

@media (max-width: 1023px) {
	.site-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.site-footer__menus {
		grid-column: 1 / -1;
		grid-row: 2;
		padding-top: 0;
	}
}

@media (max-width: 639px) {
	.site-footer__grid {
		grid-template-columns: 1fr;
	}

	.site-footer__menus {
		grid-row: auto;
		grid-template-columns: 1fr 1fr;
	}

	.site-footer__logo img {
		max-width: 240px;
	}

	.social {
		justify-content: center;
	}
}

/* ==========================================================================
   15. Generic pages, placeholders, entry content
   ========================================================================== */
.page-placeholder {
	min-height: 45vh;
	padding: clamp(40px, 5vw, 80px) 0 clamp(56px, 6vw, 110px);
}

.page-title {
	margin-bottom: 0.8em;
	font-size: clamp(30px, 2vw + 16px, 52px);
	text-align: center;
}

.page-404 {
	text-align: center;
}

.page-404__code {
	margin: 0;
	color: var(--c-orange);
	font-family: var(--font-head);
	font-size: clamp(80px, 12vw, 160px);
	font-weight: 600;
	line-height: 1;
}

.page-search__heading {
	margin-top: 40px;
	font-size: 28px;
}

.post-list {
	max-width: 760px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.post-list li {
	padding: 14px 0;
	border-bottom: 1px solid var(--c-line);
}

.post-list a {
	color: var(--c-choco);
	font-family: var(--font-head);
	font-size: 20px;
	font-weight: 500;
	text-decoration: none;
}

.post-list small {
	display: block;
	color: var(--c-muted);
}

.entry-meta {
	color: var(--c-muted);
	font-family: var(--font-head);
	text-align: center;
}

.entry-thumb {
	margin: 0 0 32px;
}

.entry-thumb img {
	width: 100%;
	border-radius: var(--radius-card);
}

.entry-content {
	max-width: 760px;
	margin: 0 auto;
}

.entry-content > * {
	max-width: 100%;
}

.entry-content img {
	border-radius: var(--radius-sm);
}

.entry-content .alignwide {
	max-width: 1100px;
	margin-inline: calc(50% - min(550px, 50vw - var(--gutter)));
}

.entry-content .alignfull {
	max-width: none;
	margin-inline: calc(50% - 50vw);
}

.entry-content .wp-block-button__link {
	border-radius: var(--radius-pill);
	background: var(--c-orange);
	color: var(--c-white);
	font-family: var(--font-head);
}

.pdetail__content.entry-content {
	max-width: none;
	margin: 0;
}

.nav-links {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 32px;
}

.nav-links .page-numbers {
	padding: 6px 14px;
	border-radius: var(--radius-pill);
	background: var(--c-white);
	color: var(--c-choco);
	text-decoration: none;
}

.nav-links .current {
	background: var(--c-orange);
	color: var(--c-white);
}
