/**
 * RamTech Product Carousels
 * All selectors are namespaced with .ramtech- and scoped to the carousel root.
 */

.ramtech-products {
	--rt-red: #D6001C;
	--rt-red-dark: #AE0017;
	--rt-ink: #0E1726;
	--rt-ink-soft: #3B4759;
	--rt-muted: #6B7688;
	--rt-line: #E7EAF0;
	--rt-line-strong: #D8DDE7;
	--rt-surface: #FFFFFF;
	--rt-soft: #F5F6F8;
	--rt-ok: #0B7A45;
	--rt-radius: 16px;
	--rt-gap: 18px;
	--rt-visible: 5;
	--rt-media-h: 196px;

	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	color: var(--rt-ink);
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
}

.ramtech-products *,
.ramtech-products *::before,
.ramtech-products *::after {
	box-sizing: border-box;
}

.ramtech-products [hidden] {
	display: none !important;
}

/* ---------------- Header ---------------- */

.ramtech-carousel-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin: 0 0 22px;
	flex-wrap: wrap;
}

.ramtech-carousel-headtext {
	min-width: 0;
	flex: 1 1 320px;
}

.ramtech-carousel-eyebrow {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--rt-red);
	margin: 0 0 8px;
}

.ramtech-products .ramtech-carousel-title {
	margin: 0;
	padding: 0;
	font-size: clamp(21px, 2.1vw, 29px);
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -.015em;
	color: var(--rt-ink);
}

.ramtech-products .ramtech-carousel-desc {
	margin: 8px 0 0;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--rt-muted);
	max-width: 640px;
}

.ramtech-products .ramtech-carousel-all {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--rt-ink);
	text-decoration: none;
	padding: 8px 2px;
	border-bottom: 1px solid transparent;
	transition: color .2s ease, border-color .2s ease;
	white-space: nowrap;
}

.ramtech-products .ramtech-carousel-all:hover,
.ramtech-products .ramtech-carousel-all:focus-visible {
	color: var(--rt-red);
	border-bottom-color: var(--rt-red);
}

.ramtech-carousel-all .ramtech-arrow {
	display: inline-flex;
	transition: transform .2s ease;
}

.ramtech-carousel-all:hover .ramtech-arrow {
	transform: translateX(3px);
}

/* ---------------- Track ---------------- */

.ramtech-carousel-viewport {
	position: relative;
}

.ramtech-carousel-track {
	display: flex;
	gap: var(--rt-gap);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding: 4px 2px 8px;
	margin: -4px -2px -8px;
}

.ramtech-carousel-track::-webkit-scrollbar {
	display: none;
}

.ramtech-carousel-track:focus-visible {
	outline: 2px solid var(--rt-red);
	outline-offset: 4px;
	border-radius: 8px;
}

.ramtech-carousel-item {
	flex: 0 0 calc((100% - (var(--rt-visible) - 1) * var(--rt-gap)) / var(--rt-visible));
	max-width: calc((100% - (var(--rt-visible) - 1) * var(--rt-gap)) / var(--rt-visible));
	scroll-snap-align: start;
	display: flex;
}

/* ---------------- Card ---------------- */

.ramtech-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	background: var(--rt-surface);
	border: 1px solid var(--rt-line);
	border-radius: var(--rt-radius);
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(14, 23, 38, .04);
	transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

@media (hover: hover) {
	.ramtech-card:hover {
		transform: translateY(-3px);
		border-color: var(--rt-line-strong);
		box-shadow: 0 12px 26px -14px rgba(14, 23, 38, .28);
	}

	.ramtech-card:hover .ramtech-card-img {
		transform: scale(1.035);
	}
}

.ramtech-card-media {
	position: relative;
	height: var(--rt-media-h);
	padding: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--rt-surface);
	border-bottom: 1px solid var(--rt-line);
	overflow: hidden;
}

.ramtech-card-medialink {
	display: block;
	width: 100%;
	height: 100%;
}

.ramtech-products .ramtech-card-img {
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
	display: block;
	margin: 0;
	transition: transform .25s ease;
}

.ramtech-card-noimg {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--rt-soft);
	border-radius: 10px;
	color: #B6BECC;
}

.ramtech-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	display: inline-block;
	padding: 4px 9px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	line-height: 1.4;
	color: #fff;
	background: var(--rt-red);
	border-radius: 999px;
}

.ramtech-badge--new {
	background: var(--rt-ink);
}

.ramtech-card-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 14px 15px 16px;
	gap: 6px;
}

.ramtech-card-brand {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--rt-muted);
}

.ramtech-products .ramtech-card-title {
	margin: 0;
	padding: 0;
	font-size: 14.5px;
	line-height: 1.35;
	font-weight: 600;
	letter-spacing: -.005em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(14.5px * 1.35 * 2);
}

.ramtech-products .ramtech-card-title a {
	color: var(--rt-ink);
	text-decoration: none;
}

.ramtech-products .ramtech-card-title a:hover,
.ramtech-products .ramtech-card-title a:focus-visible {
	color: var(--rt-red);
}

