/* Elementor Product Showcase — base styles.
   All colors/spacing here are sane defaults; Elementor style controls
   override these via inline selectors scoped to {{WRAPPER}}. */

.eps-wrapper {
	box-sizing: border-box;
}
.eps-wrapper *,
.eps-wrapper *::before,
.eps-wrapper *::after {
	box-sizing: inherit;
}

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

/* position: sticky is disabled by any ancestor with overflow set to
   hidden/auto/scroll, or with a transform/filter/perspective/contain
   applied (these create a new containing block that traps sticky).
   Elementor frequently applies these to its e-con / widget-container
   wrappers (entrance animations, "flex/grid" overflow handling, hover
   effects, etc). Scoped with :has() so this ONLY touches ancestors that
   actually contain this widget — no effect elsewhere on the page. */
.e-con:has(.eps-wrapper),
.e-con-inner:has(.eps-wrapper),
.elementor-section:has(.eps-wrapper),
.elementor-container:has(.eps-wrapper),
.elementor-column:has(.eps-wrapper),
.elementor-widget-wrap:has(.eps-wrapper),
.elementor-widget-eps-product-showcase,
.elementor-widget-eps-product-showcase > .elementor-widget-container {
	overflow: visible !important;
	transform: none !important;
	filter: none !important;
	perspective: none !important;
	contain: none !important;
}

.eps-widget-title {
	margin: 0 0 16px;
	font-size: 1.5em;
}

/* Filters */
.eps-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin-bottom: 20px;
}

.eps-filter-group__heading {
	font-weight: 600;
	margin-bottom: 8px;
}

.eps-filter-group__options {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.eps-filter {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border: 1px solid #ddd;
	border-radius: 999px;
	background: #fff;
	color: #333;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.eps-filter:hover {
	border-color: #999;
}

.eps-filter.is-active {
	background: #1a1a1a;
	color: #fff;
	border-color: #1a1a1a;
}

.eps-filter:focus-visible {
	outline: 2px solid #4a90e2;
	outline-offset: 2px;
}

.eps-filter__swatch {
	display: inline-block;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Layout
   Note: sticky offset is also exposed as an Elementor control (Content >
   General Settings > Sticky Top Offset) which overrides the `top` value
   below once configured. */
.eps-layout {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	/* Defensive: some themes/Elementor global CSS apply overflow, transform,
	   or contain to layout wrappers, any of which silently disables
	   position: sticky on descendants. Reset on the immediate sticky
	   ancestor chain only — does not touch anything outside this widget. */
	overflow: visible;
	transform: none;
	contain: none;
}

.eps-grid-col {
	flex: 1 1 68%;
	min-width: 0;
}

.eps-panel-col {
	flex: 1 1 32%;
	min-width: 0;
	position: sticky;
	top: 180px;
	align-self: flex-start;
	height: fit-content;
	overflow: visible;
}

@media (max-width: 767px) {
	.eps-layout {
		flex-direction: column;
	}
	.eps-panel-col,
	.eps-grid-col {
		flex-basis: 100%;
		width: 100%;
	}
	.eps-panel-col {
		position: static;
		top: auto;
	}
}

/* Grid */
.eps-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

@media (max-width: 1024px) {
	.eps-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.eps-grid {
		grid-template-columns: 1fr;
	}
}

/* Cards */
.eps-card {
	display: flex;
	flex-direction: column;
	text-align: left;
	background: #fff;
	border: 1px solid #eaeaea;
	border-radius: 12px;
	padding: 16px;
	overflow: hidden;
	cursor: pointer;
	transition: all 0.25s ease;
	width: 100%;
	font: inherit;
	appearance: none;
}

button.eps-card {
	text-align: left;
}

.eps-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.eps-card.is-selected {
	border-color: #1a1a1a;
	box-shadow: 0 0 0 2px #1a1a1a;
}

.eps-card:focus-visible {
	outline: 2px solid #4a90e2;
	outline-offset: 2px;
}

.eps-card[hidden] {
	display: none;
}

.eps-card__image-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 8px;
	overflow: hidden;
	background: #f5f5f5;
	margin-bottom: 12px;
}

.eps-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.eps-card__badge {
	position: absolute;
	top: 8px;
	left: 8px;
	background: #1a1a1a;
	color: #fff;
	font-size: 11px;
	padding: 4px 10px;
	border-radius: 999px;
	z-index: 1;
}

.eps-card__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}

