/* ===== Shop This That – Feature Cards ===== */

/* The row: swipe on mobile, 5 across on desktop (scrolls if you add more) */
.stt-cards {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 16px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding: 14px 16px 18px;
	margin-top: 0;
	margin-bottom: 0;
	box-sizing: border-box;
}
.stt-cards::-webkit-scrollbar { display: none; }

/* Each card (an Image block) – 2.5 visible on mobile */
.stt-cards > .wp-block-image {
	flex: 0 0 calc((100% - 24px) / 2.5);
	margin: 0 !important;
	scroll-snap-align: start;
	filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.04));
}

.stt-cards > .wp-block-image a {
	position: relative;
	display: block;
	border-radius: 28px;
	overflow: hidden;
	text-decoration: none;
	transition: transform 0.25s ease;
}
.stt-cards > .wp-block-image a:hover { transform: translateY(-4px); }

.stt-cards > .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 28px;
}

/* Floating arrow – added automatically to every linked card */
.stt-cards > .wp-block-image a::after {
	content: "\2192";
	position: absolute;
	left: 12px;
	bottom: 10px;
	width: 28px;
	height: 28px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(8px);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	line-height: 1;
	color: #111;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	transition: all 0.2s ease;
}
.stt-cards > .wp-block-image a:hover::after {
	transform: translateX(2px);
	background: #fff;
}

/* Desktop */
@media (min-width: 768px) {
	.stt-cards { gap: 18px; }

	.stt-cards > .wp-block-image {
		flex-basis: calc((100% - 72px) / 5);
	}

	.stt-cards > .wp-block-image img {
		height: 235px;
		object-fit: cover;
	}

	.stt-cards > .wp-block-image a::after {
		left: 16px;
		bottom: 16px;
		width: 38px;
		height: 38px;
		font-size: 18px;
	}
}
/* =========================================================
   EDITABLE CARDS (v1.2) – compact
   Group.stt-card > Heading.stt-card-title (link) + Paragraph.stt-card-sub + Image.stt-card-img
   ========================================================= */

.stt-cards > .stt-card {
	position: relative;
	isolation: isolate;          /* keeps the product photo behind the text */
	flex: 0 0 calc((100% - 24px) / 2.5);  /* mobile: ~2.5 cards visible */
	min-height: 104px;
	margin: 0 !important;
	padding: 12px 10px;
	box-sizing: border-box;
	border-radius: 22px;
	overflow: hidden;
	background-color: #f4efe8;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	justify-content: center;
	transition: transform 0.25s ease;
}
.stt-cards > .stt-card:hover { transform: translateY(-4px); }

/* No icons in the compact design */
.stt-card::before { display: none !important; }

/* Text column (left) */
.stt-card > :not(.stt-card-img) {
	max-width: 64%;
	margin: 0 !important;
}

.stt-card .stt-card-title {
	font-size: 14px;
	line-height: 1.05;
	letter-spacing: -0.01em;
	color: #1d1d1d;
}
.stt-card .stt-card-title a {
	color: inherit !important;
	text-decoration: none !important;
	box-shadow: none !important;
	background: none !important;
}

.stt-card .stt-card-sub {
	margin-top: 4px !important;
	font-size: 10px;
	line-height: 1.3;
	color: #2b2b2b;
}

/* Product cutout – right side, behind the text */
.stt-card .stt-card-img {
	position: absolute;
	z-index: -1;
	top: 8%;
	right: 4%;
	bottom: 8%;
	width: 44%;
	max-width: none;
	margin: 0 !important;
}
.stt-card .stt-card-img img {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain;
	object-position: center right;
	border-radius: 0;
}

/* Arrow button – bottom RIGHT, sits over the product photo */
.stt-card .stt-card-title a::before {
	content: "\2192";
	position: absolute;
	right: 8px;
	bottom: 8px;
	z-index: 5;
	width: 22px;
	height: 22px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(8px);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	line-height: 1;
	font-family: system-ui, sans-serif;
	font-weight: 400;
	color: #111;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	transition: all 0.2s ease;
	pointer-events: none;
}
.stt-card:hover .stt-card-title a::before {
	transform: translateX(2px);
	background: #fff;
}

@media (min-width: 768px) {
	.stt-cards > .stt-card {
		flex-basis: calc((100% - 72px) / 5);
		min-height: 160px;
		padding: 20px 22px;
		border-radius: 26px;
	}
	.stt-card > :not(.stt-card-img) { max-width: 58%; }
	.stt-card .stt-card-title { font-size: clamp(20px, 1.55vw, 30px); }
	.stt-card .stt-card-sub { font-size: clamp(13px, 0.9vw, 16px); margin-top: 8px !important; }
	.stt-card .stt-card-title a::before {
		right: 14px; bottom: 14px; width: 32px; height: 32px; font-size: 15px;
	}
}

/* In the editor: wrap cards 3 per row so every card is easy to click and edit */
.editor-styles-wrapper .stt-cards {
	flex-wrap: wrap;
	overflow: visible;
}
.editor-styles-wrapper .stt-cards > .stt-card {
	flex-basis: calc((100% - 36px) / 3);
}
