/**
 * Product Spec Slider - Core Stylesheet
 * High-performance, lightweight, and hardware-accelerated.
 */

:root {
	--pss-corner-size: 12px;
	--pss-corner-thickness: 1px;
	--pss-corner-offset: -6px;
	--pss-aspect-ratio: 16 / 9;
	--pss-ratio-w: 16;
	--pss-ratio-h: 9;
	--pss-placeholder-bg: #e5e3db;
	--pss-placeholder-stripe: #dbd8ce;
	--pss-placeholder-text: #8a8880;
}

/* ==========================================================================
   Wrapper & Swiper Base
   ========================================================================== */
.pss-slider-wrap {
	position: relative;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0 auto;
	/* Outer clearance so corner ticks extending outside the box are never clipped */
	padding: var(--pss-corner-bleed, 14px);
	overflow: hidden; /* Clips distant slides while preserving local corner tick clearance */
}

.pss-slider-wrap .swiper.pss-swiper {
	position: relative;
	width: 100%;
	max-width: 100%;
	height: auto;
	overflow: visible; /* Allows corner ticks to extend outside .pss-card */
	box-sizing: border-box;
}

.pss-slider-wrap .swiper-wrapper {
	position: relative;
	width: 100%;
	height: 100%;
	z-index: 1;
	display: flex;
	transition-property: transform;
	box-sizing: border-box;
	align-items: stretch;
}

.pss-slide {
	position: relative;
	width: 100% !important;
	max-width: 100% !important;
	flex-shrink: 0;
	height: auto;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: stretch;
	align-items: stretch;
	overflow: visible;
}

/* ==========================================================================
   Product Card
   ========================================================================== */
.pss-card {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	background-color: #f5f4ef;
	border: 1px solid #284b3b;
	box-sizing: border-box;
	overflow: visible !important; /* CRITICAL: Must be visible so '+' corner ticks extend outside card borders */
	backface-visibility: hidden;
	transform: translateZ(0);
}

/* Corner Technical Blueprint "+" Ticks */
.pss-card__corner {
	position: absolute;
	width: var(--pss-corner-size, 12px);
	height: var(--pss-corner-size, 12px);
	color: #284b3b;
	pointer-events: none;
	z-index: 25;
}

.pss-card__corner::before,
.pss-card__corner::after {
	content: '';
	position: absolute;
	background-color: currentColor;
}

/* Horizontal tick bar */
.pss-card__corner::before {
	top: 50%;
	left: 0;
	width: 100%;
	height: var(--pss-corner-thickness, 1px);
	transform: translateY(-50%);
}

/* Vertical tick bar */
.pss-card__corner::after {
	left: 50%;
	top: 0;
	height: 100%;
	width: var(--pss-corner-thickness, 1px);
	transform: translateX(-50%);
}

/* Position crosshair centers right on the 4 corner vertices: 50% outside, 50% inside */
.pss-card__corner--tl {
	top: var(--pss-corner-offset, 0px);
	left: var(--pss-corner-offset, 0px);
	transform: translate(-50%, -50%);
}

.pss-card__corner--tr {
	top: var(--pss-corner-offset, 0px);
	right: var(--pss-corner-offset, 0px);
	transform: translate(50%, -50%);
}

.pss-card__corner--bl {
	bottom: var(--pss-corner-offset, 0px);
	left: var(--pss-corner-offset, 0px);
	transform: translate(-50%, 50%);
}

.pss-card__corner--br {
	bottom: var(--pss-corner-offset, 0px);
	right: var(--pss-corner-offset, 0px);
	transform: translate(50%, 50%);
}

/* ==========================================================================
   Header Block (Top Bar)
   ========================================================================== */
.pss-card__header {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	position: relative;
	z-index: 3;
	padding: 14px 18px;
	gap: 12px;
	transition: background-color 0.2s ease;
}

.pss-card__header--icon_left_code_right {
	justify-content: space-between;
}

.pss-card__header--code_left_icon_right {
	justify-content: space-between;
}

.pss-card__header--together_left {
	justify-content: flex-start;
}

.pss-card__header--together_right {
	justify-content: flex-end;
}

.pss-card__header--together_center {
	justify-content: center;
}

.pss-card__header-group {
	display: inline-flex;
	align-items: center;
	gap: inherit;
}

.pss-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	color: #284b3b;
	font-size: 18px;
	flex-shrink: 0;
	transition: color 0.2s ease, transform 0.2s ease;
}

.pss-card__icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
	vertical-align: middle;
}

.pss-card__code {
	font-family: 'Courier New', Courier, monospace;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #284b3b;
	line-height: 1.2;
}

/* ==========================================================================
   Visual Block (Image, Overlay, Aspect Ratio)
   ========================================================================== */
.pss-card__visual {
	position: relative;
	width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	display: flex;
	align-items: stretch;
	justify-content: center;
	overflow: hidden;
	z-index: 2;
}

