/*
Theme Name: MPC Kadence Child
Template: kadence
Version: 1.0.2
Text Domain: mpc-kadence-child
*/

@media (max-width: 767px) {
	#mobile-header .site-container {
		padding-right: 16px;
		padding-left: 16px;
	}

	#mobile-header .site-header-main-section-left {
		flex: 1 1 auto;
		width: auto;
		min-width: 0;
	}

	#mobile-header .site-branding,
	#mobile-header .brand {
		min-width: 0;
	}

	#mobile-header .custom-logo {
		width: 140px;
		height: auto;
		max-height: 72px;
	}

	#mobile-header .site-title-wrap {
		display: none;
	}

	#mobile-header .site-header-main-section-right {
		flex: 0 0 48px;
		width: 48px;
	}

	#mobile-header .menu-toggle-open {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 44px;
		min-height: 44px;
	}

	.woocommerce .button,
	.woocommerce .single_add_to_cart_button,
	.wc-block-components-button,
	.wp-element-button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: 44px;
	}

	.woocommerce .quantity .qty,
	.woocommerce input[type="text"],
	.woocommerce input[type="email"],
	.woocommerce input[type="tel"],
	.woocommerce input[type="number"],
	.woocommerce select,
	.wc-block-components-text-input input,
	.wc-block-components-combobox .components-combobox-control__input {
		min-height: 44px;
		font-size: 16px;
	}
}


@media (max-width: 767px) {
	a.button,
	.add_to_cart_button,
	.woocommerce-tabs ul.tabs li a {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: 44px;
	}
}

@media (max-width: 767px) {
	a.button.add_to_cart_button {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		min-height: 44px !important;
	}
}

/* Phase AC: conversion touch targets only. */
body.single-product .single_add_to_cart_button {
	min-height: 44px !important;
}

body.tax-product_cat .kadence-toggle-shop-layout {
	box-sizing: border-box;
	min-width: 44px;
	min-height: 44px;
}

body.tax-product_cat .kadence-shop-top-row {
	flex-wrap: wrap;
}

body.home .wp-block-kadence-advancedbtn > a.button[href="/shop/"],
body.home .wp-block-kadence-advancedbtn > a.button[href="/ติดต่อเรา/"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
}

/* Rebuild Phase B: Home product-category cards only. */
.home .wp-block-woocommerce-product-categories .wc-block-product-categories-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.home .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item {
	margin: 0;
	padding: 0;
}

.home .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item > a {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 3 / 2;
	border-radius: 10px;
	background: #5a351f;
	color: #fff;
	text-decoration: none;
}

.home .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item__image,
.home .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item__image img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	object-position: center;
}

.home .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item > a::after {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(36, 19, 10, 0) 35%, rgba(36, 19, 10, 0.82) 100%);
	content: '';
	pointer-events: none;
}

.home .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item__name {
	position: absolute;
	z-index: 1;
	right: 16px;
	bottom: 14px;
	left: 16px;
	color: #fff;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
	text-shadow: none;
}

.home .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item__count {
	display: none;
}

.home .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item > a:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
	.home .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item > a:hover::after {
		background: linear-gradient(180deg, rgba(36, 19, 10, 0.12) 25%, rgba(36, 19, 10, 0.9) 100%);
	}
}

@media (max-width: 767px) {
	.home .wp-block-woocommerce-product-categories .wc-block-product-categories-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.home .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item > a {
		aspect-ratio: 1 / 1;
	}
}

/* Rebuild Phase C: product cards on Shop and category archives only. */
body.post-type-archive-product ul.products li.product .product-excerpt, body.tax-product_cat ul.products li.product .product-excerpt, body.post-type-archive-product ul.products li.product .product_meta, body.tax-product_cat ul.products li.product .product_meta, body.post-type-archive-product ul.products li.product .woocommerce-loop-product__meta, body.tax-product_cat ul.products li.product .woocommerce-loop-product__meta { display: none; }
body.post-type-archive-product ul.products li.product .product-action-wrap .button, body.tax-product_cat ul.products li.product .product-action-wrap .button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px !important; }

