/**
 * StrapsCo Blog Blocks — front-end styles
 * Matches the approved mockup: site fonts/colors, gold pill button.
 * All selectors are prefixed with .strapsco- to avoid theme collisions.
 */

:root {
	--strapsco-ink: #1D1410;
	--strapsco-muted: #6E6357;
	--strapsco-faint: #9A8F80;
	--strapsco-line: #E6DFD3;
	--strapsco-line-strong: #D8CFBF;
	--strapsco-surface: #FFFFFF;
	--strapsco-surface-2: #F6F2EA;
	--strapsco-accent: #EDCD2D;
	--strapsco-accent-ink: #1D1410;
	--strapsco-star: #C9A227;   /* gold — matches the approved mockup exactly */
	--strapsco-eyebrow: #A8843A;
}

.strapsco-pblock,
.strapsco-blockc {
	font-family: "Inter", system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: var(--strapsco-ink);
	box-sizing: border-box;
}

.strapsco-pblock *,
.strapsco-blockc * {
	box-sizing: border-box;
}

.strapsco-error {
	background: #FBEAE7;
	border: 1px solid #E3B3AC;
	color: #7A2A20;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13px;
}

/* Shared card shell (Block A & B) */
.strapsco-pblock {
	background: var(--strapsco-surface);
	border: 1px solid var(--strapsco-line-strong);
	border-radius: 14px;
	padding: 16px 18px;
	margin: 20px 0;
	container-type: inline-size;
}

.strapsco-pblock__eyebrow {
	display: flex;
	align-items: center;
	gap: 9px;
	font: 600 11px/1 Inter, system-ui, sans-serif;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--strapsco-eyebrow);
}
.strapsco-pblock__eyebrow::before {
	content: "";
	width: 20px;
	height: 2px;
	background: var(--strapsco-eyebrow);
	border-radius: 2px;
	flex: 0 0 auto;
}

.strapsco-pblock__sub {
	font-size: 12.5px;
	color: var(--strapsco-muted);
	margin: 6px 0 0 !important;
	padding: 0 !important;
}
.strapsco-pblock__sub b {
	color: var(--strapsco-ink);
	font-weight: 600;
}

/* Thumbnails */
.strapsco-thumb {
	border: 1px solid var(--strapsco-line);
	border-radius: 10px;
	overflow: hidden;
	background: var(--strapsco-surface-2);
}
.strapsco-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.strapsco-thumb--empty {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23B8AD9C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='18' y='3' width='12' height='9' rx='2.5'/%3E%3Crect x='18' y='36' width='12' height='9' rx='2.5'/%3E%3Ccircle cx='24' cy='24' r='11.5'/%3E%3Cpath d='M24 24V18.5M24 24h4.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 44%;
}

/* Rating / price / SKU */
.strapsco-rating {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 5px !important;
	font: 500 12px Inter, system-ui, sans-serif;
	color: var(--strapsco-muted);
}
.strapsco-stars {
	display: inline-flex;
	color: var(--strapsco-star);
	letter-spacing: 1px;
	font-size: 12.5px;
	line-height: 1;
}
.strapsco-fitline {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	color: var(--strapsco-muted);
	margin-top: 6px !important;
}
.strapsco-fitline svg {
	width: 14px;
	height: 14px;
	color: var(--strapsco-star);
	flex: 0 0 auto;
}

.strapsco-row-price {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-top: 8px !important;
}
.strapsco-price {
	font: 700 16px Inter, system-ui, sans-serif;
	color: var(--strapsco-ink);
	font-variant-numeric: tabular-nums;
}
.strapsco-price ins {
	text-decoration: none;
}
.strapsco-price del {
	color: var(--strapsco-faint);
	font-weight: 500;
	font-size: 13px;
	margin-right: 4px;
}
.strapsco-price-from {
	font: 500 12px Inter, system-ui, sans-serif;
	color: var(--strapsco-muted);
	margin-right: 2px;
}
.strapsco-sku {
	font: 500 10.5px 'JetBrains Mono', monospace;
	color: var(--strapsco-faint);
	letter-spacing: .02em;
}

/* Button */
.strapsco-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	background: var(--strapsco-accent);
	color: var(--strapsco-accent-ink);
	border: none;
	border-radius: 40px;
	padding: 12px 20px;
	font: 600 13.5px Inter, system-ui, sans-serif;
	letter-spacing: .01em;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
}
.strapsco-btn:hover,
.strapsco-btn:focus {
	color: var(--strapsco-accent-ink);
	text-decoration: none;
	filter: brightness(0.96);
}
.strapsco-btn:focus-visible {
	outline: 2px solid var(--strapsco-ink);
	outline-offset: 2px;
}
.strapsco-btn--sm {
	padding: 9px 14px;
	font-size: 12.5px;
	width: 100%;
	margin-top: 2px;
}

