/* eclarc ranges -- the bar that opens each range inside the /shop/ grid.
   Source: /mnt/c/dev/eclarc/ranges/. Loaded on /shop/ only, by eclarc-ranges.php.

   The bar is a row of the product grid itself (grid-column 1 / -1), drawn with the
   items' own hairline convention: top, right and bottom rules, -1px top margin so it
   shares the rule above it, the grid's left wall closing it. A subgrid puts the spec
   cell exactly over the last product column, so the column rule runs through the bar. */

.etheme-product-grid > .ec-range,
.etheme-product-grid.etheme-product-grid-bordered > .ec-range {
	/* the theme pads every bordered-grid child 30px (.etheme-product-grid-bordered > div) */
	padding: 0;
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: subgrid;
	margin-top: -1px;
	border-top: 1px solid #000;
	border-right: 1px solid #000;
	border-bottom: 1px solid #000;
	background: #fff;
	color: #111;
	font-family: 'Hanken Grotesk', Helvetica, Arial, sans-serif;
	scroll-margin-top: 160px;
}

/* The first bar sits straight under the headline block, whose bottom rule it shares. */
.etheme-product-grid.etheme-product-grid-bordered > .ec-range:first-child {
	border-top: 0;
}

.ec-range__head {
	grid-column: 1 / -2;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: flex-start;
	gap: 22px;
	padding: 18px 34px 22px;
	/* the column rule is drawn on the right edge, like every product cell's, so it
	   continues the rule of the column below instead of stepping 1px beside it */
	border-right: 1px solid #000;
}

.ec-range__spec {
	grid-column: -2 / -1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 34px 24px;
}

.ec-range__no,
.ec-range__what {
	font-size: 10px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: .2em;
	text-transform: uppercase;
}

.etheme-product-grid > .ec-range .ec-range__name {
	margin: 0;
	padding: 0;
	font-family: 'Hanken Grotesk', Helvetica, Arial, sans-serif !important;
	font-size: clamp(40px, 3.6vw, 58px);
	font-weight: 800;
	line-height: .92;
	letter-spacing: -.045em;
	text-transform: lowercase;
	color: #111;
}

.ec-range__price {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0;
}

@supports not (grid-template-columns: subgrid) {
	.etheme-product-grid > .ec-range { display: flex; justify-content: space-between; }
	.ec-range__spec { min-width: 30%; }
}

/* Two columns are too narrow for a split bar: as a 50/50 pair it read as one more
   product strip. It becomes one full-width cell -- index and name on the left, what
   and price on the right, each label on one line. */
@media (max-width: 700px) {
	.etheme-product-grid > .ec-range,
	.etheme-product-grid.etheme-product-grid-bordered > .ec-range {
		grid-template-columns: minmax(0, 1fr) auto;
		scroll-margin-top: 110px;
	}
	.ec-range__head { grid-column: 1; gap: 16px; padding: 16px 0 18px 34px; border-right: 0; }
	.ec-range__spec { grid-column: 2; align-items: flex-end; text-align: right; padding: 16px 34px 18px 0; }
	.ec-range__what { white-space: nowrap; }
	.etheme-product-grid > .ec-range .ec-range__name { font-size: 48px; }
}
