/* =============================================================
   httek.tech 装修站 — 业务样式
   移动优先，桌面端右侧悬浮 / 移动端底部固定栏
   ============================================================= */

:root {
	--ht-primary: #2C5F4E;
	--ht-accent: #C9762F;
	--ht-ink: #1A1A18;
	--ht-muted: #6B6862;
	--ht-bg: #FAF8F5;
	--ht-card: #FFFFFF;
	--ht-line: #E6E1D8;
	--ht-radius: 10px;
	--ht-bar-h: 56px;
	--ht-shadow: 0 2px 12px rgba(26, 26, 24, .08);
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* 移动端给底部栏留空间，避免遮住页脚 */
@media (max-width: 767px) {
	body {
		padding-bottom: calc(var(--ht-bar-h) + env(safe-area-inset-bottom, 0px));
	}
}

/* =============================================================
   0. 容器与基础排版
   ============================================================= */

.ht-container {
	width: 100%;
	max-width: 1140px;
	margin: 0 auto;
	padding: 28px 18px 40px;
	box-sizing: border-box;
}

@media (min-width: 768px) {
	.ht-container {
		padding: 40px 24px 60px;
	}
}

.ht-archive-head {
	padding-bottom: 8px;
}

.ht-archive-head h1 {
	margin: 0 0 8px;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--ht-ink);
}

@media (min-width: 768px) {
	.ht-archive-head h1 {
		font-size: 32px;
	}
}

.ht-archive-desc {
	margin: 0 0 24px;
	font-size: 15px;
	color: var(--ht-muted);
}

.ht-section-title {
	margin: 48px 0 18px;
	font-size: 20px;
	font-weight: 600;
	color: var(--ht-ink);
	padding-left: 12px;
	border-left: 3px solid var(--ht-primary);
	line-height: 1.3;
}

.ht-excerpt {
	margin: 0 0 20px;
	font-size: 15px;
	line-height: 1.8;
	color: var(--ht-muted);
}

.ht-content {
	font-size: 15px;
	line-height: 1.85;
	color: var(--ht-ink);
}

.ht-content h2 {
	margin: 36px 0 14px;
	font-size: 21px;
	font-weight: 600;
	line-height: 1.4;
}

.ht-content h3 {
	margin: 28px 0 12px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
}

.ht-content p {
	margin: 0 0 16px;
}

.ht-content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--ht-radius);
}

.ht-content ul,
.ht-content ol {
	margin: 0 0 16px;
	padding-left: 22px;
}

.ht-content li {
	margin-bottom: 6px;
}

.ht-cover {
	margin: 0 0 32px;
	border-radius: var(--ht-radius);
	overflow: hidden;
	background: #eee;
}

.ht-cover img {
	display: block;
	width: 100%;
	height: auto;
}

.ht-card__placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #f1efe8 0%, #e6e1d8 100%);
}

.ht-card__desc {
	margin: 0 0 10px;
	font-size: 13px;
	line-height: 1.65;
	color: var(--ht-muted);
}

/* =============================================================
   1. 桌面端右侧悬浮按钮
   ============================================================= */

.ht-float {
	position: fixed;
	right: 16px;
	bottom: 120px;
	z-index: 9000;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ht-float__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	width: 64px;
	padding: 10px 4px;
	border: none;
	border-radius: var(--ht-radius);
	background: var(--ht-primary);
	color: #fff;
	font-size: 12px;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: var(--ht-shadow);
	transition: transform .18s ease, opacity .18s ease;
	text-decoration: none;
}

.ht-float__item:hover {
	transform: translateY(-2px);
	opacity: .92;
}

.ht-float__item--phone {
	background: var(--ht-primary);
}

.ht-float__item--wechat {
	background: #2AAB53;
}

.ht-float__item--form {
	background: var(--ht-accent);
}

.ht-float__label {
	font-size: 11px;
	letter-spacing: .5px;
	margin-top: 2px;
}

@media (max-width: 767px) {
	.ht-float {
		display: none;
	}
}

/* =============================================================
   2. 移动端底部栏
   ============================================================= */

.ht-mobilebar {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9100;
	height: calc(var(--ht-bar-h) + env(safe-area-inset-bottom, 0px));
	padding-bottom: env(safe-area-inset-bottom, 0px);
	background: #fff;
	border-top: 1px solid var(--ht-line);
	box-shadow: 0 -2px 12px rgba(26, 26, 24, .06);
}

