/* ================================================================
   Product Components Widget — productComponents.css
   ================================================================ */

.pcomp-wrapper {
	width: 100%;
}

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

/* ── Card ── */
.pcomp-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	/* background, border, border-radius, box-shadow set via Elementor controls */
}

/* Reset <a> decoration when card is a link */
.pcomp-card--link {
	text-decoration: none;
	color: inherit;
}

.pcomp-card--link:hover .pcomp-title {
	text-decoration: underline;
}

/* ── Image ── */
.pcomp-image-wrap {
	flex-shrink: 0;
	width: 100%;
	height: 260px;
	overflow: hidden;
	background-color: #ffffff !important;
}

.pcomp-image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── Body ── */
.pcomp-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 24px;
}

/* ── Title ── */
.pcomp-title {
	margin: 0 0 6px;
	font-size: 22px;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.25;
}

/* ── Subtitle ── */
.pcomp-subtitle {
	margin: 0 0 16px;
	font-size: 14px;
	color: #555;
	line-height: 1.5;
}

/* ── Description ── */
.pcomp-desc {
	margin-top: 16px;
}

.pcomp-desc p {
	margin: 0 0 10px;
	font-size: 15px;
	color: #555;
	line-height: 1.7;
}

.pcomp-desc p:last-child {
	margin-bottom: 0;
}

.pcomp-desc ul,
.pcomp-desc ol {
	padding-left: 18px;
	margin: 0 0 10px;
}

.pcomp-desc li {
	font-size: 15px;
	color: #555;
	line-height: 1.7;
	margin-bottom: 4px;
}

.pcomp-desc strong,
.pcomp-desc b {
	font-weight: 700;
	color: white;
}

/* ================================================================
   Carousel / Grid — Swiper overrides
   ================================================================ */

/* ── Săgeți navigare (doar în modul carusel) ── */
.pcomp-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #ffffff;
	color: #1a1a1a;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.pcomp-arrow:hover {
	background: #1a1a1a;
	color: #ffffff;
}

.pcomp-arrow svg {
	width: 22px;
	height: 22px;
}

.pcomp-arrow--prev {
	left: 8px;
}

.pcomp-arrow--prev svg {
	transform: rotate(180deg);
}

.pcomp-arrow--next {
	right: 8px;
}

/* Swiper marchează capetele; ascundem săgeata inactivă */
.pcomp-arrow.swiper-button-disabled {
	opacity: 0;
	pointer-events: none;
}

/* ── Desktop (≥992px): grid, Swiper dezactivat ── */
@media (min-width: 992px) {
	.pcomp-swiper {
		overflow: visible;
	}

	.pcomp-swiper .pcomp-grid.swiper-wrapper {
		display: grid;
		transform: none !important;
	}

	.pcomp-pagination,
	.pcomp-arrow {
		display: none;
	}
}

/* ── Tablet + Mobile (<992px): carousel activ ── */
@media (max-width: 991px) {
	.pcomp-swiper {
		overflow: hidden;
	}

	/* Swiper are nevoie de flex pe wrapper; gap:0 ca sa nu se adune peste
	   spaceBetween-ul Swiper. Specificitate ridicata ca sa bata controlul
	   "gap" din Elementor ({{WRAPPER}} .pcomp-grid = 0,3,0). */
	.pcomp-wrapper .pcomp-swiper .pcomp-grid.swiper-wrapper {
		display: flex;
		gap: 0;
	}

	.pcomp-swiper .swiper-slide {
		height: auto;
	}

	.pcomp-pagination {
		position: static;
		margin-top: 16px;
		text-align: center;
	}
}

/* ================================================================
   Responsive (fallback pentru cazul fără JS)
   ================================================================ */
@media (max-width: 1024px) {
	.pcomp-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

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

	.pcomp-image-wrap {
		height: 200px;
	}

	.pcomp-title {
		font-size: 18px;
	}

	.pcomp-body {
		padding: 20px;
	}
}
