/*
======================================
    Coupons Page Styles
======================================
*/

.coupons-page {
	padding: 60px 0 80px;
}

.coupons-inner {
	width: 1320px;
	max-width: 100%;
	margin: 0 auto;
	padding: 0 30px;
	box-sizing: border-box;
}

.coupons-title {
	font-size: 32px;
	font-weight: 900;
	color: #101828;
	text-align: center;
	margin: 0 0 12px 0;
	line-height: 1.3;
}

.coupons-subtitle {
	font-size: 15px;
	color: #888;
	text-align: center;
	margin: 0 0 32px 0;
}

/* 筛选区域 */
.coupons-filters {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
	margin-bottom: 40px;
	flex-wrap: wrap;
}

.coupons-filter-btn {
	padding: 10px 24px;
	border-radius: 8px;
	border: 1px solid #ddd;
	background: #ffffff;
	color: #333;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.3s;
	white-space: nowrap;
}

.coupons-filter-btn:hover {
	border-color: #01488c;
	color: #01488c;
}

.coupons-filter-btn.active {
	background: #01488c;
	color: #ffffff;
	border-color: #01488c;
}

/* 下拉选择 */
.coupons-dropdown {
	position: relative;
}

.coupons-dropdown-btn {
	padding: 10px 20px;
	border-radius: 8px;
	border: 1px solid #ddd;
	background: #ffffff;
	color: #333;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.3s;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 6px;
}

.coupons-dropdown-btn:hover {
	border-color: #01488c;
	color: #01488c;
}

.coupons-dropdown-btn svg {
	transition: transform 0.3s;
}

.coupons-dropdown.open .coupons-dropdown-btn svg {
	transform: rotate(180deg);
}

.coupons-dropdown.has-selection .coupons-dropdown-btn {
	border-color: #01488c;
	color: #01488c;
}

.coupons-dropdown-menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: 150px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
	z-index: 100;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: all 0.25s;
	overflow: hidden;
}

.coupons-dropdown.open .coupons-dropdown-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.coupons-dropdown-item {
	padding: 10px 18px;
	font-size: 14px;
	color: #333;
	cursor: pointer;
	transition: background 0.2s;
	white-space: nowrap;
}

.coupons-dropdown-item:hover {
	background: #f2f8ff;
	color: #01488c;
}

.coupons-dropdown-item.selected {
	color: #01488c;
	font-weight: 600;
}

/* 卡片网格：负边距抵消 inner 的 padding，使网格实际宽度为 1320px，一行可排 3 张 410px + 2 个 45px 间距 */
.coupons-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 45px;
	margin-left: -30px;
	margin-right: -30px;
}

/* 单张卡片 */
.coupon-card {
	width: 410px;
	flex-shrink: 0;
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid #eee;
	transition: all 0.3s;
}

.coupon-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	transform: translateY(-4px);
}

.coupon-card.coupon-hidden {
	display: none;
}

.coupon-card.coupon-filtered {
	display: none;
}

.coupon-card-img {
	width: 100%;
	height: 280px;
	overflow: hidden;
	background: #f5f5f5;
}

.coupon-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.coupon-card-info {
	padding: 16px 18px;
}

.coupon-card-title {
	font-size: 15px;
	font-weight: 600;
	color: #1a1a2e;
	margin: 0 0 6px 0;
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.coupon-card-date {
	font-size: 12px;
	color: #aaa;
	margin: 0;
}

/* 加载更多 */
.coupons-load-more-wrap {
	text-align: center;
	margin-top: 50px;
}

.coupons-load-more-btn {
	padding: 14px 48px;
	border-radius: 14px;
	border: 2px solid #01488c;
	background: #ffffff;
	color: #01488c;
	font-size: 15px;
	cursor: pointer;
	transition: all 0.3s;
}

.coupons-load-more-btn:hover {
	border-color: #01488c;
	color: #01488c;
	box-shadow: 0 0 16px rgba(1, 72, 140, 0.45);
}

.coupons-load-more-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.coupons-load-more-btn.loading {
	pointer-events: none;
	color: #aaa;
}

/*
======================================
    Responsive
======================================
*/

@media (max-width: 1400px) {
	.coupon-card {
		width: calc(33.333% - 30px);
		flex-shrink: 0;
	}
	.coupons-grid {
		gap: 30px;
	}
}

@media (max-width: 992px) {
	.coupons-page {
		padding: 40px 0 60px;
	}
	.coupons-grid {
		margin-left: 0;
		margin-right: 0;
		gap: 24px;
	}
	.coupons-title {
		font-size: 28px;
	}
	.coupon-card {
		width: calc(50% - 12px);
	}
	.coupon-card-img {
		height: 240px;
	}
}

@media (max-width: 768px) {
	.coupons-page {
		padding: 30px 0 50px;
	}
	.coupons-inner {
		padding: 0 20px;
	}
	.coupons-grid {
		margin-left: 0;
		margin-right: 0;
		gap: 20px;
	}
	.coupons-title {
		font-size: 24px;
	}
	.coupons-subtitle {
		font-size: 13px;
		margin-bottom: 24px;
	}
	.coupons-filters {
		gap: 8px;
		margin-bottom: 30px;
	}
	.coupons-filter-btn,
	.coupons-dropdown-btn {
		padding: 8px 18px;
		font-size: 13px;
	}
	.coupon-card {
		width: calc(50% - 10px);
	}
	.coupon-card-img {
		height: 200px;
	}
	.coupon-card-title {
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	.coupons-page {
		padding: 24px 0 40px;
	}
	.coupons-inner {
		padding: 0 16px;
	}
	.coupons-grid {
		margin-left: 0;
		margin-right: 0;
		gap: 16px;
	}
	.coupons-title {
		font-size: 22px;
	}
	.coupon-card {
		width: 100%;
	}
	.coupon-card-img {
		height: 220px;
	}
	.coupons-load-more-btn {
		padding: 12px 36px;
		font-size: 14px;
	}
}
