/* =====================================================
 * Granite Materials — frontend styles
 * Mobile-first; 4-col grid on desktop, single-col single page on phone
 * ===================================================== */

.granite-mat-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
}

/* ---------- Buttons ---------- */
.granite-mat-btn {
	display: inline-block;
	padding: 12px 28px;
	background: #4a90e2;
	color: #fff;
	border-radius: 999px;
	font-weight: 600;
	text-decoration: none;
	font-size: 16px;
	transition: background .2s ease, transform .2s ease;
	border: 0;
	cursor: pointer;
	line-height: 1.2;
}
.granite-mat-btn:hover,
.granite-mat-btn:focus {
	background: #2a6fc4;
	color: #fff;
	transform: translateY(-1px);
}

/* =====================================================
 * SINGLE — mirrors Alabaster screenshot
 * ===================================================== */
.granite-mat-single {
	padding: 32px 0 64px;
}

.granite-mat-breadcrumb {
	font-size: 14px;
	color: #6b7280;
	margin-bottom: 18px;
}
.granite-mat-breadcrumb a {
	color: #4a90e2;
	text-decoration: none;
}
.granite-mat-breadcrumb a:hover { text-decoration: underline; }
.granite-mat-breadcrumb span { margin: 0 6px; }

.granite-mat-product {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
	align-items: start;
}

@media (min-width: 900px) {
	.granite-mat-product {
		grid-template-columns: 1.1fr 1fr;
		gap: 56px;
	}
}

/* Image stage */
.granite-mat-media {
	position: relative;
}
.granite-mat-stage {
	position: relative;
	background: #f3f4f6;
	border-radius: 6px;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	width: 100%;
}
.granite-mat-stage--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9ca3af;
}
.granite-mat-stage-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity .25s ease;
}
.granite-mat-stage-img.is-active { opacity: 1; }

.granite-mat-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}
.granite-mat-thumb {
	display: block;
	width: 70px;
	height: 70px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 4px;
	overflow: hidden;
	background: #f3f4f6;
	cursor: pointer;
	transition: border-color .2s ease;
}
.granite-mat-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.granite-mat-thumb.is-active,
.granite-mat-thumb:hover,
.granite-mat-thumb:focus {
	border-color: #4a90e2;
}

/* Info column */
.granite-mat-info { min-width: 0; }
.granite-mat-title {
	font-size: 36px;
	line-height: 1.15;
	margin: 0 0 6px;
	font-weight: 700;
	color: #111827;
}
@media (min-width: 900px) {
	.granite-mat-title { font-size: 48px; }
}
.granite-mat-title-bar {
	display: block;
	width: 60px;
	height: 4px;
	background: #4a90e2;
	border-radius: 2px;
	margin-bottom: 22px;
}
.granite-mat-type {
	font-size: 14px;
	color: #6b7280;
	margin: -10px 0 18px;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.granite-mat-specs {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 28px;
	font-size: 16px;
}
.granite-mat-specs th,
.granite-mat-specs td {
	text-align: left;
	padding: 14px 16px;
	border: 1px solid #e5e7eb;
	vertical-align: top;
}
.granite-mat-specs th {
	width: 40%;
	background: #fafafa;
	font-weight: 700;
	color: #111827;
}
@media (max-width: 480px) {
	.granite-mat-specs th { width: 45%; padding: 12px 10px; font-size: 14px; }
	.granite-mat-specs td { padding: 12px 10px; font-size: 14px; }
}

.granite-mat-cta { margin-bottom: 0; }

.granite-mat-description {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid #e5e7eb;
	font-size: 16px;
	line-height: 1.7;
	color: #374151;
}

/* =====================================================
 * ARCHIVE — responsive grid (1/2/3/4 cols)
 * ===================================================== */
.granite-mat-archive {
	padding: 32px 0 64px;
}
.granite-mat-archive-header {
	text-align: center;
	margin-bottom: 28px;
}
.granite-mat-archive-title {
	font-size: 32px;
	margin: 0 0 8px;
	color: #111827;
	font-weight: 700;
}
@media (min-width: 720px) {
	.granite-mat-archive-title { font-size: 40px; }
}
.granite-mat-archive-sub {
	color: #6b7280;
	font-size: 16px;
	margin: 0;
}

.granite-mat-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-bottom: 32px;
}
.granite-mat-filter-link {
	padding: 8px 18px;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	color: #374151;
	text-decoration: none;
	font-size: 14px;
	transition: all .2s ease;
	background: #fff;
}
.granite-mat-filter-link:hover,
.granite-mat-filter-link.is-active {
	background: #4a90e2;
	border-color: #4a90e2;
	color: #fff;
}

/* The grid: mobile first, then 2 / 3 / 4 columns */
.granite-mat-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}
@media (min-width: 520px) {
	.granite-mat-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}
@media (min-width: 820px) {
	.granite-mat-grid { grid-template-columns: repeat(3, 1fr); gap: 26px; }
}
@media (min-width: 1100px) {
	.granite-mat-grid { grid-template-columns: repeat(4, 1fr); gap: 28px; }
}

.granite-mat-card {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(0,0,0,.06);
	transition: transform .2s ease, box-shadow .2s ease;
	display: flex;
}
.granite-mat-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(0,0,0,.10);
}
.granite-mat-card-link {
	display: flex;
	flex-direction: column;
	width: 100%;
	color: inherit;
	text-decoration: none;
}
.granite-mat-card-media {
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #f3f4f6;
}
.granite-mat-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
}
.granite-mat-card:hover .granite-mat-card-media img {
	transform: scale(1.04);
}
.granite-mat-card-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e5e7eb, #f3f4f6);
}
.granite-mat-card-body {
	padding: 16px 18px 20px;
	text-align: center;
}
.granite-mat-card-title {
	font-size: 18px;
	margin: 0 0 4px;
	color: #111827;
	font-weight: 600;
	line-height: 1.3;
}
.granite-mat-card-type {
	font-size: 12px;
	margin: 0;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: .05em;
}

.granite-mat-pagination {
	margin-top: 40px;
	text-align: center;
}
.granite-mat-pagination .nav-links {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
}
.granite-mat-pagination .page-numbers {
	padding: 8px 14px;
	border-radius: 4px;
	background: #fff;
	border: 1px solid #e5e7eb;
	color: #374151;
	text-decoration: none;
	font-size: 14px;
}
.granite-mat-pagination .page-numbers.current,
.granite-mat-pagination .page-numbers:hover {
	background: #4a90e2;
	border-color: #4a90e2;
	color: #fff;
}

.granite-mat-archive-cta {
	margin-top: 56px;
	padding: 32px;
	text-align: center;
	background: #f9fafb;
	border-radius: 8px;
}
.granite-mat-archive-cta p {
	font-size: 16px;
	margin: 0 0 16px;
	color: #374151;
}

.granite-mat-empty {
	text-align: center;
	color: #6b7280;
	padding: 48px 0;
	font-size: 16px;
}