.ramtech-products .ramtech-card-desc {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--rt-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ramtech-products .ramtech-card-specs {
	margin: 0;
	font-size: 12px;
	line-height: 1.4;
	font-weight: 500;
	color: var(--rt-ink-soft);
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ramtech-card-foot {
	margin-top: auto;
	padding-top: 12px;
}

/* WooCommerce price markup, scoped to the card. */

.ramtech-card-price {
	display: block;
	min-height: 26px;
	margin-bottom: 12px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -.02em;
	color: var(--rt-ink);
}

.ramtech-card-price del {
	display: inline;
	margin-right: 7px;
	font-size: 12.5px;
	font-weight: 400;
	color: var(--rt-muted);
	text-decoration: line-through;
	opacity: 1;
}

.ramtech-card-price ins {
	display: inline;
	background: none;
	text-decoration: none;
	color: var(--rt-red);
}

.ramtech-card-price .woocommerce-Price-currencySymbol {
	font-size: .82em;
	font-weight: 600;
}

/* ---------------- Buttons ---------------- */

.ramtech-products .ramtech-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 42px;
	padding: 10px 14px;
	margin: 0;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	border: 1px solid transparent;
	border-radius: 10px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.ramtech-products .ramtech-cta:focus-visible {
	outline: 2px solid var(--rt-red);
	outline-offset: 2px;
}

.ramtech-products .ramtech-cta--add {
	background: var(--rt-red);
	color: #fff;
}

.ramtech-products .ramtech-cta--add:hover {
	background: var(--rt-red-dark);
	color: #fff;
	box-shadow: 0 6px 14px -8px rgba(214, 0, 28, .7);
}

.ramtech-products .ramtech-cta--link {
	background: #fff;
	color: var(--rt-ink);
	border-color: var(--rt-line-strong);
}

.ramtech-products .ramtech-cta--link:hover {
	border-color: var(--rt-red);
	color: var(--rt-red);
}

.ramtech-products .ramtech-cta--off {
	background: var(--rt-soft);
	color: var(--rt-muted);
	border-color: var(--rt-line);
	cursor: not-allowed;
}

.ramtech-products .ramtech-cta--busy {
	background: var(--rt-ink-soft);
	color: #fff;
	cursor: wait;
}

.ramtech-products .ramtech-cta--ok {
	background: var(--rt-ok);
	border-color: var(--rt-ok);
	color: #fff;
}

.ramtech-products .ramtech-cta--ok:hover {
	background: #0A6B3D;
	color: #fff;
	box-shadow: 0 6px 14px -8px rgba(11, 122, 69, .7);
}

.ramtech-products .ramtech-cta--ok:focus-visible {
	outline-color: var(--rt-ok);
}

.ramtech-products .ramtech-cta--err {
	background: #fff;
	color: var(--rt-red);
	border-color: var(--rt-red);
}

.ramtech-products .ramtech-cta[disabled] {
	opacity: .9;
}

.ramtech-cta-icon {
	flex: 0 0 auto;
	display: flex;
}

.ramtech-spin {
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
	border: 2px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ramtech-spin .7s linear infinite;
}

@keyframes ramtech-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------------- Navigation ---------------- */

.ramtech-products .ramtech-nav {
	position: absolute;
	top: calc(var(--rt-media-h) / 2);
	transform: translateY(-50%);
	z-index: 5;
	width: 38px;
	height: 38px;
	min-height: 0;
	padding: 0;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: var(--rt-ink);
	border: 1px solid var(--rt-line-strong);
	border-radius: 50%;
	box-shadow: 0 4px 12px -4px rgba(14, 23, 38, .22);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}

.ramtech-products .ramtech-nav:hover {
	background: var(--rt-red);
	border-color: var(--rt-red);
	color: #fff;
}

.ramtech-products .ramtech-nav:focus-visible {
	outline: 2px solid var(--rt-red);
	outline-offset: 2px;
}

.ramtech-products .ramtech-nav[disabled] {
	opacity: 0;
	pointer-events: none;
}

.ramtech-nav--prev {
	left: 8px;
}

.ramtech-nav--next {
	right: 8px;
}

/* ---------------- Pagination ---------------- */

.ramtech-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	margin-top: 18px;
}

.ramtech-products .ramtech-dot {
	width: 8px;
	height: 8px;
	min-height: 0;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 999px;
	background: #CFD5DF;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color .2s ease, width .2s ease;
}

.ramtech-products .ramtech-dot:focus-visible {
	outline: 2px solid var(--rt-red);
	outline-offset: 3px;
}

.ramtech-products .ramtech-dot[aria-current="true"] {
	background: var(--rt-red);
	width: 22px;
}

/* ---------------- States ---------------- */

.ramtech-products .ramtech-message {
	margin: 0;
	padding: 26px 18px;
	text-align: center;
	font-size: 14px;
	color: var(--rt-muted);
	background: var(--rt-soft);
	border: 1px solid var(--rt-line);
	border-radius: var(--rt-radius);
}

.ramtech-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 640px) {
	.ramtech-carousel-head {
		align-items: flex-start;
		gap: 12px;
	}

	.ramtech-products .ramtech-nav {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ramtech-products *,
	.ramtech-products *::before,
	.ramtech-products *::after {
		animation-duration: .001ms !important;
		transition-duration: .001ms !important;
	}

	.ramtech-carousel-track {
		scroll-behavior: auto;
	}
}
