/* Madre Loyalty — My Account section. Scoped under .gru-loyalty-account. */
.gru-loyalty-account {
	--gru-accent: #c0392b;
}

.gru-loyalty-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	margin-bottom: 1.4em;
}

.gru-loyalty-card {
	flex: 1 1 200px;
	display: flex;
	flex-direction: column;
	gap: 0.25em;
	padding: 1.2em 1.3em;
	border-radius: 16px;
	color: #fff;
	background: var( --gru-accent );
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.12 );
}

.gru-loyalty-card--primary {
	background: linear-gradient( 135deg, var( --gru-accent ), rgba( 0, 0, 0, 0.78 ) );
}

.gru-loyalty-card--warn {
	background: linear-gradient( 135deg, #b8860b, #8a6508 );
}

.gru-loyalty-card__label {
	font-size: 0.82em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.85;
}

.gru-loyalty-card__value {
	font-size: 2em;
	font-weight: 700;
	line-height: 1.05;
}

.gru-loyalty-card__sub {
	font-size: 0.9em;
	opacity: 0.9;
}

.gru-loyalty-intro {
	margin: 0 0 1.6em;
	opacity: 0.8;
	font-size: 0.95em;
}

.gru-loyalty-history__title {
	margin: 0 0 0.7em;
}

.gru-loyalty-empty {
	padding: 1.4em;
	border: 1px dashed rgba( 0, 0, 0, 0.18 );
	border-radius: 12px;
	text-align: center;
	opacity: 0.75;
}

table.gru-loyalty-history {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.93em;
}

table.gru-loyalty-history thead th {
	text-align: left;
	padding: 0.6em 0.7em;
	border-bottom: 2px solid rgba( 0, 0, 0, 0.1 );
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	opacity: 0.7;
}

table.gru-loyalty-history tbody td {
	padding: 0.7em 0.7em;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.07 );
	vertical-align: middle;
}

.gru-loyalty-history .gru-num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	white-space: nowrap;
}

.gru-loyalty-history .gru-pos {
	color: #1a7f37;
}

.gru-loyalty-history .gru-neg {
	color: #b42318;
}

.gru-tag {
	display: inline-block;
	padding: 0.2em 0.6em;
	border-radius: 999px;
	font-size: 0.78em;
	font-weight: 600;
	background: rgba( 0, 0, 0, 0.07 );
	white-space: nowrap;
}

.gru-tag--earn,
.gru-tag--refund_redeem {
	background: rgba( 26, 127, 55, 0.14 );
	color: #1a7f37;
}

.gru-tag--redeem {
	background: rgba( 0, 0, 0, 0.08 );
}

.gru-tag--expire,
.gru-tag--refund_earn {
	background: rgba( 180, 35, 24, 0.13 );
	color: #b42318;
}

.gru-loyalty-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.2em;
	margin-top: 1.3em;
}

.gru-loyalty-pagination .gru-page {
	font-weight: 600;
	text-decoration: none;
	color: var( --gru-accent );
}

.gru-loyalty-pagination .gru-page-info {
	opacity: 0.7;
	font-size: 0.9em;
}

/* Responsive: stack the table into cards on small screens. */
@media ( max-width: 600px ) {
	table.gru-loyalty-history thead {
		display: none;
	}

	table.gru-loyalty-history,
	table.gru-loyalty-history tbody,
	table.gru-loyalty-history tr,
	table.gru-loyalty-history td {
		display: block;
		width: 100%;
	}

	table.gru-loyalty-history tr {
		margin-bottom: 0.9em;
		padding: 0.4em 0.2em;
		border: 1px solid rgba( 0, 0, 0, 0.08 );
		border-radius: 12px;
	}

	table.gru-loyalty-history tbody td {
		display: flex;
		justify-content: space-between;
		gap: 1em;
		border: none;
		padding: 0.35em 0.8em;
	}

	table.gru-loyalty-history tbody td::before {
		content: attr( data-label );
		font-weight: 600;
		opacity: 0.6;
	}

	.gru-loyalty-history .gru-num {
		text-align: right;
	}
}
