/* =========================
   PRODUCTS SECTION OVERRIDE
   (eco / light editorial system)
========================= */

#solutions {
	background: #f3f5ef; /* soft eco paper tone */
	color: var(--body);
}

/* override global text colors inside section */
#solutions p,
#solutions li,
#solutions .product-desc,
#product-modal h4 {
	color: rgba(28, 28, 28, 0.75);
	font-size: 0.9rem;
	letter-spacing: normal;
	text-transform: none;
}

/* labels stay muted green */
#solutions .section-label,
#solutions .label {
	color: var(--accent);
}

#solutions .section-lead {
	font-size: clamp(1.2rem, 2.2vw, 2rem);
}

#solutions .clamp-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* =========================
   GRID (unchanged structure)
========================= */

#solutions .products-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 3.5rem;
	margin-top: 3rem;
}

/* =========================
   PRODUCT CARD (RESTRUCTURED)
   no side-by-side layout
========================= */

#solutions .product-item {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;

	background: rgba(255, 255, 255, 0.6);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: var(--radius);

	padding: 1.25rem;
	cursor: pointer;

	transition:
		transform 0.25s ease,
		box-shadow 0.25s ease;
}

#solutions .product-item:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow);
}

#solutions .product-content {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 0;
}

/* =========================
   IMAGE (NO LONGER DOMINANT)
========================= */

#solutions .product-image {
	width: 100%;
	height: 140px; /* controlled visual weight */
	overflow: hidden;
	border-radius: calc(var(--radius) - 6px);
	background: #e9ede6;
}

#solutions .product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* =========================
   TYPOGRAPHY
========================= */

#solutions .product-title {
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: -0.01em;
	text-transform: none;
	margin-bottom: 0.5rem;
}

#solutions .product-desc {
	font-size: 0.95rem;
	line-height: 1.6;
	margin-bottom: 0.25rem;
}

#solutions .product-desc strong {
	font-weight: inherit;
}

/* =========================
   BULLETS (lighter + tighter)
========================= */

#solutions .product-bullets {
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}

#solutions .product-bullets li {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;

	font-size: 0.9rem;
	line-height: 1.5;
	margin-bottom: 0.45rem;

	color: rgba(28, 28, 28, 0.75);
}

/* checkmark icon */
#solutions .product-bullets li::before {
	content: '✓';
	color: var(--accent);
	font-weight: 600;
	line-height: 1.2;
	flex: 0 0 auto;
	margin-top: 1px;
}

#product-modal ul {
	list-style: none;
	padding: 0;
	margin: 0.6rem 0 0.8rem;
}

#product-modal li {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;

	font-size: 0.9rem;
	line-height: 1.4;
	margin-bottom: 0.35rem;

	color: rgba(28, 28, 28, 0.75);
}

/* checkmark */
#product-modal li::before {
	content: '✓';
	color: var(--accent);
	font-weight: 600;
	flex: 0 0 auto;
	margin-top: 1px;
}

#product-modal .product-footer {
	display: flex;
	justify-content: space-between;
	align-items: baseline;

	margin-top: 0.75rem;
	gap: 1rem;
}

#product-modal .product-footer-options {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: nowrap;
}

#product-modal .price-selection {
	display: contents;
}

#product-modal .price-options-title {
	margin: 0;
	padding: 0;
}

#product-modal .product-footer-options .checkout-action {
	align-self: center;
	flex-wrap: nowrap;
}

#product-modal .product-footer-options #checkout-turnstile {
	flex: 0 1 300px;
	width: 300px;
	min-width: 200px;
}

#product-modal .checkout-action {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

#product-modal .product-note {
	font-size: 0.8rem;
	line-height: 1.4;
	opacity: 0.65;

	margin: 0.65rem 0 0;
}
/* =========================
   FOOTER ROW
========================= */

#solutions .product-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	margin-top: auto;
	padding-top: 0.5rem;
}

#solutions .product-link {
	white-space: nowrap;
	flex: 0 0 auto;
	font-size: 1.75rem;
	line-height: 1;
	color: var(--accent);
}

#solutions .package-contact-button {
	padding: 0;
	border: 0;
	border-bottom: 1px solid rgba(102, 122, 99, 0.35);
	background: transparent;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

#product-modal .product-footer .btn {
	white-space: nowrap;
	padding: 0.9rem 1.25rem;
	border: none;
	border-bottom: 1px solid grey;
	background: transparent;
	color: var(--accent);
	transition: all 0.25s ease;
	font-weight: bold;
}

#product-modal #buy-now-button {
	position: relative;
	top: 3px;
}

#product-modal .product-footer-options .checkout-action .btn {
	padding-block: 0.3rem;
}

#product-modal .product-footer-options #buy-now-button {
	top: 0;
}

#product-modal .product-footer .btn:hover:not(:disabled) {
	border-bottom-color: var(--accent);
	transform: translateY(-1px);
}

#product-modal .product-footer .btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

#product-modal .product-footer .btn:not(:disabled) {
	color: #2e5b2a;
	border-bottom-color: #2e5b2a;
}

#product-modal .price {
	font-size: 1.1rem;
	font-weight: 500;
}

#product-modal .price-options-row .price-option {
	padding-right: 1rem;
	white-space: nowrap;
}

/* price subdued */
#solutions .price {
	font-size: clamp(0.82rem, 1.4vw, 0.95rem);
	color: #1c1c1c;
	white-space: nowrap;
}

