/* Web Template Showcase – frontend */
:root {
	--wts-primary: #2563eb;
	--wts-thumb-ratio: 16 / 10;
	--wts-accent: #e11d48;
	--wts-text: #0f172a;
	--wts-muted: #64748b;
	--wts-border: #e2e8f0;
	--wts-soft: #f1f5f9;
	--wts-bg: #fff;
	--wts-radius: 12px;
	--wts-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .18);
}

.wts-showcase, .wts-single { color: var(--wts-text); font-size: 15px; line-height: 1.55; box-sizing: border-box; }
.wts-showcase *, .wts-single *, .wts-showcase *::before, .wts-single *::before { box-sizing: border-box; }
.wts-showcase button, .wts-single button {
	font: inherit; letter-spacing: normal; text-transform: none; box-shadow: none; margin: 0; min-height: 0; line-height: 1.2;
}
.wts-ico { display: inline-block; flex: none; vertical-align: middle; }
.wts-layout { display: block; width: 100%; height: auto; float: none; clear: both; }
.wts-container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 24px 16px 48px; }
.wts-showcase { margin: 0 0 40px; }

/* ---------- Tiêu đề khối ---------- */
.wts-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.wts-head__title { margin: 0; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.25; font-weight: 700; color: var(--wts-text); }
.wts-head__all { font-size: 14px; color: var(--wts-primary); text-decoration: none; }
.wts-head__all:hover { text-decoration: underline; }

/* ---------- Bộ lọc ---------- */
.wts-filter { margin: 0 0 6px; }
.wts-search { position: relative; margin: 0 0 14px; }
.wts-search .wts-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--wts-muted); }
.wts-search input[type=search] {
	width: 100%; height: 46px; padding: 0 16px 0 42px; border: 1px solid var(--wts-border); border-radius: 999px;
	background: var(--wts-bg); font-size: 15px; color: var(--wts-text); outline: none; box-shadow: none; margin: 0;
}
.wts-search input[type=search]:focus { border-color: var(--wts-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wts-primary) 18%, transparent); }

.wts-filter__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wts-filter__controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wts-filter.is-js .wts-filter__submit { display: none; }
.wts-filter__submit { height: 36px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--wts-primary); color: #fff; cursor: pointer; }

