/*
Theme Name: Zing Trader
Theme URI: https://example.com/
Author: Zing Trader
Description: ธีมเว็บไซต์ Zing Trader โครงสร้างราคา — Block Theme โทนน้ำเงิน-ม่วง-ไซแอน พร้อมหน้า หน้าแรก / เกี่ยวกับผม / คอร์ส & บริการ / ความรู้ดีๆ / ติดต่อ
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zing-trader
*/

/* ---------- Base ---------- */
body {
	background:
		radial-gradient(1200px 600px at 85% 0%, #1E1A8C 0%, rgba(10, 11, 46, 0) 60%),
		var(--wp--preset--color--bg);
	background-repeat: no-repeat;
	-webkit-font-smoothing: antialiased;
}
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
:where(.wp-block-post-content) > .alignfull:first-child { margin-top: 0; }
a { text-underline-offset: 3px; }

/* ---------- Header ---------- */
.zt-header {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding: 14px 24px !important;
	max-width: 1248px;
	margin: 0 auto;
	gap: 12px;
}
.zt-header-wrap { border-bottom: 1px solid var(--wp--preset--color--border); }
.zt-header-wrap .zt-header { border-bottom: 0; }
.zt-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.zt-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.zt-logo-text b { font-family: var(--wp--preset--font-family--kanit); font-weight: 600; font-size: 20px; letter-spacing: .04em; }
.zt-logo-text small { font-size: 12px; color: var(--wp--preset--color--muted); }
.zt-nav a { padding: 12px 14px; border-radius: 8px; text-decoration: none; color: #C9CBF2; }
.zt-nav a:hover, .zt-nav .current-menu-item a { color: #fff; background: var(--wp--preset--color--surface-2); }
.zt-nav .current-menu-item a { color: var(--wp--preset--color--accent); background: transparent; }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--bg) !important; color: #fff !important; }

/* ---------- Buttons ---------- */
.wp-block-button .wp-block-button__link { padding: 15px 26px; font-weight: 600; }
.zt-btn-outline .wp-block-button__link {
	background: transparent !important;
	color: #fff !important;
	border: 1px solid #4547B8 !important;
	font-weight: 500;
}
.zt-btn-outline .wp-block-button__link:hover { border-color: var(--wp--preset--color--accent) !important; }
.zt-btn-block, .zt-btn-block .wp-block-button__link { width: 100%; text-align: center; border-radius: 12px; }
.zt-live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #E5484D; margin-right: 10px; vertical-align: middle; }

/* ---------- Sections & type ---------- */
.zt-section { padding: 88px 24px !important; }
.zt-section-tight { padding: 48px 24px !important; }
.zt-band { border-top: 1px solid var(--wp--preset--color--border); border-bottom: 1px solid var(--wp--preset--color--border); background: #0E0F3D; padding: 32px 24px !important; }
.zt-eyebrow { color: var(--wp--preset--color--accent); font-weight: 600; font-size: 14px; letter-spacing: .06em; margin: 0 0 12px !important; }
.zt-mono { font-family: var(--wp--preset--font-family--mono); }
.zt-h1 { font-size: clamp(38px, 5vw, 60px) !important; line-height: 1.18 !important; margin: 0 !important; }
.zt-h2 { font-size: clamp(30px, 3.4vw, 40px) !important; line-height: 1.25 !important; margin: 0 !important; }
.zt-lead { font-size: 18px; line-height: 1.75; color: #C9CBF2; max-width: 640px; }
.zt-muted { color: var(--wp--preset--color--muted); }
.zt-small { font-size: 14px; }
.zt-center { text-align: center; }
.zt-center .zt-lead { margin-left: auto; margin-right: auto; }

/* ---------- Banner ---------- */
.zt-banner { margin: 0 auto !important; max-width: 1440px; }
.zt-banner img { display: block; width: 100%; height: auto; }

/* ---------- Cards ---------- */
.zt-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 20px;
	padding: 32px !important;
	transition: border-color .2s;
}
.zt-card:hover { border-color: #4547B8; }
.zt-card > * { margin-top: 0 !important; margin-bottom: 0 !important; }
.zt-card { display: flex; flex-direction: column; gap: 14px; }
.zt-card .zt-grow { flex-grow: 1; }
.zt-card-featured { background: #1A1B6E; border: 2px solid var(--wp--preset--color--accent); position: relative; }
.zt-badge { display: inline-block; align-self: flex-start; background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; }
.zt-price { font-family: var(--wp--preset--font-family--kanit); font-size: 30px; color: var(--wp--preset--color--accent); }
.zt-card h3 { font-size: 24px; }
.zt-list { padding-left: 20px; color: #C9CBF2; line-height: 2; }
.zt-outline-card { background: transparent; }

/* ---------- Stats ---------- */
.zt-stat { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--border); border-radius: 16px; padding: 24px !important; }
.zt-stat > * { margin: 0 !important; }
.zt-stat-value { font-family: var(--wp--preset--font-family--mono); font-size: 32px; padding-top: 8px; }
.zt-negative { color: #F07C80; }

/* ---------- Feature strip ---------- */
.zt-feature { display: flex; gap: 14px; align-items: center; }
.zt-feature p { margin: 0; }
.zt-feature svg { flex: none; }

/* ---------- Steps / timeline ---------- */
.zt-step { border-top: 2px solid #4547B8; padding: 20px 4px 0 !important; }
.zt-step:first-child { border-top-color: var(--wp--preset--color--accent); }
.zt-step > * { margin: 0 0 8px !important; }
.zt-timeline { border-left: 2px solid #30339E; margin-left: 8px !important; }
.zt-timeline > .wp-block-group { padding: 0 0 28px 28px !important; }
.zt-timeline > .wp-block-group > * { margin: 0 0 6px !important; }

/* ---------- Hero chart card ---------- */
.zt-chart svg { width: 100%; height: auto; display: block; }
.zt-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.zt-mini div { background: var(--wp--preset--color--bg); border-radius: 12px; padding: 12px; }
.zt-mini span { display: block; font-size: 12px; color: var(--wp--preset--color--muted); }
.zt-mini strong { font-family: var(--wp--preset--font-family--kanit); font-weight: 500; font-size: 18px; }

/* ---------- Tags / pills ---------- */
.zt-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.zt-pills a, .zt-chip { padding: 11px 18px; border-radius: 999px; border: 1px solid #30339E; color: #fff; text-decoration: none; font-size: 15px; }
.zt-pills a:hover { border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--accent); }
.zt-pills a.is-active { background: var(--wp--preset--color--accent); border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); font-weight: 600; }

/* ---------- Posts grid ---------- */
.zt-post { padding: 0 !important; overflow: hidden; gap: 0; }
.zt-post .wp-block-post-featured-image { margin: 0; background: #0E0F3D; aspect-ratio: 16/9; }
.zt-post .wp-block-post-featured-image img { border-radius: 0; }
.zt-post-body { padding: 22px !important; }
.zt-post-body > * { margin: 0 0 8px !important; }
.zt-post .wp-block-post-title { font-size: 19px; line-height: 1.45; }
.zt-post .wp-block-post-title a { color: #fff; text-decoration: none; }
.zt-post .wp-block-post-terms a { display: inline-block; background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; text-decoration: none; }
.zt-post .wp-block-post-date { color: var(--wp--preset--color--muted); font-size: 13px; }
.wp-block-query-pagination { margin-top: 32px; gap: 8px; }

/* ---------- FAQ ---------- */
.zt-faq { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--border); border-radius: 14px; padding: 20px 24px; }
.zt-faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.zt-faq p { color: #C9CBF2; margin-bottom: 0; }

/* ---------- Photo placeholder ---------- */
.zt-photo-ph { aspect-ratio: 4/5; max-width: 440px; border: 1px dashed #4547B8; border-radius: 24px; display: flex; align-items: center; justify-content: center; }
.zt-photo { border-radius: 24px; overflow: hidden; }
.zt-quote { font-family: var(--wp--preset--font-family--kanit); font-weight: 500; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.5; max-width: 900px; }

/* ---------- Contact ---------- */
.zt-channel { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--wp--preset--color--border); border-radius: 16px; background: var(--wp--preset--color--surface); text-decoration: none; color: #fff; margin-bottom: 12px; }
.zt-channel:hover { border-color: #4547B8; }
.zt-channel span { display: flex; flex-direction: column; }
.zt-channel small { color: var(--wp--preset--color--muted); font-size: 14px; }
.zt-form { display: flex; flex-direction: column; gap: 18px; }
.zt-form .zt-row { display: flex; flex-wrap: wrap; gap: 16px; }
.zt-form .zt-field { flex: 1 1 200px; display: flex; flex-direction: column; gap: 8px; }
.zt-form label { font-size: 14px; color: #C9CBF2; }
.zt-form input, .zt-form select, .zt-form textarea {
	padding: 14px 16px; border-radius: 12px; border: 1px solid #30339E;
	background: var(--wp--preset--color--bg); color: #fff; font: inherit;
}
.zt-form input:focus, .zt-form select:focus, .zt-form textarea:focus { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 1px; }
.zt-form button {
	padding: 16px; border: 0; border-radius: 12px; cursor: pointer;
	background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent);
	font: inherit; font-weight: 600; font-size: 16px;
}
.zt-notice { padding: 14px 18px; border-radius: 12px; background: #0E3D4D; color: #fff; }
.zt-notice.is-error { background: #4D0E1C; }
.zt-hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.zt-footer { background: #070822; border-top: 1px solid var(--wp--preset--color--border); padding: 48px 24px 32px !important; }
.zt-footer a { color: #C9CBF2; text-decoration: none; }
.zt-footer a:hover { color: var(--wp--preset--color--accent); }
.zt-footer-links { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.zt-footer-links a { padding: 10px 0; display: inline-block; }
.zt-disclaimer { font-size: 13px; line-height: 1.7; color: #9EA2D8; border-top: 1px solid var(--wp--preset--color--border); padding-top: 20px; }

/* ---------- Single post ---------- */
.zt-single .wp-block-post-content { font-size: 18px; line-height: 1.85; color: #E6E7FA; }

@media (max-width: 781px) {
	.zt-section { padding: 56px 20px !important; }
	.zt-card { padding: 24px !important; }
}

/* ---------- Layout helpers ---------- */
.zt-cols-center { align-items: center !important; gap: 56px; }
.zt-card.zt-cta { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 48px !important; gap: 24px; }
.zt-card.zt-cta > .wp-block-group { flex: 1 1 420px; }
.zt-card.zt-cta > .wp-block-group > * + * { margin-top: 12px !important; }
.zt-chip { font-size: 14px; padding: 8px 14px; }
.wp-block-button.zt-live .wp-block-button__link::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #E5484D; margin-right: 10px; vertical-align: middle; }
.wp-block-button.zt-live::before { content: none; }
p.zt-live::before { background: #E5484D; }
p.zt-badge.zt-live { background: #E5484D; color: #fff; }
p.zt-badge.zt-live::before { background: #fff; }
.zt-stat .zt-mono { margin-right: 10px; }
