/*
Theme Name: MEET DBALE
Theme URI: https://wp.meet-dbale.com/
Description: ธีมลูกของ Hello Elementor สำหรับ wp.meet-dbale.com — ร้านเครื่องจักร เคมี บรรจุภัณฑ์ (ออกแบบใหม่ 04/10/2026)
Author: accweb
Template: hello-elementor
Version: 1.0.1
Text Domain: meetdbale
*/

:root {
	--md-navy: #0b2545;
	--md-navy-2: #13315c;
	--md-blue: #1e5bd8;
	--md-amber: #f59e0b;
	--md-amber-d: #d97706;
	--md-ink: #0f172a;
	--md-text: #334155;
	--md-muted: #64748b;
	--md-line: #e2e8f0;
	--md-bg: #f4f6fa;
	--md-card: #ffffff;
	--md-green: #06c755;
	--md-green-d: #05a648;
	--md-radius: 14px;
	--md-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
	--md-shadow-h: 0 4px 10px rgba(15, 23, 42, .08), 0 18px 40px rgba(15, 23, 42, .12);
	--md-font: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
	--md-head: "Prompt", "IBM Plex Sans Thai", system-ui, sans-serif;
}

/* ---------- base ---------- */
html { scroll-behavior: smooth; }
body.md-theme {
	font-family: var(--md-font);
	font-size: 16px;
	line-height: 1.65;
	color: var(--md-text);
	background: #fff;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
body.md-theme h1, body.md-theme h2, body.md-theme h3, body.md-theme h4 {
	font-family: var(--md-head);
	color: var(--md-ink);
	line-height: 1.3;
	font-weight: 600;
	margin: 0 0 .6em;
}
body.md-theme a { color: var(--md-blue); text-decoration: none; transition: color .15s; }
body.md-theme a:hover { color: var(--md-navy); }
body.md-theme img { max-width: 100%; height: auto; }
.md-ico { flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.screen-reader-text { clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute !important; width: 1px; word-wrap: normal !important; }
.screen-reader-text:focus { background: #fff; clip: auto !important; color: var(--md-ink); display: block; height: auto; left: 8px; top: 8px; padding: 12px 20px; width: auto; z-index: 100000; border-radius: 8px; box-shadow: var(--md-shadow); }
.alignright { float: right; margin-left: 1rem; }
.alignleft { float: left; margin-right: 1rem; }
.aligncenter { clear: both; display: block; margin-inline: auto; }

.md-container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }

/* ---------- buttons ---------- */
.md-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 11px 20px; border-radius: 10px; border: 1.5px solid transparent;
	font-family: var(--md-head); font-weight: 500; font-size: 15px; line-height: 1.2;
	text-decoration: none !important; cursor: pointer; white-space: nowrap;
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s, color .15s, border-color .15s;
}
.md-btn:hover { transform: translateY(-1px); }
.md-btn--lg { padding: 14px 26px; font-size: 16px; border-radius: 12px; }
body.md-theme .md-btn--amber { background: var(--md-amber); color: #1a1200; box-shadow: 0 8px 20px rgba(245, 158, 11, .35); }
body.md-theme .md-btn--amber:hover { background: #fbbf24; color: #1a1200; }
body.md-theme .md-btn--line { background: var(--md-green); color: #fff; box-shadow: 0 6px 16px rgba(6, 199, 85, .28); }
body.md-theme .md-btn--line:hover { background: var(--md-green-d); color: #fff; }
body.md-theme .md-btn--navy { background: var(--md-navy); color: #fff; }
body.md-theme .md-btn--navy:hover { background: var(--md-navy-2); color: #fff; }
body.md-theme .md-btn--white { background: #fff; color: var(--md-navy); }
body.md-theme .md-btn--white:hover { background: #f1f5f9; color: var(--md-navy); }
body.md-theme .md-btn--ghost { background: #fff; color: var(--md-navy); border-color: var(--md-line); }
body.md-theme .md-btn--ghost:hover { border-color: var(--md-navy); color: var(--md-navy); }

/* ---------- top bar ---------- */
.md-topbar { background: var(--md-navy); color: #c7d4e6; font-size: 13px; }
.md-topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.md-topbar__msg { display: inline-flex; align-items: center; gap: 8px; }
.md-topbar__msg .md-ico { width: 18px; height: 18px; color: var(--md-amber); }
.md-topbar__links { display: inline-flex; gap: 18px; }
body.md-theme .md-topbar a { color: #fff; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
body.md-theme .md-topbar a:hover { color: var(--md-amber); }
.md-topbar a .md-ico { width: 16px; height: 16px; }

/* ---------- header ---------- */
.md-header { position: sticky; top: 0; z-index: 900; background: #fff; box-shadow: 0 1px 0 var(--md-line); }
.admin-bar .md-header { top: 32px; }
.md-header__in { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.md-logo { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; text-decoration: none !important; }
.md-logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.md-logo__name { font-family: var(--md-head); font-weight: 700; font-size: 21px; letter-spacing: .04em; color: var(--md-navy); }
.md-logo__tag { font-size: 12px; color: var(--md-muted); margin-top: 3px; }
.md-logo--light .md-logo__name { color: #fff; }
.md-logo--light .md-logo__tag { color: #9fb2cc; }
.md-search { flex: 1 1 auto; max-width: 620px; }
.md-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.md-actions .md-btn { padding: 10px 16px; }
.md-cart { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; border: 1.5px solid var(--md-line); color: var(--md-navy) !important; }
.md-cart:hover { border-color: var(--md-navy); }
.md-cart .md-ico { width: 22px; height: 22px; }
.md-cart-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--md-amber); color: #1a1200; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.md-cart-count.is-empty { display: none; }
.md-burger { display: none; }
body.md-theme .md-burger, body.md-theme .md-burger:hover, body.md-theme .md-burger:focus,
body.md-theme .md-nav__close, body.md-theme .md-nav__close:hover, body.md-theme .md-nav__close:focus { background: #fff; color: var(--md-navy); border-color: var(--md-line); }
body.md-theme .md-sub-toggle, body.md-theme .md-sub-toggle:hover, body.md-theme .md-sub-toggle:focus { background: var(--md-bg); color: var(--md-ink); border: 0; }
body.md-theme .md-burger:focus-visible, body.md-theme .md-nav__close:focus-visible, body.md-theme .md-sub-toggle:focus-visible { outline: 2px solid var(--md-blue); outline-offset: 2px; }

/* search (Advanced Woo Search + fallback) */
.md-search .aws-container .aws-search-form { height: 46px; border-radius: 12px; overflow: hidden; border: 1.5px solid var(--md-line); background: #f8fafc; transition: border-color .15s, box-shadow .15s; }
.md-search .aws-container .aws-search-form:focus-within { border-color: var(--md-blue); box-shadow: 0 0 0 4px rgba(30, 91, 216, .12); background: #fff; }
.md-search .aws-container .aws-search-field { border: 0 !important; background: transparent !important; font-family: var(--md-font); font-size: 15px; padding: 0 16px !important; color: var(--md-ink); }
.md-search .aws-container .aws-search-form .aws-form-btn { background: var(--md-navy); border: 0; border-radius: 0; }
.md-search .aws-container .aws-search-form .aws-form-btn:hover { background: var(--md-navy-2); }
.md-search .aws-container .aws-search-form .aws-search-btn_icon { color: #fff; }
.md-search .woocommerce-product-search { display: flex; height: 46px; border: 1.5px solid var(--md-line); border-radius: 12px; overflow: hidden; }
.md-search .woocommerce-product-search input[type=search] { flex: 1; border: 0; padding: 0 16px; font-size: 15px; }
.md-search .woocommerce-product-search button { background: var(--md-navy); color: #fff; border: 0; border-radius: 0; padding: 0 18px; }

/* ---------- nav ---------- */
.md-nav { background: var(--md-navy-2); }
.md-nav__head, .md-nav__contact { display: none; }
.md-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: stretch; }
.md-menu > li { position: relative; }
body.md-theme .md-menu > li > a { display: flex; align-items: center; gap: 6px; padding: 13px 16px; color: #e2e9f3; font-family: var(--md-head); font-weight: 500; font-size: 15px; }
body.md-theme .md-menu > li > a:hover,
.md-menu > li:hover > a,
body.md-theme .md-menu > li.current-menu-item > a,
body.md-theme .md-menu > li.current-menu-ancestor > a { color: #fff; background: rgba(255, 255, 255, .08); }
.md-menu > li.current-menu-item > a, .md-menu > li.current-menu-ancestor > a { box-shadow: inset 0 -3px 0 var(--md-amber); }
.md-menu > li.menu-item-has-children > a::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); opacity: .7; }
.md-menu .sub-menu { list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0; min-width: 260px; background: #fff; border-radius: 0 0 14px 14px; box-shadow: var(--md-shadow-h); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 950; columns: 1; }
.md-menu > li.md-wide > .sub-menu { columns: 2; min-width: 500px; }
.md-menu > li:hover > .sub-menu, .md-menu > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.md-menu .sub-menu li { break-inside: avoid; }
body.md-theme .md-menu .sub-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--md-text); font-size: 15px; }
body.md-theme .md-menu .sub-menu a:hover { background: var(--md-bg); color: var(--md-navy); }
.md-sub-toggle { display: none; }
.md-nav__backdrop { display: none; }

/* ---------- hero ---------- */
.md-hero { position: relative; isolation: isolate; color: #fff; overflow: hidden; background: var(--md-navy); }
.md-hero__bg, .md-banner__bg { position: absolute; inset: 0; z-index: -2; }
body.md-theme .md-hero__bg img, body.md-theme .md-banner__bg img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: right center; display: block; }
.md-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8, 25, 48, .94) 0%, rgba(8, 25, 48, .82) 34%, rgba(8, 25, 48, .35) 62%, rgba(8, 25, 48, .05) 100%); }
.md-hero__in { padding: 92px 20px 84px; }
.md-eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(245, 158, 11, .16); border: 1px solid rgba(245, 158, 11, .55); color: #fcd34d; font-size: 13px; font-weight: 600; letter-spacing: .02em; margin-bottom: 18px; }
.md-eyebrow--dark { background: rgba(11, 37, 69, .08); border-color: rgba(11, 37, 69, .25); color: var(--md-navy); }
body.md-theme .md-hero__title { color: #fff; font-size: clamp(30px, 4.6vw, 54px); font-weight: 700; line-height: 1.2; max-width: 680px; margin-bottom: 18px; }
.md-hero__title span { color: var(--md-amber); display: block; }
.md-hero__sub { font-size: 18px; color: #d3dceb; max-width: 600px; margin: 0 0 30px; }
.md-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.md-hero__stats { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.md-hero__stats li { display: flex; flex-direction: column; padding: 12px 18px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); min-width: 140px; }
.md-hero__stats strong { font-family: var(--md-head); font-size: 20px; color: #fff; font-weight: 600; }
.md-hero__stats span { font-size: 13px; color: #b8c6da; }

/* ---------- trust bar ---------- */
.md-trust { background: #fff; border-bottom: 1px solid var(--md-line); }
.md-trust__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.md-trust__item { display: flex; align-items: center; gap: 14px; padding: 22px 18px; }
.md-trust__item + .md-trust__item { border-left: 1px solid var(--md-line); }
.md-trust__item .md-ico { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: #eef4ff; color: var(--md-blue); box-sizing: border-box; }
.md-trust__item strong { display: block; font-family: var(--md-head); font-weight: 600; color: var(--md-ink); font-size: 16px; }
.md-trust__item span { display: block; font-size: 13.5px; color: var(--md-muted); }

/* ---------- sections ---------- */
.md-sec { padding: 64px 0; }
.md-sec--alt { background: var(--md-bg); }
.md-sec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
body.md-theme .md-sec__title { font-size: clamp(24px, 2.8vw, 32px); margin: 0; position: relative; padding-left: 16px; }
.md-sec__title::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; border-radius: 3px; background: var(--md-amber); }
.md-sec__sub { margin: 6px 0 0 16px; color: var(--md-muted); font-size: 15.5px; }
body.md-theme .md-sec__more { display: inline-flex; align-items: center; gap: 6px; font-family: var(--md-head); font-weight: 500; color: var(--md-blue); white-space: nowrap; }
.md-sec__more .md-ico { width: 18px; height: 18px; transition: transform .15s; }
.md-sec__more:hover .md-ico { transform: translateX(3px); }

/* category tiles */
.md-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.md-cat { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--md-line); border-radius: var(--md-radius); overflow: hidden; text-decoration: none !important; box-shadow: var(--md-shadow); transition: transform .2s ease, box-shadow .2s ease; }
.md-cat:hover { transform: translateY(-4px); box-shadow: var(--md-shadow-h); }
.md-cat__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e9eef5; }
.md-cat__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; display: block; }
.md-cat:hover .md-cat__img img { transform: scale(1.05); }
.md-cat__body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; }
.md-cat__name { font-family: var(--md-head); font-weight: 600; font-size: 17px; color: var(--md-ink); }
.md-cat__desc { font-size: 14px; color: var(--md-muted); line-height: 1.5; }
.md-cat__count { margin-top: 6px; align-self: flex-start; font-size: 12.5px; font-weight: 600; color: var(--md-blue); background: #eef4ff; padding: 3px 10px; border-radius: 999px; }

/* banners */
.md-banner { position: relative; isolation: isolate; overflow: hidden; }
.md-banner__in { padding: 80px 20px; }
.md-banner__in > * { max-width: 560px; }
body.md-theme .md-banner__title { font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; margin-bottom: 12px; }
.md-banner__sub { font-size: 17px; margin: 0 0 26px; }
.md-banner--oem { background: #fbf6ee; }
.md-banner--oem::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(251, 246, 238, .97) 0%, rgba(251, 246, 238, .9) 38%, rgba(251, 246, 238, .2) 62%, rgba(251, 246, 238, 0) 100%); }
.md-banner--oem .md-banner__sub { color: #5b4a37; }
.md-banner--ship { background: var(--md-navy); color: #fff; }
.md-banner--ship::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8, 25, 48, .95) 0%, rgba(8, 25, 48, .82) 38%, rgba(8, 25, 48, .2) 66%, rgba(8, 25, 48, 0) 100%); }
body.md-theme .md-banner--ship .md-banner__title { color: #fff; }
.md-banner--ship .md-banner__sub { color: #d3dceb; }

/* steps */
.md-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: none; }
.md-steps li { position: relative; display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--md-line); border-radius: var(--md-radius); padding: 24px 22px; box-shadow: var(--md-shadow); }
.md-steps__n { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--md-navy); color: var(--md-amber); font-family: var(--md-head); font-weight: 700; font-size: 18px; margin-bottom: 8px; }
.md-steps strong { font-family: var(--md-head); font-weight: 600; color: var(--md-ink); font-size: 17px; }
.md-steps li > span:last-child { font-size: 14.5px; color: var(--md-muted); }

/* ---------- WooCommerce: product grid ---------- */
body.md-theme .woocommerce ul.products,
body.md-theme ul.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0 0 24px; padding: 0; }
body.md-theme ul.products.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.md-theme ul.products::before, body.md-theme ul.products::after { display: none !important; }
body.md-theme ul.products li.product {
	width: auto !important; margin: 0 !important; float: none !important; clear: none !important;
	display: flex; flex-direction: column; position: relative;
	background: var(--md-card); border: 1px solid var(--md-line); border-radius: var(--md-radius);
	padding: 12px 12px 14px; box-shadow: var(--md-shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
body.md-theme ul.products li.product:hover { transform: translateY(-3px); box-shadow: var(--md-shadow-h); border-color: #cbd5e1; }
body.md-theme ul.products li.product a.woocommerce-LoopProduct-link { display: flex; flex-direction: column; flex: 1 1 auto; color: inherit; }
body.md-theme ul.products li.product a img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; border-radius: 10px; margin: 0 0 12px; box-shadow: none; }
.md-card-cat { order: 0; font-size: 12px; font-weight: 600; color: var(--md-blue); margin-bottom: 4px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.md-theme ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--md-font); font-weight: 600; font-size: 15px; line-height: 1.45; color: var(--md-ink);
	padding: 0 !important; margin: 0 0 8px !important;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em;
}
body.md-theme ul.products li.product .price { display: block; color: var(--md-navy) !important; font-family: var(--md-head); font-weight: 600; font-size: 17px; margin: auto 0 12px !important; }
body.md-theme ul.products li.product .price del { color: var(--md-muted); font-size: 14px; font-weight: 400; opacity: .8; }
body.md-theme ul.products li.product .price ins { text-decoration: none; color: #dc2626; }
.md-ask-price { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; color: var(--md-amber-d); background: #fff7e6; border: 1px solid #fde3b0; padding: 3px 10px; border-radius: 999px; }
body.md-theme ul.products li.product .button,
body.md-theme ul.products li.product .added_to_cart {
	display: flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box; margin: 0 !important;
	padding: 10px 12px; border-radius: 10px; font-family: var(--md-head); font-weight: 500; font-size: 14.5px; line-height: 1.2;
	background: var(--md-navy); color: #fff; border: 0; transition: background-color .15s;
}
body.md-theme ul.products li.product .button:hover { background: var(--md-blue); color: #fff; }
body.md-theme ul.products li.product .added_to_cart { margin-top: 6px !important; background: #eef4ff; color: var(--md-blue); }
body.md-theme ul.products li.product .onsale { top: 18px; left: 18px; right: auto; margin: 0; min-height: 0; min-width: 0; line-height: 1; padding: 6px 10px; border-radius: 999px; background: #dc2626; font-size: 12px; font-weight: 700; }

/* ---------- WooCommerce: archive / shop ---------- */
body.md-theme:not(.home) .site-main { max-width: 1240px; margin: 0 auto; padding: 28px 20px 64px; box-sizing: border-box; width: 100%; }
body.md-theme .woocommerce-breadcrumb { font-size: 13.5px; color: var(--md-muted) !important; margin: 0 0 14px !important; }
body.md-theme .woocommerce-breadcrumb a { color: var(--md-muted); }
body.md-theme .woocommerce-breadcrumb a:hover { color: var(--md-navy); }
body.md-theme .woocommerce-products-header { margin-bottom: 8px; }
body.md-theme .woocommerce-products-header__title.page-title,
body.md-theme .page-header .entry-title { font-size: clamp(26px, 3vw, 36px); font-weight: 700; color: var(--md-ink); margin: 0 0 10px; }
.term-description { color: var(--md-text); max-width: 880px; margin-bottom: 8px; }
.md-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 22px; }
body.md-theme .md-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--md-line); color: var(--md-text); font-size: 14px; font-weight: 500; transition: border-color .15s, color .15s, background-color .15s; }
body.md-theme .md-chip:hover { border-color: var(--md-navy); color: var(--md-navy); background: #f8fafc; }
.md-chip span { font-size: 12px; color: var(--md-muted); background: var(--md-bg); padding: 1px 7px; border-radius: 999px; }
body.md-theme .woocommerce-result-count { color: var(--md-muted); font-size: 14px; margin: 8px 0 20px; }
body.md-theme .woocommerce-ordering { margin: 0 0 20px; }
body.md-theme .woocommerce-ordering select { height: 42px; padding: 0 36px 0 14px; border-radius: 10px; border: 1.5px solid var(--md-line); background-color: #fff; font-family: var(--md-font); font-size: 14.5px; color: var(--md-ink); }
body.md-theme nav.woocommerce-pagination ul { border: 0 !important; display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
body.md-theme nav.woocommerce-pagination ul li { border: 0 !important; }
body.md-theme nav.woocommerce-pagination ul li a,
body.md-theme nav.woocommerce-pagination ul li span { min-width: 40px; height: 40px; padding: 0 10px !important; display: inline-flex !important; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--md-line) !important; background: #fff; color: var(--md-text); font-weight: 500; box-sizing: border-box; }
body.md-theme nav.woocommerce-pagination ul li span.current { background: var(--md-navy) !important; color: #fff !important; border-color: var(--md-navy) !important; }
body.md-theme nav.woocommerce-pagination ul li a:hover { border-color: var(--md-navy) !important; background: #fff !important; color: var(--md-navy) !important; }

/* ---------- WooCommerce: single product ---------- */
body.md-theme.single-product div.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
body.md-theme.single-product div.product > * { grid-column: 1 / -1; min-width: 0; }
body.md-theme.single-product div.product > .woocommerce-product-gallery { grid-column: 1; width: 100% !important; float: none !important; margin: 0 !important; position: sticky; top: 140px; }
body.md-theme.single-product div.product > .summary { grid-column: 2; width: 100% !important; float: none !important; margin: 0 !important; }
body.md-theme.single-product div.product > .onsale { grid-column: 1; }
body.md-theme .woocommerce-product-gallery__wrapper { border-radius: var(--md-radius); overflow: hidden; border: 1px solid var(--md-line); background: #fff; }
body.md-theme .woocommerce-product-gallery .flex-control-thumbs { display: grid !important; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px !important; }
body.md-theme .woocommerce-product-gallery .flex-control-thumbs li { width: auto !important; float: none !important; }
body.md-theme .woocommerce-product-gallery .flex-control-thumbs img { border-radius: 8px; border: 1px solid var(--md-line); opacity: .7; transition: opacity .15s, border-color .15s; aspect-ratio: 1 / 1; object-fit: cover; }
body.md-theme .woocommerce-product-gallery .flex-control-thumbs img.flex-active,
body.md-theme .woocommerce-product-gallery .flex-control-thumbs img:hover { opacity: 1; border-color: var(--md-navy); }
body.md-theme .woocommerce-product-gallery__trigger { background: #fff !important; border-radius: 10px !important; box-shadow: var(--md-shadow); }
body.md-theme div.product .product_title { font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; line-height: 1.35; color: var(--md-ink); margin-bottom: 12px; }
body.md-theme div.product .summary > .price,
body.md-theme div.product .woocommerce-variation-price .price { color: var(--md-navy) !important; font-family: var(--md-head); font-size: 26px !important; font-weight: 700; margin: 0 0 16px; }
body.md-theme div.product .summary > .price .md-ask-price { font-size: 16px; padding: 6px 14px; }
body.md-theme div.product .woocommerce-product-details__short-description { color: var(--md-text); font-size: 15.5px; border-top: 1px solid var(--md-line); padding-top: 16px; margin-bottom: 18px; }
body.md-theme div.product .woocommerce-product-details__short-description ul { padding-left: 1.2em; margin: .4em 0 .8em; }
body.md-theme div.product form.cart { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px !important; }
body.md-theme div.product form.variations_form { display: block; }
body.md-theme div.product form.cart .variations { width: 100%; border: 0; margin-bottom: 14px; background: var(--md-bg); border-radius: 12px; }
body.md-theme div.product form.cart .variations th,
body.md-theme div.product form.cart .variations td { padding: 12px 14px !important; border: 0; vertical-align: middle; background: transparent; }
body.md-theme div.product form.cart .variations label { font-weight: 600; color: var(--md-ink); }
body.md-theme div.product form.cart .variations select { width: 100%; min-width: 0; height: 44px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--md-line); background-color: #fff; font-family: var(--md-font); font-size: 15px; color: var(--md-ink); }
body.md-theme div.product form.cart .reset_variations { font-size: 13px; margin-left: 6px; }
body.md-theme div.product .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
body.md-theme div.product form.cart .quantity .qty { width: 76px; height: 48px; border-radius: 10px; border: 1.5px solid var(--md-line); font-size: 16px; text-align: center; }
body.md-theme div.product form.cart .single_add_to_cart_button {
	height: 48px; padding: 0 28px !important; border-radius: 10px !important; border: 0;
	background: var(--md-amber) !important; color: #1a1200 !important; font-family: var(--md-head); font-weight: 600; font-size: 16px;
	box-shadow: 0 8px 20px rgba(245, 158, 11, .3); transition: background-color .15s, transform .15s;
}
body.md-theme div.product form.cart .single_add_to_cart_button:hover { background: #fbbf24 !important; transform: translateY(-1px); }
body.md-theme div.product form.cart .single_add_to_cart_button.disabled { opacity: .55; }
body.md-theme .product_meta { font-size: 13.5px; color: var(--md-muted); border-top: 1px solid var(--md-line); padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.md-ask { margin: 0 0 20px; padding: 18px; border-radius: var(--md-radius); background: linear-gradient(135deg, #f1f6ff 0%, #f8fafc 100%); border: 1px solid #dbe6fb; }
.md-ask__title { font-family: var(--md-head); font-weight: 600; color: var(--md-ink); margin-bottom: 12px; font-size: 16px; }
.md-ask__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.md-ask__btns .md-btn { padding: 12px 14px; }
.md-ask__list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; color: var(--md-text); }
.md-ask__list li { display: flex; align-items: center; gap: 8px; }
.md-ask__list .md-ico { width: 18px; height: 18px; color: var(--md-blue); }
body.md-theme .woocommerce-tabs { margin-top: 24px; }
body.md-theme .woocommerce-tabs ul.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 !important; margin: 0 0 22px !important; border-bottom: 1px solid var(--md-line); }
body.md-theme .woocommerce-tabs ul.tabs::before, body.md-theme .woocommerce-tabs ul.tabs li::before, body.md-theme .woocommerce-tabs ul.tabs li::after { display: none !important; }
body.md-theme .woocommerce-tabs ul.tabs li { margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; border-radius: 0 !important; }
body.md-theme .woocommerce-tabs ul.tabs li a { display: block; padding: 12px 18px !important; font-family: var(--md-head); font-weight: 500; color: var(--md-muted) !important; border-bottom: 3px solid transparent; margin-bottom: -1px; }
body.md-theme .woocommerce-tabs ul.tabs li.active a { color: var(--md-navy) !important; border-bottom-color: var(--md-amber); }
body.md-theme .woocommerce-tabs .panel { max-width: 920px; font-size: 16px; line-height: 1.8; }
body.md-theme .woocommerce-tabs .panel > h2:first-child { display: none; }
body.md-theme .woocommerce-tabs .panel img { border-radius: 12px; }
body.md-theme .woocommerce-tabs .panel { overflow-wrap: anywhere; }
body.md-theme .woocommerce-tabs .panel img, body.md-theme .woocommerce-tabs .panel video, body.md-theme .woocommerce-tabs .panel iframe, body.md-theme .woocommerce-tabs .panel figure { max-width: 100% !important; height: auto; }
body.md-theme .woocommerce-tabs .panel .wp-video { width: 100% !important; max-width: 540px; }
body.md-theme .woocommerce-tabs .panel table { display: block; overflow-x: auto; max-width: 100%; }
body.md-theme .woocommerce-tabs .panel table, body.md-theme .woocommerce-tabs table.shop_attributes { border-collapse: collapse; width: 100%; font-size: 15px; }
body.md-theme .woocommerce-tabs .panel table th, body.md-theme .woocommerce-tabs .panel table td { border: 1px solid var(--md-line); padding: 10px 12px; }
body.md-theme .woocommerce-tabs table.shop_attributes th { background: var(--md-bg); width: 30%; font-weight: 600; color: var(--md-ink); }
body.md-theme section.related.products, body.md-theme section.up-sells { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--md-line); }
body.md-theme section.related.products > h2, body.md-theme section.up-sells > h2 { font-size: 24px; margin-bottom: 20px; }

/* notices / forms */
body.md-theme .woocommerce-message, body.md-theme .woocommerce-info, body.md-theme .woocommerce-error { border-radius: 12px; border-top-width: 0; border-left: 4px solid var(--md-blue); background: #f1f6ff; }
body.md-theme .woocommerce-message { border-left-color: var(--md-green); background: #effbf3; }
body.md-theme .woocommerce-error { border-left-color: #dc2626; background: #fef2f2; }
body.md-theme .woocommerce a.button, body.md-theme .woocommerce button.button, body.md-theme .woocommerce input.button, body.md-theme .woocommerce #respond input#submit { border-radius: 10px; background: var(--md-navy); color: #fff; font-family: var(--md-head); font-weight: 500; border: 0; }
body.md-theme .woocommerce a.button:hover, body.md-theme .woocommerce button.button:hover, body.md-theme .woocommerce input.button:hover { background: var(--md-blue); color: #fff; }
body.md-theme .woocommerce a.button.alt, body.md-theme .woocommerce button.button.alt { background: var(--md-amber); color: #1a1200; }
body.md-theme .woocommerce a.button.alt:hover, body.md-theme .woocommerce button.button.alt:hover { background: #fbbf24; color: #1a1200; }
body.md-theme input[type=text], body.md-theme input[type=email], body.md-theme input[type=tel], body.md-theme input[type=password], body.md-theme input[type=number], body.md-theme textarea, body.md-theme select { border-radius: 10px; border: 1.5px solid var(--md-line); font-family: var(--md-font); }
body.md-theme input:focus, body.md-theme textarea:focus, body.md-theme select:focus { outline: none; border-color: var(--md-blue); box-shadow: 0 0 0 4px rgba(30, 91, 216, .12); }

/* plain pages (ติดต่อเรา / นโยบาย) */
body.md-theme.page:not(.home) .site-main .page-content { max-width: 880px; font-size: 16px; }
body.md-theme.page:not(.home) .site-main .page-content iframe { width: 100%; max-width: 100%; border-radius: 14px; }

/* ---------- footer ---------- */
.md-footer { background: #081a33; color: #a9b8cc; font-size: 15px; }
.md-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.md-footer__brand p { margin: 16px 0 18px; line-height: 1.75; max-width: 340px; }
body.md-theme .md-footer__h { color: #fff; font-size: 16px; font-weight: 600; margin: 6px 0 16px; }
.md-footer__links, .md-footer__contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
body.md-theme .md-footer a { color: #cbd6e4; }
body.md-theme .md-footer a:hover { color: var(--md-amber); }
.md-footer__contact li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.6; }
.md-footer__contact .md-ico { width: 18px; height: 18px; margin-top: 3px; color: var(--md-amber); }
.md-footer__social { display: flex; gap: 10px; }
body.md-theme .md-footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #fff; transition: background-color .15s; }
body.md-theme .md-footer__social a:hover { background: var(--md-amber); color: #1a1200; }
.md-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 0; font-size: 13.5px; color: #7f91aa; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
	.md-cats { grid-template-columns: repeat(4, 1fr); gap: 14px; }
	body.md-theme ul.products, body.md-theme .woocommerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.md-footer__grid { grid-template-columns: 1fr 1fr; }
	.md-actions__line span { display: none; }
}
@media (max-width: 960px) {
	.md-topbar__msg { display: none; }
	.md-topbar__in { justify-content: center; }
	.md-header__in { flex-wrap: wrap; gap: 10px 12px; min-height: 0; padding-top: 10px; padding-bottom: 10px; }
	.md-burger { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--md-line); background: #fff; color: var(--md-navy); padding: 0; cursor: pointer; }
	.md-burger .md-ico { width: 22px; height: 22px; }
	.md-logo__mark { width: 38px; height: 38px; }
	.md-logo__name { font-size: 18px; }
	.md-logo__tag { font-size: 11px; }
	.md-search { order: 10; flex: 1 0 100%; max-width: none; }
	.md-actions .md-actions__line { display: none; }
	/* nav → drawer */
	.md-nav { position: fixed; top: 0; bottom: 0; left: 0; width: min(86vw, 360px); z-index: 1001; background: #fff; transform: translateX(-102%); transition: transform .25s ease; overflow-y: auto; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
	.md-nav-open .md-nav { transform: none; }
	.md-nav__in { padding: 0 0 24px; }
	.md-nav__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--md-line); font-family: var(--md-head); font-weight: 600; color: var(--md-ink); }
	.md-nav__close { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--md-line); background: #fff; color: var(--md-ink); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
	.md-menu { display: block; padding: 8px; }
	.md-menu > li { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid #f1f5f9; }
	body.md-theme .md-menu > li > a { flex: 1; color: var(--md-ink); padding: 14px 10px; }
	body.md-theme .md-menu > li > a:hover, .md-menu > li:hover > a, body.md-theme .md-menu > li.current-menu-item > a, body.md-theme .md-menu > li.current-menu-ancestor > a { background: transparent; color: var(--md-blue); box-shadow: none; }
	.md-menu > li.menu-item-has-children > a::after { display: none; }
	.md-sub-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--md-bg); color: var(--md-ink); padding: 0; transition: transform .2s; }
	.is-open > .md-sub-toggle { transform: rotate(180deg); }
	.md-menu .sub-menu, .md-menu > li.md-wide > .sub-menu { position: static; flex: 1 0 100%; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; columns: 1; min-width: 0; padding: 0 0 10px 10px; border-radius: 0; }
	.md-menu li.is-open > .sub-menu { display: block; }
	body.md-theme .md-menu .sub-menu a { padding: 9px 10px; color: var(--md-text); }
	.md-nav__contact { display: grid; gap: 10px; padding: 16px; }
	.md-nav__backdrop { display: block; position: fixed; inset: 0; z-index: 1000; background: rgba(8, 25, 48, .5); }
	.md-nav__backdrop[hidden] { display: none; }
	.md-trust__grid { grid-template-columns: 1fr 1fr; }
	.md-trust__item:nth-child(3) { border-left: 0; }
	.md-trust__item:nth-child(n+3) { border-top: 1px solid var(--md-line); }
	.md-cats { grid-template-columns: repeat(2, 1fr); }
	.md-steps { grid-template-columns: 1fr 1fr; }
	body.md-theme.single-product div.product { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	body.md-theme.single-product div.product > .woocommerce-product-gallery, body.md-theme.single-product div.product > .summary { grid-column: 1; position: static; }
}
@media (max-width: 767px) {
	body.md-theme { font-size: 15.5px; }
	.md-container { padding: 0 16px; }
	.md-hero__in { padding: 56px 16px 48px; }
	.md-hero::before { background: linear-gradient(180deg, rgba(8, 25, 48, .62) 0%, rgba(8, 25, 48, .78) 45%, rgba(8, 25, 48, .93) 100%); }
	body.md-theme .md-hero__bg img { object-position: center; }
	.md-hero__sub { font-size: 16px; }
	.md-hero__ctas .md-btn { flex: 1 1 auto; }
	.md-hero__stats { gap: 8px; margin-top: 28px; }
	.md-hero__stats li { min-width: 0; flex: 1 1 0; padding: 10px 12px; }
	.md-hero__stats strong { font-size: 16px; }
	.md-hero__stats span { font-size: 12px; }
	.md-trust__item { padding: 16px 10px; gap: 10px; align-items: flex-start; }
	.md-trust__item .md-ico { width: 38px; height: 38px; padding: 8px; }
	.md-trust__item strong { font-size: 14.5px; }
	.md-trust__item span { font-size: 12.5px; }
	.md-sec { padding: 44px 0; }
	.md-sec__head { margin-bottom: 18px; align-items: center; }
	body.md-theme .md-sec__title { font-size: 22px; }
	.md-sec__sub { display: none; }
	body.md-theme .md-sec__more { font-size: 14px; }
	.md-cats { gap: 12px; }
	.md-cat__body { padding: 12px 12px 14px; }
	.md-cat__name { font-size: 15.5px; }
	.md-cat__desc { font-size: 12.5px; }
	body.md-theme ul.products, body.md-theme .woocommerce ul.products, body.md-theme ul.products.columns-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	body.md-theme ul.products li.product { padding: 8px 8px 10px; border-radius: 12px; }
	body.md-theme ul.products li.product .woocommerce-loop-product__title { font-size: 14px; }
	body.md-theme ul.products li.product .price { font-size: 15px; }
	body.md-theme ul.products li.product .button { font-size: 13.5px; padding: 9px 8px; }
	.md-banner__in { padding: 56px 16px; }
	.md-banner--oem::before { background: linear-gradient(180deg, rgba(251, 246, 238, .93) 0%, rgba(251, 246, 238, .88) 60%, rgba(251, 246, 238, .7) 100%); }
	.md-banner--ship::before { background: linear-gradient(180deg, rgba(8, 25, 48, .86) 0%, rgba(8, 25, 48, .9) 100%); }
	.md-banner__sub { font-size: 15.5px; }
	.md-steps { grid-template-columns: 1fr; gap: 12px; }
	.md-steps li { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 12px; padding: 16px; }
	.md-steps__n { margin: 0; }
	.md-steps li > span:last-child { flex: 1 0 100%; }
	.md-footer__grid { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
	body.md-theme:not(.home) .site-main { padding: 18px 16px 48px; }
	.md-ask__btns { grid-template-columns: 1fr; }
	.md-chips { flex-wrap: nowrap; overflow-x: auto; margin: 6px -16px 16px; padding: 2px 16px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.md-chips::-webkit-scrollbar { display: none; }
	body.md-theme .md-chip { flex: 0 0 auto; }
	body.md-theme .woocommerce-ordering, body.md-theme .woocommerce-result-count { float: none; }
}
@media (max-width: 480px) {
	.md-trust__item { align-items: center; }
	.md-trust__item span { display: none; }
}
@media (max-width: 420px) {
	.md-logo__tag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
