/* Catalog Vault & Lead Gate - frontend.
   Six card styles share one set of tokens. Re-brand by overriding the custom properties
   on .cvlg-wrap (cards) and .cvlg-modal (form) from your theme. */

.cvlg-wrap,
.cvlg-modal {
	--cvlg-ink: #17212b;
	--cvlg-muted: #5c6975;
	--cvlg-grout: #d7dde2;
	--cvlg-porcelain: #eceff1;
	--cvlg-glaze: #1d3fa8;
	--cvlg-error: #b3261e;
}

.cvlg-wrap {
	--card-bg: #fff;
	--card-ink: var(--cvlg-ink);
	--card-muted: var(--cvlg-muted);
	--card-line: var(--cvlg-grout);
	--card-accent: var(--cvlg-glaze);
	--btn-bg: var(--cvlg-ink);
	--btn-fg: #fff;
	--btn-hover: var(--cvlg-glaze);
	margin: 0 0 2rem;
	color: var(--card-ink);
}

.cvlg-empty {
	padding: 1rem 0;
	color: #5c6975;
}

/* ---------- Identity bar ("Not Name? Switch user") ---------- */
.cvlg-identity {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	margin: 0 0 14px;
	font-size: 0.85rem;
	color: var(--card-muted);
}

.cvlg-identity[hidden] {
	display: none;
}

.cvlg-linkbtn {
	padding: 0;
	border: 0;
	background: none;
	color: var(--cvlg-glaze);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.cvlg-linkbtn:hover {
	text-decoration: none;
}

/* ---------- Grid ---------- */
.cvlg-gallery {
	display: grid;
	grid-template-columns: repeat(var(--cvlg-cols, 3), minmax(0, 1fr));
	gap: 28px;
	align-items: stretch;
}

@media (max-width: 960px) {
	.cvlg-gallery {
		grid-template-columns: repeat(min(var(--cvlg-cols, 3), 2), minmax(0, 1fr));
	}
}

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

/* ---------- Card: shared ---------- */
.cvlg-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--card-bg);
	color: var(--card-ink);
	overflow: hidden;
}

.cvlg-card__media {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--cvlg-porcelain);
}

.cvlg-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: top center;
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cvlg-card:hover .cvlg-card__media img {
	transform: scale(1.06);
}

.cvlg-card__placeholder {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(var(--card-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--card-line) 1px, transparent 1px);
	background-size: 36px 36px;
}

.cvlg-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 18px 18px 20px;
	min-width: 0;
}

.cvlg-card__title {
	margin: 0 0 4px;
	font-size: 1.15rem;
	font-weight: 650;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: inherit;
}

.cvlg-card__subtitle {
	margin: 0;
	font-size: 0.86rem;
	color: var(--card-muted);
}

.cvlg-card__excerpt {
	margin: 10px 0 0;
	font-size: 0.88rem;
	line-height: 1.5;
}

/* Badges: ribbon (styles 1, 4) and tag (styles 2, 3, 5, 6). */
.cvlg-ribbon {
	position: absolute;
	top: 16px;
	left: 0;
	z-index: 2;
	max-width: 85%;
	padding: 6px 22px 6px 12px;
	background: var(--card-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: 0.02em;
	clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 50%, 100% 100%, 0 100%);
}

.cvlg-tag {
	margin: 0 0 8px;
	font-size: 0.74rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--card-accent);
}

.cvlg-tag--float {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	max-width: calc(100% - 24px);
	margin: 0;
	padding: 4px 9px;
	background: rgba(255, 255, 255, 0.94);
	border-radius: 2px;
	color: var(--cvlg-ink);
}

/* ---------- Specs: key/value grid (<dl>) ---------- */
.cvlg-specgrid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 18px;
	margin: 14px 0 18px;
	padding: 0;
}

.cvlg-spec {
	min-width: 0;
	padding: 8px 0;
	border-top: 1px solid var(--card-line);
}

.cvlg-spec.is-wide {
	grid-column: 1 / -1;
}

