/* 全局样式 */
:root {
	--primary-bg-color: #f5f5f5;
	--white-color: #ffffff;
	--primary-color: #2c5c74;
	--text-color: #333;
	--border-color: #eee;
	--price-color: #ff4d4f;
	--modal-overlay-bg: rgba(0, 0, 0, 0.5);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
	background-color: var(--primary-bg-color);
}

.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: var(--modal-overlay-bg);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
}

.modal-content {
	background-color: var(--white-color);
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	text-align: center;
}

.modal-content h4 {
	margin-top: 0;
	margin-bottom: 15px;
}

.modal-content input {
	width: 80%;
	padding: 8px;
	margin-bottom: 15px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.modal-buttons button {
	padding: 8px 15px;
	margin: 0 5px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.modal-buttons button:last-child {
	color: white;
}

.house-diy {
	display: flex;
	flex-direction: column;
	height: 100vh;
}

/* AR 展示区域样式 */
.ar-container {
	width: 100%;
	height: 40vh;
	background-color: #fff;
	overflow: hidden;
}

.web-view {
	width: 100%;
	height: 100%;
	border: none;
	display: block;
}

/* 顶部分类导航样式 */
.nav-scroll {
	background-color: var(--white-color);
	padding: 5px 0;
	border-bottom: 1px solid var(--border-color);
	position: sticky;
	top: 0;
	z-index: 100;
}

.nav-list {
	display: flex;
	overflow-x: auto;
	padding: 0 15px;
	white-space: nowrap;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE and Edge */
}

.nav-list::-webkit-scrollbar {
	display: none; /* Chrome, Safari and Opera */
}

.nav-item {
	position: relative;
	padding: 0 15px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.nav-text {
	font-size: 14px;
	color: #333;
}

.nav-item.active .nav-text {
	color: #1890ff;
}

.nav-line {
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 20px;
	height: 2px;
	background-color: #1890ff;
}

/* 商品展示区域样式 */
.goods-scroll {
	flex: 1;
	background-color: var(--white-color);
	overflow-y: auto;
	padding: 10px;
}

.goods-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	padding-bottom: 120px; /* 为底部按钮留出空间 */
}

.goods-item {
	position: relative;
	background-color: var(--white-color);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.goods-image {
	width: 100%;
	height: 120px;
	object-fit: cover;
}

.goods-info {
	padding: 8px;
}

.goods-name {
	font-size: 14px;
	color: #333;
	margin-bottom: 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.goods-price {
	font-size: 16px;
	color: #ff4d4f;
}

.price-symbol {
	font-size: 12px;
}

.price-unit {
	font-size: 12px;
	color: #999;
}

.goods-status {
	position: absolute;
	top: 5px;
	right: 5px;
	background-color: rgba(24, 144, 255, 0.9);
	color: #fff;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 12px;
}

/* 底部按钮样式 */
.bottom-buttons {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	display: flex;
	padding: 10px 15px;
	background-color: var(--white-color);
	border-top: 1px solid var(--border-color);
}

.btn {
	flex: 1;
	height: 40px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 500;
	margin: 0 5px;
	cursor: pointer;
	transition: all 0.3s;
}

.add-cart {
	background-color: var(--white-color);
	border: 1px solid var(--primary-color);
	color: var(--primary-color);
}

.go-buy {
	background-color: var(--primary-color);
	border: none;
	color: var(--white-color);
}

.btn:active {
	opacity: 0.8;
}

/* 方案总价显示样式 */
.total-price-section {
	position: fixed;
	bottom: 60px;
	left: 0;
	right: 0;
	padding: 10px 15px;
	background: var(--white-color);
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.1);
}

.total-price-section .total-label {
	font-size: 16px;
	color: var(--text-color);
}

.total-price-section .price {
	color: var(--price-color);
}

.total-price-section .price-symbol {
	font-size: 14px;
}

.total-price-section .price-value {
	font-size: 20px;
	font-weight: bold;
	margin-left: 2px;
}