/**
 * The Gemstones collection of the stone-first page (v0.11.0, v0.11.1: one
 * page). Sits on shop-diamonds.css — the same page frame, filter rail, cards
 * and detail panel — and adds only what gemstones need: a strip of photo
 * type tiles (one real stone per type) in place of the shape strip, a rail
 * that starts folded behind "Filters" with long groups behind "Show more",
 * the "Set in a ring" / "Buy loose" actions on each card, and the 360° mark.
 * The strip and cards are scoped under .keb-shop-gemstones (the page with
 * gemstones on offer); anything that changes the shared rail is scoped to
 * [data-keb-collection="gem"] so the diamond collections keep their layout.
 */

/* --- the type strip: a real stone per type, the name and the lowest price --- */
.keb-shop-gemstones .keb-sg-types { margin: 30px 0 0; }
.keb-shop-gemstones .keb-sg-types__strip {
	display: flex; justify-content: flex-start; justify-content: safe center; align-items: flex-start; gap: 4px;
	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-gemstones .keb-sg-types__strip::-webkit-scrollbar { display: none; }
.keb-shop-gemstones .keb-sg-type {
	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: 10px 10px 16px; font: inherit; color: var(--keb-sd-ink);
	width: 128px; scroll-snap-align: center; transition: color .15s; text-align: center;
}
.keb-shop-gemstones .keb-sg-type::after {
	content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 2px;
	background: var(--keb-sd-garnet); transform: scaleX(0); transition: transform .18s ease;
}
.keb-shop-gemstones .keb-sg-type.is-selected::after { transform: scaleX(1); }
.keb-shop-gemstones .keb-sg-type:hover { background: none; }
.keb-shop-gemstones .keb-sg-type:focus-visible { outline: 2px solid var(--keb-sd-gold); outline-offset: 2px; }
.keb-shop-gemstones .keb-sg-type__art {
	display: block; width: 76px; height: 76px; border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--keb-stone, #9a9a9a) 45%, #fff) 0, var(--keb-stone, #9a9a9a) 55%, color-mix(in srgb, var(--keb-stone, #9a9a9a) 70%, #000) 100%);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); transition: transform .15s;
}
@supports not (background: color-mix(in srgb, #000 50%, #fff)) {
	.keb-shop-gemstones .keb-sg-type__art { background: var(--keb-stone, #9a9a9a); }
}
/* v0.11.2: "All" as a quiet serif mark in a hairline circle, not a colour wheel. */
.keb-shop-gemstones .keb-sg-type__art--all {
	display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--keb-sd-tile-line);
	font-family: var(--keb-sd-serif); font-size: 24px; font-weight: 400; line-height: 1; color: var(--keb-sd-muted); transition: color .15s, box-shadow .15s, transform .15s;
}
.keb-shop-gemstones .keb-sg-type:hover .keb-sg-type__art--all,
.keb-shop-gemstones .keb-sg-type.is-selected .keb-sg-type__art--all { color: var(--keb-sd-ink); box-shadow: inset 0 0 0 1px var(--keb-sd-ink); }
.keb-shop-gemstones .keb-sg-type--photo .keb-sg-type__art {
	background: #f6f4f1; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.keb-shop-gemstones .keb-sg-type__art img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); }
.keb-shop-gemstones .keb-sg-type:hover .keb-sg-type__art { transform: translateY(-2px); }
.keb-shop-gemstones .keb-sg-type__label {
	font-size: 13px; font-weight: 400; letter-spacing: 0.02em; line-height: 1.2; color: var(--keb-sd-muted); transition: color .15s; max-width: 112px;
}
.keb-shop-gemstones .keb-sg-type__meta { font-size: 11px; line-height: 1.2; color: var(--keb-sd-soft); margin-top: -4px; }
.keb-shop-gemstones .keb-sg-type:hover .keb-sg-type__label,
.keb-shop-gemstones .keb-sg-type.is-selected .keb-sg-type__label { color: var(--keb-sd-ink); }
.keb-shop-gemstones .keb-sg-type.is-selected .keb-sg-type__label { font-weight: 500; }

/* --- parts that step aside with the collection (the hidden attribute wins over their display rules) --- */
.keb-shop-diamonds .keb-shop-diamonds__views[hidden],
.keb-shop-diamonds .keb-shop-diamonds__shapes[hidden],
.keb-shop-diamonds .keb-sg-types[hidden],
.keb-shop-diamonds .keb-shop-diamonds__list-head[hidden] { display: none !important; }

/* --- the gemstone collection: no Natural | Lab Grown, the rail folded behind Filters --- */
.keb-shop-diamonds[data-keb-collection="gem"] .keb-shop-diamonds__origins { display: none; }
.keb-shop-diamonds[data-keb-collection="gem"] .keb-shop-diamonds__filter-toggle {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; min-width: 150px; 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: 44px; padding: 10px 18px;
}
.keb-shop-diamonds[data-keb-collection="gem"] .keb-shop-diamonds__filter-toggle::after { content: "+"; font-weight: 400; font-size: 16px; }
.keb-shop-diamonds[data-keb-collection="gem"] .keb-shop-diamonds__filter-toggle[aria-expanded="true"]::after { content: "–"; }
.keb-shop-diamonds[data-keb-collection="gem"] .keb-shop-diamonds__filter-toggle span { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--keb-sd-gold-dark); }
.keb-shop-diamonds[data-keb-collection="gem"] .keb-shop-diamonds__filters:not(.is-open) { display: none; }
.keb-shop-diamonds[data-keb-collection="gem"] .keb-shop-diamonds__filters { grid-template-columns: minmax(230px, 1fr) repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--keb-sd-line-soft); margin-top: 14px; }
.keb-shop-diamonds[data-keb-collection="gem"] [data-keb-group="gem_origins"],
.keb-shop-diamonds[data-keb-collection="gem"] [data-keb-group="gem_shades"] { grid-column: span 2; }
.keb-shop-diamonds[data-keb-collection="gem"] [data-keb-group="gem_view_in_person"] .keb-sd-scale__item { min-width: 0; }
.keb-shop-diamonds .keb-sd-filter__more {
	background: none; border: 0; border-radius: 0; box-shadow: none; cursor: pointer; font: inherit; font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
	text-transform: uppercase; color: var(--keb-sd-gold-dark); padding: 10px 0 0; min-height: 0; text-decoration: underline; text-underline-offset: 4px;
}
.keb-shop-diamonds .keb-sd-filter__more:hover { color: var(--keb-sd-garnet); background: none; }

/* --- cards: the stone, then "Set in a ring" and "Buy loose" --- */
.keb-shop-gemstones .keb-sg-card__badge--video { left: auto; right: 12px; font-size: 10px; font-weight: 500; letter-spacing: 0.02em; background: rgba(255, 255, 255, 0.82); padding: 4px 7px; }
.keb-shop-gemstones .keb-sg-card__actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 12px; order: 9; }
.keb-shop-gemstones .keb-sg-card--loose .keb-sg-card__actions { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.keb-shop-gemstones .keb-sg-card__cta,
.keb-shop-gemstones .keb-sg-card__secondary {
	display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 10px; border-radius: 3px;
	font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; text-align: center; line-height: 1.2;
	transition: background .14s, border-color .14s, color .14s;
}
.keb-shop-gemstones .keb-sg-card__cta { background: var(--keb-sd-garnet); color: #fff; border: 1px solid var(--keb-sd-garnet); }
.keb-shop-gemstones .keb-sg-card__cta:hover { background: var(--keb-sd-ink); border-color: var(--keb-sd-ink); color: #fff; text-decoration: none; }
.keb-shop-gemstones .keb-sg-card__secondary { background: #fff; color: var(--keb-sd-ink); border: 1px solid #b9b0aa; }
.keb-shop-gemstones .keb-sg-card__secondary:hover { background: var(--keb-sd-garnet); border-color: var(--keb-sd-garnet); color: #fff; text-decoration: none; }
.keb-shop-gemstones .keb-sg-card__cta:focus-visible,
.keb-shop-gemstones .keb-sg-card__secondary:focus-visible { outline: 2px solid var(--keb-sd-gold); outline-offset: 2px; }
.keb-shop-diamonds[data-keb-collection="gem"] .keb-sd-detail__actions:not(.is-single) { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

@media (max-width: 1100px) {
	.keb-shop-diamonds[data-keb-collection="gem"] .keb-shop-diamonds__filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	.keb-shop-gemstones .keb-sg-types { position: relative; margin-top: 18px; }
	.keb-shop-gemstones .keb-sg-types__strip { justify-content: flex-start; }
	.keb-shop-gemstones .keb-sg-types::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-gemstones .keb-sg-type { width: 96px; padding: 8px 6px 12px; gap: 6px; }
	.keb-shop-gemstones .keb-sg-type__art { width: 58px; height: 58px; }
	.keb-shop-gemstones .keb-sg-type__label { font-size: 11.5px; max-width: 88px; }
	.keb-shop-gemstones .keb-sg-type__meta { font-size: 10px; }
	.keb-shop-diamonds[data-keb-collection="gem"] .keb-shop-diamonds__filter-toggle { display: flex; width: 100%; min-width: 0; }
	.keb-shop-diamonds[data-keb-collection="gem"] .keb-shop-diamonds__filters { grid-template-columns: minmax(0, 1fr); }
	.keb-shop-diamonds[data-keb-collection="gem"] [data-keb-group="gem_origins"],
	.keb-shop-diamonds[data-keb-collection="gem"] [data-keb-group="gem_shades"] { grid-column: auto; }
	.keb-shop-gemstones .keb-sg-card__actions,
	.keb-shop-gemstones .keb-sg-card--loose .keb-sg-card__actions { grid-template-columns: minmax(0, 1fr); gap: 6px; margin-top: 10px; }
	.keb-shop-gemstones .keb-sg-card__cta,
	.keb-shop-gemstones .keb-sg-card__secondary { min-height: 36px; font-size: 10px; }
}

/* The shop starts higher on the page that carries the shortcode (as Shop Diamonds). */
body.keb-shop-gemstones-active .keb-shop-gemstones .keb-sg-types { margin-top: 16px; }
