/* GDS Catalog Block — style.css */
.gds-catalog-block {
	padding: 60px 24px;
	background-color: #ffffff;
}

/* Header */
.gds-catalog__header {
	max-width: 1200px;
	margin: 0 auto 40px;
	text-align: center;
}

.gds-catalog__header .gds-catalog__heading,
.gds-catalog__header h2 {
	color: #01533e;
	font-size: 40px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	margin-top: 0;
	margin-bottom: 24px;
}

.gds-catalog__header .gds-catalog__description,
.gds-catalog__header p {
	color: #4d4d4f !important;
	font-size: 20px !important;
	font-weight: 400;
	line-height: 1.4 !important;
	text-align: center;
	max-width: 793px;
	margin: 0 auto !important;
}

.gds-catalog__header .gds-catalog__collections-heading,
.gds-catalog__header h3 {
	color: #01533e;
	font-size: clamp(1.25rem, 2vw, 1.75rem);
	margin-top: 40px;
	margin-bottom: 8px;
}

/* Manufacturer tabs */
.gds-catalog__tabs {
	max-width: fit-content;
	margin: 0 auto -30px;
	display: flex;
	gap: 0;
	background-color: #ffffff;
	border: 1px solid #e0e1e1;
	border-radius: 10px;
	padding: 9px 8px;
	box-shadow: 0 4px 12px rgba(37, 36, 36, 0.08);
	position: relative;
	z-index: 2;
}

