/* ==========================================================
   TSUN – header, footer, trang chủ (CLAUDE.md mục 10)
   Ưu tiên điện thoại: viết cho 375px trước, máy tính mở rộng từ 900px.
   ========================================================== */

.tsun .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.tsun-skip {
	position: absolute; left: -9999px; top: 0; z-index: 1000;
	background: var(--tsun-den); color: var(--tsun-trang); padding: 10px 16px;
}
.tsun-skip:focus { left: 8px; top: 8px; color: var(--tsun-trang); }

@media (max-width: 899px) { .tsun-hide-sm { display: none !important; } }

/* ---------- Thanh thông báo ---------- */
.tsun-notice {
	background: var(--tsun-den); color: var(--tsun-trang);
	text-align: center; font-size: var(--tsun-co-nho); letter-spacing: .02em;
	padding: 8px var(--tsun-le);
}

/* ---------- Header ---------- */
.tsun-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--tsun-trang);
	display: flex; align-items: center; justify-content: space-between; gap: 24px;
	padding: 6px var(--tsun-le);
	font-size: var(--tsun-co-thuong);
}
.admin-bar .tsun-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .tsun-header { top: 32px; } }

.tsun-header__left { display: flex; align-items: center; gap: 36px; min-width: 0; }
.tsun-header__logo { display: block; color: var(--tsun-den); line-height: 0; }
.tsun-logo { display: inline-block; line-height: 0; color: inherit; }
.tsun-logo svg { display: block; width: 100%; height: auto; }
.tsun-header__logo .tsun-logo { width: 96px !important; }
@media (min-width: 900px) { .tsun-header__logo .tsun-logo { width: 112px !important; } }

.tsun-header__nav { display: none; }
@media (min-width: 900px) { .tsun-header__nav { display: block; } }

.tsun-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.tsun-menu a,
.tsun-header__tools > a,
.tsun-header__tools summary {
	min-height: 44px; display: inline-flex; align-items: center; gap: 6px;
	text-decoration: none; color: var(--tsun-den); cursor: pointer; white-space: nowrap;
}
.tsun-menu a:hover,
.tsun-header__tools > a:hover,
.tsun-header__tools summary:hover { text-decoration: underline; color: var(--tsun-den); }
.tsun-menu .current-menu-item > a { text-decoration: underline; }

.tsun-header__tools { display: flex; align-items: center; gap: 18px; }
.tsun-header__tools summary { list-style: none; }
.tsun-header__tools summary::-webkit-details-marker { display: none; }
.tsun-cart__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tsun-den); display: inline-block; }

/* Tìm kiếm: khung trượt xuống dưới header */
.tsun-search { position: static; }
.tsun-search__panel {
	position: absolute; left: 0; right: 0; top: 100%;
	background: var(--tsun-trang); border-top: 1px solid var(--tsun-xam-da); border-bottom: 1px solid var(--tsun-xam-da);
	padding: 16px var(--tsun-le);
}
.tsun-search__panel form { display: flex; gap: 8px; max-width: 640px; margin: 0 auto; }
.tsun-search__panel input[type="search"] {
	flex: 1; min-width: 0; height: 44px; padding: 0 12px;
	border: 1px solid var(--tsun-xam-da); background: var(--tsun-trang); font-size: 16px; /* 16px: iPhone không tự phóng to khi chạm (1.5.8) */
}
.tsun-search__panel button {
	height: 44px; padding: 0 20px; border: 0; background: var(--tsun-den); color: var(--tsun-trang); cursor: pointer;
}

/* Menu điện thoại */
@media (min-width: 900px) { .tsun-drawer { display: none; } }
.tsun-drawer .tsun-drawer__close { display: none; }
.tsun-drawer[open] .tsun-drawer__close { display: inline; }
.tsun-drawer[open] .tsun-drawer__open { display: none; }
.tsun-drawer__panel {
	position: absolute; left: 0; right: 0; top: 100%; z-index: 60;
	height: calc(100vh - 120px); height: calc(100dvh - 120px); overflow-y: auto;
	background: var(--tsun-trang); border-top: 1px solid var(--tsun-xam-da);
	padding: 16px var(--tsun-le) 32px;
}
.tsun-drawer__menu { list-style: none; margin: 0; padding: 0; }
.tsun-drawer__menu a {
	display: flex; align-items: center; min-height: 48px;
	font-size: 16px; text-decoration: none; color: var(--tsun-den);
	border-bottom: 1px solid var(--tsun-xam-da);
}
.tsun-drawer__menu--sub { margin-top: 24px; }
.tsun-drawer__menu--sub a { font-size: 13px; min-height: 44px; border: 0; color: var(--tsun-chu-phu); }

