/* ----------------------------------------------------------------------------
 * djb-tigerair-campaign-portable 精簡頁首樣式（獨立檔）
 *
 * 用途：活動頁本身、以及「來自 /djb-tigerair/」流量在站內其它頁面延續精簡頁首時
 * 共用同一份樣式；page-tigerair-campaign.css 不再重複此區段。
 *
 * 啟用條件：body 帶有 .tigerair-campaign-minimal-header（活動頁 / ?tigerair=true PDP /
 * 活動流 UI 下的 cart·checkout）。
 * -------------------------------------------------------------------------- */

body.tigerair-campaign-minimal-header #masthead,
body.tigerair-campaign-minimal-header header#masthead,
body.tigerair-campaign-minimal-header header.site-header,
body.tigerair-campaign-minimal-header .site-header,
body.tigerair-campaign-minimal-header .ast-above-header,
body.tigerair-campaign-minimal-header .ast-below-header,
body.tigerair-campaign-minimal-header .ast-mobile-popup-drawer,
body.tigerair-campaign-minimal-header .ast-sticky-header,
body.tigerair-campaign-minimal-header #ast-mobile-popup,
body.tigerair-campaign-minimal-header .ast-mobile-header-wrap {
	display: none !important;
}

.djb-tport-mini-header {
	position: sticky;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999;
	background: #fff;
	border-bottom: 1px solid #e9eef3;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.djb-tport-mini-header-inner {
	max-width: 1320px;
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

/* 双 LOGO 容器：自营 + 「×」 + 合作伙伴，整体置左（两图统一视觉高度） */
.djb-tport-mini-logos {
	--djb-tport-logo-h: clamp(32px, 4vw, 40px);
	display: flex;
	align-items: center;
	gap: clamp(8px, 1.6vw, 14px);
	min-width: 0;
}

.djb-tport-mini-logo {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: #01488c;
	flex-shrink: 0;
	max-height: var(--djb-tport-logo-h);
}

/* 自营 140×71、合作 244×91：仅比例不同，高度一致 */
.djb-tport-mini-logo--self img,
.djb-tport-mini-logo--partner img {
	height: var(--djb-tport-logo-h);
	max-height: var(--djb-tport-logo-h);
	width: auto;
	max-width: min(42vw, 200px);
	display: block;
	object-fit: contain;
	object-position: center;
}

.djb-tport-mini-logo--self img {
	aspect-ratio: 140 / 71;
}

.djb-tport-mini-logo--partner img {
	aspect-ratio: 244 / 91;
}

/* 旧浏览器 fallback：不支持 aspect-ratio 时用 max-height 对齐 */
@supports not (aspect-ratio: 1) {
	.djb-tport-mini-logo--self img,
	.djb-tport-mini-logo--partner img {
		height: auto;
		max-height: var(--djb-tport-logo-h);
		aspect-ratio: auto;
	}
}

.djb-tport-mini-logo-divider {
	font-size: clamp(14px, 1.8vw, 18px);
	font-weight: 400;
	color: #c5d0dc;
	line-height: 1;
	user-select: none;
	flex-shrink: 0;
}

.djb-tport-mini-logo-text {
	font-size: 18px;
	font-weight: 700;
	color: #01488c;
}

.djb-tport-mini-header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* 用戶中心：與主題 header 移動端 .header-btn-login + .header-account-icon 一致 */
.djb-tport-mini-account,
.djb-tport-mini-cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.djb-tport-mini-account {
	width: 36px;
	height: 36px;
	min-width: 36px;
	border-radius: 12px;
	background: #01488c;
	color: #fff;
}

.djb-tport-mini-account:hover,
.djb-tport-mini-account:focus {
	background: #013a73;
	color: #fff;
	transform: translateY(-1px);
}

.djb-tport-mini-account-icon {
	width: 22px;
	height: 22px;
	display: block;
	flex-shrink: 0;
}

.djb-tport-mini-cart {
	width: 40px;
	height: 40px;
	border-radius: 999px;
	color: #01488c;
}

.djb-tport-mini-cart:hover,
.djb-tport-mini-cart:focus {
	background: #f3f7fb;
	color: #01488c;
}

.djb-tport-mini-cart svg {
	width: 24px;
	height: 24px;
	display: block;
}

.djb-tport-mini-cart-count {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: #ffb200;
	color: #01488c;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	box-shadow: 0 0 0 2px #fff;
	box-sizing: border-box;
	pointer-events: none;
}

.djb-tport-mini-cart-count[data-count="0"] {
	display: none;
}

@media (max-width: 768px) {
	.djb-tport-mini-header-inner {
		padding: 10px 12px;
		gap: 8px;
	}

	.djb-tport-mini-logos {
		--djb-tport-logo-h: 32px;
		gap: 8px;
	}

	.djb-tport-mini-cart {
		width: 38px;
		height: 38px;
	}
}

/* 极窄屏：兜底按钮换成图标式，避免挤压 LOGO */
@media (max-width: 480px) {
	.djb-tport-mini-logos {
		--djb-tport-logo-h: 28px;
	}

	.djb-tport-mini-logo-divider {
		font-size: 14px;
	}

}

/* 超窄屏：只显示自营 LOGO + 合作伙伴 LOGO */
@media (max-width: 380px) {
	.djb-tport-mini-logo-divider {
		display: none;
	}
}

/* 虎航獨立菜單用戶（與 tigerair-campaign-minimal-header 相同判斷）：空購物車頁隱藏「回到商店」連結 */
body.djb-tport-hide-cart-return-to-shop.woocommerce-cart p.return-to-shop,
body.djb-tport-hide-cart-return-to-shop.woocommerce-cart .return-to-shop {
	display: none !important;
}
