.track-page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background:
		radial-gradient(ellipse 70% 50% at 10% 0%, rgba(212, 164, 90, 0.12), transparent 55%),
		linear-gradient(180deg, #0b1f33 0%, #07111c 22%, #f4f7fa 22%);
}

.track-page.is-map-view {
	background: #07111c;
}

/* Tracking-only top bar (no site nav) */
.track-topbar {
	flex-shrink: 0;
	background: #0b1f33;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.track-topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 72px;
	padding: 12px 0;
}

.track-topbar .brand-name {
	color: #fff;
}

.track-topbar .brand-tag {
	color: #d4a45a;
}

.track-topbar-aside {
	display: flex;
	align-items: center;
	gap: 18px;
}

.track-topbar-label {
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.45);
}

.track-back {
	color: rgba(255, 255, 255, 0.88);
	font-size: 0.88rem;
	font-weight: 700;
	white-space: nowrap;
}

.track-back:hover {
	color: #d4a45a;
}

.track-main {
	padding: 36px 0 72px;
	flex: 1;
}

.track-card {
	background: #fff;
	padding: 28px 26px;
	box-shadow: 0 18px 48px rgba(7, 17, 28, 0.1);
	border: 1px solid #e4ebf2;
}

.track-query-bar {
	margin-bottom: 14px;
}

.track-query-bar-solo {
	margin-bottom: 20px;
}

.track-query-bar .track-form {
	width: 100%;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
	flex-direction: row;
}

.track-query-bar .track-input {
	padding: 16px 18px;
	font-size: 0.95rem;
}

.track-query-bar .track-btn {
	padding: 0 24px;
	min-height: 52px;
}

/* Middle workspace: map + info — same content width as homepage */
.track-workspace {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	padding: 18px 0 24px;
}

.track-workspace-inner {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	width: min(1180px, calc(100% - 40px));
	margin: 0 auto;
}

.map-stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 560px;
	height: min(72vh, 760px);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
	background: #d7e2ec;
}

.map-full {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background: #d7e2ec;
}

.map-brand {
	position: absolute;
	top: 16px;
	right: 16px;
	bottom: auto;
	z-index: 500;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	background: rgba(11, 31, 51, 0.92);
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: 0 10px 28px rgba(7, 17, 28, 0.28);
	backdrop-filter: blur(8px);
	color: #fff;
	text-decoration: none;
}

.map-brand img {
	width: 28px;
	height: 28px;
	flex-shrink: 0;
}

.map-brand-name {
	display: block;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: 0.01em;
}

.map-brand-tag {
	display: block;
	font-size: 0.62rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #d4a45a;
	margin-top: 2px;
}

.map-brand:hover {
	color: #fff;
	border-color: rgba(212, 164, 90, 0.55);
}

.map-brand:hover .map-brand-name {
	color: #d4a45a;
}

.info-float {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 500;
	width: min(360px, calc(100% - 32px));
	max-height: calc(100% - 32px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 16px 16px 14px;
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid rgba(228, 235, 242, 0.95);
	box-shadow: 0 14px 40px rgba(7, 17, 28, 0.18);
	backdrop-filter: blur(10px);
	scrollbar-width: thin;
	scrollbar-color: #c9d5e0 transparent;
}

.info-float::-webkit-scrollbar {
	width: 6px;
}

.info-float::-webkit-scrollbar-thumb {
	background: #c9d5e0;
	border-radius: 999px;
}

.info-float-top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px 10px;
	margin-bottom: 12px;
}

.status-pill {
	display: inline-flex;
	align-items: center;
	min-width: 0;
	max-width: 100%;
	padding: 5px 10px;
	border-radius: 999px;
	background: #fff4e4;
	color: #9a6b24;
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.3;
	white-space: normal;
	overflow-wrap: anywhere;
}

.map-progress {
	flex-shrink: 0;
	font-size: 0.8rem;
	font-weight: 800;
	color: #b8873d;
}

.info-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 10px 14px;
}

.info-row {
	min-width: 0;
}

.info-label {
	display: block;
	font-size: 0.68rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #8aa0b3;
	font-weight: 700;
	margin-bottom: 2px;
}

.info-row strong {
	display: block;
	font-size: 0.9rem;
	font-weight: 700;
	color: #0b1f33;
	line-height: 1.4;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.info-address {
	white-space: pre-line;
}

.info-no {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 1.15rem !important;
	font-weight: 600 !important;
	letter-spacing: 0.01em;
}

.live-bar {
	margin-top: 12px;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 10px;
	background: #f4f8fb;
	border: 1px solid #e0eaf2;
	font-size: 0.78rem;
	color: #3d566c;
}

.live-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #d4a45a;
	box-shadow: 0 0 0 0 rgba(212, 164, 90, 0.55);
	animation: pulse 1.6s ease infinite;
	flex-shrink: 0;
}

