/* ============================================================
   page-modern.css
   ------------------------------------------------------------
   ดีไซน์ใหม่ของ 3 ส่วนที่ใช้ภาษาภาพชุดเดียวกัน
     .mx-*  ชิ้นส่วนกลางที่ใช้ร่วมกัน (พื้นหลัง, กล่อง, หัวข้อ)
     .pp-*  หน้าสินค้า           (page-product.php)
     .ct-*  หน้าติดต่อเรา        (page-contact.php)
     .ft-*  ส่วนท้ายเว็บ footer  (_footer.php)

   โทนสีของเว็บ : เหลือง #FCDF15 , ดำ #202020 , น้ำตาล #B24B10
   ============================================================ */

:root {
	--mx-yellow: #FCDF15;
	--mx-yellow-soft: #FFF8C7;
	--mx-dark: #202020;
	--mx-dark-2: #2b2b2b;
	--mx-brown: #B24B10;
	--mx-text: #3d3d3d;
	--mx-muted: #6f6f6f;
	--mx-line: #ececec;
	--mx-radius: 16px;
	--mx-shadow: 0 10px 30px rgba(0,0,0,.08);
	--mx-shadow-lg: 0 18px 40px rgba(0,0,0,.14);
}

/* ============================================================
   ชิ้นส่วนกลาง
   ============================================================ */
.mx-page {
	background: #f6f6f4;
	padding: 34px 0 56px;
}

.mx-panel {
	background: #fff;
	border-radius: var(--mx-radius);
	box-shadow: var(--mx-shadow);
	padding: 28px;
	margin-bottom: 24px;
}

.mx-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .4px;
	color: var(--mx-brown);
	background: var(--mx-yellow-soft);
	border-radius: 999px;
	padding: 5px 13px;
	margin-bottom: 10px;
}

.mx-h2 {
	font-size: 24px;
	font-weight: 600;
	color: var(--mx-dark);
	margin: 0 0 6px !important;
	line-height: 1.35;
}

.mx-lead {
	color: var(--mx-muted);
	font-size: 15.5px;
	margin: 0 0 20px !important;
}

/* ---------- แถบจุดเด่น (ใช้ในหน้าสินค้าและหน้าติดต่อ) ---------- */
.mx-trust {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin-bottom: 24px;
}

.mx-trust__item {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #fff;
	border-radius: 14px;
	padding: 15px 16px;
	box-shadow: 0 4px 16px rgba(0,0,0,.05);
	border: 1px solid var(--mx-line);
}

.mx-trust__icon {
	flex: 0 0 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--mx-yellow);
	color: var(--mx-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
}

.mx-trust__text strong {
	display: block;
	font-size: 15px;
	color: var(--mx-dark);
	line-height: 1.35;
}

.mx-trust__text span {
	font-size: 13px;
	color: var(--mx-muted);
	line-height: 1.4;
}

/* ---------- แถบชวนติดต่อ (ปิดท้ายหน้า) ---------- */
.mx-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 18px;
	background: linear-gradient(120deg, var(--mx-dark) 0%, var(--mx-dark-2) 60%, #3a2a12 100%);
	color: #fff;
	border-radius: var(--mx-radius);
	padding: 28px 30px;
	box-shadow: var(--mx-shadow-lg);
	position: relative;
	overflow: hidden;
}

.mx-cta::after {
	content: "";
	position: absolute;
	right: -60px;
	top: -60px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(252,223,21,.35), transparent 70%);
	pointer-events: none;
}

.mx-cta__title {
	font-size: 22px;
	font-weight: 600;
	color: var(--mx-yellow);
	margin: 0 0 4px !important;
}

.mx-cta__text {
	color: #d9d9d9 !important;
	margin: 0 !important;
	font-size: 15px;
}

.mx-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	position: relative;
	z-index: 1;
}

.mx-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border-radius: 999px;
	padding: 11px 20px;
	font-size: 15.5px;
	font-weight: 600;
	text-decoration: none !important;
	transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
	white-space: nowrap;
}

.mx-btn:hover        { transform: translateY(-2px); }
.mx-btn:focus-visible { outline: 3px solid var(--mx-yellow); outline-offset: 3px; }

.mx-btn--call { background: var(--mx-yellow); color: var(--mx-dark) !important; }
.mx-btn--call:hover { box-shadow: 0 6px 18px rgba(252,223,21,.45); }

