/* ════════════════════════════════════════════════════════
   tour-card.css — 共用行程卡片樣式
   適用於：travel/{area}、travel/{nation}/all-itineraries、collection 頁面
   ════════════════════════════════════════════════════════ */

/* ── 卡片 Grid 容器 ── */
.card-grid {
	display: flex;
	flex-direction: column;
	gap: 30px;
	margin-bottom: 60px;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding: 0;
}

/* 4日行程專用 - 讓卡片更大 */
.card-grid-premium {
	grid-template-columns: repeat(2, 1fr);
}

/* ── 行程卡片主體 ── */
.tour-card {
	background: linear-gradient(180deg, var(--gray-800) 0%, var(--gray-900) 100%);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	transition: transform 0.4s ease, box-shadow 0.4s ease;
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: row;
	position: relative;
	border: 1px solid var(--gray-700);
	gap: 24px;
}

.tour-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
	border-color: var(--gold-primary);
	color: inherit;
	text-decoration: none;
}

/* ── 圖片框（寬度 25%，高度隨文字內容延伸） ── */
.card-img-box {
	flex: 0 0 25%;
	overflow: hidden;
	position: relative;
	align-self: stretch;
}

.card-img-box img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.tour-card:hover .card-img-box img {
	transform: scale(1.08);
}

/* 圖片無資料時的佔位 */
.no-image-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--gray-800), var(--gray-900));
	border: 1px dashed var(--gray-600);
	color: var(--gold-primary);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 2px;
}

/* ── 圖片疊層元素 ── */
.card-img-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		160deg,
		rgba(0, 0, 0, 0.15) 0%,
		rgba(0, 0, 0, 0.05) 35%,
		rgba(0, 0, 0, 0.55) 100%
	);
	pointer-events: none;
	z-index: 1;
}

.card-img-sub-en {
	position: absolute;
	bottom: 14px;
	left: 0;
	right: 0;
	text-align: center;
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.55rem;
	letter-spacing: 2px;
	text-transform: uppercase;
	z-index: 2;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
	padding: 0 6px;
	line-height: 1.3;
}

/* ── 精選推薦徽章（左上角） ── */
.badge-recommend {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 10;
	background: var(--gray-900);
	color: var(--gold-primary);
	padding: 6px 12px;
	font-size: 11px;
	font-weight: 700;
	border-radius: 4px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	border: 1px solid var(--gold-primary);
}

/* ── 天數徽章（右上角） ── */
.badge-days {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 10;
	background: var(--gold-primary);
	color: var(--black-pure);
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 700;
	border-radius: 20px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	letter-spacing: 1px;
}

/* ── 內容區 ── */
.card-content {
	flex: 1;
	padding: 18px 20px 18px 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	min-width: 0;
	overflow: hidden;
}

/* ── 上方內容容器 ── */
.card-content-top {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* ── 標籤行 ── */
.card-tag-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-width: 0;
}

/* 標籤群組容器：inline-block 自然流排（桌面版不使用 flex） */
.card-tag-list {
	flex: 0 1 auto;
	min-width: 0;
}

.card-tag {
	color: var(--gold-primary);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 1.5px;
	margin-bottom: 0;
	display: inline-block;
	white-space: nowrap;
	margin-right: 4px;
}

.card-product-type {
	flex-shrink: 0;
	color: var(--gold-primary);
	border: 1px solid var(--gold-primary);
	font-size: 13px;
	font-weight: 600;
	padding: 2px 10px;
	border-radius: 20px;
	letter-spacing: 0.5px;
	white-space: nowrap;
	opacity: 0.9;
}

/* ── 標題 ── */
.product-card-title-wrap {
	max-width: 100%;
	overflow: hidden;
	margin-bottom: 0;
	flex: 0 0 auto;
}

.product-card-title {
	font-family: 'Noto Sans TC', sans-serif;
	font-size: 26px;
	font-weight: 700;
	margin: 0;
	color: #F5F0E1;
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}

/* ── 描述文字 ── */
.card-desc {
	font-size: 15px;
	color: #F5F0E1;
	line-height: 1.6;
	margin-bottom: 8px;
	flex: 1;
}

/* ── 底部資訊條 ── */
.card-info-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	padding-top: 10px;
	margin-top: auto;
	gap: 12px;
}