/* ---------- Ô ảnh chờ / ảnh ---------- */
.tsun-ph {
	display: flex; align-items: flex-end; width: 100%; height: 100%; box-sizing: border-box;
	background: var(--tsun-xam-da); color: var(--tsun-chu-phu);
	font-size: var(--tsun-co-nho); line-height: 1.4; padding: 12px 14px;
}
.tsun-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tsun-r34 { aspect-ratio: 3 / 4; }

/* ---------- Chữ + link dưới ảnh ---------- */
.tsun-cap {
	display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
	padding: 12px var(--tsun-le) 0;
}
.tsun-cap h1, .tsun-cap h2 { margin: 0; font-size: var(--tsun-co-vua); font-weight: 500; }
@media (min-width: 900px) { .tsun-cap h1, .tsun-cap h2 { font-size: 16px; } }
.tsun-link {
	min-height: 44px; display: inline-flex; align-items: center;
	text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; color: var(--tsun-den);
}

/* ---------- Trang chủ ---------- */
.tsun-home { display: block; }
.tsun-block { margin-top: 16px; }
.tsun-block--gap { margin-top: 48px; }
@media (min-width: 900px) { .tsun-block--gap { margin-top: 72px; } }

.tsun-hero__imgs { display: grid; grid-template-columns: 1fr; gap: var(--tsun-khe-anh); }
.tsun-hero__imgs > * { aspect-ratio: 4 / 5; }
@media (min-width: 900px) {
	.tsun-hero__imgs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tsun-hero__imgs > * { aspect-ratio: auto; height: min(88vh, 980px); }
}
.tsun-hero__imgs img { animation: tsun-hien-dan .9s cubic-bezier(.2, .6, .2, 1) both; }
@keyframes tsun-hien-dan { from { opacity: 0; } to { opacity: 1; } }

.tsun-wide { aspect-ratio: 4 / 5; }
@media (min-width: 900px) { .tsun-wide { aspect-ratio: 16 / 9; } }
img.tsun-wide { height: auto; }

/* Dải sản phẩm */
.tsun-strip {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tsun-khe-anh);
	margin-top: 12px;
}
@media (min-width: 900px) { .tsun-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tsun-card { display: flex; flex-direction: column; gap: 10px; padding-bottom: 28px; text-decoration: none; color: var(--tsun-den); }
.tsun-card__img { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--tsun-xam-da); }
.tsun-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tsun-card__meta { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; font-size: var(--tsun-co-thuong); }
.tsun-card__tag { font-size: 10px; letter-spacing: .06em; color: var(--tsun-chu-phu); min-height: 15px; }
.tsun-card__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsun-card__price { font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; gap: 0 6px; }
.tsun-card__price del { color: var(--tsun-chu-phu); order: 2; }
.tsun-card__price ins { text-decoration: none; }
.tsun-card__price .screen-reader-text { position: absolute; }
a.tsun-card:hover .tsun-card__name { text-decoration: underline; text-underline-offset: 4px; }