.strapsco-textlink {
	font: 600 13px Inter, system-ui, sans-serif;
	color: var(--strapsco-ink);
	text-decoration: none;
	border-bottom: 2px solid var(--strapsco-accent);
	padding-bottom: 2px;
}
.strapsco-textlink:focus-visible {
	outline: 2px solid var(--strapsco-ink);
	outline-offset: 2px;
}

/* ==========================================================
   BLOCK A — single strap
   ========================================================== */
.strapsco-a-row {
	display: flex;
	gap: 16px;
	align-items: center;
	margin-top: 14px;
}
.strapsco-a-row .strapsco-thumb {
	flex: 0 0 auto;
	width: 98px;
	height: 98px;
}
.strapsco-a-info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}
.strapsco-a-row .strapsco-cta {
	flex: 0 0 auto;
}
.strapsco-pblock p.strapsco-pname,
.strapsco-pname {
	font: 600 15px/1.35 Inter, system-ui, sans-serif;
	margin: 0 !important;
	padding: 0 !important;
	color: var(--strapsco-ink);
}

@container (max-width: 440px) {
	.strapsco-a-row {
		flex-wrap: wrap;
	}
	.strapsco-a-row .strapsco-thumb {
		width: 78px;
		height: 78px;
	}
	.strapsco-a-row .strapsco-cta {
		flex: 1 1 100%;
	}
	.strapsco-a-row .strapsco-cta .strapsco-btn {
		width: 100%;
	}
}

/* ==========================================================
   BLOCK B — set of straps
   ========================================================== */
.strapsco-b-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-top: 14px;
}
.strapsco-b-grid--cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.strapsco-b-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.strapsco-b-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.strapsco-b-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.strapsco-b-grid--scrollable {
	display: flex;
	grid-template-columns: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	gap: 12px;
	padding-bottom: 8px;
	-webkit-overflow-scrolling: touch;
}
.strapsco-b-grid--scrollable .strapsco-scard {
	flex: 0 0 calc((100% - 36px) / 4);
	width: calc((100% - 36px) / 4);
	max-width: calc((100% - 36px) / 4);
	min-width: calc((100% - 36px) / 4);
	box-sizing: border-box;
	scroll-snap-align: start;
}
.strapsco-scard {
	display: flex;
	flex-direction: column;
	background: var(--strapsco-surface);
	border: 1px solid var(--strapsco-line);
	border-radius: 12px;
	overflow: hidden;
}
.strapsco-scard .strapsco-thumb {
	width: 100%;
	aspect-ratio: 1 / 1;
	border: none;
	border-bottom: 1px solid var(--strapsco-line);
	border-radius: 0;
}
.strapsco-scard__body {
	padding: 10px 11px 12px;
	display: flex;
	flex-direction: column;
	gap: 5px;
	flex: 1 1 auto;
}
.strapsco-scard p.strapsco-pname,
.strapsco-scard .strapsco-pname {
	font-size: 12.8px;
	line-height: 1.32;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.55em;
	margin: 0 !important;
	padding: 0 !important;
}
.strapsco-scard .strapsco-rating {
	margin-top: 0 !important;
}
.strapsco-carousel-wrapper {
	position: relative;
	width: 100%;
}
.strapsco-nav-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #1D1410;
	color: #FFFFFF;
	border: none;
	display: none;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0,0,0,0.25);
	transition: background 0.2s ease;
	padding: 0;
}
.strapsco-carousel-wrapper:has(.strapsco-b-grid--scrollable) .strapsco-nav-btn,
.strapsco-b-grid--scrollable ~ .strapsco-nav-btn {
	display: flex;
}
.strapsco-nav-btn:hover {
	background: #372F27;
}
.strapsco-nav-prev {
	left: -14px;
}
.strapsco-nav-next {
	right: -14px;
}
.strapsco-nav-btn svg {
	width: 16px !important;
	height: 16px !important;
	max-width: 16px !important;
	max-height: 16px !important;
	stroke: #FFFFFF !important;
	display: block !important;
}

.strapsco-b-foot {
	display: flex !important;
	justify-content: flex-end !important;
	width: 100% !important;
	margin-top: 14px !important;
	text-align: right !important;
}

.strapsco-swipe-hint {
	display: none;
}
.strapsco-swipe-hint.strapsco-swipe-hint--show {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 9px;
	font: 500 11.5px Inter, system-ui, sans-serif;
	color: var(--strapsco-faint);
}
.strapsco-swipe-hint svg {
	width: 14px !important;
	height: 14px !important;
	max-width: 14px !important;
	max-height: 14px !important;
	flex: 0 0 14px !important;
	display: inline-block !important;
}

/* Mobile scroll progress bar (hidden on desktop) */
.strapsco-scrollbar {
	display: none;
}
.strapsco-hint-mobile {
	display: none;
}

/* Hide scrollbar track for clean, professional look */
.strapsco-b-grid--scrollable::-webkit-scrollbar,
.strapsco-b-grid::-webkit-scrollbar {
	display: none !important;
	width: 0 !important;
	height: 0 !important;
}
.strapsco-b-grid--scrollable,
.strapsco-b-grid {
	-ms-overflow-style: none !important;
	scrollbar-width: none !important;
	cursor: grab;
}
.strapsco-b-grid:active {
	cursor: grabbing;
}

