/* =========================
   PRODUCTS SECTION OVERRIDE
   (eco / light editorial system)
========================= */

#packages {
	background: #f3f5ef; /* soft eco paper tone */
	color: var(--body);
}

/* override global text colors inside section */
#packages p,
#packages li,
#packages .product-desc,
#product-modal h4 {
	color: rgba(28, 28, 28, 0.75);
}

/* labels stay muted green */
#packages .section-label,
#packages .label {
	color: var(--accent);
}

#packages .clamp-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* =========================
   GRID (unchanged structure)
========================= */

#packages .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
========================= */

#packages .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;
}

#packages .product-item:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow);
}

/* =========================
   IMAGE (NO LONGER DOMINANT)
========================= */

#packages .product-image {
	width: 100%;
	height: 140px; /* controlled visual weight */
	overflow: hidden;
	border-radius: calc(var(--radius) - 6px);
	background: #e9ede6;
}

#packages .product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* =========================
   TYPOGRAPHY
========================= */

#packages .product-title {
	font-size: 1.1rem;
	font-weight: 500;
	letter-spacing: -0.01em;
	margin-bottom: 0.5rem;
}

#packages .product-desc {
	font-size: 0.95rem;
	line-height: 1.6;
}

/* =========================
   BULLETS (lighter + tighter)
========================= */

#packages .product-bullets {
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}

#packages .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 */
#packages .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: 1rem 0;
}

#product-modal li {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;

	font-size: 0.95rem;
	line-height: 1.5;
	margin-bottom: 0.5rem;

	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: flex-end;

	margin-top: 1.25rem;
	gap: 1rem;
}

#product-modal .product-note {
	font-size: 0.8rem;
	line-height: 1.4;
	opacity: 0.65;

	margin-top: 1rem;
}
/* =========================
   FOOTER ROW
========================= */

#packages .product-footer {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-top: 1rem;
}

#packages .product-link {
	white-space: nowrap;
}

#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 .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 h4 {
	padding-bottom: 0.75rem;
}

#product-modal .price-options .price-option {
	padding-right: 1rem;
}

/* price subdued */
#packages .price {
	font-size: 1rem;
	color: #1c1c1c;
	padding-right: 2px;
}

/* =========================
   BUTTON ADJUSTMENT FOR LIGHT BG
========================= */

#packages .btn {
	color: var(--accent);
	border-bottom: 1px solid rgba(102, 122, 99, 0.35);
}

#packages .btn:hover {
	border-bottom-color: var(--accent);
}

.product-modal {
	position: fixed;
	inset: 0;
	z-index: 999;
}

/* 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;
	max-width: 700px;
	margin: 5vh auto;

	background: #f3f5ef;
	border-radius: 12px;

	z-index: 2;

	/* critical scroll behavior */
	max-height: 90vh;
	overflow-y: auto;

	padding: 2rem;
	box-sizing: border-box;
}

.product-modal.hidden {
	display: none;
}

#product-modal .modal-close {
	position: sticky;
	top: 2rem;
	margin-left: auto;

	width: 40px;
	height: 40px;

	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 .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-content {
	padding: 2rem;
	padding-top: 0;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {
	#packages .products-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	#packages .products-grid {
		grid-template-columns: 1fr;
	}
}