/* Váy / Set đồ */
.tsun-duo { display: grid; grid-template-columns: 1fr; gap: 24px var(--tsun-khe-anh); }
@media (min-width: 900px) { .tsun-duo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tsun-duo__img { display: block; text-decoration: none; }
.tsun-duo__img img { aspect-ratio: 3 / 4; height: auto; }

/* Cửa hàng */
.tsun-store { display: grid; grid-template-columns: 1fr; gap: var(--tsun-khe-anh); }
/* 1.5.11: ảnh mặt tiền dọc 2:3 (thấy đủ bảng hiệu + cửa vào) */
.tsun-store__img { aspect-ratio: 2 / 3; }
img.tsun-store__img { height: auto; contain-intrinsic-size: none; }
@media (min-width: 900px) {
	.tsun-store { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
	.tsun-store--2anh { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.tsun-store__info {
	display: flex; flex-direction: column; justify-content: flex-end; gap: 14px;
	padding: 20px var(--tsun-le); font-size: var(--tsun-co-thuong);
}
.tsun-store__info h2 { margin: 0; font-size: var(--tsun-co-vua); font-weight: 500; }
.tsun-store__info p { margin: 0; }
.tsun-store__info strong { font-weight: 500; }
.tsun-muted { color: var(--tsun-chu-phu); }

/* Trang Cửa hàng */
.tsun-stores__head { padding: 28px var(--tsun-le) 20px; max-width: 640px; }
.tsun-stores__head h1 { margin: 0 0 8px; font-size: 18px; font-weight: 500; }
.tsun-stores__head p { margin: 0; font-size: var(--tsun-co-thuong); }
.tsun-stores__item + .tsun-stores__item { margin-top: 40px; }
.tsun-stores__item .tsun-store__info a:not(.tsun-link) { color: var(--tsun-den); }

/* Dịch vụ */
.tsun-services {
	margin-top: 64px; border-top: 1px solid var(--tsun-xam-da);
	display: grid; grid-template-columns: 1fr;
}
@media (min-width: 700px) { .tsun-services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .tsun-services { grid-template-columns: repeat(4, 1fr); } }
.tsun-services > div { padding: 22px var(--tsun-le); border-bottom: 1px solid var(--tsun-xam-da); }
.tsun-services h3 { margin: 0 0 4px; font-size: 13px; font-weight: 500; }
.tsun-services p { margin: 0; color: var(--tsun-chu-phu); font-size: var(--tsun-co-thuong); max-width: 36ch; }

/* ---------- Footer ---------- */
.tsun-footer { padding: 40px var(--tsun-le) 32px; font-size: var(--tsun-co-thuong); }
.tsun-footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
@media (min-width: 900px) { .tsun-footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tsun-footer__title { margin: 0 0 10px; font-size: var(--tsun-co-thuong); font-weight: 500; }
.tsun-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tsun-footer__list a,
.tsun-footer__list li { min-height: 32px; display: flex; align-items: center; text-decoration: none; color: var(--tsun-den); }
.tsun-footer__list a:hover { text-decoration: underline; }
.tsun-footer__list.tsun-menu { flex-direction: column; gap: 0; }
.tsun-footer__bottom {
	margin-top: 48px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
	color: var(--tsun-chu-phu); font-size: var(--tsun-co-nho);
}
.tsun-footer__bottom a { color: var(--tsun-den); }
.tsun-footer__legal { margin: 0; }
.tsun-footer__bct { color: var(--tsun-chu-phu); font-size: var(--tsun-co-nho); }

/* ==========================================================
   Tra cứu đơn hàng ([tsun_tra_cuu_don]) + Trang cảm ơn
   ========================================================== */
.tsun-tcd { max-width: 560px; margin: 0 auto; padding: 8px 0 48px; }
.tsun-tcd-row { margin: 0 0 14px; }
.tsun-tcd-row label { display: block; font-size: var(--tsun-co-thuong); margin-bottom: 6px; }
.tsun-tcd-row input {
	width: 100%; min-height: 48px; padding: 10px 12px; font-size: 16px;
	border: 1px solid var(--tsun-xam-da); background: var(--tsun-trang); border-radius: 0; box-shadow: none;
}
.tsun-tcd-row input:focus { border-color: var(--tsun-den); outline: none; }
.tsun-tcd-submit, .tsun-ty-track {
	width: 100%; min-height: 52px; display: flex !important; align-items: center; justify-content: center;
	background: var(--tsun-den) !important; color: var(--tsun-trang) !important; border: 0; font-size: 14px; font-weight: 500; text-decoration: none;
}
.tsun-tcd-error { color: var(--tsun-loi); font-size: var(--tsun-co-thuong); margin: 0 0 14px; }
.tsun-tcd-help { color: var(--tsun-chu-phu); font-size: var(--tsun-co-nho); margin: 10px 0 0; }

.tsun-tcd-result { margin-top: 32px; border-top: 1px solid var(--tsun-den); padding-top: 20px; }
.tsun-tcd-head p { margin: 0 0 4px; }
.tsun-tcd-code { font-size: 18px; font-weight: 500; }
.tsun-tcd-date { color: var(--tsun-chu-phu); font-size: var(--tsun-co-thuong); }
.tsun-tcd-status { font-size: 14px; font-weight: 500; margin-top: 8px !important; }

.tsun-tcd-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; list-style: none; padding: 0; margin: 16px 0 24px; counter-reset: b; }
.tsun-tcd-steps li { border-top: 2px solid var(--tsun-xam-da); padding-top: 8px; font-size: var(--tsun-co-nho); color: var(--tsun-chu-phu); line-height: 1.3; }
.tsun-tcd-steps li.is-done,
.tsun-tcd-steps li.is-current { border-top-color: var(--tsun-den); color: var(--tsun-den); }
.tsun-tcd-steps li.is-current { font-weight: 500; }

.tsun-tcd-items { list-style: none; padding: 0; margin: 0 0 16px; }
.tsun-tcd-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--tsun-xam-da); font-size: var(--tsun-co-thuong); }
.tsun-tcd-thumb img { width: 56px; aspect-ratio: 3 / 4; height: auto; object-fit: cover; display: block; background: var(--tsun-xam-da); }
.tsun-tcd-info { display: flex; flex-direction: column; gap: 2px; }
.tsun-tcd-meta { color: var(--tsun-chu-phu); font-size: var(--tsun-co-nho); }
.tsun-tcd-meta p { margin: 0; display: inline; }
.tsun-tcd-price { white-space: nowrap; }

.tsun-tcd-sum { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 20px; font-size: var(--tsun-co-thuong); }
.tsun-tcd-sum dt { color: var(--tsun-chu-phu); margin: 0; }
.tsun-tcd-sum dd { margin: 0; text-align: right; }
.tsun-tcd-contact, .tsun-ty-contact { font-size: var(--tsun-co-thuong); color: var(--tsun-chu-phu); }
.tsun-tcd-contact a, .tsun-ty-contact a { color: var(--tsun-den); }

.tsun-ty { border: 1px solid var(--tsun-xam-da); padding: 24px 20px; margin: 0 0 28px; text-align: center; }
.tsun-ty-label { font-size: var(--tsun-co-thuong); color: var(--tsun-chu-phu); margin: 0 0 6px; }
.tsun-ty-code { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 12px; }
.tsun-ty-code span { font-size: 28px; font-weight: 500; letter-spacing: .02em; }
.tsun-ty-copy { min-height: 36px; padding: 0 12px; background: transparent !important; color: var(--tsun-den) !important; border: 1px solid var(--tsun-den) !important; font-size: var(--tsun-co-thuong); cursor: pointer; }
.tsun-ty-note { font-size: var(--tsun-co-thuong); max-width: 420px; margin: 0 auto 16px; }
.tsun-ty-actions { max-width: 320px; margin: 0 auto 12px; }
.tsun-ty-actions .tsun-ty-pay, .tsun-tcd-pay .button { display: block; width: 100%; margin: 0 0 8px; }
.tsun-ty-safe { font-size: 12px; color: var(--tsun-chu-phu); max-width: 420px; margin: 16px auto 0; }
.woocommerce-order .woocommerce-order-overview__order { display: none; }

/* Tiêu đề trang thường (Tra cứu đơn, chính sách…): bỏ dải xám cao của Kadence, chữ nhỏ */
.page-hero-section .entry-hero-container-inner { background: none !important; min-height: 0 !important; }
.page-hero-section .hero-section-overlay { display: none !important; }
.page-hero-section .hero-container,
.page-hero-section .entry-header { min-height: 0 !important; padding: 32px 0 0 !important; }
.page-hero-section .entry-title { font-size: 16px !important; font-weight: 500 !important; margin: 0 !important; }
.page.content-title-style-above .content-area { margin-top: 24px !important; }
.entry-content .tsun-tcd-steps,
.entry-content .tsun-tcd-items { padding-left: 0 !important; margin-left: 0 !important; margin-right: 0 !important; }
.entry-content .tsun-tcd-steps li,
.entry-content .tsun-tcd-items li { margin: 0 !important; }

/* Ảnh mở trang: ưu tiên giữ phần đầu người mẫu khi cắt khung */
.tsun-hero__imgs img { object-position: 50% 15%; }