/* Phase R: product-category quick navigation only. */
body.tax-product_cat .mpc-category-quick-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
body.tax-product_cat .mpc-category-quick-nav__link { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border: 1px solid #7a542d; border-radius: 999px; color: #5b3b20; font-weight: 600; line-height: 1.35; text-decoration: none; }
body.tax-product_cat .mpc-category-quick-nav__link.is-current { background: #7a542d; color: #fff; }
body.tax-product_cat .mpc-category-quick-nav__link:focus-visible { outline: 3px solid #1d5c91; outline-offset: 2px; }
@media (max-width: 767px) { body.tax-product_cat .mpc-category-quick-nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; } body.tax-product_cat .mpc-category-quick-nav__link { flex: 0 0 auto; } }

body.single-product .product_meta,body.single-product .woocommerce-tabs,body.single-product .related.products{display:none}body.single-product .mpc-product-description-rows>p,body.single-product .mpc-product-description-rows>ul>li,body.single-product .mpc-product-description-rows>ol>li{margin:0 0 10px;padding:10px 12px;border-left:3px solid #7a542d;background:#faf7f2;line-height:1.6}body.single-product .mpc-product-description-rows>:last-child{margin-bottom:0}body.single-product .mpc-product-description-rows>p{display:grid;grid-template-columns:minmax(100px,.8fr) minmax(0,1.2fr);gap:12px}

/* Phase E: Shop category grid only. */
body.woocommerce-shop ul.products:has(> li.product-category):not(:has(> li.product:not(.product-category))) {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 24px;
}

body.woocommerce-shop ul.products:has(> li.product-category) > li.product-category {
	min-width: 0;
	margin: 0;
	padding: 0;
}

body.woocommerce-shop ul.products:has(> li.product-category) > li.product-category > a {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 3 / 2;
	border-radius: 10px;
	background: #5a351f;
	color: #fff;
	text-decoration: none;
}

body.woocommerce-shop ul.products:has(> li.product-category) > li.product-category > a > img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	object-position: center;
}

body.woocommerce-shop ul.products:has(> li.product-category) > li.product-category > a::after {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(36, 19, 10, 0) 35%, rgba(36, 19, 10, 0.82) 100%);
	content: '';
	pointer-events: none;
}

body.woocommerce-shop ul.products:has(> li.product-category) > li.product-category .product-details {
	position: absolute;
	z-index: 1;
	right: 16px;
	bottom: 14px;
	left: 16px;
	margin: 0;
	padding: 0;
	background: transparent;
}

body.woocommerce-shop ul.products:has(> li.product-category) > li.product-category .woocommerce-loop-category__title {
	margin: 0;
	color: #fff;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
	text-shadow: none;
}

body.woocommerce-shop ul.products:has(> li.product-category) > li.product-category .count {
	display: none;
}

body.woocommerce-shop ul.products:has(> li.product-category) > li.product-category > a:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
	body.woocommerce-shop ul.products:has(> li.product-category) > li.product-category > a:hover::after {
		background: linear-gradient(180deg, rgba(36, 19, 10, 0.12) 25%, rgba(36, 19, 10, 0.9) 100%);
	}
}

@media (max-width: 767px) {
	body.woocommerce-shop ul.products:has(> li.product-category):not(:has(> li.product:not(.product-category))) {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 16px;
	}

	body.woocommerce-shop ul.products:has(> li.product-category) > li.product-category > a {
		aspect-ratio: 1 / 1;
	}
}

/* Phase F: service-page heroes only. */
body.page-id-91 .entry-hero,
body.page-id-93 .entry-hero,
body.page-id-95 .entry-hero,
body.page-id-99 .entry-hero,
body.page-id-10 .entry-hero {
	position: relative;
	min-height: 360px;
	background: url('/wp-content/uploads/2026/08/MPC-hero.jpg') center center / cover no-repeat;
}

body.page-id-91 .entry-hero-container-inner,
body.page-id-93 .entry-hero-container-inner,
body.page-id-95 .entry-hero-container-inner,
body.page-id-99 .entry-hero-container-inner,
body.page-id-10 .entry-hero-container-inner {
	position: relative;
	display: flex;
	align-items: center;
	min-height: inherit;
	background: transparent !important;
}

body.page-id-91 .entry-hero .hero-section-overlay,
body.page-id-93 .entry-hero .hero-section-overlay,
body.page-id-95 .entry-hero .hero-section-overlay,
body.page-id-99 .entry-hero .hero-section-overlay,
body.page-id-10 .entry-hero .hero-section-overlay {
	position: absolute;
	inset: 0;
	background: rgba(35, 20, 12, 0.65) !important;
}

body.page-id-91 .entry-hero .hero-container,
body.page-id-93 .entry-hero .hero-container,
body.page-id-95 .entry-hero .hero-container,
body.page-id-99 .entry-hero .hero-container,
body.page-id-10 .entry-hero .hero-container {
	position: relative;
	z-index: 1;
	width: 100%;
}

body.page-id-91 .entry-hero .entry-title,
body.page-id-93 .entry-hero .entry-title,
body.page-id-95 .entry-hero .entry-title,
body.page-id-99 .entry-hero .entry-title,
body.page-id-10 .entry-hero .entry-title {
	margin: 0;
	color: #fff;
}