@keyframes pulse {
	0% { box-shadow: 0 0 0 0 rgba(212, 164, 90, 0.55); }
	70% { box-shadow: 0 0 0 8px rgba(212, 164, 90, 0); }
	100% { box-shadow: 0 0 0 0 rgba(212, 164, 90, 0); }
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.track-page .site-footer {
	flex-shrink: 0;
	margin-top: auto;
}

.leaflet-marker-ship,
.leaflet-truck,
.leaflet-pin {
	background: transparent !important;
	border: 0 !important;
}

.leaflet-truck {
	overflow: visible !important;
}

.truck-wrap {
	position: relative;
	width: 44px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	will-change: transform;
	filter: drop-shadow(0 4px 8px rgba(7, 17, 28, 0.45));
	pointer-events: none;
}

.truck-body {
	position: relative;
	z-index: 1;
}

.truck-wrap.is-arrived .truck-svg {
	animation: truck-bounce 0.7s ease;
}

@keyframes truck-bounce {
	0%, 100% { transform: translateY(0) scale(1); }
	40% { transform: translateY(-2px) scale(1.08); }
	70% { transform: translateY(0) scale(0.97); }
}

.truck-glow {
	position: absolute;
	left: 50%;
	top: 60%;
	width: 28px;
	height: 28px;
	margin: -14px 0 0 -14px;
	border-radius: 50%;
	background: rgba(245, 196, 81, 0.4);
	animation: truck-pulse 1.4s ease-out infinite;
	pointer-events: none;
}

.truck-svg {
	width: 44px;
	height: 26px;
	display: block;
	overflow: visible;
	animation: truck-roll 0.45s linear infinite;
}

@keyframes truck-pulse {
	0% { transform: scale(0.75); opacity: 0.75; }
	100% { transform: scale(2.1); opacity: 0; }
}

@keyframes truck-roll {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-2px); }
}

.route-pin {
	width: 28px;
	height: 28px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
	box-shadow: 0 4px 12px rgba(7, 17, 28, 0.3);
}

.route-pin span {
	transform: rotate(45deg);
	font-size: 11px;
	font-weight: 800;
	color: #fff;
	line-height: 1;
}

.route-pin-start {
	background: #0b1f33;
}

.route-pin-end {
	background: #d4a45a;
}

.hub-marker {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #0b1f33;
	border: 2px solid #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	transition: background 0.3s ease, transform 0.3s ease;
}

.hub-marker.is-passed {
	background: #8aa0b3;
}

.hub-marker.is-current {
	background: #d4a45a;
	transform: scale(1.2);
	box-shadow: 0 0 0 4px rgba(212, 164, 90, 0.28);
}

.hub-marker.is-pending {
	background: #c5ced6;
	opacity: 0.55;
	box-shadow: none;
}

.leaflet-control-zoom {
	border: 0 !important;
	box-shadow: 0 8px 20px rgba(7, 17, 28, 0.18) !important;
}

/* Short desktop screens: keep the map tall enough for the floating card */
@media (min-width: 721px) and (max-height: 760px) {
	.map-stage {
		min-height: 520px;
		height: calc(100vh - 190px);
	}
}

@media (max-width: 980px) {
	.track-topbar-label {
		display: none;
	}

	.track-workspace {
		padding: 14px 0 18px;
	}

	.map-stage {
		min-height: 520px;
		height: 64vh;
	}
}

/* Mobile: details card stacked above the map, fully expanded */
@media (max-width: 720px) {
	.track-topbar-inner {
		min-height: 60px;
		padding: 10px 0;
		gap: 10px;
	}

	.track-topbar .brand {
		gap: 8px;
		min-width: 0;
	}

	.track-topbar .brand img {
		width: 34px;
		height: 34px;
	}

	.track-topbar .brand-name {
		font-size: 1.25rem;
	}

	.track-topbar .brand-tag {
		font-size: 0.6rem;
	}

	.track-back {
		font-size: 0.8rem;
	}

	.track-workspace-inner {
		width: calc(100% - 24px);
	}

	.track-query-bar {
		margin-bottom: 12px;
	}

	.track-query-bar .track-form {
		flex-direction: row;
	}

	.track-query-bar .track-input {
		padding: 14px 14px;
		font-size: 0.9rem;
	}

	.track-query-bar .track-btn {
		padding: 0 16px;
		min-height: 48px;
		font-size: 0.82rem;
	}

	.map-stage {
		display: flex;
		flex-direction: column;
		height: auto;
		min-height: 0;
		overflow: visible;
		border: 0;
		box-shadow: none;
		background: transparent;
	}

	.info-float {
		position: static;
		order: -1;
		width: auto;
		max-height: none;
		overflow: visible;
		margin-bottom: 12px;
		padding: 16px 14px 14px;
		background: #fff;
		backdrop-filter: none;
		box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
	}

	.info-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.info-row-wide {
		grid-column: 1 / -1;
	}

	.map-full {
		position: relative;
		inset: auto;
		height: 56vh;
		min-height: 320px;
		max-height: 520px;
		border: 1px solid rgba(255, 255, 255, 0.08);
		box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
	}

	/* Brand already shown in the top bar; avoid covering the map */
	.map-brand {
		display: none;
	}
}

@media (max-width: 360px) {
	.info-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.track-topbar .brand-tag {
		display: none;
	}
}