.wts-drop { position: relative; }
.wts-drop__btn {
	list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 14px;
	border: 1px solid var(--wts-border); border-radius: 999px; background: var(--wts-bg); cursor: pointer; font-size: 14px; user-select: none; white-space: nowrap;
}
.wts-drop__btn::-webkit-details-marker { display: none; }
.wts-drop__btn::marker { content: ""; }
.wts-drop__btn:hover, .wts-drop[open] .wts-drop__btn { border-color: var(--wts-primary); }
.wts-drop__btn.is-active { border-color: var(--wts-primary); color: var(--wts-primary); background: color-mix(in srgb, var(--wts-primary) 6%, #fff); }
.wts-drop[open] .wts-drop__btn .wts-ico { transform: rotate(180deg); }
.wts-drop__n { font-style: normal; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 9px; background: var(--wts-primary); color: #fff; padding: 0 5px; }
.wts-drop__n[hidden] { display: none; }
.wts-drop__panel {
	position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 260px; max-width: min(340px, 90vw); max-height: 340px; overflow: auto;
	padding: 6px; background: var(--wts-bg); border: 1px solid var(--wts-border); border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(15, 23, 42, .25);
}
.wts-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; margin: 0; }
.wts-opt:hover { background: var(--wts-soft); }
.wts-opt input { margin: 0; width: 16px; height: 16px; accent-color: var(--wts-primary); flex: none; }
.wts-opt__name { flex: 1; }
.wts-opt__count { font-size: 12px; color: var(--wts-muted); background: var(--wts-soft); border-radius: 10px; padding: 1px 7px; }

.wts-sort { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--wts-muted); margin: 0; }
.wts-sort select {
	height: 36px; padding: 0 30px 0 12px; border: 1px solid var(--wts-border); border-radius: 999px; background-color: var(--wts-bg); color: var(--wts-text); font-size: 14px; margin: 0; width: auto;
}

.wts-count { margin: 12px 0 14px; font-size: 13px; color: var(--wts-muted); }

/* ---------- Lưới: desktop N cột, tablet 2–3 cột, mobile slide 1 cột ---------- */
.wts-results { position: relative; transition: opacity .2s; }
.wts-showcase.is-loading .wts-results { opacity: .45; pointer-events: none; }
.wts-grid { display: grid; grid-template-columns: repeat(var(--wts-cols, 4), minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1024px) {
	.wts-grid { grid-template-columns: repeat(var(--wts-cols-tab, 3), minmax(0, 1fr)); gap: 18px; }
}
@media (max-width: 767px) {
	.wts-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.wts-grid--slider {
		display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding: 2px 2px 10px;
		scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
	}
	.wts-grid--slider::-webkit-scrollbar { display: none; }
	.wts-grid--slider > .wts-card { flex: 0 0 100%; scroll-snap-align: start; }
	.wts-showcase .wts-slider-nav { display: flex; }
	/* Mobile: slider chạy hết các mẫu, không cần phân trang / nút Xem thêm. */
	.wts-grid--slider ~ .wts-paging { display: none; }
}

/* ---------- Thẻ mẫu ---------- */
.wts-card {
	display: flex; flex-direction: column; min-width: 0; background: var(--wts-bg); border: 1px solid var(--wts-border); border-radius: var(--wts-radius);
	overflow: hidden; transition: box-shadow .25s, transform .25s, border-color .25s;
}
.wts-card:hover { box-shadow: var(--wts-shadow); transform: translateY(-3px); border-color: transparent; }
.wts-card__media { position: relative; aspect-ratio: var(--wts-thumb-ratio, 16 / 10); height: auto; background: var(--wts-soft); overflow: hidden; }
.wts-card__img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.wts-card__img img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: top center; transition: object-position 4s ease, transform .5s ease; }
.wts-card:hover .wts-card__img img { object-position: bottom center; }
.wts-card__noimg { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: #cbd5e1; }
.wts-card__overlay {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 12px;
	background: rgba(15, 23, 42, .45); opacity: 0; transition: opacity .25s; pointer-events: none;
}
.wts-card:hover .wts-card__overlay, .wts-card:focus-within .wts-card__overlay { opacity: 1; pointer-events: auto; }
@media (hover: none) { .wts-card__overlay { display: none; } }
.wts-card__body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 14px; }
.wts-card__label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--wts-primary); margin: 0 0 4px; }
.wts-card__title { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wts-card__title a { color: inherit; text-decoration: none; }
.wts-card__title a:hover { color: var(--wts-primary); }
.wts-card__excerpt { margin: 6px 0 0; font-size: 13px; color: var(--wts-muted); }
.wts-card__foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; }
.wts-card__price { font-weight: 700; color: var(--wts-accent); font-size: 14px; white-space: nowrap; }