@media (max-width: 767px) {
	body.page-id-91 .entry-hero,
	body.page-id-93 .entry-hero,
	body.page-id-95 .entry-hero,
	body.page-id-99 .entry-hero,
	body.page-id-10 .entry-hero {
		min-height: 260px;
	}
}

/* Phase G: Shop and About heroes only. */
body.woocommerce-shop .entry-hero,
body.page-id-97 .entry-content > .wp-block-cover.alignfull:first-child {
	position: relative;
	min-height: 360px !important;
	background: url('/wp-content/uploads/2026/08/MPC-hero.jpg') center center / cover no-repeat;
}

body.woocommerce-shop .entry-hero-container-inner {
	position: relative;
	display: flex;
	align-items: center;
	min-height: inherit;
	background: transparent !important;
}

body.woocommerce-shop .entry-hero .hero-section-overlay,
body.page-id-97 .entry-content > .wp-block-cover.alignfull:first-child > .wp-block-cover__background {
	position: absolute;
	inset: 0;
	background: rgba(35, 20, 12, 0.65) !important;
	opacity: 1;
}

body.woocommerce-shop .entry-hero .hero-container {
	position: relative;
	z-index: 1;
	width: 100%;
}

body.woocommerce-shop .entry-hero .page-title,
body.page-id-97 .entry-content > .wp-block-cover.alignfull:first-child .wp-block-heading {
	margin: 0;
	color: #fff !important;
}

body.page-id-97 .entry-content > .wp-block-cover.alignfull:first-child > .wp-block-cover__image-background {
	opacity: 0;
}

body.page-id-97 .entry-content > .wp-block-cover.alignfull:first-child {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

/* Phase Q: make the About hero match the full-bleed Shop/service heroes. */
body.page-id-97 .content-area {
	container-type: inline-size;
}

body.page-id-97 .entry-content > .wp-block-cover.alignfull:first-child {
	width: 100cqw;
	max-width: 100cqw;
	margin-right: calc((100% - 100cqw) / 2);
	margin-left: calc((100% - 100cqw) / 2);
}

/* Phase Q: keep the About hero title aligned with the Shop hierarchy. */
body.page-id-97 .entry-content > .wp-block-cover.alignfull:first-child .wp-block-heading {
	max-width: 100%;
	padding-right: 24px;
	padding-left: 24px;
	font-size: 32px !important;
	line-height: 48px !important;
	overflow-wrap: anywhere;
}

/* Phase S: keep the Home and About heroes directly below the header. */
body.home .entry-content-wrap,
body.page-id-97 .entry-content-wrap {
	padding-top: 0;
}

/* Phase AE-B: Home Hero WebP with a safe JPG fallback. */
body.home .mpc-home-hero {
	background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%), url('/wp-content/uploads/2026/08/PrintingMachine1.jpg') !important;
	background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%), image-set(url('/wp-content/uploads/2026/08/PrintingMachine1.webp') type('image/webp'), url('/wp-content/uploads/2026/08/PrintingMachine1.jpg') type('image/jpeg')) !important;
}

@media (min-width: 768px) {
	body.home .mpc-home-hero {
		min-height: 440px !important;
		padding-top: 80px !important;
		padding-bottom: 80px !important;
	}
}

/* Phase T: Homepage service decisions and MPC benefits only. */
body.home .mpc-home-service-decision {
	background: #faf7f2;
}

body.home .mpc-home-service-decision__grid {
	max-width: 1200px;
	margin: 0 auto;
}

body.home .mpc-home-service-decision__card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 28px;
	border: 1px solid #e2d4c2;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(75, 48, 27, 0.08);
}

body.home .mpc-home-service-decision__card h3 {
	margin: 0 0 12px;
	color: #4a321c;
	font-size: 1.25rem;
}

body.home .mpc-home-service-decision__card p {
	margin: 0 0 18px;
	line-height: 1.65;
}

body.home .mpc-home-service-decision__card p:last-child {
	margin-top: auto;
	margin-bottom: 0;
}

body.home .mpc-home-service-decision__card .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 16px;
	border: 2px solid #7a542d;
	border-radius: 6px;
	background: #7a542d;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

body.home .mpc-home-service-decision__card .button:focus-visible {
	outline: 3px solid #1d5c91;
	outline-offset: 3px;
}

body.home .mpc-home-benefits__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	max-width: 1200px;
	margin: 24px auto 0;
	padding: 0;
	list-style: none;
}

body.home .mpc-home-benefits__list li {
	padding: 20px;
	border-left: 4px solid #7a542d;
	border-radius: 8px;
	background: #faf7f2;
}

