/**
 * Perfecta Elements – Product Card base styles
 * @author   Marco Nötzold (Hagalaz Design)
 * @version  1.0.1
 * @since    1.0.0
 */

/* -------- Design tokens (fallbacks; most colors are controlled via Elementor selectors) -------- */
:root {
	--pe-accent: #ffd700;
}

/* -------- Base reset for widget scope -------- */
.pe-card * { box-sizing: border-box; }

/* -------- Visually hidden utility -------- */
.pe-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;
}

/* -------- Card -------- */
.pe-card.product-card {
	position: relative;
	background: #fff;
	border-radius: 0; /* square by default */
	overflow: hidden;
	outline: none;
}
.pe-card.product-card:focus-visible {
	outline: 3px solid #1a73e8;
	outline-offset: 2px;
}

/* -------- Image container -------- */
.pe-image-container {
	position: relative;
	height: auto;
	overflow: hidden;
	isolation: isolate;
	/* aspect-ratio is set inline via Elementor control */
}
.pe-image.main-image {
	position: absolute;
	inset: 0;
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center center;
	z-index: 0;
}

/* -------- Hover frame (border) -------- */
.pe-border.hover-border {
	position: absolute;
	top: 15px; right: 15px; bottom: 15px; left: 15px;
	border: 3px solid var(--pe-accent);
	border-radius: 0;
	z-index: 2;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}

/* -------- Overlay -------- */
.pe-overlay.hover-overlay {
	position: absolute;
	top: 0; right: 0; bottom: 0; left: 0; /* full coverage */
	background-color: rgba(0,0,0,0.85);   /* can be overridden via Elementor */
	color: #fff;
	padding: 80px 28px 36px 36px;         /* overridden via Elementor Dimensions */
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	z-index: 3;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;            /* overridden via Elementor (Top/Middle/Bottom) */
	text-align: left;                     /* overridden via Elementor (Left/Center/Right) */
}

.pe-overlay-title {
	font-size: 28px;
	font-weight: 700;
	margin: 0 0 12px 0;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.35);
}

.pe-overlay-list { list-style: none; margin: 0; padding: 0; }
.pe-overlay-list li { position: relative; font-size: 14px; margin: 0 0 8px 0; opacity: 0.98; }

.pe-overlay-list a {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: #fff;
	outline: none;
	transition: padding-left 0.2s ease;
}
.pe-overlay-list a:focus-visible {
	outline: 2px solid #8ab4f8;
	outline-offset: 2px;
	border-radius: 2px;
}
.pe-overlay-list a:hover,
.pe-overlay-list a:focus {
	padding-left: 12px; /* space for icon slide-in feel */
}
.pe-overlay-list a .pe-link-icon {
	display: inline-flex;
	line-height: 1;
	font-size: 1.5em;             /* overridden via Elementor */
	margin-right: 10px;           /* overridden via Elementor */
	color: var(--pe-accent);      /* default; overridden by Elementor "Icon Color" */
}

/* -------- Hover interactions -------- */
.pe-card.product-card:hover .pe-border,
.pe-card.product-card:focus-within .pe-border { opacity: 1; }
.pe-card.product-card:hover .pe-overlay,
.pe-card.product-card:focus-within .pe-overlay {
	opacity: 1;
	transform: translateY(0);
}

/* -------- Motion preference -------- */
@media (prefers-reduced-motion: reduce) {
	.pe-border.hover-border,
	.pe-overlay.hover-overlay,
	.pe-overlay-list a { transition: none; }
}

/* -------- Touch devices: show overlay by default -------- */
@media (hover: none) and (pointer: coarse) {
	.pe-border.hover-border { opacity: 1; }
	.pe-overlay.hover-overlay { opacity: 1; transform: none; }
}

/* -------- Responsive tweaks -------- */
@media (max-width: 768px) {
	.pe-overlay-title { font-size: 24px; }
	.pe-overlay-list li { font-size: 13px; }
}
@media (max-width: 480px) {
	.pe-overlay { padding: 60px 20px 28px 28px; }
}