/* ---------- Nút ---------- */
.wts-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px; border-radius: 8px;
	border: 1px solid var(--wts-primary); background: var(--wts-primary); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
	text-transform: uppercase; letter-spacing: .02em; transition: all .2s; white-space: nowrap;
}
.wts-btn:hover { filter: brightness(1.08); color: #fff; }
.wts-btn--sm { height: 34px; padding: 0 12px; font-size: 13px; text-transform: none; letter-spacing: 0; }
.wts-btn--light { background: #fff; border-color: #fff; color: var(--wts-text); }
.wts-btn--light:hover { color: var(--wts-primary); }
.wts-btn--outline { background: transparent; color: var(--wts-primary); }
.wts-btn--outline:hover { background: var(--wts-primary); color: #fff; filter: none; }
.wts-btn--accent { border-color: var(--wts-accent); color: var(--wts-accent); }
.wts-btn--accent:hover { background: var(--wts-accent); color: #fff; }

/* ---------- Phân trang / Xem thêm / Slider ---------- */
.wts-paging:empty { display: none; }
.wts-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.wts-page {
	display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 8px;
	border: 1px solid var(--wts-border); background: var(--wts-bg); color: var(--wts-text); text-decoration: none; font-size: 14px;
}
a.wts-page:hover { border-color: var(--wts-primary); color: var(--wts-primary); }
.wts-page.is-current { background: var(--wts-primary); border-color: var(--wts-primary); color: #fff; font-weight: 600; }
.wts-page--dots { border-color: transparent; background: transparent; }
.wts-more { text-align: center; margin-top: 24px; }
.wts-more__btn {
	display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--wts-border);
	background: var(--wts-bg); color: var(--wts-text); text-decoration: none; font-weight: 600; font-size: 14px;
}
.wts-more__btn:hover { border-color: var(--wts-primary); color: var(--wts-primary); }
.wts-empty { padding: 32px 16px; text-align: center; color: var(--wts-muted); background: var(--wts-soft); border-radius: var(--wts-radius); }

.wts-slider-nav { display: none; align-items: center; justify-content: center; gap: 12px; margin-top: 8px; }
.wts-slider-btn {
	display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border-radius: 50%;
	border: 1px solid var(--wts-border); background: var(--wts-bg); color: var(--wts-text); cursor: pointer;
}
.wts-slider-btn:disabled { opacity: .35; cursor: default; }
.wts-slider-dots { display: flex; gap: 6px; align-items: center; }
.wts-dot { width: 8px; height: 8px; padding: 0; border-radius: 4px; border: 0; background: #cbd5e1; cursor: pointer; transition: all .25s; }
.wts-dot.is-active { width: 22px; background: var(--wts-primary); }
.wts-slider-count { font-size: 13px; color: var(--wts-muted); min-width: 48px; text-align: center; }

/* ---------- Trang chi tiết ---------- */
.wts-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--wts-muted); margin: 0 0 18px; }
.wts-breadcrumb a { color: var(--wts-muted); text-decoration: none; }
.wts-breadcrumb a:hover { color: var(--wts-primary); }

.wts-single__top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; align-items: start; }
@media (max-width: 900px) { .wts-single__top { grid-template-columns: 1fr; gap: 24px; } }

.wts-gallery { position: sticky; top: 24px; min-width: 0; }
@media (max-width: 900px) { .wts-gallery { position: static; } }
.wts-gallery__main { position: relative; border: 1px solid var(--wts-border); border-radius: var(--wts-radius); overflow: hidden; background: var(--wts-soft); }
.wts-gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.wts-gallery__track::-webkit-scrollbar { display: none; }
.wts-gallery__slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; aspect-ratio: var(--wts-thumb-ratio, 16 / 10); display: flex; align-items: center; justify-content: center; }
.wts-gallery__slide a { display: block; width: 100%; height: 100%; }
.wts-gallery__slide img { width: 100%; height: 100%; max-width: none; object-fit: contain; display: block; }
.wts-gallery__slide--empty { color: #cbd5e1; }
.wts-gallery__nav {
	position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 0;
	display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .92); color: var(--wts-text);
	box-shadow: 0 2px 8px rgba(15, 23, 42, .2); cursor: pointer; opacity: 0; transition: opacity .2s;
}
.wts-gallery__main:hover .wts-gallery__nav { opacity: 1; }
@media (hover: none) { .wts-gallery__nav { opacity: 1; } }
.wts-gallery__nav--prev { left: 10px; }
.wts-gallery__nav--next { right: 10px; }
.wts-gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.wts-gallery__thumb {
	flex: 0 0 88px; height: 66px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--wts-soft); cursor: pointer; opacity: .65; transition: all .2s;
}
.wts-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.wts-gallery__thumb.is-active, .wts-gallery__thumb:hover { border-color: var(--wts-primary); opacity: 1; }

.wts-single__title { margin: 0 0 10px; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.25; font-weight: 700; }
.wts-single__terms { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.wts-single__terms a {
	font-size: 12px; font-weight: 600; text-decoration: none; padding: 3px 10px; border-radius: 999px;
	color: var(--wts-primary); background: color-mix(in srgb, var(--wts-primary) 9%, #fff);
}
.wts-single__intro { font-size: 15px; }
.wts-single__intro p { margin: 0 0 12px; }
.wts-single__label { margin: 14px 0 8px; font-weight: 600; }
.wts-checklist { list-style: none; margin: 0 0 14px; padding: 0; }
.wts-checklist li { position: relative; padding: 0 0 0 28px; margin: 0 0 8px; }
.wts-checklist li::before {
	content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 4px; background: #22c55e
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.wts-single__platform { margin: 0 0 12px; }
.wts-single__price { margin: 0 0 12px; font-size: 22px; font-weight: 700; color: var(--wts-accent); }
.wts-single__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.wts-single__actions .wts-btn { height: 44px; padding: 0 22px; }

.wts-single__section { margin-top: 48px; }
.wts-single__h { margin: 0 0 18px; font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; line-height: 1.3; }
.wts-single__shot { border: 1px solid var(--wts-border); border-radius: var(--wts-radius); overflow: hidden; background: var(--wts-soft); }
.wts-single__shot img { display: block; width: 100%; height: auto; max-width: 100%; margin: 0; }
.wts-related { margin-bottom: 0; }
/* Theme dạng block: bố cục chi tiết rộng hơn cột nội dung mặc định. */
.wts-single.alignwide { max-width: var(--wp--style--global--wide-size, 1240px); margin-left: auto; margin-right: auto; }
.wts-archive__desc { margin: 0 0 20px; color: var(--wts-muted); }

@media (prefers-reduced-motion: reduce) {
	.wts-card, .wts-card__img img { transition: none; }
}