@media (max-width: 767px) {
	body.home .mpc-home-service-decision__card {
		padding: 24px;
	}

	body.home .mpc-home-benefits__list {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	body.woocommerce-shop .entry-hero,
	body.page-id-97 .entry-content > .wp-block-cover.alignfull:first-child {
		min-height: 260px !important;
	}

}

/* Phase U: Contact conversion cards only. */
body.page-id-99 .mpc-contact-conversion {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 28px 0 40px;
}

body.page-id-99 .mpc-contact-conversion__card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 24px;
	border: 1px solid #e2d4c2;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 6px 20px rgba(75, 48, 27, 0.08);
}

body.page-id-99 .mpc-contact-conversion__card--line {
	border-color: #7a542d;
	background: #faf7f2;
}

body.page-id-99 .mpc-contact-conversion__card h3 {
	margin: 0 0 12px;
	color: #4a321c;
	font-size: 1.25rem;
}

body.page-id-99 .mpc-contact-conversion__card p {
	margin: auto 0 0;
}

body.page-id-99 .mpc-contact-conversion__card a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 16px;
	border: 2px solid #7a542d;
	border-radius: 6px;
	background: #fff;
	color: #5b3b20;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	word-break: break-word;
}

body.page-id-99 .mpc-contact-conversion__card--line a {
	background: #7a542d;
	color: #fff;
}

body.page-id-99 .mpc-contact-conversion__card a:focus-visible {
	outline: 3px solid #1d5c91;
	outline-offset: 3px;
}

@media (max-width: 767px) {
	body.page-id-99 .mpc-contact-conversion {
		grid-template-columns: 1fr;
	}
}

/* Phase H: Contact map and directions only. */
body.page-id-99 .mpc-contact-map {
	margin: 48px auto 0;
	max-width: var(--global-content-width);
}

body.page-id-99 .mpc-contact-map h2 {
	margin: 0 0 20px;
}

body.page-id-99 .mpc-contact-map img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
}

body.page-id-99 .mpc-contact-map p {
	margin: 20px 0 0;
}

body.page-id-99 .mpc-contact-map-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 20px;
	border-radius: 6px;
	background: #4a2c18;
	color: #fff;
	text-decoration: none;
}

/* Phase I: custom-order LINE CTA only. */
body.page-id-91 .mpc-custom-order-line-cta {
	margin: 48px auto 0;
	max-width: var(--global-content-width);
	text-align: center;
}

body.page-id-91 .mpc-custom-order-line-cta h2 {
	margin: 0 0 20px;
}

body.page-id-91 .mpc-custom-order-line-cta img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 525px;
	margin: 0 auto;
	border-radius: 10px;
}

body.page-id-91 .mpc-custom-order-line-id {
	margin: 16px 0;
}

body.page-id-91 .mpc-custom-order-line-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 20px;
	border-radius: 6px;
	background: #06c755;
	color: #fff;
	text-decoration: none;
}

/* Phase J: service information cards only. */
body.page-id-93 .entry-content > ol {
	counter-reset: mpc-step;
	margin: 0;
	padding: 0;
	list-style: none;
}

body.page-id-93 .entry-content > ol > li {
	counter-increment: mpc-step;
	position: relative;
	margin: 0 0 16px;
	padding: 20px 20px 20px 68px;
	border-radius: 10px;
	background: #fff;
}

body.page-id-93 .entry-content > ol > li::before {
	content: counter(mpc-step);
	position: absolute;
	left: 20px;
	top: 18px;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #4a2c18;
	color: #fff;
	font-weight: 700;
}

body.page-id-95 .entry-content > h3 {
	margin: 28px 0 0;
	padding: 18px 20px;
	border-radius: 10px 10px 0 0;
	background: #4a2c18;
	color: #fff;
}

body.page-id-95 .entry-content > h3 + p,
body.page-id-95 .entry-content > h3 + p + ul,
body.page-id-95 .entry-content > h3 + p + ul + p,
body.page-id-95 .entry-content > h3 + p + p {
	margin: 0;
	padding: 16px 20px;
	background: #fff;
}

body.page-id-95 .entry-content > h3 + p + ul,
body.page-id-95 .entry-content > h3 + p + ul + p,
body.page-id-95 .entry-content > h3 + p + p {
	padding-left: 40px;
}

body.page-id-95 .entry-content > h3 + p:not(:has(+ ul)):not(:has(+ p)),
body.page-id-95 .entry-content > h3 + p + ul + p,
body.page-id-95 .entry-content > h3 + p + p {
	border-radius: 0 0 10px 10px;
}

body.page-id-93 .mpc-service-cta,
body.page-id-95 .mpc-service-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px;
}

body.page-id-93 .mpc-service-cta a,
body.page-id-95 .mpc-service-cta a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 20px;
	border-radius: 6px;
	background: #4a2c18;
	color: #fff;
	text-decoration: none;
}