.cvlg-specgrid dt {
	margin: 0 0 2px;
	font-size: 0.72rem;
	font-weight: 400;
	color: var(--card-muted);
}

.cvlg-specgrid dd {
	margin: 0;
	font-size: 0.85rem;
	font-weight: 600;
	overflow-wrap: anywhere;
}

/* ---------- Specs: table ---------- */
.cvlg-specs {
	width: 100%;
	margin: 14px 0 18px;
	border-collapse: collapse;
	border: 0;
	font-size: 0.82rem;
}

.cvlg-specs th,
.cvlg-specs td {
	padding: 7px 0;
	border: 0;
	border-top: 1px solid var(--card-line);
	background: transparent;
	text-align: left;
	vertical-align: top;
	line-height: 1.4;
}

.cvlg-specs th {
	width: 38%;
	padding-right: 12px;
	font-weight: 400;
	color: var(--card-muted);
}

.cvlg-specs td {
	font-weight: 500;
	color: inherit;
}

/* ---------- Buttons ---------- */
.cvlg-card__actions {
	display: grid;
	gap: 8px;
	margin-top: auto;
}

.cvlg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 11px 16px;
	border: 1px solid transparent;
	border-radius: 2px;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cvlg-btn--primary {
	background: var(--btn-bg);
	color: var(--btn-fg);
}

.cvlg-btn--primary:hover,
.cvlg-btn--primary:focus-visible {
	background: var(--btn-hover);
	color: var(--btn-fg);
}

.cvlg-btn--secondary {
	background: transparent;
	border-color: currentcolor;
	color: var(--card-ink);
}

.cvlg-btn--secondary:hover,
.cvlg-btn--secondary:focus-visible {
	background: var(--cvlg-porcelain);
	color: var(--cvlg-ink);
}

.cvlg-btn--block {
	display: flex;
	width: 100%;
}

.cvlg-btn[disabled] {
	opacity: 0.6;
	cursor: wait;
}

.cvlg-btn:focus-visible,
.cvlg-linkbtn:focus-visible,
.cvlg-flip-toggle:focus-visible,
.cvlg-acc summary:focus-visible,
.cvlg-modal__close:focus-visible,
.cvlg-field input:focus-visible {
	outline: 2px solid var(--cvlg-glaze);
	outline-offset: 2px;
}

/* =====================================================================
   Style 1 - Modern Corporate (default)
   ===================================================================== */
.cvlg-style-1 .cvlg-card {
	border: 1px solid var(--card-line);
	border-radius: 3px;
	box-shadow: 0 8px 26px -14px rgba(23, 33, 43, 0.35);
	transition: box-shadow 0.25s ease;
}

.cvlg-style-1 .cvlg-card:hover {
	box-shadow: 0 14px 32px -14px rgba(23, 33, 43, 0.45);
}

.cvlg-style-1 .cvlg-card__media {
	border-bottom: 1px solid var(--card-line);
}

/* =====================================================================
   Style 2 - Minimalist Clean
   ===================================================================== */
.cvlg-style-2 .cvlg-gallery {
	gap: 44px 32px;
}

.cvlg-style-2 .cvlg-card {
	background: transparent;
}

.cvlg-style-2 .cvlg-card__body {
	padding: 18px 0 0;
}

.cvlg-style-2 .cvlg-card__title {
	font-size: 1.25rem;
	font-weight: 500;
	letter-spacing: -0.015em;
}

.cvlg-style-2 .cvlg-tag {
	color: var(--card-muted);
}

.cvlg-style-2 .cvlg-btn--primary {
	background: transparent;
	border-color: var(--cvlg-ink);
	color: var(--cvlg-ink);
}

.cvlg-style-2 .cvlg-btn--primary:hover,
.cvlg-style-2 .cvlg-btn--primary:focus-visible {
	background: var(--cvlg-ink);
	color: #fff;
}

.cvlg-style-2 .cvlg-btn--secondary {
	border-color: var(--card-line);
	color: var(--card-muted);
}