.eps-card__name {
	font-weight: 600;
	font-size: 16px;
}

.eps-card__category {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #888;
}

.eps-card__description {
	font-size: 13px;
	color: #666;
	margin: 4px 0;
}

.eps-specs {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 10px 0;
}

.eps-spec {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	font-size: 13px;
}

.eps-spec__label {
	color: #888;
}

.eps-spec__value {
	color: #1a1a1a;
	font-weight: 500;
}

.eps-card__buttons {
	display: flex;
	gap: 10px;
	margin-top: auto;
	padding-top: 10px;
}

.eps-btn {
	flex: 1;
	text-align: center;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
	border: 1px solid transparent;
	display: inline-block;
}

.eps-btn--primary {
	background: #1a1a1a;
	color: #fff;
}
.eps-btn--primary:hover {
	background: #333;
}

.eps-btn--secondary {
	background: #fff;
	color: #1a1a1a;
	border-color: #ccc;
}
.eps-btn--secondary:hover {
	border-color: #1a1a1a;
}

/* Empty state */
.eps-empty-state {
	text-align: center;
	padding: 40px 20px;
	color: #888;
	border: 1px dashed #ddd;
	border-radius: 12px;
	margin-top: 16px;
}
.eps-empty-state[hidden] {
	display: none;
}

/* Selected panel */
.eps-panel {
	background: #fafafa;
	border: 1px solid #eaeaea;
	border-radius: 12px;
	padding: 24px;
}

.eps-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.eps-panel__heading {
	margin: 0;
	font-size: 18px;
}

.eps-panel__nav {
	display: flex;
	gap: 8px;
}

.eps-nav-btn {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid #ddd;
	background: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #333;
	transition: all 0.2s ease;
}

.eps-nav-btn:hover:not(:disabled) {
	background: #1a1a1a;
	color: #fff;
	border-color: #1a1a1a;
}

.eps-nav-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.eps-nav-btn:focus-visible {
	outline: 2px solid #4a90e2;
	outline-offset: 2px;
}

.eps-panel__image-wrap {
	width: 100%;
	height: 360px;
	border-radius: 10px;
	overflow: hidden;
	background: #f0f0f0;
	margin-bottom: 12px;
}

.eps-panel__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.eps-panel__thumbnails {
	display: flex;
	gap: 10px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.eps-thumb {
	width: 70px;
	height: 70px;
	border-radius: 8px;
	overflow: hidden;
	border: 2px solid transparent;
	padding: 0;
	cursor: pointer;
	background: #f0f0f0;
}

.eps-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.eps-thumb.is-active {
	border-color: #1a1a1a;
}

.eps-thumb:focus-visible {
	outline: 2px solid #4a90e2;
	outline-offset: 2px;
}

.eps-panel__content {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.eps-panel__name {
	font-size: 20px;
	font-weight: 700;
}

.eps-panel__category {
	font-size: 12px;
	text-transform: uppercase;
	color: #888;
	letter-spacing: 0.5px;
}

.eps-panel__description {
	font-size: 14px;
	color: #555;
	margin: 8px 0;
}

.eps-panel .eps-specs {
	margin: 12px 0;
}

.eps-panel__buttons {
	display: flex;
	gap: 10px;
	margin-top: 16px;
}

.eps-panel--empty {
	opacity: 0.5;
}

/* Entrance animation hook (toggled via inline class from Elementor motion effects
   or simple CSS animation when enable_entrance_animations is on) */
.eps-card {
	animation: eps-fade-in 0.4s ease both;
}

@keyframes eps-fade-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.eps-card.is-selected {
	animation: eps-pulse 0.4s ease;
}

@keyframes eps-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(26, 26, 26, 0.3);
	}
	100% {
		box-shadow: 0 0 0 8px rgba(26, 26, 26, 0);
	}
}

/* RTL support */
[dir="rtl"] .eps-card {
	text-align: right;
}
