/* Product cards (store-profile feature "product_cards"): the card of every product list, the same card the pet
   store's shop page draws (photo, category line, title, stars, price, button). Markup: templates/frontend/product-card.php.
   Scoped to body.wd-cards. Colours and roundness follow the Design tokens (--wd-*), each with the theme palette
   and a plain colour as fallbacks. */

body.wd-cards {
	--pc-deep: var(--wd-deep, var(--theme-palette-color-2, #0e3d27));
	--pc-leaf: var(--wd-accent, var(--theme-palette-color-1, #1e7a4c));
	--pc-soft: var(--wd-soft, var(--theme-palette-color-6, #e4f2e8));
	--pc-line: var(--wd-line, var(--theme-palette-color-5, #d3e6d9));
	--pc-amber: var(--wd-amber, #f5a524);
	--pc-mute: #6b7a72;
}

body.wd-cards ul.products { gap: 24px !important; }

body.wd-cards ul.products > li.wd-pc {
	position: relative;
	display: flex !important;
	flex-direction: column;
	align-items: stretch !important;
	justify-content: flex-start !important;
	text-align: left !important;
	margin: 0 !important;
	padding: 0 !important;
	background: #fff !important;
	border: 1px solid #e4eee8;
	border-radius: 24px !important;
	overflow: hidden;
	box-shadow: none !important;
	text-align: left;
	transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
}
body.wd-cards ul.products > li.wd-pc:hover { transform: translateY(-5px); border-color: var(--pc-line); box-shadow: 0 24px 40px -26px rgba(14, 61, 39, .45) !important; }

.wd-pc__media { position: relative; display: block; width: 100%; flex: 0 0 auto; aspect-ratio: 1 / 1; background: var(--pc-soft); overflow: hidden; }
.wd-pc__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .5s ease, opacity .35s ease; }
.wd-pc__img--alt { opacity: 0; }
.wd-pc:hover .wd-pc__img { transform: scale(1.05); }
.wd-pc:hover .wd-pc__img--alt { opacity: 1; }
.wd-pc__media .woocommerce-placeholder { object-fit: cover; }
.wd-pc.is-out .wd-pc__img { filter: grayscale(.85); opacity: .7; }

.wd-pc__badges { position: absolute; left: 14px; top: 14px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.wd-pc__badge { display: inline-block; padding: 5px 11px; border-radius: 999px; background: var(--pc-amber); color: #3a2500; font-size: 12px; line-height: 1.2; font-weight: 800; letter-spacing: .01em; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .5); }
.wd-pc__badge--best { background: var(--pc-deep); color: #fff; }
.wd-pc__badge--out { background: #3b3f3d; color: #fff; }

.wd-pc__body { width: 100%; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 auto; padding: 14px 18px 18px; }
.wd-pc__cat { font-size: 11.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--pc-leaf); }
.wd-pc__name { margin: 3px 0 6px !important; padding: 0 !important; font-size: 17px !important; line-height: 1.3 !important; font-weight: 700 !important; text-align: left !important; }
.wd-pc__name a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--pc-deep); }
.wd-pc__name a:hover { color: var(--pc-leaf); }

.wd-pc__meta { display: flex; align-items: center; margin: 0 0 8px; font-size: 13px; color: var(--pc-mute); }
.wd-pc__rate { display: inline-flex; align-items: center; gap: 6px; }
.wd-pc__rate em { font-style: normal; }
.wd-pc__rate--none { font-size: 12.5px; }
.wd-pc__stars { display: inline-block; width: 78px; height: 14px; background: linear-gradient(90deg, var(--pc-amber) var(--r, 0%), #d9e1dc var(--r, 0%));
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M12 1l3.2 6.9 7.5.9-5.6 5.1 1.5 7.4L12 17.5 5.4 21.3l1.5-7.4L1.3 8.8l7.5-.9z'/%3E%3C/svg%3E") 0 0 / 15.6px 14px repeat-x;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M12 1l3.2 6.9 7.5.9-5.6 5.1 1.5 7.4L12 17.5 5.4 21.3l1.5-7.4L1.3 8.8l7.5-.9z'/%3E%3C/svg%3E") 0 0 / 15.6px 14px repeat-x; }

.wd-pc__price { display: flex; align-items: baseline; flex-wrap: nowrap; gap: 8px; margin: 0 0 12px; white-space: nowrap; overflow: hidden; }
.wd-pc__from { font-size: 13px; color: var(--pc-mute); font-weight: 600; }
.wd-pc__now { font-size: 22px; line-height: 1.1; font-weight: 800; color: var(--pc-deep); }
.wd-pc__price del { font-size: 14.5px; color: #8a978f; font-weight: 500; }
.wd-pc__price del .amount { text-decoration: line-through; }

body.wd-cards .wd-pc .wd-pc__add {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	position: static !important;
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
	width: 100%;
	height: auto !important;
	min-height: 46px;
	margin: auto 0 0 !important;
	padding: 0 18px !important;
	border: 2px solid var(--pc-deep) !important;
	border-radius: 999px !important;
	background: var(--pc-deep) !important;
	color: #fff !important;
	font-family: var(--theme-button-font-family, inherit);
	font-size: 13.5px !important;
	font-weight: 800 !important;
	letter-spacing: .04em;
	text-transform: uppercase;
	box-shadow: none !important;
	cursor: pointer;
	transition: background .18s, color .18s, border-color .18s, transform .1s;
}
body.wd-cards .wd-pc .wd-pc__add:hover { background: var(--pc-leaf) !important; border-color: var(--pc-leaf) !important; color: #fff !important; }
body.wd-cards .wd-pc .wd-pc__add:active { transform: scale(.98) !important; }
body.wd-cards .wd-pc .wd-pc__add.product_type_variable,
body.wd-cards .wd-pc .wd-pc__add.product_type_grouped,
body.wd-cards .wd-pc .wd-pc__add.product_type_external { background: #fff !important; color: var(--pc-deep) !important; }
body.wd-cards .wd-pc .wd-pc__add.product_type_variable:hover,
body.wd-cards .wd-pc .wd-pc__add.product_type_grouped:hover,
body.wd-cards .wd-pc .wd-pc__add.product_type_external:hover { background: var(--pc-deep) !important; border-color: var(--pc-deep) !important; color: #fff !important; }
body.wd-cards .wd-pc .added_to_cart { display: block; margin-top: 8px; text-align: center; font-size: 13px; font-weight: 700; color: var(--pc-leaf); }

/* the list's own toolbar: result count and sorting */
body.wd-cards .woocommerce-result-count { font-size: 13px; color: var(--wd-text, var(--theme-palette-color-3, #3a484c)); }
body.wd-cards form.woocommerce-ordering select {
	min-height: 42px;
	padding: 0 38px 0 16px;
	border: 1.5px solid var(--pc-line);
	border-radius: 999px;
	background-color: #fff;
	font-weight: 600;
}

/* phones: two across, tighter */
@media (max-width: 600px) {
	body.wd-cards ul.products { gap: 12px !important; }
	.wd-pc__badges { left: 8px; top: 8px; }
	.wd-pc__badge { font-size: 11px; padding: 4px 9px; }
	.wd-pc__body { padding: 12px 12px 14px; }
	.wd-pc__name { font-size: 15px !important; }
	.wd-pc__now { font-size: 18px; }
	.wd-pc__price del { font-size: 12.5px; }
	.wd-pc__price { gap: 6px; }
	body.wd-cards .wd-pc .wd-pc__add { min-height: 44px; font-size: 12.5px !important; padding: 0 10px !important; }
}

@media (prefers-reduced-motion: reduce) {
	body.wd-cards ul.products > li.wd-pc,
	.wd-pc__img,
	body.wd-cards .wd-pc .wd-pc__add { transition: none; }
	body.wd-cards ul.products > li.wd-pc:hover { transform: none; }
}

/* ── shop / category header ──────────────────────────────────────────────────────────────────
   Full width, like the other pages: the band runs edge to edge, its content sits at the theme's width. */
body.wd-cards { overflow-x: clip; }
body.wd-cards.woocommerce-shop .hero-section,
body.wd-cards.tax-product_cat .hero-section,
body.wd-cards.search .hero-section { display: none; } /* only where our own header replaces it; the 404 and search pages keep the theme's heading */
body.wd-cards .wd-ah {
	position: relative;
	width: 100vw;
	max-width: 100vw;
	margin: 0 0 clamp(24px, 3.4vw, 40px) calc(50% - 50vw);
	overflow: hidden;
	background: linear-gradient(135deg, var(--wd-soft, var(--theme-palette-color-6, #eaf4f1)) 0%, var(--wd-cream, var(--theme-palette-color-7, #fbf8f2)) 70%);
	border-bottom: 1px solid var(--wd-line, var(--theme-palette-color-5, #d9e4e2));
}
body.wd-cards .wd-ah::before {
	content: "";
	position: absolute;
	width: 380px;
	height: 380px;
	right: -100px;
	top: -140px;
	border-radius: 50%;
	background: var(--wd-accent, var(--theme-palette-color-1, #0f766e));
	opacity: .08;
	pointer-events: none;
}
body.wd-cards .wd-ah__in {
	position: relative;
	z-index: 1;
	width: min(var(--theme-normal-container-max-width, 1290px), 92vw);
	margin-inline: auto;
	padding-block: clamp(28px, 4vw, 52px);
}
body.wd-cards .wd-ah__eyebrow {
	display: inline-block;
	margin: 0 0 14px;
	padding: 6px 14px;
	border: 1px solid var(--wd-line, var(--theme-palette-color-5, #d9e4e2));
	border-radius: 999px;
	background: var(--wd-white, #fff);
	color: var(--wd-deep, var(--theme-palette-color-2, #0b5f58));
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}
body.wd-cards .wd-ah__title {
	margin: 0 0 10px;
	font-size: clamp(28px, 4vw, 44px);
	line-height: 1.1;
	letter-spacing: -.01em;
	color: var(--wd-heading, var(--theme-palette-color-4, #0a2e33));
}
body.wd-cards .wd-ah__lead {
	max-width: 40em;
	margin: 0;
	font-size: clamp(15px, 1.7vw, 18px);
	color: var(--wd-text, var(--theme-palette-color-3, #3a484c));
}
body.wd-cards .wd-ah__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}
body.wd-cards .wd-ah__pills--sub { margin-top: 10px; }
body.wd-cards a.wd-ah__pill {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 18px;
	border: 1.5px solid var(--wd-line, var(--theme-palette-color-5, #d9e4e2));
	border-radius: 999px;
	background: var(--wd-white, #fff);
	color: var(--wd-heading, var(--theme-palette-color-4, #0a2e33));
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}
body.wd-cards a.wd-ah__pill:hover,
body.wd-cards a.wd-ah__pill.is-on {
	background: var(--wd-accent, var(--theme-palette-color-1, #0f766e));
	border-color: var(--wd-accent, var(--theme-palette-color-1, #0f766e));
	color: #fff;
}
body.wd-cards .wd-ah__pills--sub a.wd-ah__pill { min-height: 36px; font-size: 13px; }
@media (max-width: 600px) {
	body.wd-cards .wd-ah__eyebrow { font-size: 11px; letter-spacing: .07em; padding: 5px 12px; }
	body.wd-cards .wd-ah__pills { flex-wrap: nowrap; overflow-x: auto; margin-inline: -4vw; padding: 0 4vw 4px; scrollbar-width: none; }
	body.wd-cards .wd-ah__pills::-webkit-scrollbar { display: none; }
	body.wd-cards a.wd-ah__pill { flex: 0 0 auto; }
}

body.wd-cards h1.wd-ah__eyebrow { font-size: 12px; line-height: 1.3; margin: 0; }
body.wd-cards h1.wd-ah__eyebrow + .wd-ah__pills { margin-top: 18px; }

/* ── 404 page: the theme's heading and search box, dressed like the other headers ── */
body.wd-cards.error404 .hero-section {
	width: 100%;
	margin: 0;
	padding: clamp(40px, 7vw, 96px) 4vw clamp(16px, 2vw, 24px);
	text-align: center;
}
body.wd-cards.error404 .site-main {
	background: linear-gradient(135deg, var(--wd-soft, var(--theme-palette-color-6, #eaf4f1)) 0%, var(--wd-cream, var(--theme-palette-color-7, #fbf8f2)) 70%);
	padding-bottom: clamp(32px, 6vw, 80px);
}
body.wd-cards.error404 .hero-section .page-title { margin: 0 0 12px; font-size: clamp(30px, 5vw, 52px); line-height: 1.1; color: var(--wd-heading, var(--theme-palette-color-4, #0a2e33)); }
body.wd-cards.error404 .hero-section .page-description { max-width: 34em; margin: 0 auto; font-size: clamp(15px, 1.7vw, 18px); color: var(--wd-text, var(--theme-palette-color-3, #3a484c)); }
body.wd-cards.error404 .search-form { max-width: 520px; margin: 0 auto; }
body.wd-cards .wd-nf { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 22px 0 0; }
body.wd-cards a.wd-nf__btn {
	display: inline-flex;
	align-items: center;
	min-height: 46px;
	padding: 0 24px;
	border: 2px solid var(--wd-accent, var(--theme-palette-color-1, #0f766e));
	border-radius: 999px;
	background: var(--wd-accent, var(--theme-palette-color-1, #0f766e));
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
body.wd-cards a.wd-nf__btn--o { background: transparent; color: var(--wd-deep, var(--theme-palette-color-2, #0b5f58)); }
body.wd-cards a.wd-nf__btn:hover { background: var(--wd-deep, var(--theme-palette-color-2, #0b5f58)); border-color: var(--wd-deep, var(--theme-palette-color-2, #0b5f58)); color: #fff; }

/* the buy button on the product page: 16px, weight 800 (the theme's own button variables give 14px / 700) */
body.wd-cards.single-product form.cart .single_add_to_cart_button { font-size: 16px; font-weight: 800; }
