/*
Theme Name: XeChinhChu
Theme URI: https://example.com/xechinhchu
Author: NPaintGrCar
Description: Theme nhẹ, chuẩn SEO cho website mua bán & định giá xe cũ. Tối ưu cho plugin "Định Giá Xe Cũ" (shortcode [dinh_gia_xe]). Màu thương hiệu, logo, nút header, nội dung footer tuỳ chỉnh trong Giao diện → Tuỳ biến.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
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: xechinhchu
Tags: blog, two-columns, custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
	--xcc-brand: #15477E;
	--xcc-brand-2: #0F3762;
	--xcc-ink: #141416;
	--xcc-text: #111111;
	--xcc-muted: #5F6874;
	--xcc-line: #D8DDE4;
	--xcc-bg: #F9FBFC;
	--xcc-card: #FFFFFF;
	--xcc-input: #F5F7FA;
	--xcc-footer: #EEF1F4;
	--xcc-radius: 16px;
	--xcc-wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--xcc-bg);
	color: var(--xcc-text);
	font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.65;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--xcc-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--xcc-ink); line-height: 1.25; letter-spacing: -0.01em; margin: 1.4em 0 .6em; }
h1 { font-size: clamp(26px, 3.6vw, 36px); font-weight: 800; }
h2 { font-size: clamp(21px, 2.6vw, 26px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }
.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100000; clip: auto; width: auto; height: auto; padding: 10px 14px; background: #fff; }

.xcc-wrap { max-width: var(--xcc-wrap); margin: 0 auto; padding: 0 20px; }
.xcc-main { padding: 28px 0 56px; min-height: 60vh; }

/* ---------------- Header ---------------- */
.xcc-header { background: #fff; border-bottom: 1px solid var(--xcc-line); position: sticky; top: 0; z-index: 900; }
.admin-bar .xcc-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .xcc-header { top: 0; position: relative; } }
.xcc-header-in { display: flex; align-items: center; gap: 22px; height: 66px; }
.xcc-logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 20px; color: var(--xcc-brand); letter-spacing: -0.02em; white-space: nowrap; }
.xcc-logo:hover { text-decoration: none; }
.xcc-logo img { max-height: 44px; width: auto; }
.xcc-logo-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--xcc-brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.xcc-nav { flex: 1; }
.xcc-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.xcc-nav li { position: relative; }
.xcc-nav a { display: block; padding: 9px 13px; border-radius: 10px; color: var(--xcc-ink); font-weight: 600; font-size: 15px; }
.xcc-nav a:hover, .xcc-nav .current-menu-item > a, .xcc-nav .current_page_item > a { background: #EEF3F9; color: var(--xcc-brand); text-decoration: none; }
.xcc-nav .sub-menu { position: absolute; top: 100%; left: 0; min-width: 210px; background: #fff; border: 1px solid var(--xcc-line); border-radius: 12px; padding: 6px; display: none; flex-direction: column; align-items: stretch; box-shadow: 0 12px 30px rgba(20, 30, 50, .1); }
.xcc-nav li:hover > .sub-menu, .xcc-nav li:focus-within > .sub-menu { display: flex; }
.xcc-actions { display: flex; gap: 8px; align-items: center; }
.xcc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 11px; padding: 9px 16px; font-weight: 700; font-size: 14.5px; border: 1px solid transparent; cursor: pointer; line-height: 1.2; white-space: nowrap; font-family: inherit; }
.xcc-btn:hover { text-decoration: none; }
.xcc-btn-primary { background: var(--xcc-brand); color: #fff; }
.xcc-btn-primary:hover { background: var(--xcc-brand-2); color: #fff; }
.xcc-btn-ghost { background: #fff; color: var(--xcc-brand); border-color: #D3DBE5; }
.xcc-btn-ghost:hover { background: #EEF3F9; }
.xcc-burger { display: none; background: none; border: 1px solid var(--xcc-line); border-radius: 10px; width: 42px; height: 42px; cursor: pointer; color: var(--xcc-ink); align-items: center; justify-content: center; }

@media (max-width: 960px) {
	.xcc-burger { display: inline-flex; margin-left: auto; }
	.xcc-nav { position: fixed; inset: 66px 0 0 0; background: #fff; padding: 14px 20px; transform: translateX(100%); transition: transform .25s ease; overflow: auto; z-index: 899; }
	.xcc-nav.is-open { transform: none; }
	.xcc-nav ul { flex-direction: column; align-items: stretch; }
	.xcc-nav a { padding: 13px 12px; font-size: 16px; border-bottom: 1px solid #F0F2F5; border-radius: 0; }
	.xcc-nav .sub-menu { position: static; display: flex; box-shadow: none; border: 0; padding: 0 0 0 14px; }
	.xcc-actions .xcc-btn-ghost { display: none; }
}
@media (max-width: 480px) {
	.xcc-actions .xcc-btn { padding: 8px 12px; font-size: 13.5px; }
	.xcc-logo span.t { font-size: 17px; }
}

/* ---------------- Breadcrumb ---------------- */
.xcc-bc { font-size: 13.5px; color: var(--xcc-muted); margin-bottom: 14px; }
.xcc-bc a { color: var(--xcc-muted); }
.xcc-bc span.sep { margin: 0 6px; opacity: .6; }

/* ---------------- Content ---------------- */
.xcc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.xcc-layout.no-sidebar { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 960px) { .xcc-layout { grid-template-columns: minmax(0, 1fr); } }
.xcc-card { background: var(--xcc-card); border: 1px solid #E3E7ED; border-radius: var(--xcc-radius); padding: 26px; }
.xcc-entry-title { margin-top: 0; }
.xcc-meta { color: var(--xcc-muted); font-size: 13.5px; margin: -4px 0 18px; }
.xcc-content > *:first-child { margin-top: 0; }
.xcc-content img { border-radius: 12px; }
.xcc-content blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 4px solid var(--xcc-brand); background: #F3F7FB; border-radius: 0 12px 12px 0; }
.xcc-content table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 15px; }
.xcc-content th, .xcc-content td { border: 1px solid #E3E7ED; padding: 9px 12px; text-align: left; }
.xcc-content th { background: #F5F7FA; }
.xcc-content pre { background: #0f1b2b; color: #e9eef5; padding: 14px; border-radius: 12px; overflow: auto; }
.alignwide { max-width: 1100px; }
.alignfull { width: 100%; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.wp-caption-text, figcaption { font-size: 13.5px; color: var(--xcc-muted); text-align: center; }

/* Danh sách bài viết */
.xcc-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.xcc-post { background: #fff; border: 1px solid #E3E7ED; border-radius: var(--xcc-radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.xcc-post:hover { box-shadow: 0 12px 28px rgba(20, 40, 70, .09); transform: translateY(-2px); }
.xcc-post-thumb { display: block; aspect-ratio: 16 / 10; background: #E9EEF4; overflow: hidden; }
.xcc-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.xcc-post-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.xcc-post-title { font-size: 17px; margin: 0; line-height: 1.35; }
.xcc-post-title a { color: var(--xcc-ink); }
.xcc-post-excerpt { color: var(--xcc-muted); font-size: 14.5px; margin: 0; }
.xcc-post-date { color: var(--xcc-muted); font-size: 12.5px; }
.xcc-archive-head { margin-bottom: 20px; }
.xcc-archive-head h1 { margin: 0 0 6px; }
.xcc-archive-head p { color: var(--xcc-muted); margin: 0; }

.navigation.pagination { margin-top: 28px; }
.nav-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.page-numbers { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid #E3E7ED; background: #fff; color: var(--xcc-ink); padding: 0 12px; font-weight: 600; }
.page-numbers.current { background: var(--xcc-brand); color: #fff; border-color: var(--xcc-brand); }

/* Sidebar */
.xcc-sidebar .widget { background: #fff; border: 1px solid #E3E7ED; border-radius: var(--xcc-radius); padding: 20px; margin-bottom: 18px; }
.xcc-sidebar .widget-title, .xcc-sidebar h2 { font-size: 16px; margin: 0 0 12px; }
.xcc-sidebar ul { list-style: none; margin: 0; padding: 0; }
.xcc-sidebar li { padding: 7px 0; border-bottom: 1px solid #F0F2F5; }
.xcc-sidebar li:last-child { border-bottom: 0; }
.xcc-cta { background: linear-gradient(135deg, var(--xcc-brand), #2563A6); color: #fff; border: 0 !important; }
.xcc-cta h3 { color: #fff; margin: 0 0 6px; font-size: 18px; }
.xcc-cta p { opacity: .9; font-size: 14.5px; }
.xcc-cta .xcc-btn { background: #fff; color: var(--xcc-brand); }

/* Search form */
.xcc-search { display: flex; gap: 8px; }
.xcc-search input[type="search"] { flex: 1; border: 1px solid #DCDCDC; border-radius: 10px; background: var(--xcc-input); padding: 10px 12px; font: inherit; font-size: 15px; min-width: 0; }

/* Home */
.xcc-hero { background: linear-gradient(160deg, #EAF1F9 0%, #F9FBFC 70%); border-bottom: 1px solid #E6EBF1; padding: 38px 0 30px; }
.xcc-section { padding: 36px 0 8px; }
.xcc-section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 16px; }
.xcc-section-head h2 { margin: 0; }
.xcc-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.xcc-feature { background: #fff; border: 1px solid #E3E7ED; border-radius: var(--xcc-radius); padding: 20px; }
.xcc-feature h3 { margin: 10px 0 6px; font-size: 17px; }
.xcc-feature p { margin: 0; color: var(--xcc-muted); font-size: 14.5px; }
.xcc-feature-ico { width: 42px; height: 42px; border-radius: 12px; background: #EAF1F9; color: var(--xcc-brand); display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 760px) { .xcc-features { grid-template-columns: 1fr; } }

/* Comments */
.xcc-comments { margin-top: 24px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { border-bottom: 1px solid #EEF0F3; padding: 14px 0; }
.comment-meta { font-size: 13.5px; color: var(--xcc-muted); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; border: 1px solid #DCDCDC; border-radius: 10px; padding: 10px 12px; font: inherit; background: var(--xcc-input); }
.comment-form .submit, .wp-block-button__link, button.xcc-submit { background: var(--xcc-brand); color: #fff; border: 0; border-radius: 10px; padding: 11px 20px; font-weight: 700; cursor: pointer; font-family: inherit; }

/* ---------------- Footer ---------------- */
.xcc-footer { background: var(--xcc-footer); border-top: 1px solid #DFE4EA; padding: 40px 0 0; font-size: 14.5px; color: #3B4450; }
.xcc-footer a { color: #2F3A47; }
.xcc-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; }
.xcc-footer h3 { font-size: 15px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--xcc-ink); }
.xcc-footer ul { list-style: none; margin: 0; padding: 0; }
.xcc-footer li { padding: 4px 0; }
.xcc-footer-about p { color: #4A5461; }
.xcc-footer-tags { margin-top: 26px; padding-top: 16px; border-top: 1px solid #DCE2E9; font-size: 13.5px; color: #4A5461; }
.xcc-footer-tags a { color: #4A5461; }
.xcc-footer-bottom { margin-top: 18px; padding: 16px 0 22px; border-top: 1px solid #DCE2E9; font-size: 13px; color: #5F6874; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 860px) { .xcc-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .xcc-footer-grid { grid-template-columns: 1fr; } .xcc-card { padding: 18px; } }

/* 404 */
.xcc-404 { text-align: center; padding: 60px 20px; }
.xcc-404 .big { font-size: 96px; font-weight: 800; color: var(--xcc-brand); line-height: 1; }