@container (max-width: 640px) {
	.strapsco-b-grid {
		display: flex;
		grid-template-columns: none;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		gap: 11px;
		padding: 2px 18px 8px 0;
		margin-right: -18px;
		-webkit-overflow-scrolling: touch;
	}
	.strapsco-b-grid .strapsco-scard {
		flex: 0 0 160px;
		scroll-snap-align: start;
	}
	.strapsco-nav-btn {
		display: none !important;
	}
	.strapsco-swipe-hint {
		display: flex;
		align-items: center;
		gap: 6px;
		margin-top: 9px;
		font: 500 11.5px Inter, system-ui, sans-serif;
		color: var(--strapsco-faint);
	}
	.strapsco-swipe-hint svg {
		width: 14px;
		height: 14px;
	}
}

/* Fallback for theme responsive queries */
@media (max-width: 768px) {
	.strapsco-a-row {
		flex-wrap: wrap;
	}
	.strapsco-a-row .strapsco-cta {
		flex: 1 1 100%;
		width: 100%;
	}
	.strapsco-a-row .strapsco-cta .strapsco-btn {
		width: 100%;
	}

	.strapsco-b-grid {
		display: flex !important;
		grid-template-columns: none !important;
		overflow-x: auto !important;
		scroll-snap-type: x mandatory !important;
		gap: 11px !important;
		padding: 2px 18px 8px 0 !important;
		margin-right: -18px !important;
		-webkit-overflow-scrolling: touch;
	}
	.strapsco-b-grid .strapsco-scard {
		flex: 0 0 160px !important;
		scroll-snap-align: start !important;
	}
	.strapsco-nav-btn {
		display: none !important;
	}
	.strapsco-swipe-hint {
		display: flex !important;
		align-items: center;
		gap: 6px;
		margin-top: 9px;
		font: 500 11.5px Inter, system-ui, sans-serif;
		color: var(--strapsco-faint);
	}
	.strapsco-hint-desktop {
		display: none !important;
	}
	.strapsco-hint-mobile {
		display: inline !important;
	}

	.strapsco-scrollbar.is-active {
		display: block !important;
		position: relative;
		width: 100%;
		height: 6px;
		margin-top: 10px;
		border-radius: 999px;
		background: rgba(0, 0, 0, 0.06);
		overflow: hidden;
		cursor: pointer;
		touch-action: none;
	}
	.strapsco-scrollbar__thumb {
		position: absolute;
		top: 0;
		left: 0;
		height: 100%;
		width: 40px;
		border-radius: 999px;
		background: #8a8a8a;
		will-change: transform;
		cursor: grab;
	}
	.strapsco-scrollbar__thumb:active {
		cursor: grabbing;
		background: #6f6f6f;
	}

	.strapsco-blockc {
		flex-wrap: wrap;
		gap: 14px;
	}
	.strapsco-blockc .strapsco-cta {
		flex: 1 1 100%;
		width: 100%;
	}
	.strapsco-blockc .strapsco-cta .strapsco-btn {
		width: 100%;
	}
}

/* ==========================================================
   BLOCK C — category banner
   ========================================================== */
.strapsco-blockc {
	display: flex;
	align-items: center;
	gap: 20px;
	background: var(--strapsco-surface-2);
	border: 1px solid var(--strapsco-line-strong);
	border-radius: 14px;
	padding: 18px 20px;
	margin: 20px 0;
	container-type: inline-size;
}
.strapsco-c-text {
	flex: 1 1 75%;
	max-width: 75%;
	min-width: 0;
}
.strapsco-c-eyebrow {
	font: 600 10.5px/1 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--strapsco-eyebrow);
}
.strapsco-c-h {
	font: 700 18px/1.25 Inter, system-ui, sans-serif;
	margin: 7px 0 5px;
	letter-spacing: -.01em;
	color: var(--strapsco-ink);
}
.strapsco-blockc p {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 13px;
	line-height: 1.5;
	color: var(--strapsco-muted);
}
.strapsco-blockc .strapsco-cta {
	flex: 0 0 auto;
}

@container (max-width: 440px) {
	.strapsco-blockc {
		flex-wrap: wrap;
		gap: 14px;
	}
	.strapsco-blockc .strapsco-cta {
		flex: 1 1 100%;
	}
	.strapsco-blockc .strapsco-cta .strapsco-btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.strapsco-b-grid {
		scroll-behavior: auto !important;
	}
}

/* Product titles that contain HTML (e.g. "Sailcloth Strap <br><small>By DASSARI</small>") */
.strapsco-pname span,
.strapsco-pname .product-title-compatibility {
	font: inherit;
	color: inherit;
}
.strapsco-pname small {
	font-size: 0.85em;
	font-weight: 500;
	color: #6b6b6b;
}
