/*
 * Base layout for the bundled templates.
 *
 * Deliberately restrained: type, colour and spacing come from the theme
 * wherever possible (currentColor, em units). This file is meant to
 * complement a theme, not to override it. Every class is prefixed with
 * wmds- and can be overridden completely.
 */

.wmds-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wmds-card {
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: .5rem;
	overflow: hidden;
	background: #fff;
	transition: box-shadow .15s ease;
}

.wmds-card:hover,
.wmds-card:focus-within {
	box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
}

.wmds-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.wmds-card__image {
	aspect-ratio: 4 / 3;
	background: rgba(0, 0, 0, .05);
}

.wmds-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wmds-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
}

.wmds-card__body {
	padding: 1rem;
}

.wmds-card__title {
	margin: 0 0 .25rem;
	font-size: 1.05rem;
	line-height: 1.3;
}

.wmds-card__meta {
	margin: 0 0 .75rem;
	font-size: .85rem;
	opacity: .7;
}

.wmds-card__facts {
	margin: 0 0 .75rem;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: .35rem 1rem;
	font-size: .85rem;
}

.wmds-card__fact-label {
	display: block;
	opacity: .6;
	font-size: .78rem;
}

.wmds-card__price {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 600;
}

.wmds-card__price small,
.wmds-price small {
	display: block;
	font-size: .78rem;
	font-weight: 400;
	opacity: .7;
}

/* --- Detail page --- */

.wmds-single__header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.wmds-single__logo {
	width: 48px;
	height: auto;
	flex: 0 0 auto;
}

.wmds-single__title {
	margin: 0;
}

.wmds-single__subtitle {
	margin: .25rem 0 0;
	opacity: .7;
}

.wmds-single__main {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
	margin-bottom: 2rem;
}

@media (max-width: 48rem) {
	.wmds-single__main {
		grid-template-columns: 1fr;
	}
}

.wmds-gallery__main img {
	width: 100%;
	height: auto;
	border-radius: .5rem;
	display: block;
}

.wmds-gallery__thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr));
	gap: .5rem;
	margin: .5rem 0 0;
	padding: 0;
	list-style: none;
}

.wmds-gallery__thumbs img {
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: .25rem;
	display: block;
}

.wmds-summary {
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: .5rem;
	padding: 1.25rem;
}

.wmds-price {
	margin: 0 0 .75rem;
	font-size: 1.6rem;
	font-weight: 700;
}

.wmds-availability,
.wmds-inspection {
	margin: 0 0 .75rem;
	font-size: .9rem;
}

.wmds-highlights {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: .35rem 1rem;
	margin: 0 0 1rem;
	font-size: .9rem;
}

.wmds-highlights dt {
	opacity: .65;
}

.wmds-highlights dd {
	margin: 0;
	font-weight: 500;
}

.wmds-contact {
	border-top: 1px solid rgba(0, 0, 0, .12);
	padding-top: 1rem;
}

.wmds-contact h2 {
	margin: 0 0 .5rem;
	font-size: 1rem;
}

.wmds-contact__name {
	margin: 0 0 .5rem;
	font-weight: 600;
}

.wmds-button {
	display: inline-block;
	padding: .6rem 1.1rem;
	border-radius: .3rem;
	background: currentColor;
	text-decoration: none;
}

.wmds-button::before {
	content: "";
}

/* Keep the label readable: the background would inherit currentColor. */
.wmds-button {
	color: inherit;
	border: 1px solid currentColor;
	background: transparent;
}

.wmds-button:hover {
	background: rgba(0, 0, 0, .06);
}

/* --- Specifications and features --- */

.wmds-specs__groups {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 1.5rem;
}

.wmds-specs__group h3 {
	margin: 0 0 .5rem;
	font-size: .95rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	opacity: .65;
}

.wmds-specs__group dl {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: .3rem 1rem;
	margin: 0;
	font-size: .9rem;
}

.wmds-specs__group dt {
	opacity: .65;
}

.wmds-specs__group dd {
	margin: 0;
}

.wmds-features ul {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
	gap: .35rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: .9rem;
}

.wmds-features li::before {
	content: "✓ ";
	opacity: .55;
}

/* --- Notices --- */

.wmds-warning {
	margin: 0 0 1rem;
	padding: .5rem .75rem;
	border-left: 3px solid #b32d2e;
	background: rgba(179, 45, 46, .07);
	font-size: .9rem;
}

.wmds-legal {
	margin-top: 2rem;
	font-size: .78rem;
	opacity: .65;
}

.wmds-empty {
	padding: 2rem 0;
	opacity: .7;
}

.wmds-pagination {
	margin-top: 2rem;
	display: flex;
	gap: .5rem;
	flex-wrap: wrap;
}
