/* =========================================================================
   Attractive Holidays — A&K-inspired luxury tour cards
   Matches Traveler's REAL markup: .services-item.grid vs .services-item.list
   (verified against the live theme — do not guess generic Traveler class
   names here, this theme build uses its own non-standard structure).
   ========================================================================= */
:root {
	--ath-ink:    #1c1916;
	--ath-gold:   #b08d57;
	--ath-ivory:  #f5f1eb;
	--ath-offer:  #c14728;   /* injected "featured" pill */
	--ath-sans:   "Montserrat", system-ui, sans-serif;
	--ath-muted:  #6f6a63;
	--ath-line:   #e5dfd5;
	--ath-ease:   cubic-bezier(.22, .61, .36, 1);
}

body.ath-lux-cards .services-item {
	container-type: inline-size;
	container-name: ath-card;
}

body.ath-lux-cards .service-list-wrapper .swiper-slide { height: auto; }
body.ath-lux-cards .services-item { height: 100%; }

/* ── Card shell (both modes) — square corners on every side, no exceptions ── */
body.ath-lux-cards .services-item,
body.ath-lux-cards .services-item > .item,
body.ath-lux-cards .services-item .featured-image,
body.ath-lux-cards .services-item .featured-image img {
	border-radius: 0 !important;
}
body.ath-lux-cards .services-item > .item {
	height: 100%;
	border: 1px solid var(--ath-line) !important;
	overflow: hidden;
	background: var(--ath-ivory);
	box-shadow: 0 1px 3px rgba(28, 25, 22, .06), 0 12px 32px -16px rgba(28, 25, 22, .35);
	transition: box-shadow .4s var(--ath-ease), border-color .4s var(--ath-ease);
}
body.ath-lux-cards .services-item > .item:hover {
	border-color: var(--ath-gold) !important;
	box-shadow: 0 2px 6px rgba(28, 25, 22, .08), 0 24px 48px -20px rgba(28, 25, 22, .48);
}

/* ── Image ──────────────────────────────────────────────────────────────── */
body.ath-lux-cards .services-item .featured-image {
	position: relative;
	overflow: hidden;
	background: var(--ath-ink);
}
body.ath-lux-cards .services-item .featured-image img.image-feature,
body.ath-lux-cards .services-item .featured-image img.img-responsive.wp-post-image {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	transition: transform 1.1s var(--ath-ease);
}
body.ath-lux-cards .services-item > .item:hover .featured-image img { transform: scale(1.05); }
body.ath-lux-cards .services-item .service-avatar { display: none !important; }

body.ath-lux-cards .services-item .featured-image::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 40%;
	background: linear-gradient(to top, rgba(20, 17, 14, .45), transparent);
	pointer-events: none;
}

/* Traveler's own badge — captured by JS then hidden (we render .ath-card-tags instead) */
body.ath-lux-cards .services-item.grid .st-tag-feature-sale,
body.ath-lux-cards .services-item.list .service-tag.bestseller { display: none !important; }

body.ath-lux-cards .services-item .service-add-wishlist {
	z-index: 3;
	background: rgba(255, 255, 255, .85) !important;
	backdrop-filter: blur(6px);
	border-radius: 50% !important;
}

/* ── Text shared by both modes ─────────────────────────────────────────── */
body.ath-lux-cards .services-item .sub-title,
body.ath-lux-cards .services-item .reviews { display: none !important; }

body.ath-lux-cards .services-item h3.title {
	margin: 0 0 6px !important;
	font-size: 19px !important;
	font-weight: 700 !important;
	line-height: 1.28 !important;
	letter-spacing: -.01em;
	color: var(--ath-ink) !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(19px * 1.28 * 2);
}
body.ath-lux-cards .services-item h3.title a { color: inherit !important; text-decoration: none !important; }
body.ath-lux-cards .services-item h3.title a:hover { color: var(--ath-gold) !important; }

