/**
 * Shop Diamonds browser. Scoped entirely under .keb-shop-diamonds so it never
 * touches the rest of the theme. It shares the ring builder's visual language
 * (product-frontend.css): the theme's Kinzy tokens with the same fallbacks,
 * Jost for text, the house serif for display and prices, champagne gold
 * eyebrows, garnet actions, quiet hairlines and the builder's own chip,
 * input, card and detail-panel treatments.
 *
 * The section breaks out of a narrow page column to the full viewport and
 * uses the whole page width with the theme's side gutters. The script measures
 * the viewport minus any scrollbar into --keb-sd-vw so the breakout never adds
 * a sideways scroll; 100vw is the no-script fallback.
 */
.keb-shop-diamonds {
	--keb-sd-ink: var(--kinzy-deep-truffle, #211a18);
	--keb-sd-garnet: var(--kinzy-garnet, #351211);
	--keb-sd-paper: var(--kinzy-diamond-white, #f8f6f2);
	--keb-sd-warm: var(--kinzy-warm-ivory, #f3ece4);
	--keb-sd-warm-dark: #ece2d8;
	--keb-sd-gold: var(--kinzy-champagne-gold, #bfa277);
	--keb-sd-gold-dark: #765126;
	--keb-sd-muted: #6f6560;
	--keb-sd-soft: #8d857a;
	--keb-sd-line: rgba(53, 18, 17, 0.18);
	--keb-sd-line-soft: rgba(53, 18, 17, 0.09);
	--keb-sd-tile-line: #d8cec5;
	--keb-sd-card-line: #e6e2dc;
	--keb-sd-tile: #ffffff;
	--keb-sd-serif: var(--kinzy-serif, "Cormorant Garamond", Georgia, "Times New Roman", serif);
	--keb-sd-sans: var(--kinzy-sans, "Jost", "Helvetica Neue", Arial, sans-serif);
	color: var(--keb-sd-ink);
	background: var(--keb-sd-paper);
	font-family: var(--keb-sd-sans);
	font-size: 14px;
	line-height: 1.45;
	box-sizing: border-box;
	width: var(--keb-sd-vw, 100vw);
	max-width: none;
	margin-left: calc(50% - var(--keb-sd-vw, 100vw) / 2);
	margin-right: calc(50% - var(--keb-sd-vw, 100vw) / 2);
	padding: 0;
	text-align: left;
}
.keb-shop-diamonds *,
.keb-shop-diamonds *::before,
.keb-shop-diamonds *::after { box-sizing: border-box; }
.keb-shop-diamonds p { font-family: inherit; }
.keb-shop-diamonds__inner {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 8px clamp(20px, 4.2vw, 60px) 72px;
}

.keb-shop-diamonds__preview-note {
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--keb-sd-gold-dark);
	border: 1px solid var(--keb-sd-line);
	padding: 8px 12px;
	margin: 0 0 16px;
}

/* Intro: the builder's heading pattern — eyebrow, serif title, lead, then the type switch */
.keb-shop-diamonds__intro { text-align: center; padding: 30px 0 6px; }
.keb-shop-diamonds__eyebrow {
	font-size: 10px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
	color: var(--keb-sd-gold-dark); margin: 0 0 12px;
}
.keb-shop-diamonds__title {
	font-family: var(--keb-sd-serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08;
	letter-spacing: -0.01em; margin: 0 0 12px; color: var(--keb-sd-ink); text-transform: none;
}
.keb-shop-diamonds__lead {
	max-width: 600px; margin: 0 auto; font-size: 15px; line-height: 1.6; color: var(--keb-sd-muted);
}
.keb-shop-diamonds__origins {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 340px; margin: 26px auto 0;
}
/* v0.9.20: Natural | Lab Grown as a quiet pair — small capitals, the chosen
   one boxed in ink on white (the same vocabulary as the Grid / List switch),
   the other a hairline. */
.keb-shop-diamonds__origin {
	display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 12px;
	background: transparent; border: 1px solid var(--keb-sd-tile-line); border-radius: 0; color: var(--keb-sd-muted);
	font-size: 11px; font-weight: 500; line-height: 1.2; text-decoration: none; letter-spacing: 0.16em; text-transform: uppercase;
	transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.keb-shop-diamonds__origin:hover { background: #fff; border-color: var(--keb-sd-ink); color: var(--keb-sd-ink); text-decoration: none; }
.keb-shop-diamonds__origin.is-active { background: #fff; border-color: var(--keb-sd-ink); color: var(--keb-sd-ink); font-weight: 600; }
.keb-shop-diamonds__origin:focus-visible { outline: 2px solid var(--keb-sd-gold); outline-offset: 3px; }

/* Colour collection — White | Coloured as quiet text tabs under the type switch (the builder's segment tabs) */
.keb-shop-diamonds__collections { display: flex; justify-content: center; align-items: center; gap: 36px; margin: 22px auto 0; }
.keb-shop-diamonds__collection {
	position: relative; background: none; border: 0; border-radius: 0; box-shadow: none; cursor: pointer; margin: 0; min-height: 0;
	padding: 6px 2px 10px; font: inherit; font-size: 11.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--keb-sd-soft); line-height: 1.2; transition: color .15s;
}
.keb-shop-diamonds__collection::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--keb-sd-garnet);
	transform: scaleX(0); transition: transform .18s ease;
}
.keb-shop-diamonds__collection:hover { background: none; color: var(--keb-sd-ink); }
.keb-shop-diamonds__collection.is-active { color: var(--keb-sd-ink); }
.keb-shop-diamonds__collection.is-active::after { transform: scaleX(1); }
.keb-shop-diamonds__collection:focus-visible { outline: 2px solid var(--keb-sd-gold); outline-offset: 2px; }

/* Shape strip — one neat row that stays put; the chosen shape is underlined */
.keb-shop-diamonds__shapes { margin: 30px 0 0; }
.keb-shop-diamonds__shape-strip {
	display: flex; justify-content: center; align-items: flex-start; gap: 0;
	border-bottom: 1px solid var(--keb-sd-line);
	overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
	scroll-snap-type: x proximity; padding: 0 4px;
}
.keb-shop-diamonds__shape-strip::-webkit-scrollbar { display: none; }
.keb-shape-tile {
	position: relative; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px;
	cursor: pointer; background: none; border: 0; border-radius: 0; box-shadow: none; padding: 8px 10px 16px; font: inherit; color: var(--keb-sd-ink);
	width: 96px; scroll-snap-align: center; transition: color .15s;
}
.keb-shape-tile::after {
	content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px;
	background: var(--keb-sd-garnet); transform: scaleX(0); transition: transform .18s ease;
}
.keb-shape-tile.is-selected::after { transform: scaleX(1); }
.keb-shape-tile:hover { background: none; }
.keb-shape-tile:focus-visible { outline: 2px solid var(--keb-sd-gold); outline-offset: 2px; }
.keb-shape-tile__art { color: #9d9189; transition: color .15s, transform .15s; }
.keb-shape-tile__art svg { width: 58px; height: 58px; display: block; }
.keb-shape-tile:hover .keb-shape-tile__art { color: var(--keb-sd-garnet); transform: translateY(-2px); }
.keb-shape-tile.is-selected .keb-shape-tile__art { color: var(--keb-sd-ink); }
.keb-shape-tile__label {
	font-size: 12px; font-weight: 400; letter-spacing: 0.04em; line-height: 1.2; text-align: center;
	color: var(--keb-sd-muted); transition: color .15s; max-width: 84px;
}
.keb-shape-tile:hover .keb-shape-tile__label,
.keb-shape-tile.is-selected .keb-shape-tile__label { color: var(--keb-sd-ink); }
.keb-shape-tile.is-selected .keb-shape-tile__label { font-weight: 500; }

/* Filter panel: the builder's quiet rail laid across the page — no boxes, space does the separating */
.keb-shop-diamonds__filters {
	display: grid; grid-template-columns: minmax(250px, 1.15fr) repeat(3, minmax(0, 1fr)) minmax(210px, 0.95fr);
	gap: 18px 44px; margin: 0; padding: 22px 0 26px; border-bottom: 1px solid var(--keb-sd-line); background: transparent;
}
@media (min-width: 1281px) {
	/* Coloured collection: the nine intensity chips get the widest column */
	.keb-shop-diamonds[data-keb-collection="fancy"] .keb-shop-diamonds__filters {
		grid-template-columns: minmax(230px, 1fr) minmax(0, 0.9fr) minmax(0, 1.7fr) minmax(0, 0.95fr) minmax(200px, 0.85fr);
	}
}
.keb-shop-diamonds__filters-head {
	grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 -4px;
}
.keb-shop-diamonds__filters-title {
	font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--keb-sd-ink);
}
.keb-shop-diamonds__reset {
	background: none; border: 0; border-radius: 0; box-shadow: none; cursor: pointer; font: inherit; font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em;
	text-transform: uppercase; color: var(--keb-sd-gold-dark); padding: 4px 0; min-height: 0; text-decoration: none;
}
.keb-shop-diamonds__reset:hover { color: var(--keb-sd-garnet); background: none; text-decoration: underline; text-underline-offset: 4px; }
.keb-sd-filter { border: 0; margin: 0; min-width: 0; padding: 0; }
.keb-sd-filter[hidden] { display: none; }
.keb-shop-diamonds__filter-toggle { display: none; }
.keb-sd-filter__head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; min-height: 18px; }
.keb-sd-filter__label {
	font-size: 14px; font-weight: 600; letter-spacing: 0.01em; line-height: 1.3; color: var(--keb-sd-ink);
	padding: 0; margin: 0; float: none; width: auto; text-transform: none;
}
.keb-sd-filter__hint { font-size: 11.5px; color: var(--keb-sd-soft); letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.keb-sd-filter__readout { margin-left: auto; font-size: 12.5px; font-weight: 500; color: var(--keb-sd-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Grade chips, in grade order — the builder's chip grid */
.keb-sd-scale { display: flex; flex-wrap: wrap; gap: 6px; }
.keb-sd-scale__item { position: relative; flex: 0 0 auto; min-width: 46px; cursor: pointer; margin: 0; }
.keb-sd-scale__item input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.keb-sd-scale__item span {
	display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 6px 12px;
	font-size: 12px; font-weight: 500; letter-spacing: 0.01em; color: var(--keb-sd-ink); background: #fff;
	border: 1px solid var(--keb-sd-tile-line); border-radius: 4px; transition: background .14s, border-color .14s, color .14s; white-space: nowrap;
}
.keb-sd-scale__item input:hover + span { border-color: var(--keb-sd-ink); }
.keb-sd-scale__item input:checked + span { background: var(--keb-sd-garnet); border-color: var(--keb-sd-garnet); color: #fff; }
.keb-sd-scale__item input:focus-visible + span { outline: 2px solid var(--keb-sd-gold); outline-offset: 2px; }

/* From / to inputs — the builder's range boxes */
.keb-sd-filter__inputs { display: grid; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr); align-items: end; gap: 8px; max-width: 280px; }
.keb-sd-filter__inputs::before { content: "–"; grid-column: 2; align-self: center; margin-bottom: 14px; color: var(--keb-sd-soft); text-align: center; }
.keb-sd-input { display: grid; gap: 5px; min-width: 0; margin: 0; }
.keb-sd-input:first-child { grid-column: 1; grid-row: 1; }
.keb-sd-input:last-child { grid-column: 3; grid-row: 1; }
.keb-sd-input > .keb-sd-input__label { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--keb-sd-muted); }
.keb-sd-input__field {
	position: relative; display: flex; align-items: center; height: 42px; padding: 0 10px; background: #fffdfa;
	border: 1px solid var(--keb-sd-tile-line); border-radius: 4px; transition: border-color .14s;
}
.keb-sd-input__field:focus-within { border-color: var(--keb-sd-garnet); }
.keb-sd-input__field > b { font-weight: 400; color: var(--keb-sd-muted); margin-right: 3px; font-size: 14px; }
.keb-sd-input__field > em { font-style: normal; font-size: 11px; color: var(--keb-sd-soft); margin-left: 4px; }
.keb-sd-input input {
	flex: 1 1 0; min-width: 0; width: 100%; border: 0; background: none; padding: 0; margin: 0; height: 100%; border-radius: 0;
	font: inherit; font-size: 14px; font-weight: 500; color: var(--keb-sd-ink); -moz-appearance: textfield; appearance: textfield; outline: none; box-shadow: none;
}
.keb-sd-input input::-webkit-outer-spin-button,
.keb-sd-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.keb-sd-input input::placeholder { color: rgba(33, 26, 24, 0.38); }

/* Carat dual slider */
.keb-sd-filter--carat .keb-sd-filter__inputs { margin-top: 12px; }
.keb-sd-range { position: relative; height: 28px; margin: 2px 8px 0; max-width: 264px; }
.keb-sd-range__track { position: absolute; left: 0; right: 0; top: 13px; height: 2px; background: var(--keb-sd-line); }
.keb-sd-range__fill { position: absolute; top: 0; bottom: 0; left: 0; right: 0; background: var(--keb-sd-garnet); }
.keb-sd-range input[type="range"] {
	position: absolute; left: -8px; right: -8px; width: calc(100% + 16px); top: 0; height: 28px; margin: 0; padding: 0;
	background: none; border: 0; -webkit-appearance: none; appearance: none; pointer-events: none; outline: none; box-shadow: none;
}
.keb-sd-range input[type="range"]::-webkit-slider-runnable-track { background: transparent; height: 28px; }
.keb-sd-range input[type="range"]::-moz-range-track { background: transparent; height: 28px; }
.keb-sd-range input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none; pointer-events: auto; cursor: pointer;
	width: 16px; height: 16px; margin-top: 6px; border-radius: 50%; background: #fff; border: 1px solid var(--keb-sd-garnet);
	box-shadow: 0 1px 3px rgba(33, 26, 24, 0.22);
}
.keb-sd-range input[type="range"]::-moz-range-thumb {
	pointer-events: auto; cursor: pointer; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 1px solid var(--keb-sd-garnet);
	box-shadow: 0 1px 3px rgba(33, 26, 24, 0.22);
}
.keb-sd-range input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--keb-sd-gold); outline-offset: 2px; }

/* Toolbar (v0.9.20): one hairline-topped row — the Grid / List switch as two
   quiet icon buttons on the left (the pressed one boxed), "Sort by" and the
   choice on the right as plain text with a chevron; the count stays a polite
   live region for screen readers (v0.9.12). */
.keb-shop-diamonds__toolbar {
	position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 0 12px; margin-top: 0;
}
.keb-shop-diamonds__count { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.keb-shop-diamonds__toolbar-right { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; }
.keb-shop-diamonds__views { display: inline-flex; align-items: center; gap: 6px; }
.keb-shop-diamonds .keb-shop-diamonds__view {
	display: inline-flex; align-items: center; justify-content: center; gap: 0; width: 36px; height: 36px; min-height: 0; padding: 0; margin: 0; border: 1px solid transparent; border-radius: 0;
	background: transparent; box-shadow: none; cursor: pointer; font-size: 0; line-height: 0; color: var(--keb-sd-soft); transition: color .15s, border-color .15s, background-color .15s;
}
.keb-shop-diamonds .keb-shop-diamonds__view:hover { color: var(--keb-sd-ink); background: transparent; }
.keb-shop-diamonds .keb-shop-diamonds__view[aria-pressed="true"] { color: var(--keb-sd-ink); border-color: var(--keb-sd-tile-line); background: #fff; }
.keb-shop-diamonds .keb-shop-diamonds__view:focus-visible { outline: 2px solid var(--keb-sd-gold); outline-offset: 2px; }
.keb-shop-diamonds__view-icon { position: relative; display: inline-block; width: 16px; height: 16px; color: currentColor; flex: 0 0 auto; }
.keb-shop-diamonds__view-icon--grid::before { content: ""; position: absolute; left: 1px; top: 1px; width: 6px; height: 6px; background: currentColor; box-shadow: 8px 0 0 currentColor, 0 8px 0 currentColor, 8px 8px 0 currentColor; }
.keb-shop-diamonds__view-icon--list::before { content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 2px; background: currentColor; box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor; }
.keb-shop-diamonds__sort { display: inline-flex; align-items: center; gap: 12px; margin: 0; }
.keb-shop-diamonds__sort span { font-size: 10.5px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--keb-sd-soft); }
.keb-shop-diamonds .keb-shop-diamonds__sort select,
.keb-shop-diamonds .keb-shop-diamonds__sort select:focus,
.keb-shop-diamonds .keb-shop-diamonds__sort select:hover {
	font-family: inherit !important; font-size: 13.5px !important; font-weight: 500 !important; letter-spacing: 0.01em; color: var(--keb-sd-ink) !important; text-align: right;
	background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; outline: none;
	padding: 4px 18px 4px 0 !important; margin: 0 !important; height: 36px !important; min-height: 0 !important; width: auto !important; min-width: 0; max-width: none; cursor: pointer;
	appearance: none !important; -webkit-appearance: none !important; -moz-appearance: none !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23211a18' stroke-width='1.3'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important; background-position: right 2px center !important; background-size: 10px 7px !important; line-height: 1.2;
}
.keb-shop-diamonds .keb-shop-diamonds__sort select:hover { color: var(--keb-sd-garnet) !important; }
.keb-shop-diamonds .keb-shop-diamonds__sort select:focus,
.keb-shop-diamonds .keb-shop-diamonds__sort select:focus-visible { outline: 2px solid var(--keb-sd-gold) !important; outline-offset: 2px; box-shadow: none !important; }
.keb-shop-diamonds__all-shapes { display: none; }

/* List view: the builder's list — one hairline row per diamond, header above */
.keb-shop-diamonds__list-head,
.keb-sd-row {
	display: grid; grid-template-columns: minmax(130px, 1.15fr) repeat(7, minmax(0, 1fr)) minmax(96px, 1fr) 44px; align-items: center; gap: 0 10px;
}
.keb-shop-diamonds__list-head {
	padding: 10px 14px; border-bottom: 1px solid var(--keb-sd-line); font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--keb-sd-muted); text-align: center;
}
.keb-shop-diamonds__list-head span:first-child { text-align: left; }
.keb-shop-diamonds__list-head[hidden] { display: none; }
.keb-shop-diamonds__grid[data-keb-view="list"] { display: flex; flex-direction: column; gap: 0; }
.keb-sd-row {
	position: relative; width: 100%; min-height: 64px; padding: 12px 14px; background: #fff; border: 0; border-bottom: 1px solid var(--keb-sd-line-soft); cursor: pointer;
	font-size: 14px; color: var(--keb-sd-ink); text-align: center; transition: background .14s;
}
.keb-sd-row:hover { background: var(--keb-sd-warm); }
.keb-sd-row.is-open { background: var(--keb-sd-warm); box-shadow: inset 3px 0 0 var(--keb-sd-garnet); }
.keb-sd-row__shape { display: inline-flex; align-items: center; gap: 12px; text-align: left; min-width: 0; }
.keb-sd-row__sketch { color: var(--keb-sd-ink); flex: 0 0 auto; }
.keb-sd-row__sketch svg { width: 30px; height: 30px; display: block; }
.keb-sd-row__shape-label { font-size: 13px; color: var(--keb-sd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.keb-sd-row__cell { min-width: 0; font-size: 14px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.keb-sd-row__cell--carat { font-variant-numeric: tabular-nums; }
.keb-sd-row__na { color: var(--keb-sd-soft); }
.keb-sd-row__price { font-family: var(--keb-sd-serif); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.keb-shop-diamonds .keb-sd-row__more {
	width: 40px; height: 40px; margin: 0 0 0 auto; padding: 0; border: 1px solid transparent; border-radius: 50%; background: transparent; box-shadow: none; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center; color: var(--keb-sd-gold-dark); transition: border-color .14s, color .14s;
}
.keb-shop-diamonds .keb-sd-row__more svg { width: 11px; height: 8px; transition: transform .18s; }
.keb-shop-diamonds .keb-sd-row__more:hover { border-color: var(--keb-sd-line); color: var(--keb-sd-garnet); background: transparent; }
.keb-shop-diamonds .keb-sd-row__more:focus-visible { outline: 2px solid var(--keb-sd-gold); outline-offset: 2px; }
.keb-sd-row.is-open .keb-sd-row__more svg { transform: rotate(180deg); }
.keb-shop-diamonds__grid[data-keb-view="list"] .keb-sd-detail { width: 100%; margin: 0 0 14px; border-top: 0; }

/* Grid + cards: the builder's diamond card — photo, price, stone, grades, "More info", lab */
.keb-shop-diamonds__grid {
	display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); align-items: start;
}
.keb-sd-card {
	position: relative; display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--keb-sd-card-line); border-radius: 2px;
	cursor: pointer; overflow: visible; transition: border-color .16s;
}
.keb-sd-card:hover { border-color: #cbc4ba; }
.keb-sd-card.is-open { border-color: var(--keb-sd-garnet); box-shadow: inset 0 3px 0 var(--keb-sd-gold); }
.keb-sd-card.is-open::after {
	content: ""; position: absolute; left: 50%; bottom: -12px; width: 14px; height: 14px; margin-left: -7px;
	background: #fff; border-left: 1px solid var(--keb-sd-garnet); border-top: 1px solid var(--keb-sd-garnet);
	transform: rotate(45deg); z-index: 2;
}
.keb-sd-card__media {
	position: relative; aspect-ratio: 1 / 1; background: #d6d8dc; display: flex; align-items: center; justify-content: center; overflow: hidden;
	border-radius: 2px 2px 0 0;
}
.keb-sd-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.keb-sd-card__shape { color: var(--keb-sd-gold); width: 40%; }
.keb-sd-card__shape svg { width: 100%; height: auto; display: block; }
.keb-sd-card__badge {
	position: absolute; top: 12px; left: 12px; z-index: 2; font-size: 12px; font-weight: 500; letter-spacing: 0; line-height: 1; text-transform: none;
	background: rgba(255, 255, 255, 0.94); border-radius: 5px; padding: 6px 9px; color: var(--keb-sd-ink);
}
.keb-sd-card__badge--pick { color: var(--keb-sd-gold-dark); }
.keb-sd-card__body { padding: 14px 16px 14px; display: flex; flex-direction: column; gap: 0; flex: 1; }
.keb-sd-card__price { margin: 0 0 6px; font-family: var(--keb-sd-serif); font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: 0; color: var(--keb-sd-ink); font-variant-numeric: tabular-nums; }
.keb-sd-card__title { font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1.35; margin: 0 0 1px; letter-spacing: 0; color: var(--keb-sd-ink); text-transform: none; }
.keb-sd-card__specs { margin: 0; font-size: 17px; font-weight: 400; letter-spacing: 0; line-height: 1.4; color: var(--keb-sd-ink); }
.keb-sd-card__cut { display: block; margin: 2px 0 0; font-size: 12.5px; color: var(--keb-sd-muted); }
.keb-sd-card__foot {
	margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.keb-sd-card__more {
	background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; min-height: 28px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 400; letter-spacing: 0;
	color: var(--keb-sd-ink); display: inline-flex; align-items: center; gap: 7px; text-transform: none; text-decoration: none;
}
.keb-sd-card__more svg { width: 10px; height: 7px; transition: transform .18s; }
.keb-sd-card.is-open .keb-sd-card__more svg { transform: rotate(180deg); }
.keb-sd-card__more:hover { color: var(--keb-sd-garnet); background: none; }
.keb-sd-card__more:focus-visible { outline: 2px solid var(--keb-sd-gold); outline-offset: 3px; }
.keb-sd-card__cert { font-size: 13px; font-weight: 400; letter-spacing: 0.02em; color: var(--keb-sd-ink); }

/* The shared detail block (diamond-detail.css) parked inside the results grid */
.keb-shop-diamonds .keb-sd-detail { grid-column: 1 / -1; animation: keb-sd-reveal .22s ease; }
@keyframes keb-sd-reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Status + more */
.keb-shop-diamonds__status { text-align: center; padding: 40px 0; color: var(--keb-sd-muted); font-size: 14px; }
.keb-shop-diamonds__more-wrap { text-align: center; margin-top: 32px; }
.keb-shop-diamonds__more {
	background: var(--keb-sd-paper); border: 1px solid var(--keb-sd-ink); border-radius: 0; color: var(--keb-sd-ink); cursor: pointer; box-shadow: none;
	font-family: inherit; font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; min-height: 46px; padding: 13px 28px; transition: background .16s, color .16s, border-color .16s;
}
.keb-shop-diamonds__more:hover { background: var(--keb-sd-garnet); border-color: var(--keb-sd-garnet); color: #fff; }
.keb-shop-diamonds__more:focus-visible { outline: 2px solid var(--keb-sd-gold); outline-offset: 3px; }
.keb-shop-diamonds__grid[aria-busy="true"] { opacity: 0.55; transition: opacity .2s; }

/* Large desktop: a little more air in the filters */
@media (min-width: 1500px) {
	.keb-shop-diamonds__filters { gap: 18px 56px; }
}

/* Laptop: filters in three columns */
@media (max-width: 1280px) {
	.keb-shop-diamonds__filters { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 36px; }
}

/* Tablet: two columns of filters; list drops polish / symmetry / lab */
@media (max-width: 1100px) {
	.keb-shop-diamonds__list-head, .keb-sd-row { grid-template-columns: minmax(120px, 1.2fr) repeat(4, minmax(0, 1fr)) minmax(90px, 1fr) 40px; }
	.keb-sd-col--finish, .keb-sd-col--lab { display: none; }
	.keb-shop-diamonds__filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 32px; }
}

/* Phone: filters fold behind a button; the strip scrolls sideways with a fade hint */
@media (max-width: 640px) {
	.keb-shop-diamonds__inner { padding: 8px 16px 48px; }
	.keb-shop-diamonds__intro { padding-top: 22px; }
	.keb-shop-diamonds__origins { max-width: none; margin-top: 20px; }
	.keb-shop-diamonds__collections { gap: 26px; margin-top: 14px; }
	.keb-shop-diamonds__shapes { position: relative; margin-top: 22px; }
	.keb-shop-diamonds__shapes::after {
		content: ""; position: absolute; top: 0; right: 0; bottom: 1px; width: 36px; pointer-events: none;
		background: linear-gradient(to right, rgba(248, 246, 242, 0), var(--keb-sd-paper));
	}
	.keb-shop-diamonds__shape-strip { justify-content: flex-start; padding: 0; }
	.keb-shop-diamonds__filter-toggle {
		display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 18px 0 0; border-radius: 0; box-shadow: none;
		background: #fff; border: 1px solid var(--keb-sd-ink); color: var(--keb-sd-ink); cursor: pointer;
		font-family: inherit; font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; min-height: 46px; padding: 12px 16px;
	}
	.keb-shop-diamonds__filter-toggle::after { content: "+"; font-weight: 400; font-size: 16px; }
	.keb-shop-diamonds__filter-toggle[aria-expanded="true"]::after { content: "–"; }
	.keb-shop-diamonds__filter-toggle span { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--keb-sd-gold-dark); }
	.keb-shop-diamonds__filters { display: none; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 18px 0 20px; }
	.keb-shop-diamonds__filters.is-open { display: grid; }
	.keb-sd-filter__inputs, .keb-sd-range { max-width: none; }
	.keb-shape-tile { width: 76px; padding: 6px 6px 12px; }
	.keb-shape-tile__art svg { width: 46px; height: 46px; }
	.keb-shape-tile__label { font-size: 11px; white-space: normal; }
	.keb-sd-scale { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
	.keb-sd-scale__item { min-width: 0; }
	.keb-sd-scale__item span { padding: 6px 4px; white-space: normal; text-align: center; line-height: 1.15; }
	[data-keb-group="fancy_intensities"] .keb-sd-scale { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
	.keb-shop-diamonds__toolbar { padding: 10px 0; }
	.keb-shop-diamonds__toolbar-right { gap: 16px; }
	.keb-shop-diamonds__list-head, .keb-sd-row { grid-template-columns: 40px repeat(3, minmax(0, 1fr)) minmax(72px, 1.1fr) 32px; gap: 0 6px; }
	.keb-shop-diamonds__list-head { padding: 8px 6px; font-size: 9px; letter-spacing: 0.08em; }
	.keb-sd-row { padding: 10px 6px; min-height: 56px; }
	.keb-sd-row__shape-label, .keb-sd-col--cut { display: none; }
	.keb-sd-row__sketch svg { width: 26px; height: 26px; }
	.keb-sd-row__cell { font-size: 13px; }
	.keb-sd-row__price { font-size: 15px; }
	.keb-shop-diamonds .keb-sd-row__more { width: 32px; height: 32px; }
	.keb-shop-diamonds__grid { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; }
	.keb-sd-card__body { padding: 12px 12px 12px; }
	.keb-sd-card__price { font-size: 17px; margin-bottom: 4px; }
	.keb-sd-card__title { font-size: 13.5px; }
	.keb-sd-card__specs { font-size: 15px; }
	.keb-sd-card__foot { padding-top: 10px; }
	.keb-sd-card.is-open::after { bottom: -8px; width: 12px; height: 12px; margin-left: -6px; }
}

/* v0.9.16 — the shop starts higher and the top is condensed: the theme's
   page-top padding gives way on the page that carries the shortcode, the
   eyebrow goes, the title and lead tighten, the type switch and the colour
   collection share one row, the shape strip and filter rail sit closer. */
body.keb-shop-diamonds-active .main_container.padding_top_l { padding-top: 24px; }
.keb-shop-diamonds__intro { padding: 8px 0 0; }
.keb-shop-diamonds__eyebrow { display: none; }
.keb-shop-diamonds__title { font-size: clamp(28px, 3vw, 38px); margin: 0 0 8px; }
.keb-shop-diamonds__lead { max-width: 780px; font-size: 14.5px; line-height: 1.5; }
.keb-shop-diamonds__switches { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 40px; margin: 18px auto 0; }
.keb-shop-diamonds__origins { margin: 0; max-width: none; grid-template-columns: repeat(2, 150px); gap: 8px; }
.keb-shop-diamonds__origin { min-height: 42px; }
.keb-shop-diamonds__collections { margin: 0; gap: 28px; }
.keb-shop-diamonds__collection { padding: 6px 2px 8px; }
.keb-shop-diamonds__shapes { margin-top: 16px; }
.keb-shape-tile { width: 88px; padding: 6px 8px 12px; gap: 6px; }
.keb-shape-tile__art svg { width: 50px; height: 50px; }
.keb-shop-diamonds__filters { padding: 16px 0 20px; }
.keb-shop-diamonds__toolbar { padding: 10px 0 8px; }
@media (max-width: 640px) {
	body.keb-shop-diamonds-active .main_container.padding_top_l { padding-top: 12px; }
	.keb-shop-diamonds__intro { padding-top: 4px; }
	.keb-shop-diamonds__lead { display: none; }
	.keb-shop-diamonds__switches { margin-top: 14px; gap: 12px 24px; }
	.keb-shop-diamonds__origins { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.keb-shop-diamonds__shapes { margin-top: 14px; }
}

/* v0.9.24 — type and colour pass. One voice: the serif for the stone's name
   and its price, Jost for everything else; ink for what matters, one muted
   grey for what explains it; a chosen grade boxed in ink on ivory rather than
   filled garnet (garnet stays for the buy buttons); no pill badges on photos. */
.keb-sd-scale__item input:checked + span { background: var(--keb-sd-warm); border-color: var(--keb-sd-ink); box-shadow: inset 0 0 0 1px var(--keb-sd-ink); color: var(--keb-sd-ink); font-weight: 600; }
.keb-sd-card__badge:not(.keb-sd-card__badge--pick) { display: none; }
.keb-sd-card__badge--pick { top: 10px; left: 10px; padding: 4px 8px; border-radius: 0; background: rgba(255, 255, 255, 0.92); box-shadow: none; font-size: 9.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--keb-sd-gold-dark); }
.keb-sd-card__body { padding: 14px 16px 12px; gap: 2px; }
.keb-sd-card__title { order: 1; font-family: var(--keb-sd-serif); font-size: 21px; font-weight: 400; line-height: 1.15; margin: 0; color: var(--keb-sd-ink); }
.keb-sd-card__specs { order: 2; font-size: 13.5px; line-height: 1.4; color: var(--keb-sd-muted); }
.keb-sd-card__cut { order: 3; margin: 0; font-size: 12.5px; color: var(--keb-sd-muted); }
.keb-sd-card__price { order: 4; margin: 10px 0 0; font-size: 20px; font-weight: 600; }
.keb-sd-card__foot { order: 5; }
.keb-sd-card__cert { font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--keb-sd-gold-dark); }
.keb-sd-row__price { font-size: 18px; }
@media (max-width: 1100px) {
	.keb-sd-card__title { font-size: 19px; }
	.keb-sd-card__price { font-size: 18px; }
}

/* v0.11.2 — the stone collection is the first choice: White diamonds |
   Coloured diamonds | Gemstones as the boxed pair/trio that Natural | Lab
   Grown used to be; Natural | Lab Grown becomes the first filter of the
   diamond collections, a full-width row at the top of the rail. */
.keb-shop-diamonds__switches { margin-top: 20px; gap: 8px; }
.keb-shop-diamonds__collections { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, auto); gap: 8px; margin: 0; }
.keb-shop-diamonds__collection {
	display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 18px;
	background: transparent; border: 1px solid var(--keb-sd-tile-line); border-radius: 0; color: var(--keb-sd-muted);
	font-size: 11px; font-weight: 500; line-height: 1.2; letter-spacing: 0.16em; text-transform: uppercase;
	transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.keb-shop-diamonds__collection::after { display: none; }
.keb-shop-diamonds__collection:hover { background: #fff; border-color: var(--keb-sd-ink); color: var(--keb-sd-ink); }
.keb-shop-diamonds__collection.is-active { background: #fff; border-color: var(--keb-sd-ink); color: var(--keb-sd-ink); font-weight: 600; }
.keb-shop-diamonds__collection:focus-visible { outline: 2px solid var(--keb-sd-gold); outline-offset: 3px; }

.keb-sd-filter--origin { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 0 0 14px; border-bottom: 1px solid var(--keb-sd-line-soft, var(--keb-sd-line)); }
.keb-sd-filter--origin[hidden] { display: none; }
.keb-sd-filter--origin .keb-sd-filter__head { margin: 0; }
.keb-sd-filter--origin .keb-shop-diamonds__origins { display: inline-grid; grid-template-columns: repeat(2, 136px); gap: 6px; margin: 0; max-width: none; }
.keb-sd-filter--origin .keb-shop-diamonds__origin {
	min-height: 42px; padding: 6px 12px; border-radius: 4px; background: #fff; border: 1px solid var(--keb-sd-tile-line); color: var(--keb-sd-ink);
	font-size: 12px; font-weight: 500; letter-spacing: 0.01em; text-transform: none;
}
.keb-sd-filter--origin .keb-shop-diamonds__origin:hover { background: #fff; border-color: var(--keb-sd-ink); color: var(--keb-sd-ink); }
.keb-sd-filter--origin .keb-shop-diamonds__origin.is-active { background: var(--keb-sd-warm); border-color: var(--keb-sd-ink); box-shadow: inset 0 0 0 1px var(--keb-sd-ink); color: var(--keb-sd-ink); font-weight: 600; }

/* The gemstones' own shape strip sits under the type tiles, the diamond strip's
   twin; a strip wider than the page starts from its left edge rather than
   clipping. "All shapes" carries a quiet serif "All" where the others carry a drawing. */
.keb-shop-diamonds__shape-strip { justify-content: safe center; }
.keb-shop-diamonds__shapes--gem { margin-top: 8px; }
.keb-shape-tile__art--all { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; font-family: var(--keb-sd-serif); font-size: 26px; font-weight: 400; line-height: 1; }

@media (max-width: 640px) {
	.keb-shop-diamonds__switches { margin-top: 14px; }
	.keb-shop-diamonds__collections { width: 100%; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
	.keb-shop-diamonds__collection { min-height: 44px; padding: 6px 4px; font-size: 9.5px; letter-spacing: 0.1em; text-align: center; }
	.keb-sd-filter--origin { gap: 8px; padding-bottom: 12px; }
	.keb-sd-filter--origin .keb-shop-diamonds__origins { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.keb-shape-tile__art--all { width: 46px; height: 46px; font-size: 24px; }
	.keb-shop-diamonds__shapes--gem .keb-shape-tile__art svg { width: 36px; height: 36px; }
}