.card-info-left {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	color: #F5F0E1;
	font-size: 1.1rem;
}

.card-info-item {
	display: flex;
	align-items: center;
	gap: 4px;
}

.card-info-item i {
	color: var(--gold-primary);
	font-size: 0.8rem;
}

.card-info-sep {
	color: var(--gray-600);
	font-size: 0.85rem;
}

.card-price-section {
	display: flex;
	align-items: baseline;
	gap: 4px;
	flex-shrink: 0;
}

.card-price-label {
	color: var(--gray-400);
	font-size: 0.82rem;
	letter-spacing: 0.5px;
}

/* 出發日期：桌面版隱藏（已移入 card-price-section，僅手機版顯示） */
.card-nearest-departure {
	display: none;
}

/* NT$ 前綴（桌面版與數字同樣樣式） */
.card-price-nt {
	color: var(--gold-primary);
	font-size: 1.8rem;
	font-weight: 800;
	letter-spacing: -0.5px;
	font-family: 'Noto Sans TC', sans-serif;
}

/* card-price-row：桌面版透明容器，讓 NT$/數字/起 同行顯示 */
.card-price-row {
	display: contents;
}

.card-price-num {
	color: var(--gold-primary);
	font-size: 1.8rem;
	font-weight: 800;
	letter-spacing: -0.5px;
	font-family: 'Noto Sans TC', sans-serif;
}

.card-price-suffix {
	color: var(--gold-primary);
	font-size: 0.85rem;
	font-weight: 600;
}

/* ── 舊式 footer / 按鈕（保留兼容性） ── */
.card-footer {
	border-top: 1px solid var(--gray-700);
	padding: 16px 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.price-label {
	font-size: 12px;
	color: var(--gray-400);
}

.price-num {
	font-size: 20px;
	color: var(--gold-primary);
	font-weight: 700;
	font-family: 'Noto Sans TC', sans-serif;
}

.btn-arrow {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--gray-800);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--gray-300);
	transition: 0.3s;
}

.tour-card:hover .btn-arrow {
	background: var(--gold-primary);
	color: var(--black-pure);
}

