/* ── Wrapper ──────────────────────────────────────────────────────────── */
.gm-wrapper {
	font-family: inherit;
	max-width: 100%;
}

/* ── Filters ──────────────────────────────────────────────────────────── */
.gm-filters {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	align-items: stretch;
	margin-bottom: 1.75rem;
}
.gm-filter-group {
	flex: 1;
	min-width: 0;
}
.gm-filter-group > label {
	display: block;
	font-weight: 700;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 0.5rem;
	color: #333;
}
#gm-site-filter, #gm-plan-filter {
	padding: 0.5rem 0.75rem;
	border: 2px solid #ccc;
	border-radius: 6px;
	font-size: 0.95rem;
	width: 100%;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.2s;
}
#gm-site-filter:focus, #gm-site-filter:focus {
	outline: none;
	border-color: #c2d82d;
}

.gm-cat-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.gm-cat-btn {
	padding: 0.4rem 1rem;
	border: 2px solid #c2d82d;
	background: #fff;
	color: #000;
	border-radius: 20px;
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.4;
	transition: background 0.18s, color 0.18s;
}
.gm-cat-btn:hover,
.gm-cat-btn.active {
	background: #c2d82d;
	color: #000;
}
.gm-cat-btn:focus-visible {
	outline: 3px solid #c2d82d;
	outline-offset: 2px;
}

.memberships_category_wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: flex-start;
}

/* ── Grid ─────────────────────────────────────────────────────────────── */
.gm-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	align-items: stretch; /* equal-height rows */
}

.gm-no-results {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eee;
    border-radius: 10px;
    padding: 90px 0;
    text-align: center;
}

.gm-no-results[hidden] {
    display: none;
}

/* ── Card ─────────────────────────────────────────────────────────────── */
/* The outer .gm-card fills the grid cell; inner does the visual card */
.gm-card {
	display: flex;
}
.gm-card[hidden] {
	display: none;
}
.gm-card-inner {
	display: flex;
	flex-direction: column;
	width: 100%;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.07 );
}

/* Card — Header */
.gm-card-header {
	background: #c2d82d;
	padding: 0.85rem 1rem;
}
.gm-card-title {
	margin: 0;
	font-size: 1.1rem;
	line-height: 1.3;
	color: #000;
}

/* Card — Body (flex:1 pushes footer to the bottom) */
.gm-card-body {
	flex: 1;
	padding: 0.85rem 1rem;
}
.gm-content {
	font-size: 0.9rem;
	color: #444;
	margin-bottom: 0.75rem;
	line-height: 1.55;
}

/* Sections (payment plans, discounts …) */
.gm-section {
	margin-top: 0.9rem;
}
.gm-section h4 {
	font-size: 0.875rem;
	font-weight: 700;
	margin: 0 0 0.3rem;
	color: #333;
}
.gm-section ul {
	margin: 0;
	padding-left: 1.1rem;
	font-size: 0.875rem;
	color: #555;
	line-height: 1.6;
}

/* Price override highlight */
.gm-price-override {
	margin-top: 0.9rem;
	padding: 0.5rem 0.8rem;
	background: #fff8e1;
	border-left: 3px solid #f9a825;
	border-radius: 4px;
	font-size: 0.875rem;
	line-height: 1.5;
}
.gm-price-note {
	display: block;
	color: #6d4c00;
	font-style: italic;
}
.gm-price-override small {
	display: block;
	color: #999;
	font-size: 0.8rem;
}

/* Card — Footer */
.gm-card-footer {
	padding: 0.85rem 1rem;
	border-top: 1px solid #eee;
	text-align: left;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 1rem;
}
.gm-btn {
	display: inline-block;
	background: #c2d82d;
	color: #000;
	padding: 0.65rem 1rem;
	border-radius: 6px;
	text-decoration: none;
	font-size: 1rem;
	font-weight: 700;
	text-align: center;
	width: 100%;
	transition: all 0.18s;
}
.gm-btn:hover {
	background: #809016;
	color: #fff;
	text-decoration: none;
}

/* Pricing Section */
.gm-pricing-section {
	width: 100%;
}
.gm-pricing-section h4 {
	font-size: 0.875rem;
	font-weight: 700;
	margin: 0 0 0.75rem;
	color: #333;
}
.gm-pricing-details {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0 0.5rem;
	align-items: center;
	font-size: 0.9rem;
	margin: 0;
}
.gm-pricing-details dt {
	font-weight: 700;
	color: #333;
	white-space: nowrap;
}
.gm-pricing-details dd {
	margin: 0;
	color: #555;
	text-align: right;
}
.gm-pricing-loading {
	font-size: 0.875rem;
	color: #666;
	font-style: italic;
}
.gm-pricing-error {
	color: #d32f2f;
	font-size: 0.875rem;
	margin: 0;
}

/* ── Tablet ──────────────────────────────────────────────────────────────── */
@media (min-width: 768px) {
	/* Filters: wrapping layout */
	.gm-filters {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 1.25rem;
		align-items: flex-start;
	}

	/* Make select filter groups appear side by side */
	.gm-filter-group:nth-child(1),
	.gm-filter-group:nth-child(2) {
		flex: 1 1 calc(50% - 0.625rem);
		min-width: 200px;
		max-width: calc(50% - 0.625rem);
	}

	/* Category filter takes full width below */
	.gm-filter-group:nth-child(3) {
		flex: 1 1 100%;
		width: 100%;
	}

	#gm-site-filter, #gm-plan-filter {
		width: 100%;
	}
	
    #category_descriptions {
        position: sticky;
        top: 180px;
    }
    
	.memberships_category_wrapper {
        gap: 1.5rem;
        grid-template-columns: 1fr 1fr;
    }
    

	.gm-grid {
		gap: 1.5rem;
	}

	/* Card spacing */
	.gm-card-header,
	.gm-card-body {
		padding: 1rem 1.25rem;
	}

	.gm-card-footer {
		padding: 1rem 1.25rem;
		flex-direction: column;
		align-items: stretch;
		text-align: left;
		gap: 1rem;
	}

	/* Pricing */
	.gm-pricing-details {
		font-size: 0.95rem;
		gap: 0.25rem 0.5rem;
	}

	.gm-pricing-details dt {
		font-size: 0.875rem;
	}

	/* Button */
	.gm-btn {
		width: 100%;
		font-size: 1rem;
		padding: 0.5rem 1rem;
	}
}

/* ── Desktop ─────────────────────────────────────────────────────────────── */
@media (min-width: 1200px) {
    
    .memberships_category_wrapper {
        gap: 2rem;
    }

	.gm-grid {
		gap: 2rem;
	}

	/* Footer: side-by-side layout */
	.gm-card-footer {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		text-align: right;
	}

	/* Pricing */
	.gm-pricing-details {
		font-size: 1.25rem;
	}

	/* Button */
	.gm-btn {
		width: auto;
		font-size: 1.25rem;
		padding: 0.5rem 1.3rem;
		white-space: nowrap;
		flex-shrink: 0;
	}
}