.mx-btn--line { background: #06C755; color: #fff !important; }
.mx-btn--line:hover { box-shadow: 0 6px 18px rgba(6,199,85,.45); }

.mx-btn--ghost { background: transparent; color: #fff !important; border: 1px solid rgba(255,255,255,.35); }
.mx-btn--ghost:hover { background: rgba(255,255,255,.08); }

/* ============================================================
   หน้าสินค้า
   ============================================================ */

/* ---------- แถบค้นหา / เรียงลำดับ ---------- */
.pp-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 4px 0 22px;
}

.pp-search {
	position: relative;
	flex: 1 1 280px;
}

.pp-search i {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	color: #9a9a9a;
	pointer-events: none;
}

.pp-search input {
	width: 100%;
	height: 48px;
	border: 1px solid #dedede;
	border-radius: 999px;
	padding: 0 18px 0 42px;
	font-size: 15.5px;
	background: #fafafa;
	transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.pp-search input:focus {
	outline: none;
	border-color: var(--mx-yellow);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(252,223,21,.25);
}

.pp-sort {
	height: 48px;
	border: 1px solid #dedede;
	border-radius: 999px;
	padding: 0 40px 0 18px;
	font-size: 15px;
	background: #fafafa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23666' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 16px center;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.pp-sort:focus {
	outline: none;
	border-color: var(--mx-yellow);
	box-shadow: 0 0 0 4px rgba(252,223,21,.25);
}

.pp-count {
	font-size: 14px;
	color: var(--mx-muted);
	white-space: nowrap;
}

.pp-count strong { color: var(--mx-dark); }

/* ไม่พบสินค้าที่ค้นหา */
.pp-noresult {
	display: none;
	text-align: center;
	padding: 40px 15px;
	color: var(--mx-muted);
}

.pp-noresult.is-visible { display: block; }
.pp-noresult i { font-size: 34px; color: #cfcfcf; display: block; margin-bottom: 10px; }

/* การ์ดที่ถูกกรองออก */
.pm-card.is-hidden { display: none !important; }

/* ภาพในการ์ด : ไม่ซูมตอนชี้ (ให้เข้าชุดกับสไลด์และแกลเลอรี่ที่ไม่ซูม)
   ใช้การยกการ์ดขึ้นและเงาเข้มขึ้นแทน */
.pm-card:hover .pm-card__img { transform: none !important; }
.pm-card { transition: transform .22s ease, box-shadow .22s ease !important; }
.pm-card:hover { transform: translateY(-4px); box-shadow: var(--mx-shadow-lg) !important; }

/* ============================================================
   หน้าติดต่อเรา
   ============================================================ */

/* ---------- การ์ดช่องทางติดต่อ ---------- */
.ct-channels {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 24px;
}

.ct-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #fff;
	border-radius: var(--mx-radius);
	padding: 22px 20px;
	box-shadow: var(--mx-shadow);
	text-decoration: none !important;
	color: var(--mx-text) !important;
	border-top: 4px solid transparent;
	transition: transform .2s ease, box-shadow .2s ease;
	min-width: 0;
}

a.ct-card:hover { transform: translateY(-4px); box-shadow: var(--mx-shadow-lg); }
a.ct-card:focus-visible { outline: 3px solid var(--mx-yellow); outline-offset: 3px; }

.ct-card--tel  { border-top-color: #e0373a; }
.ct-card--line { border-top-color: #06C755; }
.ct-card--fb   { border-top-color: #1f49a8; }
.ct-card--mail { border-top-color: #6b7280; }

.ct-card__icon {
	width: 48px;
	height: 48px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 21px;
	color: #fff;
}

.ct-card--tel  .ct-card__icon { background: linear-gradient(135deg, #e0373a, #b81f22); }
.ct-card--line .ct-card__icon { background: linear-gradient(135deg, #37cf4d, #06961f); }
.ct-card--fb   .ct-card__icon { background: linear-gradient(135deg, #4a7bea, #1f49a8); }
.ct-card--mail .ct-card__icon { background: linear-gradient(135deg, #6b7280, #434852); }

.ct-card__label {
	font-size: 13.5px;
	color: var(--mx-muted);
}

.ct-card__value {
	font-size: 18px;
	font-weight: 600;
	color: var(--mx-dark);
	line-height: 1.35;
	word-break: break-word;
}

.ct-card__value small {
	display: block;
	font-size: 16px;
	font-weight: 500;
	color: var(--mx-dark);
}

.ct-card__hint {
	margin-top: auto;
	font-size: 13px;
	color: var(--mx-brown);
	font-weight: 500;
}

/* ---------- ป้าย "พร้อมให้บริการ" ---------- */
.ct-status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #e9f9ee;
	color: #0b7a32;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 14px;
}

.ct-status__dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #13b34a;
	box-shadow: 0 0 0 0 rgba(19,179,74,.6);
	animation: ct-blink 2s infinite;
}

@keyframes ct-blink {
	0%   { box-shadow: 0 0 0 0 rgba(19,179,74,.55); }
	70%  { box-shadow: 0 0 0 9px rgba(19,179,74,0); }
	100% { box-shadow: 0 0 0 0 rgba(19,179,74,0); }
}

/* ---------- พื้นที่ให้บริการ ---------- */
.ct-areas {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}

.ct-areas li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--mx-yellow-soft);
	border: 1px solid #f3e27a;
	color: #5a4a00;
	border-radius: 999px;
	padding: 7px 14px;
	font-size: 14.5px;
	font-weight: 500;
}

/* ---------- ที่อยู่ + แผนที่ ---------- */
.ct-address {
	display: flex;
	gap: 13px;
	align-items: flex-start;
	margin: 0 0 16px;
}

.ct-address i {
	flex: 0 0 auto;
	color: var(--mx-brown);
	font-size: 20px;
	margin-top: 3px;
}

.ct-address p {
	margin: 0 !important;
	font-size: 15.5px;
	line-height: 1.75 !important;
	color: var(--mx-text);
}

.ct-map {
	display: block;
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--mx-line);
}

.ct-map img {
	display: block;
	width: 100%;
	height: auto;
}

.ct-map__btn {
	position: absolute;
	left: 14px;
	bottom: 14px;
	background: #fff;
	color: var(--mx-dark) !important;
	border-radius: 999px;
	padding: 9px 16px;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 6px 18px rgba(0,0,0,.2);
	text-decoration: none !important;
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.ct-map:hover .ct-map__btn { background: var(--mx-yellow); }

/* ---------- กล่อง Facebook ---------- */
.ct-fb { min-height: 200px; }
.ct-fb .fb-page, .ct-fb iframe { width: 100% !important; }

/* ============================================================
   FOOTER
   ============================================================ */
#footer.ft {
	background: #161616 !important;
	color: #bdbdbd;
	margin-top: 0;
	padding: 0;
	border-top: 0;
	box-shadow: none !important;
	position: relative;
}

/* แถบเหลืองบาง ๆ ขอบบน */
#footer.ft::before {
	content: "";
	display: block;
	height: 4px;
	background: linear-gradient(90deg, var(--mx-yellow), #ffb300, var(--mx-yellow));
}

/* ---------- แถบชวนโทรด้านบน footer ---------- */
.ft-top {
	border-bottom: 1px solid rgba(255,255,255,.08);
	padding: 26px 0;
}

.ft-top__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
}

.ft-top__title {
	color: #fff;
	font-size: 20px;
	font-weight: 600;
	margin: 0 !important;
}

.ft-top__title span { color: var(--mx-yellow); }

.ft-top__sub {
	color: #9d9d9d !important;
	font-size: 14.5px;
	margin: 2px 0 0 !important;
}

/* ---------- คอลัมน์หลัก ---------- */
.ft-main { padding: 44px 0 26px; }

.ft-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 34px;
}

.ft-brand__logo {
	max-height: 64px;
	width: auto;
	margin-bottom: 14px;
	display: block;
}

.ft-brand__name {
	color: #fff;
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 8px !important;
	line-height: 1.4;
}

.ft-brand__desc {
	color: #a9a9a9 !important;
	font-size: 14.5px;
	line-height: 1.8 !important;
	margin: 0 0 16px !important;
}

.ft-social {
	display: flex;
	gap: 9px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ft-social a {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255,255,255,.07);
	color: #fff !important;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	text-decoration: none !important;
	transition: background .2s ease, color .2s ease, transform .2s ease;
}

.ft-social a:hover { background: var(--mx-yellow); color: var(--mx-dark) !important; transform: translateY(-3px); }
.ft-social a:focus-visible { outline: 3px solid var(--mx-yellow); outline-offset: 3px; }

.ft-head {
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	margin: 4px 0 16px !important;
	position: relative;
	padding-bottom: 10px;
}

.ft-head::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 32px;
	height: 3px;
	border-radius: 3px;
	background: var(--mx-yellow);
}

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

.ft-list li {
	margin-bottom: 11px;
	font-size: 14.5px;
	line-height: 1.6;
}

.ft-list a {
	color: #cfcfcf !important;
	text-decoration: none !important;
	transition: color .2s ease, padding .2s ease;
}

.ft-list a:hover { color: var(--mx-yellow) !important; padding-left: 4px; }

.ft-list--icon li {
	display: flex;
	gap: 11px;
	align-items: flex-start;
}

.ft-list--icon i {
	flex: 0 0 16px;
	color: var(--mx-yellow);
	margin-top: 4px;
	text-align: center;
}

/* แท็กคำค้น */
.ft-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.ft-tags a {
	background: rgba(255,255,255,.06);
	border: 1px solid rgba(255,255,255,.1);
	color: #cfcfcf !important;
	border-radius: 999px;
	padding: 4px 11px;
	font-size: 13px;
	text-decoration: none !important;
	transition: all .2s ease;
}

.ft-tags a:hover { background: var(--mx-yellow); color: var(--mx-dark) !important; border-color: var(--mx-yellow); }

/* สถิติผู้เข้าชม */
.ft-stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.ft-stat {
	background: rgba(255,255,255,.05);
	border-radius: 10px;
	padding: 9px 11px;
}

.ft-stat strong {
	display: block;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

.ft-stat span { font-size: 12px; color: #9a9a9a; }

.ft-stat--wide { grid-column: 1 / -1; background: rgba(252,223,21,.1); }
.ft-stat--wide strong { color: var(--mx-yellow); }

/* ---------- แถบล่างสุด ---------- */
.ft-bottom {
	border-top: 1px solid rgba(255,255,255,.08);
	padding: 18px 0;
	font-size: 13.5px;
	color: #8d8d8d;
}

.ft-bottom__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
}

.ft-bottom a { color: #a9a9a9 !important; text-decoration: none !important; }
.ft-bottom a:hover { color: var(--mx-yellow) !important; }

.ft-bottom__links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
}

/* ============================================================
   แท็บเล็ต / มือถือ
   ============================================================ */
@media (max-width: 991px) {
	.mx-trust     { grid-template-columns: repeat(2, 1fr); }
	.ct-channels  { grid-template-columns: repeat(2, 1fr); }
	.ft-grid      { grid-template-columns: 1fr 1fr; }
	.ft-brand     { grid-column: 1 / -1; }
}

@media (max-width: 575px) {
	.mx-page   { padding: 20px 0 36px; }
	.mx-panel  { padding: 20px 16px; border-radius: 14px; }
	.mx-h2     { font-size: 20px; }

	.mx-trust  { grid-template-columns: 1fr 1fr; gap: 10px; }
	.mx-trust__item { flex-direction: column; text-align: center; padding: 14px 10px; gap: 8px; }
	.mx-trust__text span { display: none; }

	.mx-cta    { padding: 22px 18px; }
	.mx-cta__actions, .mx-btn { width: 100%; justify-content: center; }

	.pp-toolbar { gap: 10px; }
	.pp-sort    { flex: 1 1 auto; }

	.ct-channels { grid-template-columns: 1fr; gap: 12px; }
	.ct-card     { flex-direction: row; align-items: center; padding: 16px; gap: 14px; }
	.ct-card__icon { flex: 0 0 46px; }
	.ct-card__hint { display: none; }

	.ft-grid   { grid-template-columns: 1fr; gap: 28px; }
	.ft-top__inner .mx-btn { width: 100%; justify-content: center; }
	.ft-bottom__inner { flex-direction: column; text-align: center; }
	.ft-bottom__links { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
	.mx-btn, .ct-card, .pm-card, .ft-social a, .ft-list a { transition: none !important; }
	.ct-status__dot { animation: none; }
	.mx-btn:hover, a.ct-card:hover, .pm-card:hover, .ft-social a:hover { transform: none !important; }
}

/* ---------- เมฆแท็กบนพื้นขาว (หน้าแท็ก) ---------- */
.tag-cloud a {
	background: var(--mx-yellow-soft);
	border-color: #f3e27a;
	color: #5a4a00 !important;
	font-size: 14px;
	padding: 6px 13px;
}
.tag-cloud a:hover { background: var(--mx-yellow); color: var(--mx-dark) !important; }

/* ---------- โลโก้ใน footer : วางบนแผ่นเหลือง ให้ตัวอักษรสีเข้มอ่านออก ---------- */
.ft-brand__logo-tile {
	display: inline-block;
	background: var(--mx-yellow);
	border-radius: 14px;
	padding: 10px 16px;
	margin-bottom: 16px;
	box-shadow: 0 6px 18px rgba(252,223,21,.18);
}
.ft-brand__logo-tile .ft-brand__logo { margin: 0; max-height: 58px; }

/* ---------- อีเมลยาว : ย่อขนาดแทนการตัดคำกลางคำ ---------- */
.ct-card--mail .ct-card__value { font-size: 15px; word-break: normal; overflow-wrap: anywhere; }
@media (max-width: 575px) {
	.ct-card--mail .ct-card__value { font-size: 14.5px; }
}