@media (max-width: 767px) {
	.ht-mobilebar {
		display: flex;
	}
}

.ht-mobilebar__item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	border: none;
	background: transparent;
	color: var(--ht-ink);
	font-size: 11px;
	text-decoration: none;
	cursor: pointer;
	line-height: 1.2;
}

.ht-mobilebar__item svg {
	width: 20px;
	height: 20px;
	color: var(--ht-primary);
}

.ht-mobilebar__item--cta {
	background: var(--ht-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 1px;
	margin: 6px 8px 6px 0;
	border-radius: 8px;
}

.ht-mobilebar__item--cta span {
	color: #fff;
}

/* =============================================================
   3. 弹窗
   ============================================================= */

.ht-modal {
	position: fixed;
	inset: 0;
	z-index: 9500;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ht-modal.is-open {
	display: flex;
}

.ht-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(26, 26, 24, .55);
	backdrop-filter: blur(2px);
}

.ht-modal__panel {
	position: relative;
	width: 100%;
	max-width: 360px;
	max-height: 88vh;
	overflow-y: auto;
	padding: 28px 24px;
	border-radius: 14px;
	background: #fff;
	text-align: center;
	animation: ht-pop .22s ease-out;
}

.ht-modal__panel--form {
	max-width: 460px;
	text-align: left;
}

@keyframes ht-pop {
	from {
		opacity: 0;
		transform: translateY(12px) scale(.98);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ht-modal__panel {
		animation: none;
	}
}

.ht-modal__close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: var(--ht-muted);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.ht-modal h3 {
	margin: 0 0 6px;
	font-size: 19px;
	font-weight: 600;
	color: var(--ht-ink);
}

.ht-modal__sub {
	margin: 0 0 18px;
	font-size: 13px;
	color: var(--ht-muted);
}

.ht-modal__qr {
	display: block;
	width: 240px;
	height: 240px;
	max-width: 100%;
	margin: 14px auto;
	border: 1px solid var(--ht-line);
	border-radius: 8px;
	object-fit: contain;
	background: #fff;
}

.ht-modal__tip {
	margin: 10px 0;
	font-size: 13px;
	color: var(--ht-muted);
}

.ht-modal__id {
	margin: 6px 0;
	font-size: 14px;
	color: var(--ht-ink);
}

.ht-modal__id a {
	color: var(--ht-accent);
	font-weight: 600;
	text-decoration: none;
}

.ht-modal__hours {
	margin: 12px 0 0;
	font-size: 12px;
	color: var(--ht-muted);
}

body.ht-locked {
	overflow: hidden;
}

/* =============================================================
   4. 询盘表单
   ============================================================= */

.ht-form {
	display: block;
}

.ht-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

@media (max-width: 560px) {
	.ht-form__row {
		grid-template-columns: 1fr;
	}
}

.ht-form__field {
	margin-bottom: 12px;
}

.ht-form__field label {
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
	color: var(--ht-ink);
}

.ht-form__field label .req {
	color: #d63638;
	margin-left: 2px;
}

.ht-form__field input,
.ht-form__field select,
.ht-form__field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--ht-line);
	border-radius: 8px;
	background: #fff;
	color: var(--ht-ink);
	font-size: 15px;
	line-height: 1.4;
	transition: border-color .16s ease, box-shadow .16s ease;
	box-sizing: border-box;
}

.ht-form__field input:focus,
.ht-form__field select:focus,
.ht-form__field textarea:focus {
	outline: none;
	border-color: var(--ht-primary);
	box-shadow: 0 0 0 3px rgba(44, 95, 78, .12);
}

.ht-form__field textarea {
	min-height: 76px;
	resize: vertical;
}

.ht-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ht-form__submit {
	width: 100%;
	padding: 13px;
	border: none;
	border-radius: 8px;
	background: var(--ht-accent);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 1px;
	cursor: pointer;
	transition: opacity .16s ease, transform .16s ease;
}

.ht-form__submit:hover:not(:disabled) {
	opacity: .93;
}

.ht-form__submit:disabled {
	opacity: .6;
	cursor: not-allowed;
}

.ht-form__note {
	margin: 10px 0 0;
	font-size: 12px;
	color: var(--ht-muted);
	line-height: 1.6;
}

.ht-form__msg {
	display: none;
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 14px;
}