/* =========================
   BUTTON ADJUSTMENT FOR LIGHT BG
========================= */

#solutions .btn {
	color: var(--accent);
	border-bottom: 1px solid rgba(102, 122, 99, 0.35);
}

#solutions .btn:hover {
	border-bottom-color: var(--accent);
}

.product-modal {
	position: fixed;
	inset: 0;
	z-index: 1001;
	display: grid;
	place-items: start center;
	padding: var(--overlay-content-top, 8.5rem) 1rem 1rem;
	box-sizing: border-box;
}

/* backdrop stays fixed */
.product-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

/* THIS is the important part */
.product-modal-content {
	position: relative;
	width: min(920px, 100%);
	margin: 0;

	background: #f3f5ef;
	border-radius: 12px;

	z-index: 2;

	/* critical scroll behavior */
	max-height: calc(100vh - var(--overlay-content-top, 8.5rem) - 1rem);
	max-height: calc(100dvh - var(--overlay-content-top, 8.5rem) - 1rem);
	display: flex;
	flex-direction: column;
	overflow: hidden;

	padding: 0;
	box-sizing: border-box;
}

.product-modal.hidden {
	display: none;
}

#product-modal .modal-close {
	width: 40px;
	height: 40px;
	flex: 0 0 auto;

	display: flex;
	align-items: center;
	justify-content: center;

	border: none;
	border-radius: 50%;

	background: rgba(0, 0, 0, 0.06);
	color: #333;

	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;

	transition:
		background-color 0.2s ease,
		transform 0.2s ease;

	z-index: 10;
}

#product-modal .product-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.5rem;
}

#product-modal #modal-body {
	min-height: 0;
	overflow-y: auto;
	padding: 0 1.5rem 1.5rem;
}

#product-modal .modal-close:hover {
	background: rgba(0, 0, 0, 0.12);
	transform: scale(1.05);
}

#product-modal .modal-close:active {
	transform: scale(0.95);
}

#product-modal #product-modal-title {
	margin: 0;
	font-size: clamp(1.35rem, 2.5vw, 1.8rem);
	line-height: 1.2;
}

#product-modal .product-modal-layout {
	display: grid;
	grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.35fr);
	gap: 1.5rem;
	align-items: start;
}

#product-modal .product-modal-layout.no-image {
	grid-template-columns: minmax(0, 1fr);
}

#product-modal .product-modal-media img {
	display: block;
	width: 100%;
	height: clamp(220px, 38vh, 340px);
	object-fit: cover;
	border-radius: 10px;
}

#product-modal .product-modal-details > :first-child {
	margin-top: 0;
}

#product-modal .product-modal-description {
	font-size: 0.95rem;
	line-height: 1.55;
	max-width: 78ch;
}

#product-modal .product-modal-details h4,
#product-modal .product-modal-details p {
	margin-bottom: 0.5rem;
}

#product-modal .product-modal-details h4 {
	margin-top: 0.8rem;
}

#product-modal .product-modal-secondary {
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.45;
	color: var(--body);
}

#product-modal .product-contact-cta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.8rem;
	width: 100%;
	margin-top: 0.75rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(46, 91, 42, 0.2);
}

#product-modal .product-footer .product-contact-cta .btn {
	padding: 0.7rem 1.2rem;
	border: 1px solid #2e5b2a;
	border-radius: 999px;
	background: #2e5b2a;
	color: #fff;
}

#product-modal .product-footer .product-contact-cta .btn:hover {
	background: #244a21;
	color: #fff;
	transform: translateY(-1px);
}

#product-modal .package-inquiry {
	max-width: 620px;
	margin: 0 auto;
	box-shadow: none;
}

#product-modal .package-inquiry input[readonly] {
	background: #f3f5ef;
	color: var(--body);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {
	#solutions .products-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	#solutions .section-lead {
		font-size: 1.25rem;
	}

	#solutions .products-grid {
		grid-template-columns: 1fr;
	}

	.product-modal-content {
		width: 100%;
		margin: 0;
	}

	#product-modal .product-modal-header {
		padding: 1.1rem;
	}

	#product-modal .modal-close {
		width: 36px;
		height: 36px;
	}

	#product-modal #modal-body {
		padding: 0 1.1rem 1.1rem;
	}

	#product-modal .product-modal-layout {
		grid-template-columns: 1fr;
		gap: 0.85rem;
	}

	#product-modal .product-modal-media img {
		height: clamp(120px, 22vh, 180px);
	}

	#product-modal .product-footer {
		align-items: baseline;
		flex-wrap: wrap;
	}

	#product-modal .product-footer-options {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		align-items: start;
		gap: 0.75rem;
	}

	#product-modal .product-footer-options .price-selection {
		display: flex;
		flex-direction: column;
		gap: 0.75rem;
	}

	#product-modal .product-footer-options .checkout-action {
		display: grid;
		grid-template-columns: auto minmax(0, 300px);
		align-items: center;
		justify-content: end;
		width: 100%;
		gap: 0.5rem;
	}

	#product-modal .product-footer-options #checkout-turnstile {
		grid-column: 2;
		width: min(300px, 100%);
		min-width: 0;
	}

	#product-modal .product-footer-options #buy-now-button {
		grid-column: 1;
		justify-self: end;
	}
}
