.sr-section {
	--sr-columns: 4;
	max-width: 1200px;
	margin: 48px auto;
	padding: 0 20px;
	text-align: center;
	box-sizing: border-box;
}
.sr-section * { box-sizing: border-box; }

.sr-heading {
	font-size: clamp(24px, 3vw, 34px);
	color: #0f7a72;
	margin: 0 0 6px;
	font-family: Georgia, 'Times New Roman', serif;
}
.sr-subheading { color: #6b6357; margin: 0 0 28px; }

/* Horizontally scrollable reel rail */
.sr-grid {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	padding: 4px 4px 14px;
	text-align: left;
	scrollbar-width: thin;
}
.sr-grid::-webkit-scrollbar { height: 6px; }
.sr-grid::-webkit-scrollbar-thumb { background: #ddd3c0; border-radius: 3px; }

.sr-card {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	gap: 6px;
	font: inherit;
	color: inherit;
	width: clamp(140px, 26vw, 190px);
	scroll-snap-align: start;
}

.sr-thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 9 / 16;
	border-radius: 10px;
	background: #e9e3d6;
	overflow: hidden;
	display: block;
}

/* Skeleton shimmer shown until every reel in the row has its poster ready,
   then the whole row reveals together instead of popping in one by one. */
.sr-card.sr-skeleton .sr-thumb {
	background: linear-gradient(100deg, #ece5d8 30%, #f5f0e6 50%, #ece5d8 70%);
	background-size: 200% 100%;
	animation: sr-shimmer 1.4s ease-in-out infinite;
}
@keyframes sr-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

.sr-thumb-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	background: transparent;
}
.sr-card.sr-skeleton .sr-thumb-video,
.sr-card.sr-skeleton .sr-views,
.sr-card.sr-skeleton .sr-card-title,
.sr-card.sr-skeleton .sr-card-price {
	opacity: 0;
}
.sr-card.sr-loaded .sr-thumb {
	animation: none;
}
.sr-card.sr-loaded .sr-thumb-video,
.sr-card.sr-loaded .sr-views,
.sr-card.sr-loaded .sr-card-title,
.sr-card.sr-loaded .sr-card-price {
	opacity: 1;
	transition: opacity .35s ease;
}

.sr-views {
	position: absolute;
	top: 8px;
	left: 8px;
	background: rgba(0,0,0,.6);
	color: #fff;
	font-size: 11px;
	padding: 3px 8px;
	border-radius: 5px;
	pointer-events: none;
	display: flex;
	align-items: center;
	gap: 4px;
}
.sr-eye-icon, .sr-mute-icon {
	display: inline-block;
	width: 12px;
	height: 12px;
	flex: 0 0 auto;
}
.sr-eye-icon .sr-ic { width: 11px; height: 11px; }

.sr-card-title {
	font-size: 13.5px;
	font-weight: 600;
	color: #2b2b2b;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.sr-card-price { font-size: 13px; color: #444; }
.sr-card-price ins { text-decoration: none; color: #0f7a72; font-weight: 700; }
.sr-card-price del { color: #999; margin-left: 4px; }

/* Full-screen viewer (built + appended to <body> by JS, never in initial HTML) */
.sr-viewer {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	background: #000;
	align-items: center;
	justify-content: center;
}
.sr-viewer.is-open { display: flex; }
.sr-viewer-inner {
	position: relative;
	width: 100%;
	max-width: 420px;
	height: 100%;
	max-height: 100vh;
	background: #111;
	overflow: hidden;
}
@media (min-width: 480px) {
	.sr-viewer-inner { max-height: 90vh; margin: auto; border-radius: 14px; }
}

.sr-viewer-track {
	height: 100%;
	overflow-y: auto;
	overflow-x: hidden;
	scroll-snap-type: y mandatory;
	scrollbar-width: none;
}
.sr-viewer-track::-webkit-scrollbar { display: none; }

.sr-slide {
	position: relative;
	width: 100%;
	height: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
}
.sr-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	background: #000;
}

.sr-top-controls {
	position: absolute;
	top: 14px;
	right: 12px;
	display: flex;
	gap: 10px;
	z-index: 5;
}
.sr-btn {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(0,0,0,.45);
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.sr-btn .sr-ic { width: 18px; height: 18px; display: block; }

/* Icons are rendered as colour masks (background-color painted through an
   SVG shape) rather than inline <svg>, so no theme "svg path { fill }"
   reset can ever hide or recolour them. */
.sr-ic {
	display: inline-block;
	background-color: #fff !important;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}
.sr-ic-close {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'><line x1='5' y1='5' x2='19' y2='19'/><line x1='19' y1='5' x2='5' y2='19'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'><line x1='5' y1='5' x2='19' y2='19'/><line x1='19' y1='5' x2='5' y2='19'/></svg>");
}
.sr-ic-sound-on {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 9v6h4l5 5V4L8 9H4z'/><path d='M16.5 8.5a5 5 0 010 7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/><path d='M19 6a9 9 0 010 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 9v6h4l5 5V4L8 9H4z'/><path d='M16.5 8.5a5 5 0 010 7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/><path d='M19 6a9 9 0 010 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/></svg>");
}
.sr-ic-sound-off {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 9v6h4l5 5V4L8 9H4z'/><line x1='16' y1='9' x2='21' y2='15' stroke='black' stroke-width='2' stroke-linecap='round'/><line x1='21' y1='9' x2='16' y2='15' stroke='black' stroke-width='2' stroke-linecap='round'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 9v6h4l5 5V4L8 9H4z'/><line x1='16' y1='9' x2='21' y2='15' stroke='black' stroke-width='2' stroke-linecap='round'/><line x1='21' y1='9' x2='16' y2='15' stroke='black' stroke-width='2' stroke-linecap='round'/></svg>");
}
.sr-ic-heart {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'><path d='M12 21s-7.5-4.6-10-9.3C.4 8 2 4.5 5.6 4c2-.3 3.8.7 5 2.4C11.8 4.7 13.6 3.7 15.6 4c3.6.5 5.2 4 3.6 7.7C16.5 16.4 12 21 12 21z'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'><path d='M12 21s-7.5-4.6-10-9.3C.4 8 2 4.5 5.6 4c2-.3 3.8.7 5 2.4C11.8 4.7 13.6 3.7 15.6 4c3.6.5 5.2 4 3.6 7.7C16.5 16.4 12 21 12 21z'/></svg>");
}
.sr-ic-share {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='12' y1='19' x2='12' y2='5'/><polyline points='6 11 12 5 18 11'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='12' y1='19' x2='12' y2='5'/><polyline points='6 11 12 5 18 11'/></svg>");
}
.sr-ic-eye {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7-11-7-11-7z'/><circle cx='12' cy='12' r='3'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7-11-7-11-7z'/><circle cx='12' cy='12' r='3'/></svg>");
}
.sr-icon-btn.is-liked .sr-ic-heart { background-color: #ff4d67 !important; }

.sr-side-actions {
	position: absolute;
	right: 12px;
	bottom: 130px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	align-items: center;
	z-index: 3;
}
.sr-icon-btn {
	background: rgba(0,0,0,.35);
	border: none;
	color: #fff;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	gap: 2px;
}
.sr-icon-btn .sr-ic { width: 27px; height: 27px; }
.sr-icon-btn .sr-count { font-size: 11px; }
.sr-icon-btn.is-liked svg { fill: #ff4d67; stroke: #ff4d67; }

.sr-product-card {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 66px;
	background: rgba(255,255,255,.95);
	border-radius: 12px;
	padding: 8px;
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: #222;
	z-index: 3;
}
.sr-product-img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.sr-product-info { display: flex; flex-direction: column; overflow: hidden; }
.sr-product-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-product-price { font-size: 12.5px; }
.sr-product-price ins { text-decoration: none; color: #0f7a72; font-weight: 700; }
.sr-product-price del { color: #999; margin-left: 4px; font-size: 11.5px; }

/* Wrapper owns the positioning so the theme's own WooCommerce button
   styles (margins, floats, box-shadows) can't push it out of place. */
.sr-cart-wrap {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 16px;
	z-index: 4;
}
.sr-cart-wrap .sr-add-cart-btn,
.sr-cart-wrap a.sr-add-cart-btn,
.sr-cart-wrap span.sr-add-cart-btn {
	display: block !important;
	position: static !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 13px 12px !important;
	background: #1a1a1a !important;
	color: #fff !important;
	border: none !important;
	border-radius: 10px !important;
	font-weight: 700 !important;
	font-size: 14px !important;
	line-height: normal !important;
	text-align: center !important;
	text-decoration: none !important;
	text-transform: none !important;
	box-shadow: none !important;
	cursor: pointer !important;
}
.sr-cart-wrap .sr-add-cart-btn.is-added { background: #2f7d3f !important; }
.sr-cart-wrap .sr-add-cart-btn.sr-outofstock {
	background: #555 !important;
	cursor: not-allowed !important;
	pointer-events: none !important;
}
/* WooCommerce auto-inserts a "View cart" link right after the button on
   ajax add-to-cart — hide it, we show our own "Added" state instead. */
.sr-cart-wrap .added_to_cart,
.sr-cart-wrap a.wc-forward {
	display: none !important;
}
