/*
 * Shared between front-page.php and single-store.php — buttons, service
 * cards, and location cards look identical on both, so they live here
 * once instead of drifting apart in front-page.css / store-page.css.
 * Always enqueued (see functions-enqueue-snippet.php), unlike the two
 * page-specific stylesheets which only load on their own template.
 *
 * Colors read from Avada's global --awb-color* vars first, with a
 * red/black/white fallback — see front-page.css header for the caveat
 * about not having confirmed the real hex values yet.
 */

#gm-home,
#gm-store {
	--gm-red: var(--awb-color2, #ed2e38);
	--gm-black: var(--awb-color1, #0a0a0a);
	--gm-white: #ffffff;
	--gm-gray-lt: #f4f4f4;
	--gm-gray-md: #6b6b6b;
	--gm-gray-dk: #1a1a1a;
	--gm-radius: 6px;
	--gm-gap: 24px;
	--gm-section-pad: 64px 24px;
	max-width: 1200px;
	margin: 0 auto;
	font-family: var(--awb-body-typography-font-family, inherit);
	color: var(--gm-gray-dk);
}

#gm-home section,
#gm-store section {
	padding: var(--gm-section-pad);
}

#gm-home h1,
#gm-home h2,
#gm-home h3,
#gm-store h1,
#gm-store h2,
#gm-store h3 {
	font-family: var(--awb-heading-typography-font-family, inherit);
	line-height: 1.2;
	margin: 0 0 16px;
}

#gm-home h2,
#gm-store h2 {
	font-size: 2rem;
	text-align: center;
}

/* Buttons */
.gm-btn {
	display: inline-block;
	padding: 14px 28px;
	border-radius: var(--gm-radius);
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.gm-btn--primary {
	background: var(--gm-red);
	color: var(--gm-white);
	border: 2px solid var(--gm-red);
}
.gm-btn--primary:hover {
	background: color-mix(in srgb, var(--gm-red) 85%, black);
	border-color: color-mix(in srgb, var(--gm-red) 85%, black);
}
.gm-btn--outline {
	background: transparent;
	color: var(--gm-black);
	border: 2px solid var(--gm-black);
}
.gm-btn--outline:hover {
	background: var(--gm-black);
	color: var(--gm-white);
}

/* Service cards */
.gm-services {
	text-align: center;
}
.gm-services__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--gm-gap);
	margin-bottom: 32px;
}
.gm-service-card {
	display: block;
	text-decoration: none;
	color: var(--gm-gray-dk);
	border: 1px solid #e2e2e2;
	border-radius: var(--gm-radius);
	overflow: hidden;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.gm-service-card:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}
.gm-service-card img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}
.gm-service-card h3 {
	font-size: 1rem;
	margin: 16px;
}

/* Location cards (homepage Locations grid + store-page Nearby Locations) */
.gm-location-card {
	padding: 12px 0;
	border-bottom: 1px solid #eaeaea;
	display: block;
	color: var(--gm-gray-dk);
	text-decoration: none;
}
.gm-location-card strong {
	display: block;
}
.gm-location-card span {
	display: block;
	font-size: 0.85rem;
	color: var(--gm-gray-md);
}
.gm-location-card__phone {
	display: inline-block;
	margin-top: 4px;
	font-size: 0.85rem;
	color: var(--gm-red) !important;
}
/* Prototype-only comparison link, see the PROTOTYPE-ONLY comment in
   front-page.php next to where this class is used — pending open item #41. */
.gm-location-card__original {
	display: block;
	margin-top: 4px;
	font-size: 0.75rem;
	color: var(--gm-gray-md) !important;
	text-decoration: underline;
}
.gm-location-card__original:hover {
	color: var(--gm-red) !important;
}

@media (max-width: 992px) {
	.gm-services__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	#gm-home,
	#gm-store {
		--gm-section-pad: 40px 16px;
	}
	#gm-home h2,
	#gm-store h2 {
		font-size: 1.5rem;
	}
	.gm-services__grid {
		grid-template-columns: 1fr;
	}
}