/* =====================================================================
   Style 3 - Compact list / horizontal row
   ===================================================================== */
.cvlg-style-3 .cvlg-gallery {
	gap: 16px;
}

.cvlg-style-3 .cvlg-card {
	flex-direction: row;
	border: 1px solid var(--card-line);
	border-radius: 3px;
}

.cvlg-style-3 .cvlg-card__media {
	flex: 0 0 210px;
	aspect-ratio: auto;
	min-height: 210px;
	border-right: 1px solid var(--card-line);
}

.cvlg-style-3 .cvlg-card__media img {
	position: absolute;
	inset: 0;
}

.cvlg-style-3 .cvlg-card__body {
	padding: 16px 20px;
}

.cvlg-style-3 .cvlg-card__head {
	margin-bottom: 4px;
}

.cvlg-style-3 .cvlg-specgrid--inline {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 10px 0 14px;
}

.cvlg-style-3 .cvlg-card__actions {
	grid-auto-flow: column;
	grid-auto-columns: max-content;
	justify-content: start;
}

@media (max-width: 720px) {
	.cvlg-style-3 .cvlg-card {
		flex-direction: column;
	}

	.cvlg-style-3 .cvlg-card__media {
		flex-basis: auto;
		aspect-ratio: 16 / 10;
		min-height: 0;
		border-right: 0;
		border-bottom: 1px solid var(--card-line);
	}

	.cvlg-style-3 .cvlg-specgrid--inline {
		grid-template-columns: 1fr 1fr;
	}

	.cvlg-style-3 .cvlg-card__actions {
		grid-auto-flow: row;
		grid-auto-columns: auto;
	}
}

/* =====================================================================
   Style 4 - Dark elegance
   ===================================================================== */
.cvlg-style-4 {
	--card-bg: #1a1a1a;
	--card-ink: #f4f1ea;
	--card-muted: #a8a191;
	--card-line: #3a3a3a;
	--card-accent: #c9a24b;
	--btn-bg: #c9a24b;
	--btn-fg: #1a1a1a;
	--btn-hover: #ddb961;
}

.cvlg-style-4 .cvlg-card {
	border: 1px solid #2c2c2c;
	border-radius: 2px;
}

.cvlg-style-4 .cvlg-card__media {
	background: #111;
	border-bottom: 1px solid #2c2c2c;
}

.cvlg-style-4 .cvlg-ribbon {
	color: #1a1a1a;
}

.cvlg-style-4 .cvlg-card__title {
	color: #fff;
}

.cvlg-style-4 .cvlg-specs td {
	color: #fff;
}

.cvlg-style-4 .cvlg-btn--secondary {
	border-color: #c9a24b;
	color: #c9a24b;
}

.cvlg-style-4 .cvlg-btn--secondary:hover,
.cvlg-style-4 .cvlg-btn--secondary:focus-visible {
	background: rgba(201, 162, 75, 0.14);
	color: #ddb961;
}

.cvlg-style-4 .cvlg-card__placeholder {
	background-image:
		linear-gradient(#2c2c2c 1px, transparent 1px),
		linear-gradient(90deg, #2c2c2c 1px, transparent 1px);
}

.cvlg-style-4 .cvlg-identity {
	color: #a8a191;
}

/* =====================================================================
   Style 5 - Interactive overlay (specs slide up over the cover)
   ===================================================================== */
.cvlg-style-5 .cvlg-card {
	border: 0;
	border-radius: 3px;
	background: #0e141b;
}

.cvlg-style-5 .cvlg-card__media {
	aspect-ratio: 4 / 5;
}

.cvlg-style-5 .cvlg-card__caption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	padding: 56px 64px 16px 16px;
	background: linear-gradient(to top, rgba(14, 20, 27, 0.92) 25%, rgba(14, 20, 27, 0));
	color: #fff;
	transition: opacity 0.25s ease;
}

.cvlg-style-5 .cvlg-card__caption .cvlg-card__title {
	margin: 0;
	color: #fff;
	font-size: 1.05rem;
}

.cvlg-style-5 .cvlg-card__caption .cvlg-card__subtitle {
	color: rgba(255, 255, 255, 0.78);
}

.cvlg-flip-toggle {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--cvlg-ink);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: transform 0.3s ease;
}