.gds-manufacturer-tab {
	padding: 17px 30px 15px;
	border: none;
	border-radius: 10px;
	background-color: transparent;
	color: #000000;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

.gds-manufacturer-tab:hover {
	background-color: rgba(1, 83, 62, 0.08);
}

.gds-manufacturer-tab.is-active,
.gds-manufacturer-tab[aria-selected="true"] {
	background-color: #01533e;
	color: #ffffff;
}

/* Manufacturer info panel (inside .gds-catalog__manufacturer-section) */
.gds-catalog__mfr-info {
	margin: 0 0 34px;
	text-align: center;
}

.gds-catalog__mfr-name {
	color: #01533e;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 24px;
	text-align: center;
}

.gds-catalog__mfr-description {
	color: #4d4d4f;
	font-size: 1rem;
	line-height: 1.5;
	margin: 0;
	max-width: 875px;
	text-align: center;
	display: inline-block;
}

/* Manufacturer section — single grey card wrapping mfr-info + grid */
.gds-catalog__manufacturer-section {
	max-width: 1372px;
	margin: 0 auto 32px;
	background-color: #f9fafb;
	border: 1px solid #e0e1e1;
	border-radius: 20px;
	padding: 63px 42px 29px;
}

/* Door grid — subgrid rows so all cards align by image / name / description / button */
.gds-catalog__grid {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	grid-auto-rows: minmax(0, auto);
	gap: 0 24px;
}

/* Door card */
.gds-door-card {
	display: grid;
	grid-template-rows: subgrid;
	grid-row: span 4;
	margin-bottom: 24px;
	background-color: #ffffff;
	border: 1px solid #e6e6e6;
	border-radius: 10px;
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}

.gds-door-card:hover {
	box-shadow: 0 4px 12px rgba(37, 36, 36, 0.08);
}

.gds-door-card__image {
	grid-row: 1 / 2;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-bottom: 1px solid #f1f2f2;
}

.gds-door-card__image img {
	display: block;
	position: static;
	opacity: 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gds-door-card__info {
	grid-row: 2 / 5;
	display: grid;
	grid-template-rows: subgrid;
	gap: 0;
	padding: 14px 21px 24px;
	flex: 1;
}

.gds-door-card__name {
	color: #01533e;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.556;
	margin: 0;
}

.gds-door-card__description {
	color: #4d4d4f !important;
	font-size: 14px !important;
	line-height: 1.43 !important;
	margin: 0 !important;
	margin-top: 8px !important;
}

/* "View Details" button — Primary/Green outline */
.gds-door-card__btn {
	display: block;
	width: 100%;
	margin-top: 20px;
	padding: 10px 0;
	box-sizing: border-box;
	background-color: #ffffff;
	color: #00523d;
	border: 1px solid #01533e;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.5;
	cursor: pointer;
	text-align: center;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.gds-door-card__btn:hover,
.gds-door-card__btn:focus {
	background-color: #01533e;
	color: #ffffff;
}

/* Hide filtered cards */
.gds-door-card[hidden] {
	display: none !important;
}

/* Specialist CTA button — below the catalog grid */
.gds-catalog__specialist-cta {
	max-width: 1200px;
	margin: 32px auto 0;
	text-align: center;
}

.gds-catalog__specialist-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 13px 26px;
	height: 46px;
	background-color: #ca463d;
	color: #ffffff;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.257;
	text-decoration: none;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.gds-catalog__specialist-btn:hover {
	background-color: #b33a32;
	color: #ffffff;
}

/* ------------------------------------------------------------------ */
/* Modal dialog                                                        */
/* ------------------------------------------------------------------ */
.gds-door-modal {
	position: fixed;
	inset: 0;
	margin: auto;
	border: none;
	border-radius: 12px;
	padding: 0;
	max-width: 511px;
	width: 100%;
	max-height: 90vh;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.20);
	overflow-y: auto;
}

/* Prevent dialog from showing in block editor */
[data-type="gds/catalog"] .gds-door-modal,
[data-type="gds/catalog"] dialog {
	display: none !important;
}

.gds-door-modal::backdrop {
	background-color: rgba(0, 0, 0, 0.50);
}

.gds-modal__inner {
	display: flex;
	flex-direction: column;
	position: relative;
	border-radius: 12px;
	background-color: #ffffff;
}

.gds-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 10;
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #333333;
	padding: 4px 8px;
	border-radius: 4px;
	transition: background-color 0.15s ease;
}

.gds-modal__close:hover {
	background-color: rgba(0, 0, 0, 0.08);
}

/* Header — title + description above the carousel */
.gds-modal__header {
	padding: 15px 25px 12px;
}

/* Carousel */
.gds-modal__carousel {
	position: relative;
	background-color: #f5f5f5;
	aspect-ratio: 461 / 288;
	border-radius: 10px;
	overflow: hidden;
	margin: 0 25px;
}

.gds-modal__carousel-track {
	width: 100%;
	height: 100%;
}

.gds-modal__carousel-img {
	display: block;
	position: static;
	opacity: 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gds-modal__carousel-prev,
.gds-modal__carousel-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background-color: #ffffff;
	border: 1px solid #e5e7e7;
	border-radius: 4px;
	width: 36px;
	height: 36px;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gds-modal__carousel-prev { left: 8px; }
.gds-modal__carousel-next { right: 8px; }

/* Carousel counter badge — "1 / 3" */
.gds-modal__carousel-counter {
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	background-color: rgba(0, 0, 0, 0.50);
	color: #ffffff;
	font-size: 0.875rem;
	font-weight: 500;
	padding: 4px 12px;
	border-radius: 100px;
	pointer-events: none;
	white-space: nowrap;
}

.gds-modal__title {
	color: #01533e;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.333;
	margin: 0 0 8px;
}

.gds-modal__description {
	color: var(--Neutral-Charcoal, #4d4d4f);
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: 24px;
	margin: 0;
}

/* Details panel — key features + disclaimer + CTAs below carousel */
.gds-modal__details {
	padding: 20px 25px 28px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* Key Features */
.gds-modal__features-heading {
	color: #01533e;
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 8px;
}

.gds-modal__features-list {
	margin: 0;
	padding-left: 20px;
}

.gds-modal__features-list li {
	color: #4d4d4f;
	font-size: 1rem;
	line-height: 1.5;
	margin-bottom: 4px;
}

/* Divider */
.gds-modal__divider {
	border: none;
	border-top: 1px solid #dbdddd;
	margin: 4px 0;
}

/* Disclaimer */
.gds-modal__disclaimer {
	color: #4d4d4f;
	font-size: 0.8125rem;
	line-height: 1.5;
	margin: 0;
}

.gds-modal__disclaimer-link {
	background: none;
	border: none;
	padding: 0;
	color: #01533e;
	font-size: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* CTA buttons */
.gds-modal__cta-group {
	display: flex;
	flex-direction: row;
	gap: 17px;
	padding-top: 8px;
}

/* "Request a Quote" — Primary/Green filled */
.gds-modal__cta-primary {
	flex: 1;
	padding: 10px 20px;
	background-color: #01533e;
	color: #ffffff;
	border: none;
	border-radius: 6px;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	text-align: center;
	transition: background-color 0.2s ease;
	text-decoration: none;
}

.gds-modal__cta-primary:hover {
	background-color: #013d2e;
}

/* "Call for Details" — Primary/Green outline with phone icon */
.gds-modal__phone-icon {
	color: #129b48;
	flex-shrink: 0;
	vertical-align: middle;
}

.gds-modal__cta-secondary {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	background-color: #ffffff;
	color: #01533e;
	border: 1px solid #01533e;
	border-radius: 6px;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.gds-modal__cta-secondary:hover {
	background-color: #01533e;
	color: #ffffff;
}

/* Responsive grid columns */
@media (max-width: 1100px) {
	.gds-catalog__grid {
		grid-template-columns: repeat( 3, 1fr );
	}
}

@media (max-width: 768px) {
	.gds-catalog__grid {
		grid-template-columns: repeat( 2, 1fr );
	}

	/* Fix top padding — tab bar (76px) overlaps 30px = 46px clearance + gap */
	.gds-catalog__manufacturer-section {
		padding: 56px 24px 29px;
	}
}

@media (max-width: 480px) {
	.gds-catalog-block {
		padding-top: 40px;
		padding-bottom: 40px;
	}

	/* Heading: Figma mobile = 30px / 1.2 */
	.gds-catalog__header .gds-catalog__heading,
	.gds-catalog__header h2 {
		font-size: 30px;
	}

	/* Description: Figma mobile = 18px */
	.gds-catalog__header .gds-catalog__description,
	.gds-catalog__header p {
		font-size: 18px !important;
	}

	/* Single column, 16px gap (per Figma Frame 45905) */
	.gds-catalog__grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	/* Full-bleed gray section: break out of block padding (24px) + entry-content padding (12px) */
	.gds-catalog__manufacturer-section {
		margin-left: -36px;
		margin-right: -36px;
		width: calc( 100% + 72px );
		border-radius: 0;
		border-left: none;
		border-right: none;
		/* 42px horizontal → card at 42px from viewport edge (Figma: x:43 in 390px frame) */
		padding: 56px 42px 29px;
	}
}

/* Mobile */
@media (max-width: 600px) {
	.gds-modal__header {
		padding: 16px 16px 12px;
	}

	.gds-modal__details {
		padding: 16px 16px 24px;
	}

	.gds-modal__carousel {
		margin: 0 16px;
	}

	.gds-door-modal {
		inset: 48px 23px auto;  /* 48px from top, 23px from each side — matches Figma mobile frame */
		margin: 0 auto;
		max-width: 100%;
		width: calc(100% - 46px);
		border-radius: 12px;
		max-height: calc(100vh - 48px - 24px);
	}

	.gds-modal__cta-group {
		flex-direction: column;
		gap: 16px;
	}

	.gds-modal__cta-primary,
	.gds-modal__cta-secondary {
		width: 100%;
		text-align: center;
		justify-content: center;
	}
}
