/*
Theme Name: Xuongsi
Theme URI: https://xuongsi.net
Description: Theme cho xưởng sỉ áo thun Xuongsi.net – trang sản phẩm sỉ, form báo giá, nút Zalo/gọi.
Version: 1.0.3
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: xuongsi
*/

/* ---------- Header ---------- */
.xs-topbar { background: var(--wp--preset--color--navy); color: #dfe5ef; font-size: .875rem; }
.xs-topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.xs-topbar p { margin: 0; }
.xs-header { border-bottom: 1px solid var(--wp--preset--color--line); background: #fff; position: sticky; top: 0; z-index: 50; }
.admin-bar .xs-header { top: 32px; }
.xs-logo { font-weight: 800; font-size: 1.35rem; letter-spacing: -.01em; margin: 0; }
.xs-logo a { color: var(--wp--preset--color--navy); text-decoration: none; }
.xs-logo span, .xs-logo a span { color: var(--wp--preset--color--brand); }
.xs-header .wp-block-navigation { font-weight: 500; font-size: .98rem; }
.xs-header .wp-block-navigation a { color: var(--wp--preset--color--ink); }
.xs-header .wp-block-navigation .wp-block-navigation__submenu-container { border: 1px solid var(--wp--preset--color--line) !important; border-radius: 8px; padding: 6px 0; min-width: 240px !important; box-shadow: 0 8px 24px rgba(20,33,58,.08); }
.xs-header .wp-block-button__link { padding: .55rem 1.1rem; font-size: .95rem; }

/* ---------- Hero ---------- */
.xs-hero { background: var(--wp--preset--color--sand); padding-top: clamp(2.5rem, 6vw, 4.5rem) !important; padding-bottom: clamp(2.5rem, 6vw, 4.5rem) !important; margin-top: 0 !important; margin-bottom: 1.5rem; border-bottom: 1px solid var(--wp--preset--color--line); }
.xs-hero h1 { margin-top: .2rem; }
.xs-lead { font-size: 1.15rem; color: var(--wp--preset--color--muted); }
.xs-eyebrow { color: var(--wp--preset--color--brand-dark); font-weight: 700; font-size: .85rem; letter-spacing: .08em; margin-bottom: 0; }

/* ---------- Stats ---------- */
.xs-stats-wrap { margin-top: -0.5rem; }
.xs-stats { gap: 12px !important; }
.xs-stats .wp-block-column { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 10px; padding: 14px 16px; }
.xs-stats p { margin: 0; color: var(--wp--preset--color--muted); font-size: .95rem; }
.xs-stats strong { color: var(--wp--preset--color--navy); font-size: 1.25rem; }

/* ---------- Cards ---------- */
.xs-cards { gap: 16px !important; margin-top: 1rem; }
.xs-card { border: 1px solid var(--wp--preset--color--line); border-radius: 12px; padding: 18px 20px !important; height: 100%; background: #fff; transition: border-color .15s, box-shadow .15s; }
.xs-card:hover { border-color: var(--wp--preset--color--brand); box-shadow: 0 6px 18px rgba(232,89,12,.08); }
.xs-card h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.xs-card h3 a { color: var(--wp--preset--color--navy); text-decoration: none; }
.xs-card p { margin: .3rem 0; font-size: .97rem; color: var(--wp--preset--color--muted); }
.xs-card .xs-price { color: var(--wp--preset--color--brand-dark); font-weight: 700; }

/* ---------- Tables ---------- */
.wp-block-table table { border-collapse: collapse; width: 100%; font-size: .97rem; }
.wp-block-table th { background: var(--wp--preset--color--navy); color: #fff; text-align: left; font-weight: 600; }
.wp-block-table th, .wp-block-table td { border: 1px solid var(--wp--preset--color--line); padding: .65rem .8rem; vertical-align: top; }
.wp-block-table tbody tr:nth-child(even) td { background: #faf9f6; }
.xs-spec table { table-layout: auto; }
.xs-spec td:first-child { font-weight: 600; width: 32%; }

/* ---------- FAQ ---------- */
.wp-block-details { border: 1px solid var(--wp--preset--color--line); border-radius: 10px; padding: .8rem 1rem; }
.wp-block-details summary { font-weight: 600; cursor: pointer; }
.wp-block-details[open] summary { margin-bottom: .4rem; }

/* ---------- CTA ---------- */
.xs-cta { background: var(--wp--preset--color--navy); color: #fff; padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; margin-top: 3rem !important; }
.xs-cta h2 { color: #fff; margin-top: 0; }
.xs-cta p { color: #dfe5ef; }
.xs-cta .is-style-outline .wp-block-button__link { color: #fff; border-color: #fff; background: transparent; }

.xs-note { font-size: .9rem; color: var(--wp--preset--color--muted); font-style: italic; }

/* ---------- Form ---------- */
.xs-form { margin-bottom: 3rem; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; background: var(--wp--preset--color--sand); border: 1px solid var(--wp--preset--color--line); border-radius: 12px; padding: 20px; }
.xs-form .xs-field-note, .xs-form p:last-child { grid-column: 1 / -1; }
.xs-form label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
.xs-form input, .xs-form select, .xs-form textarea { width: 100%; box-sizing: border-box; padding: .65rem .75rem; border: 1px solid #cfc8bc; border-radius: 8px; font: inherit; background: #fff; }
.xs-form input:focus, .xs-form select:focus, .xs-form textarea:focus { outline: 2px solid var(--wp--preset--color--brand); border-color: transparent; }
.xs-form button { cursor: pointer; border: 0; }
.xs-req { color: var(--wp--preset--color--brand-dark); }
.xs-hp { position: absolute; left: -9999px; }
.xs-alert { padding: .8rem 1rem; border-radius: 8px; font-weight: 600; }
.xs-alert-ok { background: #e7f6ec; color: #14532d; }
.xs-alert-err { background: #fdecec; color: #8a1c1c; }

/* ---------- Footer ---------- */
.xs-footer { background: #0f1a2e; color: #c5cdda; font-size: .95rem; margin-top: 0 !important; }
.xs-footer h3 { color: #fff; font-size: 1rem; margin-bottom: .5rem; }
.xs-footer a { color: #fff; text-decoration: none; }
.xs-footer a:hover { text-decoration: underline; }
.xs-footer ul { list-style: none; padding: 0; margin: 0; }
.xs-footer li { margin: .25rem 0; }
.xs-footer .xs-copy { border-top: 1px solid #253350; padding-top: 1rem; font-size: .85rem; color: #8d98ab; }

/* ---------- Floating buttons ---------- */
.xs-float { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 99; }
.xs-float a { display: block; padding: .6rem 1rem; border-radius: 999px; color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.18); font-size: .95rem; text-align: center; }
.xs-float-zalo { background: #0068ff; }
.xs-float-call { background: var(--wp--preset--color--brand); }

/* ---------- Blog ---------- */
.xs-post-card { border-bottom: 1px solid var(--wp--preset--color--line); padding-bottom: 1.2rem; }

@media (max-width: 781px) {
	.xs-form { grid-template-columns: 1fr; }
	.xs-topbar .xs-topbar-right { display: none; }
	.xs-float { right: 10px; bottom: 10px; flex-direction: row; }
	.xs-float a { padding: .55rem .9rem; font-size: .9rem; }
	.xs-header .wp-block-buttons { display: none; }
}

/* Remove block gap between header, main and footer */
.wp-site-blocks > * + * { margin-block-start: 0 !important; }
.xs-cta { margin-bottom: 0 !important; }
.wp-block-post-content > .xs-hero:first-child { margin-top: 0 !important; }

/* =========================================================
   Trang chủ – bố cục rộng, hero tối, khối uy tín
   ========================================================= */
.home .wp-block-post-content { --wp--style--global--content-size: 1180px; }

.xs-hero-dark {
	background: radial-gradient(1200px 500px at 85% -10%, rgba(232,89,12,.28), transparent 60%),
		linear-gradient(135deg, #0f1a2e 0%, #14213a 55%, #1b2c4c 100%);
	color: #e6ebf3; border-bottom: 0;
	padding-top: clamp(3rem, 7vw, 5.5rem) !important; padding-bottom: clamp(3rem, 7vw, 5.5rem) !important;
}
.xs-hero-dark h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: -.02em; }
.xs-hero-dark .xs-lead { color: #c9d2e1; font-size: 1.15rem; }
.xs-hero-dark .xs-eyebrow { color: #ffb183; }
.xs-hero-dark .is-style-outline .wp-block-button__link { color: #fff; border: 2px solid rgba(255,255,255,.7); background: transparent; }
.xs-hero-dark .is-style-outline .wp-block-button__link:hover { background: rgba(255,255,255,.08); }
.xs-hero-checks { color: #c9d2e1; font-size: .93rem; margin-top: 1.2rem; }
.xs-hero-cols { gap: clamp(24px, 4vw, 56px) !important; align-items: center !important; }
.xs-hero-cols > .wp-block-column:first-child { flex-basis: 60% !important; }
.xs-hero-cols > .wp-block-column:last-child { flex-basis: 40% !important; }

.xs-price-card { background: #fff; color: var(--wp--preset--color--ink); border-radius: 16px; padding: 22px 22px 18px !important; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.xs-pc-title { font-weight: 800; letter-spacing: .08em; font-size: .8rem; color: var(--wp--preset--color--brand-dark); margin: 0; }
.xs-pc-table table { font-size: 1rem; }
.xs-pc-table th { background: transparent; color: var(--wp--preset--color--muted); font-weight: 600; font-size: .85rem; border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding-left: 0; }
.xs-pc-table td { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: .7rem 0; background: transparent !important; }
.xs-pc-table td:last-child, .xs-pc-table th:last-child { text-align: right; font-weight: 800; color: var(--wp--preset--color--navy); font-size: 1.1rem; }
.xs-pc-table td a { color: var(--wp--preset--color--ink); text-decoration: none; font-weight: 600; }
.xs-pc-note { font-size: .82rem; color: var(--wp--preset--color--muted); margin: .4rem 0 .6rem; }
.xs-price-card .wp-block-buttons, .xs-price-card .wp-block-button { width: 100%; }
.xs-price-card .wp-block-button__link { width: 100%; }

.xs-trust-wrap { background: #fff; border-bottom: 1px solid var(--wp--preset--color--line); padding-top: 0 !important; padding-bottom: 0 !important; margin-top: 0 !important; }
.xs-trust { gap: 0 !important; margin: 0 !important; }
.xs-trust .wp-block-column { padding: 22px 18px; border-right: 1px solid var(--wp--preset--color--line); text-align: center; }
.xs-trust .wp-block-column:last-child { border-right: 0; }
.xs-trust p { margin: 0; }
.xs-trust strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--wp--preset--color--navy); letter-spacing: -.01em; }
.xs-trust span { display: block; color: var(--wp--preset--color--muted); font-size: .9rem; }

.xs-sec-eyebrow { margin-top: 3.5rem !important; margin-bottom: -.6rem !important; }
.xs-sec-lead { color: var(--wp--preset--color--muted); }
.home h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.01em; }

.xs-band { background: var(--wp--preset--color--sand); border-top: 1px solid var(--wp--preset--color--line); border-bottom: 1px solid var(--wp--preset--color--line); padding-top: .5rem !important; padding-bottom: 3rem !important; margin-top: 3rem !important; }
.xs-why-cols { gap: 16px !important; }
.xs-why { background: #fff; border: 1px solid var(--wp--preset--color--line); border-left: 4px solid var(--wp--preset--color--brand); border-radius: 10px; padding: 16px 18px !important; height: 100%; }
.xs-why h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.xs-why p { margin: 0; color: var(--wp--preset--color--muted); font-size: .96rem; }

.xs-steps { gap: 16px !important; counter-reset: s; }
.xs-step { border: 1px solid var(--wp--preset--color--line); border-radius: 12px; padding: 18px !important; height: 100%; position: relative; }
.xs-step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--wp--preset--color--brand); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 0 .6rem !important; }
.xs-step h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.xs-step p:last-child { margin: 0; color: var(--wp--preset--color--muted); font-size: .95rem; }

@media (max-width: 781px) {
	.xs-trust { flex-wrap: wrap !important; }
	.xs-trust .wp-block-column { flex-basis: 50% !important; border-bottom: 1px solid var(--wp--preset--color--line); }
	.xs-hero-dark h1 { font-size: 1.9rem; }
}
.xs-hero-dark .xs-price-card .is-style-outline .wp-block-button__link { color: var(--wp--preset--color--navy); border: 2px solid var(--wp--preset--color--navy); }
.xs-hero-dark .xs-price-card .is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--navy); color: #fff; }
.xs-pc-table thead { border-bottom: 0; }
@media (max-width: 781px) {
	.xs-trust.wp-block-columns > .wp-block-column { flex-basis: 50% !important; flex-grow: 0 !important; padding: 16px 10px; }
	.xs-trust.wp-block-columns > .wp-block-column:nth-child(2n) { border-right: 0; }
	.xs-trust.wp-block-columns > .wp-block-column:last-child { flex-basis: 100% !important; }
	.xs-trust strong { font-size: 1.3rem; }
}
.xs-trust .wp-block-column:last-child { border-right: 0 !important; }
.xs-trust .wp-block-column { box-sizing: border-box; }
@media (max-width: 781px) { .xs-trust.wp-block-columns { flex-wrap: wrap !important; } }

/* =========================================================
   Ảnh thực tế (1.0.3)
   ========================================================= */
.xs-gallery { margin-top: 2.2rem !important; margin-bottom: 2.2rem !important; }
.xs-gallery .xs-gal-title { margin: 0 0 .9rem; }
.xs-gal-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.xs-gal-c3 .xs-gal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.xs-gal-item { margin: 0; background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 12px; overflow: hidden; }
.xs-gal-item a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #f3f5f8; }
.xs-gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.xs-gal-item a:hover img { transform: scale(1.04); }
.xs-gal-item figcaption { font-size: .84rem; line-height: 1.35; color: var(--wp--preset--color--muted); padding: 8px 10px 10px; }
.xs-gal-home .xs-gal-item a { aspect-ratio: 1 / 1; }
.xs-card { overflow: hidden; }
.xs-card-img { display: block; margin: -18px -20px 14px !important; aspect-ratio: 16 / 10; overflow: hidden; background: #f3f5f8; }
.xs-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.xs-card:hover .xs-card-img img { transform: scale(1.04); }
@media (max-width: 780px) {
	.xs-gal-grid, .xs-gal-c3 .xs-gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.xs-gal-item figcaption { font-size: .78rem; }
}