.cvlg-style-5 .cvlg-card.is-open .cvlg-flip-toggle {
	transform: rotate(45deg);
}

.cvlg-drawer {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	flex-direction: column;
	padding: 20px 18px 64px;
	overflow-y: auto;
	background: rgba(14, 20, 27, 0.96);
	color: #fff;
	transform: translateY(101%);
	visibility: hidden;
	transition: transform 0.35s ease, visibility 0s linear 0.35s;
	--card-line: rgba(255, 255, 255, 0.18);
	--card-muted: rgba(255, 255, 255, 0.62);
	--card-ink: #fff;
	--btn-bg: #fff;
	--btn-fg: #0e141b;
	--btn-hover: #dfe6ff;
}

.cvlg-drawer__title {
	margin: 0 0 4px;
	font-size: 1.05rem;
	font-weight: 650;
	color: #fff;
}

.cvlg-drawer .cvlg-btn--secondary {
	border-color: rgba(255, 255, 255, 0.7);
	color: #fff;
}

.cvlg-drawer .cvlg-btn--secondary:hover,
.cvlg-drawer .cvlg-btn--secondary:focus-visible {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.cvlg-style-5 .cvlg-card.is-open .cvlg-drawer,
.cvlg-style-5 .cvlg-card:focus-within .cvlg-drawer {
	transform: none;
	visibility: visible;
	transition-delay: 0s;
}

.cvlg-style-5 .cvlg-card.is-open .cvlg-card__caption,
.cvlg-style-5 .cvlg-card:focus-within .cvlg-card__caption {
	opacity: 0;
}

@media (hover: hover) {
	.cvlg-style-5 .cvlg-card:hover .cvlg-drawer {
		transform: none;
		visibility: visible;
		transition-delay: 0s;
	}

	.cvlg-style-5 .cvlg-card:hover .cvlg-card__caption {
		opacity: 0;
	}

	.cvlg-style-5 .cvlg-card:hover .cvlg-card__media > img {
		transform: none;
	}
}

/* =====================================================================
   Style 6 - Compact card with accordion specs
   ===================================================================== */
.cvlg-style-6 .cvlg-gallery {
	align-items: start;
	gap: 20px;
}

@media (max-width: 960px) {
	.cvlg-style-6 .cvlg-gallery {
		grid-template-columns: repeat(min(var(--cvlg-cols, 4), 2), minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.cvlg-style-6 .cvlg-gallery {
		grid-template-columns: minmax(0, 1fr);
	}
}

.cvlg-style-6 .cvlg-card {
	border: 1px solid var(--card-line);
	border-radius: 3px;
}

.cvlg-style-6 .cvlg-card__media {
	aspect-ratio: 16 / 11;
}

.cvlg-style-6 .cvlg-card__body {
	padding: 14px 14px 16px;
}

/* Fixed title height keeps rows aligned whatever the title length. */
.cvlg-style-6 .cvlg-card__title {
	display: -webkit-box;
	min-height: 2.5em;
	margin: 0 0 2px;
	overflow: hidden;
	font-size: 1rem;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.cvlg-style-6 .cvlg-card__subtitle {
	min-height: 1.3em;
	font-size: 0.8rem;
}

.cvlg-acc {
	margin: 12px 0 14px;
	border-top: 1px solid var(--card-line);
	border-bottom: 1px solid var(--card-line);
}

.cvlg-acc summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 0;
	font-size: 0.85rem;
	font-weight: 600;
	list-style: none;
	cursor: pointer;
}

.cvlg-acc summary::-webkit-details-marker {
	display: none;
}

.cvlg-acc summary::after {
	content: '';
	width: 8px;
	height: 8px;
	border-right: 2px solid currentcolor;
	border-bottom: 2px solid currentcolor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}

.cvlg-acc[open] summary::after {
	transform: rotate(-135deg);
}

.cvlg-acc .cvlg-specs {
	margin: 0 0 8px;
}

.cvlg-style-6 .cvlg-card__actions {
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
}

@media (max-width: 400px) {
	.cvlg-style-6 .cvlg-card__actions {
		grid-auto-flow: row;
	}
}

/* ---------- Modal ---------- */
html.cvlg-lock {
	overflow: hidden;
}

.cvlg-modal[hidden] {
	display: none;
}

.cvlg-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.cvlg-modal.is-open {
	opacity: 1;
}

.cvlg-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 32, 0.55);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.cvlg-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 460px;
	max-height: calc(100vh - 32px);
	overflow: auto;
	background: #fff;
	border-radius: 2px;
	color: var(--cvlg-ink);
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
	transform: translateY(12px);
	transition: transform 0.25s ease;
}

.cvlg-modal.is-open .cvlg-modal__dialog {
	transform: none;
}

.cvlg-modal__dialog:focus {
	outline: none;
}

.cvlg-modal__head {
	padding: 28px 56px 22px 28px;
	background-color: var(--cvlg-ink);
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
	background-size: 22px 22px;
	color: #fff;
}

.cvlg-modal__head h2 {
	margin: 0;
	font-size: 1.4rem;
	font-weight: 650;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: #fff;
}

.cvlg-modal__catalog {
	margin: 6px 0 0;
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.78);
}

