/* ============================================================================
   YEMMA — THE RUG ROW
   The strip a [yemma_rugs] shortcode / "Rug row" block prints into an article.

   Self-contained: it draws its own frame and lays the shop's own product card
   out in a horizontal, snap-scrolling track. The card's inner look is the
   theme's; only its width and its place in the row are set here. Theme variables
   are used where the theme defines them, each with a fallback so the row still
   reads on a theme that does not.
   ========================================================================== */

.rugrow {
	margin-block: clamp(2.2rem, 4vw, 3.4rem);
	/* bleed past the text column so the row reads as its own object */
	margin-inline: calc(clamp(1rem, 5vw, 5rem) * -1);
}

.rugrow__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	padding: 0 clamp(1rem, 5vw, 5rem) 0.9rem;
	border-bottom: 1px solid var(--line, #dfd4c2);
}

.rugrow__cap {
	font-family: var(--sans, system-ui, -apple-system, sans-serif);
	font-size: 9.5px;
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--muted, #8a8178);
}

.rugrow__cap b {
	color: var(--clay, #a9522f);
	font-weight: 500;
}

.rugrow__nav {
	display: flex;
	gap: 0.35rem;
}

.rugrow__nav button {
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	padding: 0;
	background: transparent;
	border: 1px solid var(--line, #dfd4c2);
	color: var(--ink, #14100d);
	cursor: pointer;
	transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.rugrow__nav button:hover {
	background: var(--ink, #14100d);
	border-color: var(--ink, #14100d);
	color: var(--bone, #fffdf9);
}

.rugrow__nav button[disabled] {
	opacity: 0.28;
	pointer-events: none;
}

.rugrow__nav svg {
	width: 13px;
	height: 13px;
}

.rugrow__track {
	display: flex;
	gap: clamp(0.8rem, 1.4vw, 1.2rem);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 1.2rem clamp(1rem, 5vw, 5rem);
	scrollbar-width: thin;
}

.rugrow__track.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
}

/* while dragging, a click that ends the drag must not open a rug */
.rugrow__track.is-dragging a {
	pointer-events: none;
}

.rugrow__track::-webkit-scrollbar {
	height: 3px;
}

.rugrow__track::-webkit-scrollbar-thumb {
	background: var(--line, #dfd4c2);
}

/* The shop's own card, as a horizontal item. Its inner styling is the theme's;
   only the width and the snap belong to the row. */
.rugrow__track > * {
	flex: 0 0 clamp(190px, 30vw, 244px);
	scroll-snap-align: start;
	margin: 0;
}

.rugrow__all {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	margin: 0 clamp(1rem, 5vw, 5rem);
	font-size: 10px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--clay, #a9522f);
	text-decoration: none;
}

.rugrow__all svg {
	width: 14px;
	height: 14px;
	transition: transform 0.35s ease;
}

.rugrow__all:hover svg {
	transform: translateX(5px);
}

@media (max-width: 720px) {
	.rugrow__nav {
		display: none;
	}
}
