/* ============================================================
   Sales Popup — Style C (ivory card, midnight ink, brass gold).
   Two layouts from one markup: centred modal, or a card docked
   bottom-right. Falls back to literal token values so the popup
   still looks right if the theme's tokens.css is absent.
   ============================================================ */

.dctd-pop {
	--pop-ink: var(--ink1, #071B2E);
	--pop-surface: var(--atmo1, #FFFCF6);
	--pop-canvas: var(--atmo0, #F6F1E8);
	--pop-border: var(--sand, #D8CDBC);
	--pop-body: var(--taupe, #6F685F);
	--pop-muted: var(--stone, #B8AEA1);
	--pop-gold: var(--gold, #B88A3B);
	--pop-gold-dk: var(--gold-dk, #9F7430);
	--pop-cream: var(--cream, #F7F0E6);
	--pop-font: var(--sans, "Montserrat", "Be Vietnam Pro", Helvetica, Arial, sans-serif);

	position: fixed;
	z-index: 99990;
	font-family: var(--pop-font);
}

.dctd-pop[hidden] { display: none; }

/* ---- scrim (centred layout only) ---- */
.dctd-pop-scrim {
	position: fixed;
	inset: 0;
	background: rgba(3, 17, 31, .62);
	opacity: 0;
	transition: opacity .35s ease;
}

.dctd-pop-card {
	position: relative;
	background: var(--pop-surface);
	border: 1px solid var(--pop-border);
	box-shadow: 0 24px 64px rgba(7, 27, 46, .25);
	overflow: hidden;
}

/* ---- close ---- */
.dctd-pop-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 3;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid rgba(247, 240, 230, .5);
	border-radius: 50%;
	background: rgba(3, 17, 31, .55);
	color: var(--pop-cream);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
}
.dctd-pop-close:hover,
.dctd-pop-close:focus-visible {
	background: var(--pop-cream);
	color: var(--pop-ink);
	border-color: var(--pop-cream);
	outline: none;
}

/* ---- the clickable card ---- */
.dctd-pop-link {
	display: block;
	text-decoration: none;
	color: inherit;
}
.dctd-pop-media {
	display: block;
	overflow: hidden;
	background: var(--pop-canvas);
}
.dctd-pop-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .8s ease;
}
.dctd-pop-link:hover .dctd-pop-media img { transform: scale(1.05); }

.dctd-pop-body {
	display: block;
	padding: 22px 24px 24px;
}

.dctd-pop-badge {
	display: inline-block;
	margin-bottom: 10px;
	padding: 5px 11px;
	background: var(--pop-gold);
	color: var(--pop-cream);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.dctd-pop-title {
	display: block;
	color: var(--pop-ink);
	font-size: 23px;
	font-weight: 600;
	line-height: 1.22;
	letter-spacing: -.02em;
}

.dctd-pop-meta {
	display: block;
	margin-top: 7px;
	color: var(--pop-gold-dk);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .13em;
	text-transform: uppercase;
}

.dctd-pop-text {
	display: block;
	margin-top: 12px;
	color: var(--pop-body);
	font-size: 14.5px;
	line-height: 1.65;
}

.dctd-pop-price {
	display: block;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--pop-border);
	color: var(--pop-ink);
	font-size: 27px;
	font-weight: 600;
	letter-spacing: -.01em;
}
.dctd-pop-price small {
	font-size: 12.5px;
	font-weight: 400;
	color: var(--pop-body);
}
.dctd-pop-price s {
	margin-left: 8px;
	color: var(--pop-muted);
	font-size: 14px;
	font-weight: 400;
}

.dctd-pop-cta {
	display: block;
	margin-top: 18px;
	padding: 14px 18px;
	background: var(--pop-ink);
	border: 1px solid var(--pop-ink);
	color: var(--pop-cream);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	text-align: center;
	transition: background .25s, border-color .25s;
}
.dctd-pop-link:hover .dctd-pop-cta {
	background: var(--pop-gold);
	border-color: var(--pop-gold);
}

/* ============================================================
   CENTRED MODAL
   ============================================================ */
.dctd-pop--center {
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.dctd-pop--center .dctd-pop-card {
	width: 100%;
	max-width: 420px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	opacity: 0;
	transform: translateY(18px) scale(.97);
	transition: opacity .4s ease, transform .4s cubic-bezier(.16, 1, .3, 1);
}
.dctd-pop--center .dctd-pop-media { height: 200px; }

.dctd-pop--center.is-open .dctd-pop-scrim { opacity: 1; }
.dctd-pop--center.is-open .dctd-pop-card {
	opacity: 1;
	transform: none;
}

/* ============================================================
   BOTTOM-DOCKED CARD
   ============================================================ */
.dctd-pop--bottom {
	right: 24px;
	bottom: 24px;
	width: 360px;
	max-width: calc(100vw - 32px);
}
.dctd-pop--bottom .dctd-pop-card {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity .4s ease, transform .45s cubic-bezier(.16, 1, .3, 1);
}
.dctd-pop--bottom.is-open .dctd-pop-card {
	opacity: 1;
	transform: none;
}
.dctd-pop--bottom .dctd-pop-media { height: 150px; }
.dctd-pop--bottom .dctd-pop-body { padding: 18px 20px 20px; }
.dctd-pop--bottom .dctd-pop-title { font-size: 20px; }
.dctd-pop--bottom .dctd-pop-price { font-size: 23px; }
.dctd-pop--bottom .dctd-pop-text {
	font-size: 14px;
	/* Keep the docked card compact — it competes with page content. */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ============================================================
   MOBILE — both layouts become a full-width sheet at the bottom
   ============================================================ */
@media (max-width: 600px) {
	.dctd-pop--bottom,
	.dctd-pop--center {
		inset: auto 0 0 0;
		width: auto;
		max-width: none;
		display: block;
		padding: 0;
	}
	.dctd-pop--center .dctd-pop-card,
	.dctd-pop--bottom .dctd-pop-card {
		max-width: none;
		max-height: 88vh;
		border-left: 0;
		border-right: 0;
		border-bottom: 0;
	}
	.dctd-pop--center .dctd-pop-media,
	.dctd-pop--bottom .dctd-pop-media { height: 132px; }
	.dctd-pop--center .dctd-pop-scrim { display: none; }
	.dctd-pop-body { padding: 16px 18px 18px; }
	.dctd-pop-title { font-size: 19px; }
	.dctd-pop-price { font-size: 22px; margin-top: 12px; padding-top: 11px; }
	.dctd-pop-cta { margin-top: 14px; padding: 13px 16px; }
	.dctd-pop-text { display: none; }
}

/* ============================================================
   Reduced motion — appear without sliding
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	.dctd-pop-scrim,
	.dctd-pop-card,
	.dctd-pop-media img {
		transition: none !important;
	}
	.dctd-pop--center .dctd-pop-card,
	.dctd-pop--bottom .dctd-pop-card {
		transform: none;
	}
}