.ht-form__msg.is-error {
	display: block;
	background: #fcebeb;
	color: #a32d2d;
}

.ht-form__msg.is-ok {
	display: block;
	background: #eaf3de;
	color: #3b6d11;
}

/* 详情页内嵌表单区块 */
.ht-lead-block {
	margin: 48px 0 0;
	padding: 28px 24px;
	border-radius: 14px;
	background: var(--ht-bg);
	border: 1px solid var(--ht-line);
}

.ht-lead-block h3 {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 600;
	color: var(--ht-ink);
}

.ht-lead-block > p {
	margin: 0 0 20px;
	font-size: 14px;
	color: var(--ht-muted);
}

/* =============================================================
   5. 面包屑
   ============================================================= */

.ht-crumb {
	margin: 0 0 18px;
	font-size: 13px;
	color: var(--ht-muted);
}

.ht-crumb a {
	color: var(--ht-muted);
	text-decoration: none;
}

.ht-crumb a:hover {
	color: var(--ht-primary);
}

.ht-crumb span {
	margin: 0 6px;
	opacity: .5;
}

.ht-crumb em {
	font-style: normal;
	color: var(--ht-ink);
}

/* =============================================================
   6. 案例前后对比滑块
   ============================================================= */

.ht-ba {
	position: relative;
	width: 100%;
	margin: 0 0 32px;
	border-radius: var(--ht-radius);
	overflow: hidden;
	background: #eee;
	aspect-ratio: 4 / 3;
	user-select: none;
	touch-action: pan-y;
}

@media (min-width: 768px) {
	.ht-ba {
		aspect-ratio: 16 / 10;
	}
}

.ht-ba img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}

.ht-ba__after {
	clip-path: inset(0 0 0 50%);
}

.ht-ba__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	background: #fff;
	transform: translateX(-1px);
	pointer-events: none;
	box-shadow: 0 0 8px rgba(0, 0, 0, .3);
}

.ht-ba__knob {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ht-ink);
	font-size: 13px;
	font-weight: 600;
}

.ht-ba__tag {
	position: absolute;
	bottom: 12px;
	padding: 4px 10px;
	border-radius: 4px;
	background: rgba(26, 26, 24, .68);
	color: #fff;
	font-size: 12px;
	letter-spacing: 1px;
	pointer-events: none;
}

.ht-ba__tag--before {
	left: 12px;
}

.ht-ba__tag--after {
	right: 12px;
}

.ht-ba__range {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
}

/* =============================================================
   7. 案例头部信息
   ============================================================= */

.ht-case-head {
	margin: 0 0 24px;
}

.ht-case-head h1 {
	margin: 0 0 14px;
	font-size: 26px;
	line-height: 1.35;
	font-weight: 600;
	color: var(--ht-ink);
}

@media (min-width: 768px) {
	.ht-case-head h1 {
		font-size: 32px;
	}
}

.ht-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.ht-meta li {
	font-size: 14px;
	color: var(--ht-muted);
}

.ht-meta strong {
	color: var(--ht-ink);
	font-weight: 600;
	margin-left: 4px;
}

.ht-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ht-tags li a {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 20px;
	background: var(--ht-bg);
	border: 1px solid var(--ht-line);
	color: var(--ht-muted);
	font-size: 12px;
	text-decoration: none;
}

.ht-tags li a:hover {
	border-color: var(--ht-primary);
	color: var(--ht-primary);
}

/* =============================================================
   8. 效果图集
   ============================================================= */

.ht-gallery {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin: 32px 0;
}

@media (min-width: 768px) {
	.ht-gallery {
		grid-template-columns: repeat(3, 1fr);
		gap: 14px;
	}
}

.ht-gallery figure {
	margin: 0;
	border-radius: var(--ht-radius);
	overflow: hidden;
	background: #eee;
	aspect-ratio: 4 / 3;
}

.ht-gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease;
}

.ht-gallery figure:hover img {
	transform: scale(1.03);
}

/* =============================================================
   9. 客户评价
   ============================================================= */

.ht-review {
	position: relative;
	margin: 32px 0;
	padding: 24px 24px 24px 56px;
	border-radius: var(--ht-radius);
	background: var(--ht-bg);
	border-left: 3px solid var(--ht-primary);
}

