/* Shop product card (inc/product-card.php, woocommerce/content-product-zph.php).
   A fixed structure that never grows past its grid cell: photo, title, price,
   colour/size facts, a two-line teaser and one always-visible button. */

.zph-inner .products > .zph-card { display: flex; margin-block-end: 40px; }
.zph-inner .zph-card .zph-card__inner { display: flex; flex-direction: column; inline-size: 100%; }

/* ---------- photo ---------- */
.zph-inner .zph-card .zph-card__media { position: relative; overflow: hidden; margin: 0; border-radius: var(--zs-radius); background: var(--zs-frame); isolation: isolate; }
.zph-inner .zph-card .product-image-link { display: block; }
.zph-inner .zph-card .zph-card__media img { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 1; object-fit: cover; }
.zph-inner .zph-card .hover-img { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity .45s ease; }
@media (hover: hover) {
	.zph-inner .zph-card:hover .hover-img { opacity: 1; }
}
.zph-inner .zph-card .product-labels { z-index: 3; }

/* Wishlist / quick view / compare: a quiet column of round glass buttons on the photo. */
.zph-inner .zph-card .zph-card__tools {
	position: absolute;
	inset-block-start: 10px;
	inset-inline-end: 10px;
	z-index: 4;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.zph-inner .zph-card .zph-card__tools .wd-action-btn { display: block; margin: 0; }
.zph-inner .zph-card .zph-card__tools .wd-action-btn > a {
	display: grid;
	place-items: center;
	inline-size: 36px;
	block-size: 36px;
	padding: 0;
	border-radius: 50%;
	background: #ffffffe6;
	box-shadow: 0 6px 16px -8px #29251f66;
	color: var(--zs-ink);
	font-size: 0;
	backdrop-filter: blur(6px);
	transition: background-color .2s ease, color .2s ease, opacity .2s ease, transform .2s ease;
}
.zph-inner .zph-card .zph-card__tools .wd-action-btn > a::before { margin: 0; font-size: 16px; line-height: 1; }
.zph-inner .zph-card .zph-card__tools .wd-action-btn > a:hover { background: var(--zs-umber); color: var(--zs-gold-pale); }
.zph-inner .zph-card .zph-card__tools .wd-action-btn > a.added { color: #b3261e; }
.zph-inner .zph-card .zph-card__tools .woodmart-tooltip-label { display: none; }
/* Quick view and compare appear with the pointer; the wishlist stays visible. */
@media (hover: hover) {
	.zph-inner .zph-card .zph-card__tools :is(.wrap-quickview-button, .wd-compare-btn) { opacity: 0; transform: translateX(var(--zph-tools-shift, -6px)); transition: opacity .2s ease, transform .2s ease; }
	.zph-inner .zph-card:is(:hover, :focus-within) .zph-card__tools :is(.wrap-quickview-button, .wd-compare-btn) { opacity: 1; transform: none; }
}
:root[dir="rtl"] .zph-inner .zph-card { --zph-tools-shift: 6px; }
@media (hover: none) {
	.zph-inner .zph-card .zph-card__tools :is(.wrap-quickview-button, .wd-compare-btn) { display: none; }
}

/* ---------- text ---------- */
.zph-inner .zph-card .zph-card__body { display: flex; flex: 1 1 auto; flex-direction: column; padding: 0; text-align: start; }
.zph-inner .zph-card .product-title { margin-block: 14px 4px; text-align: start; }
.zph-inner .zph-card .product-rating-price { margin-block-end: 10px; }
.zph-inner .zph-card .wrapp-product-price { display: block; text-align: start; }
.zph-inner .zph-card .price { margin: 0; }

.zph-inner .zph-card .zph-card__facts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
	color: var(--zs-muted);
	font-size: 12.5px;
	line-height: 1.6;
}
.zph-inner .zph-card .zph-card__facts li { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 0; list-style: none; }
.zph-inner .zph-card .zph-card__facts li + li::before { content: ""; inline-size: 3px; block-size: 3px; margin-inline-end: 7px; border-radius: 50%; background: #cbbfae; }
.zph-inner .zph-card .zph-card__facts li + li { gap: 0; }
.zph-inner .zph-card .zph-card__dots { display: inline-flex; }
.zph-inner .zph-card .zph-card__dots i {
	inline-size: 12px;
	block-size: 12px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--zph-dot, #fff);
	box-shadow: 0 0 0 1px #29251f2e;
}
.zph-inner .zph-card .zph-card__dots i + i { margin-inline-start: -4px; }
.zph-inner .zph-card .zph-card__dots i.is-unknown { background: repeating-linear-gradient(45deg, #efe8dc 0 2px, #fff 2px 4px); }

.zph-inner .zph-card .zph-card__teaser {
	display: -webkit-box;
	margin: 0 0 14px;
	overflow: hidden;
	color: var(--zs-soft-ink);
	font-size: 12.5px;
	line-height: 1.85;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* ---------- the one action ---------- */
.zph-inner .zph-card .zph-card__cta { margin-block-start: auto; }
/* :not(#zph) matches the ID-level specificity of site.css's shared :is(…, #place_order) button rule. */
.zph-inner .main-page-wrapper .zph-card .zph-card__cta .add-to-cart-loop:not(#zph) {
	position: relative;
	display: flex;
	inline-size: 100%;
	min-block-size: 42px;
	padding: 8px 16px;
	border: 1px solid var(--zs-ink);
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: var(--zs-ink);
	font-size: 13.5px;
	font-weight: 600;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.zph-inner .main-page-wrapper .zph-card .zph-card__cta .add-to-cart-loop:not(#zph):is(:hover, :focus-visible) {
	border-color: var(--zs-umber);
	background: var(--zs-umber);
	color: var(--zs-gold-pale);
	filter: none;
	transform: none;
}
.zph-inner .zph-card .zph-card__cta .add-to-cart-loop::before { display: none; }
.zph-inner .zph-card .zph-card__cta .add-to-cart-loop span { padding: 0; transform: none; }
.zph-inner .zph-card .zph-card__cta .add-to-cart-loop.loading { color: transparent; pointer-events: none; }
.zph-inner .zph-card .zph-card__cta .add-to-cart-loop.loading::after {
	content: "";
	position: absolute;
	inset: 50% auto auto 50%;
	inline-size: 16px;
	block-size: 16px;
	margin: -8px 0 0 -8px;
	border: 2px solid #29251f33;
	border-inline-start-color: var(--zs-ink);
	border-radius: 50%;
	animation: wd-rotate 450ms infinite linear;
}
.zph-inner .zph-card .zph-card__cta .added_to_cart { display: block; margin-block-start: 8px; color: var(--zs-gold-deep); font-size: 12.5px; font-weight: 600; text-align: center; }
.zph-inner .zph-card.quick-shop-shown .zph-card__cta .add-to-cart-loop { opacity: .35; pointer-events: none; }

/* Inline colour/size form over the photo: scrollable instead of clipped. */
.zph-inner .zph-card .quick-shop-wrapper { z-index: 5; background: #fffffff5; }
.zph-inner .zph-card .quick-shop-wrapper .quick-shop-form { overflow-y: auto; overscroll-behavior: contain; padding: 44px 14px 14px; }
.zph-inner .zph-card .quick-shop-wrapper .woocommerce-variation-add-to-cart { margin-inline: 0; }
.zph-inner .main-page-wrapper .zph-card .quick-shop-wrapper .single_add_to_cart_button:not(#zph) { min-block-size: 42px; border-radius: 999px !important; font-size: 13.5px; }

/* ---------- phones: two narrow columns ---------- */
@media (max-width: 767px) {
	.zph-inner .products > .zph-card { margin-block-end: 28px; }
	.zph-inner .zph-card .product-title { margin-block-start: 10px; font-size: 13.5px; }
	.zph-inner .zph-card .zph-card__teaser { display: none; }
	.zph-inner .zph-card .zph-card__facts { gap: 4px 10px; font-size: 11.5px; }
	.zph-inner .zph-card .zph-card__tools { inset-block-start: 8px; inset-inline-end: 8px; }
	.zph-inner .zph-card .zph-card__tools .wd-action-btn > a { inline-size: 32px; block-size: 32px; }
	/* :not(#zph) matches the ID-level specificity of site.css's shared :is(…, #place_order) button rule. */
.zph-inner .main-page-wrapper .zph-card .zph-card__cta .add-to-cart-loop:not(#zph) { min-block-size: 38px; padding-inline: 10px; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
	.zph-inner .zph-card :is(.hover-img, .zph-card__tools *, .add-to-cart-loop) { transition: none; }
	.zph-inner .zph-card .zph-card__cta .add-to-cart-loop.loading::after { animation-duration: 1.5s; }
}
