/*
Theme Name:  ChangSure Child
Theme URI:   https://changsure.com
Description: ChangSure storefront presentation layer on top of WoodMart. Presentation only — business logic lives in the changsure-core plugin.
Author:      Amity Tech
Template:    woodmart
Version:     0.5.6
Requires at least: 7.0
Requires PHP: 8.1
Text Domain: changsure-child
*/

@font-face {
	font-family: "Noto Sans Thai";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("assets/fonts/noto-sans-thai.woff2") format("woff2");
	unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
	font-family: "Noto Sans Thai";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("assets/fonts/noto-sans-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Brand tokens (spec 8.3). Colours are defaults; the brand name is configurable in changsure-core. */
:root {
	--cs-navy: #111D2B;
	--cs-gold: #F3AE38;
	--cs-action-gold: #E8AC48;
	--cs-action-gold-hover: #EFBC61;
	--cs-steel: #64748B;
	--cs-white: #FFFFFF;
	--cs-line: #E2E8F0;
	--cs-soft: #F8FAFC;
}

/* Map WoodMart's colour tokens to the ChangSure palette (no parent-theme files edited).
   Declared on body so it wins over WoodMart's generated :root defaults. Move to Theme Settings
   once the final logo/brand is approved (D7). */
body {
	background: var(--cs-white);
	--wd-text-font: "Noto Sans Thai", Tahoma, sans-serif;
	--wd-title-font: "Noto Sans Thai", Tahoma, sans-serif;
	--wd-entities-title-font: "Noto Sans Thai", Tahoma, sans-serif;
	--wd-header-el-font: "Noto Sans Thai", Tahoma, sans-serif;
	--wd-primary-color: var(--cs-navy);
	--wd-alternative-color: var(--cs-gold);
	--btn-accented-bgcolor: var(--cs-action-gold);
	--btn-accented-bgcolor-hover: var(--cs-action-gold-hover);
	--btn-accented-color: var(--cs-navy);
	--btn-accented-color-hover: var(--cs-navy);
}
.price, .amount { color: var(--cs-navy); }

/* Price unit and unit box (product page) */
.cs-price-unit { font-size: .8em; font-weight: 400; color: var(--cs-steel); }
.cs-unit-box { margin: 0 0 1.25em; padding: .75em 1em; border-left: 3px solid var(--cs-gold); background: var(--cs-soft); }
.cs-unit-box p { margin: .2em 0; }
.cs-unit-main { font-weight: 600; color: var(--cs-navy); }
.cs-per-piece { font-weight: 400; color: var(--cs-steel); }
.cs-unit-other, .cs-sku { font-size: .9em; color: var(--cs-steel); }

/* Spec table: stays readable on phones (no horizontal page scroll) */
.cs-spec-table { width: 100%; max-width: 720px; border-collapse: collapse; }
.cs-spec-table th, .cs-spec-table td { padding: .55em .75em; border-bottom: 1px solid var(--cs-line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.cs-spec-table th { width: 40%; font-weight: 600; color: var(--cs-navy); background: var(--cs-soft); }
.cs-spec-note { margin-top: 1em; font-size: .9em; color: var(--cs-steel); }

/* Product cards */
.cs-card-spec { margin: .25em 0 .4em; font-size: .82em; line-height: 1.4; color: var(--cs-steel); }

@media (max-width: 480px) {
	.cs-spec-table th { width: 45%; }
}

/* ---------- Quotation / wholesale forms (Phase 2) ---------- */
.cs-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cs-notice { margin: 0 0 1.5em; padding: .9em 1.1em; border-left: 4px solid var(--cs-steel); background: var(--cs-soft); }
.cs-notice-ok { border-color: #16A34A; }
.cs-notice-error { border-color: #DC2626; background: #FEF2F2; }
.cs-notice ul { margin: .3em 0 0 1.2em; }
.cs-help { font-size: .9em; color: var(--cs-steel); }
.cs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 1.25em; }
.cs-grid label, .cs-rfq-form > p > label, .cs-wholesale-form label, .cs-decide label { display: block; font-weight: 600; margin-bottom: .25em; }
.cs-radio { display: inline-flex !important; align-items: center; gap: .4em; margin-right: 1.25em; font-weight: 400 !important; }
.cs-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1em; }
.cs-rfq-table, .cs-quote-table { width: 100%; border-collapse: collapse; }
.cs-rfq-table th, .cs-rfq-table td, .cs-quote-table th, .cs-quote-table td { padding: .5em .6em; border-bottom: 1px solid var(--cs-line); text-align: left; vertical-align: top; }
.cs-rfq-table input[type=number] { width: 7em; }
.cs-rfq-table input[type=text] { min-width: 14em; width: 100%; }
.cs-link-btn { background: none; border: 0; color: #B91C1C; text-decoration: underline; cursor: pointer; padding: 0; }
.cs-rfq-add { margin: 1em 0 0; padding: .9em 1em; border: 1px dashed var(--cs-line); border-radius: 6px; }
.cs-rfq-add input[type=number] { width: 6.5em; }
.cs-rfq-add-title { margin: 0 0 .5em; }
.cs-rfq-from-cart { margin: 1em 0; }
.cs-btn-quote { background: var(--cs-navy) !important; color: #fff !important; }

.cs-quote { max-width: 900px; }
.cs-quote-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1em; border-bottom: 3px solid var(--cs-navy); margin-bottom: 1em; }
.cs-quote-head h2 { margin: 0; color: var(--cs-navy); }
.cs-quote-head dl, .cs-terms { display: grid; grid-template-columns: max-content 1fr; gap: .2em 1em; margin: 0 0 1em; }
.cs-quote-head dt, .cs-terms dt { font-weight: 600; color: var(--cs-navy); }
.cs-quote-head dd, .cs-terms dd { margin: 0; }
.cs-quote-table .num { text-align: right; white-space: nowrap; }
.cs-quote-table tfoot th { text-align: right; font-weight: 600; }
.cs-quote-table .cs-total th, .cs-quote-table .cs-total td { font-size: 1.1em; font-weight: 700; color: var(--cs-navy); border-top: 2px solid var(--cs-navy); }
.cs-status { display: inline-block; padding: .1em .6em; border-radius: 999px; background: var(--cs-soft); font-size: .9em; }
.cs-status-sent { background: #FEF3C7; } .cs-status-accepted { background: #DCFCE7; } .cs-status-expired, .cs-status-rejected, .cs-status-superseded { background: #F1F5F9; color: var(--cs-steel); }
.cs-decide { margin-top: 1.5em; padding: 1em; background: var(--cs-soft); border-radius: 6px; }

@media print {
	header.whb-header, .whb-header, footer, .footer-container, .woocommerce-breadcrumb, .page-title, .wd-toolbar, .cs-no-print, .cs-decide, .scrollToTop { display: none !important; }
	.cs-quote { max-width: none; }
	body { background: #fff; }
}
.cs-rfq-table select { min-width: 6.5em; }


/* Footer (scripts/storefront/footer.php). Mobile-first: one column, then 2, then 4. */
.cs-footer { padding: 40px 0 16px; color: #334155; }
.cs-footer__grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.cs-footer h4 { margin: 0 0 12px; font-size: 16px; color: var(--cs-navy); }
.cs-footer ul { margin: 0; padding: 0; list-style: none; }
.cs-footer li { margin: 0 0 8px; }
.cs-footer a { color: #334155; }
.cs-footer a:hover { color: var(--cs-navy); text-decoration: underline; }
.cs-footer__about img { display: block; margin-bottom: 12px; max-width: 200px; height: auto; }
.cs-footer__cta { display: inline-block; padding: 10px 18px; border-radius: 4px; background: var(--cs-gold); color: var(--cs-navy) !important; font-weight: 700; text-decoration: none !important; }
@media (min-width: 600px) { .cs-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .cs-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }

/* Home: wholesale banner sits on brand gold — navy text for contrast (WCAG AA). */
.elementor-element-cs_wholesale .promo-banner :is(.banner-title, .banner-inner, .banner-inner p) { color: var(--cs-navy) !important; }
.elementor-element-cs_wholesale .promo-banner .btn { background: var(--cs-navy) !important; color: #fff !important; }

/* ---------- Storefront polish (WoodMart Megamarket base) ---------- */
/* Product page quote box: card, qty + unit + button on one row; wraps on phones. */
.cs-rfq-add { display: flex; flex-wrap: wrap; align-items: center; gap: .6em; padding: 1em 1.1em; border: 1px solid var(--cs-line); border-left: 4px solid var(--cs-navy); border-radius: 6px; background: var(--cs-soft); }
.cs-rfq-add .cs-rfq-add-title { flex: 1 0 100%; margin: 0; color: var(--cs-navy); }
.cs-rfq-add input[type=number] { flex: 0 0 6.5em; width: 6.5em; height: 42px; background: #fff; }
.cs-rfq-add select { flex: 1 1 10em; width: auto; min-width: 9em; height: 42px; background-color: #fff; }
.cs-rfq-add .cs-btn-quote { flex: 0 0 auto; height: 42px; }
@media (max-width: 480px) { .cs-rfq-add .cs-btn-quote { flex: 1 0 100%; } }

/* Add to cart = brand gold with navy text (WCAG contrast), wherever WoodMart renders it. */
.single_add_to_cart_button, .wd-sticky-btn .single_add_to_cart_button, .add_to_cart_button, .product_type_simple.button {
	background-color: var(--cs-action-gold) !important; color: var(--cs-navy) !important;
}
.single_add_to_cart_button:hover, .add_to_cart_button:hover { background-color: var(--cs-action-gold-hover) !important; }

/* Stock badge on brand colours (green "in stock" stays green: it is a status, not decoration). */
.product-grid-item .wd-product-cats, .product-grid-item .wd-product-brands-links { display: none; }

/* My Account summary (changsure-core WholesaleAndAccount::account_summary) */
.cs-account-summary { margin: 1.5em 0; }
.cs-account-cards { display: grid; gap: 1em; grid-template-columns: 1fr; }
@media (min-width: 768px) { .cs-account-cards { grid-template-columns: 1fr 1fr; } }
.cs-account-card { padding: 1em 1.2em; border: 1px solid var(--cs-line); border-top: 3px solid var(--cs-gold); border-radius: 6px; background: #fff; }
.cs-account-card h4 { margin: 0 0 .6em; color: var(--cs-navy); }
.cs-credit-dl { display: grid; grid-template-columns: max-content 1fr; gap: .3em 1.2em; margin: 0 0 .8em; }
.cs-credit-dl dt { color: var(--cs-steel); }
.cs-credit-dl dd { margin: 0; text-align: right; }
.cs-overdue { color: #B91C1C; font-weight: 700; }

/* Sign up / sign in with mobile number, LINE, Facebook, Google (changsure-core Frontend\SignIn) */
.cs-signin { margin-top: 1.25em; }
.cs-signin-or { display: flex; align-items: center; gap: .75em; margin: 0 0 1em; color: var(--cs-steel); font-size: .9em; }
.cs-signin-or::before, .cs-signin-or::after { content: ""; flex: 1; border-top: 1px solid var(--cs-line); }
.cs-signin-social { display: grid; gap: .5em; grid-template-columns: 1fr; margin-bottom: 1em; }
@media (min-width: 480px) { .cs-signin-social { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); } }
.cs-signin-btn { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: .5em 1em; border-radius: 6px; border: 1px solid transparent; font-weight: 600; text-align: center; text-decoration: none; line-height: 1.2; }
.cs-signin-btn:hover, .cs-signin-btn:focus { text-decoration: none; opacity: .92; }
.cs-signin-line { background: #06C755; color: #fff; }
.cs-signin-facebook { background: #1877F2; color: #fff; }
.cs-signin-google { background: #fff; color: #1f1f1f; border-color: #747775; }
.cs-signin-line:hover, .cs-signin-facebook:hover { color: #fff; }
.cs-signin-phone { display: grid; gap: .5em; padding: 1em; border: 1px solid var(--cs-line); border-radius: 6px; background: var(--cs-soft); }
.cs-signin-phone p { margin: 0; }
.cs-signin-phone input { width: 100%; min-height: 44px; font-size: 16px; }
.cs-signin-phone .cs-signin-phone-btn { width: 100%; background: var(--cs-navy); color: #fff; }
.cs-signin-link { background: none; border: 0; padding: .25em 0; color: var(--cs-navy); text-decoration: underline; cursor: pointer; justify-self: start; min-height: 0; }
.cs-signin-error { color: #b32d2e; font-weight: 600; }
.cs-signin-note { margin: .75em 0 0; color: var(--cs-steel); font-size: .85em; }
.cs-linked { margin-top: 2em; }
.cs-linked-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75em; }
.cs-linked-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: .5em .75em; padding: .75em 1em; border: 1px solid var(--cs-line); border-radius: 6px; }
.cs-linked-list > li > .cs-signin-phone, .cs-linked-list > li > .cs-signin-btn { flex: 1 1 100%; }
@media (min-width: 768px) { .cs-linked-list > li > .cs-signin-btn { flex: 0 0 auto; margin-left: auto; } }
.cs-linked-name { font-weight: 600; min-width: 8em; }
.cs-linked-detail { color: var(--cs-steel); overflow-wrap: anywhere; }
.cs-linked-unlink { margin: 0 0 0 auto; }

/* Account pages (design package 4, Codex Account V1.1): two panels on large screens, one column on phones */
.cs-auth { display: grid; grid-template-columns: 1fr; margin: 0 auto 2em; max-width: 1120px; border: 1px solid var(--cs-line); border-radius: 18px; overflow: hidden; background: #fff; }
@media (min-width: 768px) { .cs-auth { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); min-height: 520px; } }
.cs-auth-aside { display: flex; flex-direction: column; justify-content: center; padding: 20px 22px; background: linear-gradient(145deg, #17283c, var(--cs-navy) 72%); color: #fff; border-bottom: 5px solid var(--cs-gold); }
.cs-auth-aside h2 { margin: 0 0 .4em; color: #fff; font-size: clamp(22px, 3.4vw, 40px); line-height: 1.32; }
.cs-auth-aside p { margin: 0; color: #d4dfeb; }
.cs-auth-aside-link { display: none; margin-top: 1.2em; color: var(--cs-gold) !important; font-weight: 700; }
@media (min-width: 768px) { .cs-auth-aside { padding: clamp(28px, 4vw, 48px); } .cs-auth-aside-link { display: inline-block; align-self: flex-start; } }
.cs-auth-main { min-width: 0; padding: clamp(20px, 4vw, 46px); }
.cs-auth-title { margin: 0 0 .25em; font-size: clamp(24px, 3vw, 32px); line-height: 1.3; color: var(--cs-navy); }
.cs-auth-title:focus { outline: none; }
.cs-auth-intro, .cs-methods-intro { color: #526174; margin: 0 0 1em; }
.cs-auth-notice { margin: 0 0 1em; padding: .75em 1em; border-radius: 8px; background: #eef4fa; color: var(--cs-navy); }
.cs-auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 1.2em; }
.cs-auth-tabs a { display: block; padding: 10px; text-align: center; font-weight: 700; text-decoration: none; color: var(--cs-navy); border-bottom: 2px solid var(--cs-line); }
.cs-auth-tabs a[aria-current] { border-color: #a46806; background: #fff7e9; }
.cs-auth-form { display: grid; gap: 12px; margin: 0; }
.cs-auth-form .form-row { margin: 0; padding: 0; width: 100%; }
.cs-auth-form label { display: block; font-weight: 700; margin-bottom: 5px; }
.cs-auth-form input.input-text { width: 100%; min-height: 44px; font-size: 16px; border-radius: 8px; }
.cs-auth-row { display: flex !important; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5em 1em; }
.cs-auth-row label { margin: 0; font-weight: 400; display: inline-flex; align-items: center; gap: .4em; min-height: 44px; }
.cs-auth-submit { width: 100%; min-height: 48px; border-radius: 8px !important; background: var(--cs-gold) !important; color: var(--cs-navy) !important; font-weight: 700; }
.cs-auth-help { margin: 0; color: #526174; font-size: .92em; }
.cs-auth-guest, .cs-auth-back { margin: 1.5em 0 0; padding-top: 1em; border-top: 1px solid var(--cs-line); color: #526174; font-size: .9em; }
.cs-auth-back { border: 0; padding: 0; margin-top: 1em; }
.cs-auth :focus-visible, .cs-methods :focus-visible, .cs-wholesale-form :focus-visible { outline: 3px solid #2869a5; outline-offset: 3px; }
.cs-auth .woocommerce-privacy-policy-text { font-size: .85em; color: #526174; }

/* My Account → ช่องทางเข้าสู่ระบบ */
.cs-methods .cs-linked-list { margin-bottom: 1em; }
.cs-linked-card { justify-content: space-between; }
.cs-linked-card > div { display: flex; flex-wrap: wrap; align-items: center; gap: .25em .6em; min-width: 0; }
.cs-linked-card .cs-linked-detail { flex-basis: 100%; }
.cs-linked-card .cs-unlink { min-height: 44px; }
.cs-linked-card .cs-unlink[disabled] { opacity: .55; cursor: not-allowed; }
.cs-methods-hint { color: #526174; font-size: .9em; }
.cs-methods-add { margin: 1.25em 0 .6em; font-size: 1.05em; color: var(--cs-navy); }
.cs-methods-link { margin-top: 1em; }

/* Wholesale application: reason beside each field */
.cs-wholesale-form .cs-field-error { display: block; margin-top: .3em; color: #9b2432; font-size: .9em; font-weight: 600; }
.cs-wholesale-form [aria-invalid="true"] { border-color: #9b2432 !important; background: #fff0f1; }
.cs-wholesale-form fieldset[aria-invalid="true"] { border-left: 3px solid #9b2432; padding-left: .75em; }
.cs-wholesale-form input, .cs-wholesale-form textarea { min-height: 44px; font-size: 16px; }
.cs-wholesale-form .cs-radio { display: flex; align-items: center; gap: .5em; min-height: 44px; font-weight: 400; }
.cs-wholesale-form .cs-radio input { min-height: 0; }

/* Account dashboard shortcuts */
.cs-account-links { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin: 0 0 1.5em; }
@media (min-width: 768px) { .cs-account-links { grid-template-columns: repeat(3, 1fr); } }
.cs-account-links a { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: .5em; border: 1px solid #a4b1bf; border-radius: 8px; font-weight: 700; text-align: center; text-decoration: none; color: var(--cs-navy); overflow-wrap: anywhere; }
.cs-account-links a:hover { border-color: var(--cs-gold); background: #fff7e9; }
/* WooCommerce wraps the password field with a show/hide button */
.cs-auth-form .password-input { position: relative; display: block; }
.cs-auth-form .password-input input { padding-right: 48px; }
.cs-auth-form .show-password-input { position: absolute; top: 0; right: 0; width: 44px; height: 44px; min-height: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.cs-auth-form .show-password-input::after { content: "👁"; font-size: 18px; opacity: .6; }
.cs-auth-form .show-password-input.display-password::after { opacity: 1; }

/* Home (design package 1, Codex Storefront V1.4): hero, customer entries, spec search */
.cs-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: 8px; border: 1px solid transparent; font-weight: 700; text-decoration: none !important; line-height: 1.25; text-align: center; cursor: pointer; }
.cs-btn-gold { background: var(--cs-gold); color: var(--cs-navy) !important; border-color: var(--cs-gold); }
.cs-btn-gold:hover { filter: brightness(.95); }
.cs-btn-ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.7); }
.cs-btn-ghost:hover { background: rgba(255,255,255,.1); }
.cs-btn-line { background: #fff; color: var(--cs-navy) !important; border-color: #a4b1bf; }
.cs-btn-line:hover { border-color: var(--cs-gold); background: #fff7e9; }
.cs-home-top :focus-visible, .cs-spec-search :focus-visible { outline: 3px solid #2869a5; outline-offset: 3px; }

.cs-home-top { width: 100%; }
.cs-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	overflow: hidden;
	border: 1px solid var(--cs-line);
	border-inline-start: 4px solid var(--cs-gold);
	border-radius: 12px;
	background: var(--cs-white);
}
.cs-hero-text { display: flex; flex-direction: column; justify-content: center; padding: clamp(22px, 3vw, 44px); }
.cs-hero-title { margin: 0 0 .35em; color: var(--cs-navy); font-size: clamp(28px, 3.5vw, 48px); line-height: 1.25; }
.cs-hero-sub { margin: 0 0 .85em; color: #526174; font-size: clamp(15px, 1.4vw, 17px); }
.cs-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.cs-hero-actions .cs-btn-gold { background: var(--cs-action-gold); border-color: var(--cs-action-gold); }
.cs-hero-actions .cs-btn-ghost { border-color: var(--cs-line); color: var(--cs-navy) !important; }
.cs-hero-actions .cs-btn-ghost:hover { background: var(--cs-soft); }
.cs-hero-finder { color: var(--cs-navy); text-decoration: underline; text-underline-offset: .22em; }
.cs-hero-art { display: none; }
@media (min-width: 900px) {
	.cs-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.cs-hero-art { display: grid; place-items: center; padding: 12px 24px 12px 0; }
	.cs-hero-art img { width: 100%; height: auto; max-height: 240px; object-fit: contain; filter: brightness(1.075) saturate(.86); }
}

.cs-entries { display: grid; gap: 10px; grid-template-columns: 1fr; margin-top: 14px; }
.cs-entry {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas: "title action" "detail action";
	align-items: center;
	column-gap: 10px;
	padding: 11px 14px;
	border: 1px solid var(--cs-line);
	border-radius: 9px;
	background: var(--cs-white);
}
.cs-entry h2 { grid-area: title; margin: 0 0 .25em; font-size: 17px; color: var(--cs-navy); }
.cs-entry p { grid-area: detail; margin: 0; color: #526174; }
.cs-entry .cs-btn { grid-area: action; }
@media (min-width: 768px) {
	.cs-entries { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.cs-entry { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "detail" "action"; gap: .4rem; padding: 16px; }
	.cs-entry .cs-btn { justify-self: start; }
}
@media (max-width: 480px) {
	.cs-home-top .cs-entry .cs-btn { font-size: 13px; padding: 7px 9px; }
}

.cs-spec-search { width: 100%; padding: 20px; border: 1px solid var(--cs-line); border-radius: 12px; background: var(--cs-soft); }
.cs-spec-search h2 { margin: 0 0 .7em; font-size: 22px; color: var(--cs-navy); scroll-margin-top: 110px; }
.cs-spec-grid { display: grid; gap: 10px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-spec-grid .cs-spec-wide { grid-column: 1 / -1; }
@media (min-width: 1024px) { .cs-spec-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cs-spec-grid .cs-spec-wide { grid-column: span 2; } }
.cs-spec-grid p { margin: 0; min-width: 0; }
.cs-spec-grid label { display: block; margin-bottom: 4px; font-weight: 700; color: var(--cs-navy); }
.cs-spec-grid select, .cs-spec-grid input { width: 100%; min-height: 44px; font-size: 16px; border-radius: 8px; background-color: #fff; }
.cs-spec-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
@media (max-width: 480px) { .cs-spec-actions .cs-btn { flex: 1 1 100%; } }
.cs-spec-grid select, .cs-spec-grid input, .cs-auth-form input.input-text { box-sizing: border-box !important; }
.cs-home-top .cs-btn, .cs-spec-search .cs-btn { font-size: 15px; text-transform: none; letter-spacing: 0; }
.cs-spec-search button.cs-btn-gold { background: var(--cs-navy) !important; color: var(--cs-white) !important; }
.cs-spec-search button.cs-btn-line { background: #fff !important; color: var(--cs-navy) !important; border: 1px solid #a4b1bf !important; }

/* Promotions (design docs/design/promotions-v1.md): discount / gift box under the price */
.cs-promo-box { margin: 0 0 1em; padding: .7em 1em; border-radius: 8px; border: 1px solid #f3c56b; background: #fff7e9; color: var(--cs-navy); line-height: 1.6; }
.cs-promo-box strong { color: #b4261c; }
.product .price del, .wd-product .price del { color: var(--cs-steel); opacity: .8; }
.product .price ins, .wd-product .price ins { text-decoration: none; color: #b4261c; font-weight: 700; }

/* Keep the default installed wordmark in sync with its source, including earlier uploads.
   A replacement logo selected in WoodMart uses its own image URL. */
.whb-header img:is([src$="/logo-changsure.svg"], [src$="/changsure-logo.svg"]),
.cs-footer__about img:is([src$="/logo-changsure.svg"], [src$="/changsure-logo.svg"]) { content: url("assets/logo-changsure.svg?v=0.5.5"); }

@media (max-width: 767px) {
	.single-product .woocommerce-product-gallery--without-images {
		max-width: 160px;
		margin-inline: auto;
	}
}

/* Keep the home category grid readable even before categories have uploaded photos. */
.home .wd-cat.cat-design-alt .wd-cat-inner {
	box-sizing: border-box;
	height: 100%;
	padding: 12px 10px;
	border: 1px solid var(--cs-line);
	border-radius: 10px;
	background: var(--cs-white);
}
.home .wd-cat.cat-design-alt .wd-cat-image {
	display: grid;
	place-items: center;
	min-height: 108px;
}
.home .wd-cat.cat-design-alt .wd-cat-image img {
	width: min(100%, 108px);
	height: 108px;
	object-fit: contain;
}
.home .wd-cat.cat-design-alt .wd-cat-image img.woocommerce-placeholder {
	content: url("assets/img/v-spec.svg");
	width: 56px;
	height: 56px;
}
.home .wd-cat.cat-design-alt .wd-cat-inner:focus-within {
	outline: 2px solid var(--cs-navy);
	outline-offset: 2px;
}
@media (max-width: 767px) {
	.home .wd-cat.cat-design-alt .wd-cat-image { min-height: 88px; }
	.home .wd-cat.cat-design-alt .wd-cat-image img:not(.woocommerce-placeholder) {
		width: min(100%, 88px);
		height: 88px;
	}
}