.ht-review::before {
	content: '\201C';
	position: absolute;
	top: 8px;
	left: 18px;
	font-size: 48px;
	line-height: 1;
	color: var(--ht-primary);
	opacity: .3;
	font-family: Georgia, serif;
}

.ht-review p {
	margin: 0 0 10px;
	font-size: 15px;
	line-height: 1.8;
	color: var(--ht-ink);
}

.ht-review cite {
	font-style: normal;
	font-size: 13px;
	color: var(--ht-muted);
}

/* =============================================================
   10. 案例/服务卡片网格
   ============================================================= */

.ht-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.ht-filter a {
	display: inline-block;
	padding: 7px 16px;
	border-radius: 20px;
	border: 1px solid var(--ht-line);
	background: #fff;
	color: var(--ht-muted);
	font-size: 13px;
	text-decoration: none;
	transition: all .16s ease;
}

.ht-filter a:hover,
.ht-filter a.is-active {
	background: var(--ht-primary);
	border-color: var(--ht-primary);
	color: #fff;
}

.ht-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin: 0 0 40px;
}

@media (min-width: 600px) {
	.ht-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 992px) {
	.ht-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.ht-card {
	display: flex;
	flex-direction: column;
	border-radius: var(--ht-radius);
	overflow: hidden;
	background: var(--ht-card);
	border: 1px solid var(--ht-line);
	transition: box-shadow .2s ease, transform .2s ease;
	text-decoration: none;
	color: inherit;
}

.ht-card:hover {
	box-shadow: 0 6px 24px rgba(26, 26, 24, .1);
	transform: translateY(-2px);
}

.ht-card__thumb {
	position: relative;
	aspect-ratio: 4 / 3;
	background: #eee;
	overflow: hidden;
}

.ht-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
}

.ht-card:hover .ht-card__thumb img {
	transform: scale(1.04);
}

.ht-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 3px 10px;
	border-radius: 4px;
	background: rgba(26, 26, 24, .7);
	color: #fff;
	font-size: 11px;
	letter-spacing: .5px;
}

.ht-card__body {
	padding: 14px 16px 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.ht-card__title {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.45;
	color: var(--ht-ink);
}

.ht-card__spec {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin: auto 0 0;
	font-size: 13px;
	color: var(--ht-muted);
}

.ht-card__spec span::before {
	content: '';
	display: inline-block;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: var(--ht-line);
	margin-right: 6px;
	vertical-align: middle;
}

.ht-card__spec span:first-child::before {
	display: none;
}

/* =============================================================
   11. 服务详情
   ============================================================= */

.ht-service-price {
	display: inline-block;
	margin: 0 0 20px;
	padding: 10px 18px;
	border-radius: 8px;
	background: rgba(201, 118, 47, .1);
	color: var(--ht-accent);
	font-size: 20px;
	font-weight: 600;
}

.ht-includes {
	margin: 24px 0;
	padding: 20px 24px;
	border-radius: var(--ht-radius);
	background: var(--ht-bg);
	border: 1px solid var(--ht-line);
}

.ht-includes h3 {
	margin: 0 0 14px;
	font-size: 16px;
	font-weight: 600;
	color: var(--ht-ink);
}

.ht-includes ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
}

@media (min-width: 600px) {
	.ht-includes ul {
		grid-template-columns: 1fr 1fr;
	}
}

.ht-includes li {
	position: relative;
	padding-left: 22px;
	font-size: 14px;
	line-height: 1.7;
	color: var(--ht-ink);
}

.ht-includes li::before {
	content: '';
	position: absolute;
	left: 4px;
	top: 9px;
	width: 6px;
	height: 10px;
	border-right: 2px solid var(--ht-primary);
	border-bottom: 2px solid var(--ht-primary);
	transform: rotate(40deg);
}

/* =============================================================
   12. 空状态
   ============================================================= */

.ht-empty {
	padding: 60px 20px;
	text-align: center;
	color: var(--ht-muted);
	font-size: 15px;
}

/* =============================================================
   13. 分页
   ============================================================= */

.ht-pager {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin: 32px 0;
	flex-wrap: wrap;
}

.ht-pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border-radius: 8px;
	border: 1px solid var(--ht-line);
	background: #fff;
	color: var(--ht-muted);
	font-size: 14px;
	text-decoration: none;
}

.ht-pager .page-numbers.current,
.ht-pager .page-numbers:hover {
	background: var(--ht-primary);
	border-color: var(--ht-primary);
	color: #fff;
}