.cvlg-modal__catalog:empty {
	display: none;
}

.cvlg-modal__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.cvlg-modal__panel {
	padding: 24px 28px 28px;
}

.cvlg-modal__panel[hidden] {
	display: none;
}

.cvlg-modal .cvlg-btn--primary {
	background: var(--cvlg-ink);
	color: #fff;
}

.cvlg-modal .cvlg-btn--primary:hover,
.cvlg-modal .cvlg-btn--primary:focus-visible {
	background: var(--cvlg-glaze);
}

.cvlg-modal .cvlg-btn--secondary {
	border-color: var(--cvlg-ink);
	color: var(--cvlg-ink);
}

.cvlg-field {
	margin-bottom: 16px;
}

.cvlg-field label {
	display: block;
	margin-bottom: 5px;
	font-size: 0.85rem;
	font-weight: 600;
}

.cvlg-field input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 11px 12px;
	border: 1px solid #b7c0c8;
	border-radius: 2px;
	background: #fff;
	color: var(--cvlg-ink);
	font: inherit;
	font-size: 0.95rem;
	line-height: 1.3;
}

.cvlg-field input:focus {
	border-color: var(--cvlg-glaze);
}

.cvlg-field.has-error input {
	border-color: var(--cvlg-error);
}

.cvlg-field__error {
	display: block;
	margin-top: 4px;
	font-size: 0.8rem;
	color: var(--cvlg-error);
}

.cvlg-form-error {
	margin: 0 0 14px;
	font-size: 0.86rem;
	color: var(--cvlg-error);
}

.cvlg-form-error:empty {
	display: none;
}

.cvlg-privacy {
	margin: 12px 0 0;
	font-size: 0.78rem;
	line-height: 1.45;
	color: var(--cvlg-muted);
}

/* Honeypot: off-screen rather than display:none (some bots skip hidden fields). */
.cvlg-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.cvlg-success__title {
	margin: 0 0 8px;
	font-size: 1.05rem;
	font-weight: 650;
}

.cvlg-success__note {
	margin: 0 0 20px;
	font-size: 0.9rem;
	color: var(--cvlg-muted);
}

.cvlg-success__note a {
	color: var(--cvlg-glaze);
	font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
	.cvlg-card,
	.cvlg-card__media img,
	.cvlg-modal,
	.cvlg-modal__dialog,
	.cvlg-btn,
	.cvlg-drawer,
	.cvlg-flip-toggle,
	.cvlg-card__caption,
	.cvlg-acc summary::after {
		transition: none;
	}

	.cvlg-card:hover .cvlg-card__media img {
		transform: none;
	}
}