/* ════════════════════════════════════════════════════════
   行動版（≤768px）
   ════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
	.card-grid {
		padding: 0;
		gap: 20px;
	}

	.tour-card {
		height: auto;
		border-radius: 8px;
		gap: 0;
	}

	.card-img-box {
		display: none;
	}

	/* 改為 flex-start，讓內容自然堆疊；無摘要時不會有多餘空間 */
	.card-content {
		padding: 14px 16px;
		justify-content: flex-start;
		border: 1px solid var(--gold-primary);
		border-radius: 8px;
	}

	.card-content-top {
		gap: 4px;
	}

	/* ── 標題列：顯示 hashtags + 產品型態徽章 ── */
	.card-tag-row {
		display: flex !important;
		align-items: center;
		flex-wrap: wrap;
		gap: 4px;
		margin-bottom: 2px;
	}

	/* ── 標籤文字：Regular 11px，金色實底膠囊 + 黑色文字 ── */
	.card-tag {
		display: inline-block !important;
		font-family: 'Noto Sans TC', sans-serif;
		font-weight: 400;
		font-size: 11px;
		letter-spacing: 0.5px;
		overflow: visible;
		text-overflow: unset;
		white-space: normal;
		color: #000 !important;
		background: var(--gold-primary);
		padding: 2px 8px;
		border-radius: 12px;
		flex: none;
	}

	/* ── 產品型態徽章：Regular 11px，金色實底膠囊 + 黑色文字 ── */
	.card-product-type {
		font-family: 'Noto Sans TC', sans-serif;
		font-weight: 400;
		font-size: 11px;
		color: #000 !important;
		background: var(--gold-primary);
		border-color: transparent;
	}

	.product-card-title-wrap {
		max-width: 100%;
		overflow: visible;
		margin-bottom: 2px;
	}

	/* ── 主標題：Noto Sans TC Bold 19px，奶油色 ── */
	.product-card-title {
		font-family: 'Noto Sans TC', sans-serif;
		font-weight: 700;
		font-size: 19px;
		line-height: 1.3;
		margin: 0;
		overflow: visible;
		text-overflow: unset;
		white-space: normal;
		color: #faf0c8 !important;
	}

	/* ── 摘要：Noto Sans TC Light 14px，奶油色，換行不截斷 ── */
	.card-desc {
		display: block !important;
		font-family: 'Noto Sans TC', sans-serif;
		font-weight: 300;
		font-size: 14px;
		line-height: 1.5;
		margin-bottom: 4px;
		color: #faf0c8 !important;
		white-space: normal;
		overflow: visible;
		text-overflow: unset;
		flex: none;
	}

	/* ── 最近出發日期：手機版靠左顯示（在 card-info-left 內），奶油色 13px ── */
	.card-nearest-departure {
		display: block !important;
		font-family: 'Noto Sans TC', sans-serif;
		font-weight: 300;
		font-size: 13px;
		color: #faf0c8;
		margin: 2px 0 0;
		line-height: 1.4;
	}

	/* 移除舊式 card-footer 分隔線 */
	.card-footer {
		border-top: none;
		padding-top: 4px;
		margin-top: auto;
		justify-content: flex-end;
	}

	/* ── 資訊條行動版：左側資訊 + 右側售價，無分隔線，底部對齊（售價對齊最近日期） ── */
	.card-info-bar {
		border-top: none;
		padding-top: 8px;
		margin-top: 6px;
		justify-content: space-between;
		align-items: flex-end;
		gap: 8px;
	}

	/* ── 分隔線「|」手機版隱藏 ── */
	.card-info-sep {
		display: none;
	}

	/* ── 左側資訊（地點、天數、出發日期）：直排，Noto Sans TC Medium 14px，奶油色 ── */
	.card-info-left {
		display: flex !important;
		flex-direction: column;
		align-items: flex-start;
		font-family: 'Noto Sans TC', sans-serif;
		font-weight: 500;
		font-size: 14px;
		color: #faf0c8;
		flex-shrink: 1;
		min-width: 0;
		gap: 3px;
	}

	.card-info-item {
		font-family: 'Noto Sans TC', sans-serif;
		font-weight: 500;
		font-size: 14px;
		gap: 3px;
	}

	/* ── Icon 大小：15px ── */
	.card-info-item i {
		font-size: 15px;
		color: var(--gold-primary);
	}

	/* ── 右側售價區塊：欄排版（售價緊貼 NT$ 46,800 起），左側切齊 ── */
	.card-price-section {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		flex-shrink: 0;
	}

	/* ── 售價標籤：Noto Sans TC Light 12px，金色，緊貼 NT$ 上方 2px ── */
	.card-price-label {
		font-family: 'Noto Sans TC', sans-serif;
		font-weight: 300;
		font-size: 12px;
		color: var(--gold-primary);
		letter-spacing: 0;
		display: block;
		margin-bottom: -12px;
		line-height: 1;
	}

	/* ── 價格行容器：NT$ + 數字 + 起 同行 ── */
	.card-price-row {
		display: flex;
		align-items: baseline;
		gap: 1px;
	}

	/* ── NT$：Noto Sans TC Medium 13px，金色 ── */
	.card-price-nt {
		font-family: 'Noto Sans TC', sans-serif;
		font-weight: 500;
		font-size: 13px;
		color: var(--gold-primary);
		letter-spacing: normal;
		margin-left: -2px;
	}

	/* ── 價格數字：Noto Sans TC Bold 21px，奶油色 ── */
	.card-price-num {
		font-family: 'Noto Sans TC', sans-serif;
		font-weight: 700;
		font-size: 21px;
		color: #faf0c8;
		letter-spacing: normal;
	}

	/* ── 起：Noto Sans TC Light 13px，金色 ── */
	.card-price-suffix {
		font-family: 'Noto Sans TC', sans-serif;
		font-weight: 300;
		font-size: 13px;
		color: var(--gold-primary);
	}

	/* 金額文字（舊版相容） */
	.price-label {
		font-size: 10px;
	}

	.price-num {
		font-size: 1.05rem;
	}

	/* 隱藏右下角箭頭 */
	.card-arrow,
	.btn-arrow {
		display: none !important;
	}

	.badge-recommend {
		top: 8px;
		left: 8px;
		font-size: 8px;
		padding: 3px 7px;
	}

	.badge-days {
		top: 8px;
		right: 8px;
		font-size: 8px;
		padding: 3px 7px;
	}
}