/* ── Injected: category + featured tags ───────────────────────────────── */
.ath-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; }
.ath-card-tag {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-family: var(--ath-sans);
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: .11em;
	text-transform: uppercase;
	line-height: 1.4;
	white-space: nowrap;
}
.ath-card-tag--cat   { background: rgba(28, 25, 22, .10); color: var(--ath-ink); }
.ath-card-tag--offer { background: var(--ath-offer); color: #fff; }

/* ── Description (list: native .service-excerpt · grid: injected) ───────── */
body.ath-lux-cards .services-item .service-excerpt,
.ath-card-desc {
	color: var(--ath-muted) !important;
	font-size: 13px;
	line-height: 1.55;
	margin: 0 0 8px !important;
	font-family: var(--ath-sans);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ── Injected fact rows: Itinerary / Duration / Best time / Price ────────
   Each on its own "Label :  value" line, no bullets, no table borders.
   `min-width: 0` on every flex item in this chain is required: without it,
   a nowrap value (itinerary) forces its flex-item ancestors to grow past
   the card's padding instead of shrinking — that's what deforms the card. ── */
.ath-card-facts {
	display: flex;
	flex-direction: column;
	margin-top: auto;
	min-width: 0;
	max-width: 100%;
}
.ath-card-row {
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
	font-family: var(--ath-sans);
	font-size: 12.5px;
	line-height: 1.5;
	margin: 0 0 5px;
}
.ath-card-row__label {
	font-weight: 700;
	color: var(--ath-ink);
	white-space: nowrap;
}
.ath-card-row__value {
	color: var(--ath-muted);
	margin-left: 4px;
}
/* Itinerary: value wraps to its own line below the label, truncated with ellipsis */
.ath-card-row--itinerary { margin-bottom: 8px; min-width: 0; max-width: 100%; }
.ath-card-row--itinerary .ath-card-row__value {
	display: block;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
	margin-left: 0;
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
/* Price row: label+value on the left, CTA button on the right, same baseline */
.ath-card-row--price {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 8px;
	padding-top: 12px;
	min-width: 0;
}
.ath-card-row--price > div {
	display: flex;
	align-items: center;
	min-width: 70px;
	max-width: 100%;
	flex: 1 1 auto;
	overflow: hidden;
}
.ath-card-row--price .ath-card-row__label {
	flex-shrink: 0;
}
.ath-card-row__value--price {
	font-weight: 700;
	color: var(--ath-ink);
	font-size: 15px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 40px;
	flex-shrink: 1;
}
.ath-card-cta {
	flex-shrink: 0 !important;
}

/* ── CTA button (injected .ath-card-cta) ─────────────────────────────────── */
.ath-card-cta {
	display: inline-flex !important;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	gap: 6px;
	white-space: nowrap;
	padding: 10px 20px !important;
	border-radius: 999px !important;
	border: none !important;
	background: var(--ath-ink) !important;
	color: #fff !important;
	font-family: var(--ath-sans);
	font-size: 12.5px !important;
	font-weight: 600 !important;
	letter-spacing: .05em;
	text-decoration: none !important;
	transition: background .3s var(--ath-ease);
}
.ath-card-cta::after { content: "→"; font-size: 15px; font-weight: 300; }
.ath-card-cta:hover { background: var(--ath-gold) !important; color: #fff !important; }

/* ── Container queries: fluid font scaling ───────────────────────────────── */
@container ath-card (max-width: 280px) {
	h3.title { font-size: 15px !important; min-height: calc(15px * 1.28 * 2); }
	.ath-card-row--itinerary { display: none; }
}
@container ath-card (min-width: 440px) {
	h3.title { font-size: 22px !important; min-height: calc(22px * 1.28 * 2); }
}

/* ══════════════════════════════════════════════════════════════════════════
   GRID MODE — .services-item.grid
   ══════════════════════════════════════════════════════════════════════════ */
body.ath-lux-cards .services-item.grid > .item {
	display: flex;
	flex-direction: column;
	min-height: 520px;
}
body.ath-lux-cards .services-item.grid .featured-image {
	flex: 0 0 240px !important;
	aspect-ratio: auto !important;
	height: 240px !important;
	max-height: 240px !important;
}
body.ath-lux-cards .services-item.grid .content-item {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-width: 0;
	box-sizing: border-box;
	padding: 18px 20px 14px !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   LIST MODE — .services-item.list
   Traveler splits .content-item into content-item-left / content-item-right
   SIDE BY SIDE; we force a single stacked column to match the reference.
   ══════════════════════════════════════════════════════════════════════════ */
body.ath-lux-cards .services-item.list > .item {
	display: flex !important;
	flex-direction: row !important;
	min-height: 320px;
}
body.ath-lux-cards .services-item.list .featured-image {
	width: 40%;
	min-width: 190px;
	max-width: 420px;
	align-self: stretch;
	flex-shrink: 0;
}
body.ath-lux-cards .services-item.list .content-item {
	display: flex !important;
	flex-direction: column !important;
	flex: 1 1 auto;
	min-width: 0;
	box-sizing: border-box;
	align-self: stretch;
	padding: 18px 24px 16px !important;
	overflow: hidden;
}
body.ath-lux-cards .services-item.list .content-item-left,
body.ath-lux-cards .services-item.list .content-item-right {
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	box-sizing: border-box;
	flex: none !important;
}
body.ath-lux-cards .services-item.list .content-item-right-wrap {
	display: flex !important;
	flex-direction: column !important;
	justify-content: flex-start !important;
	height: auto !important;
	width: 100% !important;
	min-width: 0 !important;
	box-sizing: border-box;
	text-align: left !important;
}
body.ath-lux-cards .services-item.list h3.title {
	font-size: 22px !important;
	min-height: calc(22px * 1.28 * 2);
}

@media (max-width: 575px) {
	body.ath-lux-cards .services-item.list > .item { flex-direction: column !important; height: auto !important; }
	body.ath-lux-cards .services-item.list .content-item { height: auto !important; overflow: visible; }
	body.ath-lux-cards .services-item.list .featured-image {
		width: 100%;
		max-width: none;
		height: auto;
		aspect-ratio: 16 / 10;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.ath-lux-cards .services-item .featured-image img { transition: none; }
	body.ath-lux-cards .services-item > .item:hover .featured-image img { transform: none; }
}