/* Modern Aspect-Ratio with Fallback */
.pss-card__visual {
	aspect-ratio: var(--pss-aspect-ratio, 16 / 9);
}

.pss-card__visual[style*="--pss-aspect-ratio: custom"] {
	aspect-ratio: var(--pss-ratio-w, 16) / var(--pss-ratio-h, 9);
}

.pss-card__visual[style*="--pss-aspect-ratio: auto"] {
	aspect-ratio: auto;
}

.pss-card__image-container {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pss-card__image-link {
	display: contents;
	text-decoration: none;
	color: inherit;
}

.pss-card__image {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	object-position: center center;
	border: 0;
	max-width: 100%;
	transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
	content-visibility: auto;
}

.pss-card:hover .pss-card__image {
	transform: scale(1.02);
}

/* Technical Blueprint Placeholder (Matches reference screenshot) */
.pss-card__placeholder {
	width: 100%;
	height: 100%;
	min-height: 220px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--pss-placeholder-bg, #e5e3db);
	background-image: repeating-linear-gradient(
		-45deg,
		var(--pss-placeholder-bg, #e5e3db),
		var(--pss-placeholder-bg, #e5e3db) 14px,
		var(--pss-placeholder-stripe, #dbd8ce) 14px,
		var(--pss-placeholder-stripe, #dbd8ce) 28px
	);
}

.pss-card__placeholder-text {
	font-family: 'Courier New', Courier, monospace;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 2px;
	color: var(--pss-placeholder-text, #8a8880);
	text-transform: uppercase;
	user-select: none;
	background-color: rgba(229, 227, 219, 0.92);
	padding: 6px 14px;
	border-radius: 2px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Image Overlay Layer */
.pss-card__overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 3;
	opacity: 0;
	transition: opacity 0.3s ease;
}

/* ==========================================================================
   Footer Block (Bottom Bar)
   ========================================================================== */
.pss-card__footer {
	display: block;
	box-sizing: border-box;
	position: relative;
	z-index: 3;
	padding: 14px 18px;
	transition: background-color 0.2s ease;
}

.pss-card__title {
	margin: 0;
	padding: 0;
	font-family: 'Courier New', Courier, monospace;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.5px;
	color: #1f2e26;
	line-height: 1.35;
	word-break: break-word;
}

.pss-card__title a {
	color: inherit;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.pss-card__title a:hover {
	opacity: 0.8;
}

/* ==========================================================================
   Navigation Arrows
   ========================================================================== */
.pss-slider__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 25;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	font-size: 14px;
	color: #284b3b;
	background-color: rgba(245, 244, 239, 0.9);
	border: 1px solid #284b3b;
	cursor: pointer;
	box-sizing: border-box;
	user-select: none;
	transition: all 0.25s ease;
}

.pss-slider__arrow svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
	vertical-align: middle;
}

.pss-slider__arrow:hover {
	background-color: #284b3b;
	color: #ffffff;
}

.pss-slider__arrow:focus-visible {
	outline: 2px solid #284b3b;
	outline-offset: 2px;
}

.pss-slider__arrow--prev {
	inset-inline-start: 10px;
}

.pss-slider__arrow--next {
	inset-inline-end: 10px;
}

.pss-slider__arrow.swiper-button-disabled {
	opacity: 0.35;
	cursor: not-allowed;
	pointer-events: none;
}

/* ==========================================================================
   Pagination (Dots, Fraction, Progressbar)
   ========================================================================== */
.pss-slider-wrap .swiper-pagination {
	position: relative;
	margin-top: 14px;
	z-index: 20;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	transition: opacity 0.3s ease;
}

.pss-slider-wrap .swiper-pagination-bullets {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
}

.pss-slider-wrap .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	background-color: rgba(40, 75, 59, 0.3);
	opacity: 1;
	border-radius: 50%;
	transition: all 0.25s ease;
	cursor: pointer;
	margin: 0 !important;
}

.pss-slider-wrap .swiper-pagination-bullet-active {
	background-color: #284b3b;
	transform: scale(1.25);
}

.pss-slider-wrap .swiper-pagination-fraction {
	display: block;
	text-align: center;
	font-family: 'Courier New', Courier, monospace;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1px;
	color: #284b3b;
}

.pss-slider-wrap .swiper-pagination-progressbar {
	position: relative;
	height: 3px;
	background: rgba(40, 75, 59, 0.15);
	width: 100%;
}

.pss-slider-wrap .swiper-pagination-progressbar-fill {
	background: #284b3b;
}

/* ==========================================================================
   Power & Battery Efficiency: Intersection Observer Optimizations
   ========================================================================== */
.pss-slider-wrap[data-pss-inview="false"] * {
	animation-play-state: paused !important;
}

/* Ensure smooth 3D effects when cards/cube/coverflow are active */
.swiper-cards,
.swiper-coverflow,
.swiper-cube,
.swiper-flip {
	padding: 15px 0;
}
