/* ============================================================
   Carmela ps-card — the single product-card stylesheet (B2, 2026-09-30)
   Card markup: theme-library/function-files/carmela-ps-card.php
   Consumers: homepage product sliders (.product-slider-carousel) AND
   every PLP loop (ul.products on shop / taxonomy / product search).
   Context layering: base = loop look; .product-slider-carousel adds the
   slider paddings. Grid/list layout switch lives in carmela-replica.css.
   ============================================================ */

.ps-card {
	position: relative;
	outline: none;
}

.ps-card-image {
	position: relative;
	overflow: hidden;
	border-radius: 0;
	margin-bottom: 12px;
}
/* Sale badge — top-left, overrides WC's default .onsale pill. */
.ps-card-image .carmela-sale-badge,
.ps-card-image .onsale {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 5;
	margin: 0;
	background: #F77575;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	font-family: 'DM Sans', sans-serif;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	line-height: 1.15;
	padding: 0;
	box-sizing: border-box;
}
/* B4-R15: NET price badge (DAP regions) — top-right pill; base look lives in
   carmela-replica.css. */
.ps-card-image .carmela-net-badge {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 5;
}
.ps-card-link {
	display: block;
	position: relative;
	width: 100%;
	padding-bottom: 140%; /* portrait 1.4 (326.75 x 457.44 target desktop) */
}

.ps-card-img {
	width: 100%;
	/* height/margin pinned: WC core `.woocommerce ul.products li.product a
	   img { height:auto; margin:0 0 1em }` (0,3,3) outranks any plain class
	   selector and would render images at natural ratio — short images leave
	   a white strip and rows go uneven. */
	height: 100% !important;
	margin: 0 !important;
	object-fit: cover;
	position: absolute;
	top: 0;
	left: 0;
	transition: opacity 0.3s ease;
}
.ps-card-img--hover {
	opacity: 0;
	transition: opacity 0.3s ease;
}
.ps-card:hover .ps-card-img--hover {
	opacity: 1;
}

.ps-card-info {
	padding: 12px 10px;
	text-align: center;
}
.ps-card-name {
	font-size: 14px;
	line-height: 1.4;
	font-weight: 500;
	font-family: 'DM Sans', sans-serif;
	color: #000;
	margin: 0 0 4px;
}
.ps-card-name a,
.ps-card-name a:visited {
	text-decoration: none;
	color: inherit;
}
.ps-card-name a:hover {
	color: #000;
}

.ps-card-price {
	font-size: 16px;
	font-weight: 400;
	font-family: 'DM Sans', sans-serif;
	color: #000000;
	margin-bottom: 8px;
}
.ps-card-price del {
	color: #000000;
	font-weight: 400;
	margin-right: 6px;
}
.ps-card-price ins {
	text-decoration: none;
	color: #F77575;
	font-weight: 400;
}

.ps-card-colors {
	display: flex;
	justify-content: center;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 10px;
}
.ps-color-dot {
	width: 17px;
	height: 17px;
	border-radius: 25px;
	border: 2px solid #fff;
	background: var(--dot-color, #ccc);
	box-shadow: 0 0 1px 1px #ddd;
	cursor: pointer;
	position: relative;
	display: inline-block;
}
/* Hover tooltip showing the color name (replicates reference .tooltip-label top) */
.ps-color-tooltip {
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	background: #111;
	color: #fff;
	font-size: 10px;
	font-family: 'DM Sans', sans-serif;
	padding: 2px 6px;
	border-radius: 3px;
	white-space: nowrap;
	margin-bottom: 5px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
	z-index: 10;
}
.ps-color-dot:hover .ps-color-tooltip {
	opacity: 1;
}

/* ===================================================
   Hover action icons + Quick Shop overlay
   =================================================== */

/* --- Action icon bar (bottom of image, visible on hover) ---
   Final reference form: 30x30 white circles, 15px icons,
   hover inverts to #111. */
.ps-card-actions {
	position: absolute;
	bottom: 10px;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	gap: 8px;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.25s ease, transform 0.25s ease;
	z-index: 10;
	pointer-events: none;
}
.ps-card:hover .ps-card-actions {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
/* Touch devices have no hover — keep the bar visible (reference shows
   .button-set below 1025px). QS-open state below still wins (higher spec). */
@media (max-width: 1024px) {
	.ps-card-actions {
		opacity: 1;
		transform: translateY(0);
		pointer-events: auto;
	}
}
.ps-card--qs-active .ps-card-actions {
	opacity: 0;
	pointer-events: none;
}
.ps-card--qs-active .ps-card-img--hover {
	opacity: 0 !important;
}

/* R3-3a: solid white chip (transparent circles vanish over dark product
   photos). */
.ps-action-btn {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: none;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, color 0.2s ease;
	padding: 0;
	color: #000;
	font-size: 15px;
	line-height: 1;
}
.ps-action-btn:hover {
	background: #111;
	color: #fff;
}
.ps-action-btn--active {
	background: #111;
	color: #fff;
}
.ps-action-btn i {
	font-size: 15px;
	line-height: 1;
}
/* R12b: the quickshop key is an anchor — kill the UA underline and the
   theme's global a/a:visited colour grab; hover companions go last
   (R5-3/:visited family rule).
   R12d: the colour companions are scoped OUT of list mode. This sheet
   loads AFTER carmela-replica.css, and `a.ps-action-btn:visited` (0,2,1)
   ties with the list skin's `body.cqw-plp-list .ps-action-btn` (0,2,1 —
   body is a type selector) — the tie broke to this sheet, painting
   visited CTAs black-on-black at rest until hover (user report). */
a.ps-action-btn { text-decoration: none; }
body:not(.cqw-plp-list) a.ps-action-btn:visited { color: #000; }
body:not(.cqw-plp-list) a.ps-action-btn:hover,
body:not(.cqw-plp-list) a.ps-action-btn:active,
body:not(.cqw-plp-list) a.ps-action-btn:focus-visible {
	color: #fff;
	background: #111;
}
/* R12: the quickshop key can carry a text label — hidden by default
   (grid/slider/search are icon-only), revealed by the list-mode skin
   in carmela-replica.css. */
.ps-action-label { display: none; }

/* --- Quick Shop overlay (white panel covering entire card) --- */
.ps-quick-shop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: #fff;
	z-index: 20;
	padding: 16px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	border-radius: 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.ps-quick-shop--active {
	opacity: 1;
	visibility: visible;
}

/* Close button */
.ps-qs-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 28px;
	height: 28px;
	border: none;
	background: none;
	cursor: pointer;
	font-size: 20px;
	color: #999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border-radius: 50%;
	transition: background 0.2s, color 0.2s;
	z-index: 5;
}
.ps-qs-close:hover {
	background: #f0f0f0;
	color: #333;
}

/* Body layout */
.ps-qs-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 12px;
	overflow-y: auto;
}

/* Price */
.ps-qs-price {
	font-size: 16px;
	font-weight: 700;
	color: #222;
}
.ps-qs-price del {
	color: #999;
	font-weight: 400;
	font-size: 13px;
	margin-right: 6px;
}
.ps-qs-price ins {
	text-decoration: none;
	color: #e74c3c;
}

/* Selection rows */
.ps-qs-row {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.ps-qs-label {
	font-size: 12px;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.ps-qs-label strong {
	color: #333;
	text-transform: none;
	letter-spacing: 0;
}

/* Color dots in Quick Shop */
.ps-qs-colors {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}
/* R3-3e: 30x30 circle — target quick-shop color swatch size. */
.ps-qs-color-dot {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 2px solid transparent;
	cursor: pointer;
	padding: 2px;
	box-sizing: border-box;
	transition: border-color 0.2s;
}
.ps-qs-color-dot span {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
}
.ps-qs-color-dot.active {
	border-color: #111;
}
.ps-qs-color-dot:hover {
	border-color: #999;
}

/* Size pills in Quick Shop — R3-3c: target-measured 65x30 pill
   (radius 25px, #eee base, 13px). */
.ps-qs-sizes {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}
.ps-qs-size {
	min-width: 65px;
	height: 30px;
	padding: 0 14px;
	border: 1px solid #eee;
	border-radius: 25px;
	background: #eee;
	cursor: pointer;
	font-size: 13px;
	color: #333;
	font-family: 'DM Sans', sans-serif;
	transition: all 0.2s;
	line-height: 28px;
}
.ps-qs-size:hover {
	border-color: #999;
}
.ps-qs-size.active {
	background: #111;
	border-color: #111;
	color: #fff;
}

/* Add to Cart button — square, #111 (reference token) */
.ps-qs-add-to-cart {
	width: 100%;
	padding: 10px 16px;
	background: #111;
	color: #fff;
	border: none;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	font-family: 'DM Sans', sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: background 0.2s;
	border-radius: 0;
	margin-top: 4px;
}
.ps-qs-add-to-cart:hover:not(:disabled) {
	background: #000;
}
.ps-qs-add-to-cart:disabled {
	background: #ccc;
	cursor: not-allowed;
	color: #999;
}

/* --- Slider context: carousel gutters + the approved homepage paddings --- */
.product-slider-carousel .ps-card {
	padding: 0 8px;
}
.product-slider-carousel .ps-card-info {
	padding: 15px 25px;
}

@media (max-width: 768px) {
	.ps-card-actions {
		bottom: 6px;
		gap: 5px;
	}
	.ps-quick-shop {
		padding: 12px;
	}
	.ps-qs-body {
		gap: 8px;
	}
	.ps-qs-price {
		font-size: 14px;
	}
	.ps-qs-color-dot {
		width: 24px;
		height: 24px;
	}
	.ps-qs-size {
		min-width: 52px;
		height: 26px;
		line-height: 24px;
		font-size: 11px;
	}
	.ps-qs-add-to-cart {
		padding: 8px 12px;
		font-size: 12px;
	}
	.ps-qs-close {
		width: 24px;
		height: 24px;
		font-size: 18px;
	}
	.product-slider-carousel .ps-card-info {
		padding: 10px 12px;
	}
	.product-slider-carousel .ps-card-name {
		font-size: 13px;
	}
	.product-slider-carousel .ps-card-price {
		font-size: 14px;
	}
	.product-slider-carousel .ps-color-dot {
		width: 12px;
		height: 12px;
	}
}
