/* ============================================================================
   Product cards, site-wide (inc/woocommerce/product-cards.php) — v2.1.0
   ----------------------------------------------------------------------------
   One card for every product grid on the site, modelled on the home page
   "What's New And Trending" carousel card (THD Page Manager, .hdpc__card):

     white card · 1px #E8E8E8 border · 12px corners · 1:1 image tile with a
     14px inset (second image fades in + zooms on hover) · Montserrat 500 17px
     title · Montserrat 500 16px grey price ("Login to see prices" in teal for
     guests) · MSRP line · full-width orange "DM Serif Display" pill button
     pinned to the bottom (Add to Cart / Select options, "Read More" for guests)

   Applied to:
     1. WooCommerce loops rendered by Kadence (shop, categories, search,
        related / upsell / cross-sell products): ul.products li.product
     2. The WooCommerce "Product Collection" block: li.wc-block-product
     3. The older product grid blocks (All Products, Products by Category…):
        .wc-block-grid__product
     4. THD Page Manager carousel / grid cards (.hdpc__card, .hdpg__card) –
        already this design; only the phone layout is aligned (2 per view).

   Sizes are the same everywhere: 4 cards per row ≥ 1025px (22px gutter),
   3 per row 768–1024px, 2 per row ≤ 767px (16px gutter). Cards in a row
   stretch to the same height; the button is always at the bottom.

   Everything is scoped to body.thdw-cards (added by the module), so switching
   the module off leaves the site exactly as before.
   ============================================================================ */

body.thdw-cards {
	--hdc-border: #e8e8e8;
	--hdc-ink: #171111;
	--hdc-grey: #757575;
	--hdc-teal: #025960;
	--hdc-orange: #fc9e01;
	--hdc-radius: 12px;
	--hdc-gap: 22px;
	--hdc-pad: 16px;
	--hdc-img-pad: 14px;
	--hdc-font: Montserrat, Arial, sans-serif;
	--hdc-serif: "DM Serif Display", Georgia, serif;
}

/* ============================================================================
   1. Grids – 4 / 3 / 2 columns, same gutters everywhere
   ============================================================================ */

body.thdw-cards .woocommerce ul.products:not(.products-list-view),
body.thdw-cards ul.products:not(.products-list-view),
body.thdw-cards .woocommerce-page ul.products:not(.products-list-view) {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: var(--hdc-gap) !important;
	column-gap: var(--hdc-gap) !important;
	row-gap: var(--hdc-gap) !important;
	align-items: stretch !important;
	margin: 0 0 var(--hdc-gap) !important;
	padding: 0 !important;
	list-style: none;
}
body.thdw-cards ul.products:not(.products-list-view)::before,
body.thdw-cards ul.products:not(.products-list-view)::after {
	display: none !important; /* WooCommerce's clearfix would become a grid cell. */
}
/* Smaller loops that ask for fewer columns (Kadence column classes / the block's own count). */
body.thdw-cards ul.products:not(.products-list-view).columns-3,
body.thdw-cards ul.products:not(.products-list-view).grid-lg-col-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
body.thdw-cards ul.products:not(.products-list-view).columns-2,
body.thdw-cards ul.products:not(.products-list-view).grid-lg-col-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* Product Collection block */
body.thdw-cards ul.wc-block-product-template,
body.thdw-cards .wp-block-woocommerce-product-template {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: var(--hdc-gap) !important;
	align-items: stretch !important;
	justify-content: stretch !important;
	margin: 0 0 var(--hdc-gap) !important;
	padding: 0 !important;
	list-style: none;
}
/* The block's "Wide width" setting (alignwide / alignfull) must not push the
   grid past the page container: the list always fills its parent, no more. */
body.thdw-cards ul.wc-block-product-template,
body.thdw-cards ul.wc-block-product-template.alignwide,
body.thdw-cards ul.wc-block-product-template.alignfull,
body.thdw-cards .wp-block-woocommerce-product-template.alignwide,
body.thdw-cards .wp-block-woocommerce-product-template.alignfull,
body.thdw-cards .wp-block-woocommerce-product-collection.alignwide,
body.thdw-cards .wp-block-woocommerce-product-collection.alignfull,
body.thdw-cards .wc-block-grid.alignwide,
body.thdw-cards .wc-block-grid.alignfull {
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	left: auto !important;
	right: auto !important;
	transform: none !important;
}
body.thdw-cards .wp-block-woocommerce-product-collection,
body.thdw-cards .wc-block-grid {
	max-width: 100% !important;
}
body.thdw-cards ul.wc-block-product-template.columns-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
body.thdw-cards ul.wc-block-product-template.columns-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
body.thdw-cards ul.wc-block-product-template.columns-1 {
	grid-template-columns: minmax(0, 1fr) !important;
}

/* Older product grid blocks */
body.thdw-cards .wc-block-grid .wc-block-grid__products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: var(--hdc-gap) !important;
	align-items: stretch !important;
	margin: 0 0 var(--hdc-gap) !important;
	padding: 0 !important;
	list-style: none;
}
body.thdw-cards .wc-block-grid.has-3-columns .wc-block-grid__products {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
body.thdw-cards .wc-block-grid.has-2-columns .wc-block-grid__products {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
body.thdw-cards .wc-block-grid.has-1-columns .wc-block-grid__products {
	grid-template-columns: minmax(0, 1fr) !important;
}

@media (max-width: 1024px) {
	body.thdw-cards ul.products:not(.products-list-view),
	body.thdw-cards ul.products:not(.products-list-view).grid-lg-col-4,
	body.thdw-cards ul.wc-block-product-template,
	body.thdw-cards ul.wc-block-product-template.columns-4,
	body.thdw-cards .wc-block-grid .wc-block-grid__products,
	body.thdw-cards .wc-block-grid.has-4-columns .wc-block-grid__products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}
@media (max-width: 767px) {
	body.thdw-cards {
		--hdc-gap: 16px;
	}
	body.thdw-cards ul.products:not(.products-list-view),
	body.thdw-cards ul.products:not(.products-list-view).grid-lg-col-4,
	body.thdw-cards ul.products:not(.products-list-view).grid-lg-col-3,
	body.thdw-cards ul.wc-block-product-template,
	body.thdw-cards ul.wc-block-product-template.columns-4,
	body.thdw-cards ul.wc-block-product-template.columns-3,
	body.thdw-cards .wc-block-grid .wc-block-grid__products,
	body.thdw-cards .wc-block-grid.has-4-columns .wc-block-grid__products,
	body.thdw-cards .wc-block-grid.has-3-columns .wc-block-grid__products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

/* ============================================================================
   2. The card – shared rules
   The three markups are listed side by side for every part of the card.
   ============================================================================ */

/* --- Card box ------------------------------------------------------------ */
body.thdw-cards ul.products:not(.products-list-view) li.product,
body.thdw-cards .woocommerce ul.products:not(.products-list-view) li.product,
body.thdw-cards li.wc-block-product,
body.thdw-cards .wc-block-grid__product {
	position: relative;
	display: flex !important;
	flex-direction: column !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0;
	height: auto;
	margin: 0 !important;
	padding: 0 !important;
	background: #fff !important;
	border: 1px solid var(--hdc-border) !important;
	border-radius: var(--hdc-radius) !important;
	box-shadow: none !important;
	overflow: hidden;
	text-align: center;
	font-family: var(--hdc-font);
	float: none !important;
	clear: none !important;
}
body.thdw-cards li.wc-block-product {
	flex-basis: auto !important;
}

/* --- Image tile ---------------------------------------------------------- */
body.thdw-cards ul.products li.product a.woocommerce-loop-image-link,
body.thdw-cards ul.products li.product .product-image-wrap,
body.thdw-cards li.wc-block-product .kadence-product-collection-hover-zoom,
body.thdw-cards li.wc-block-product > .wc-block-components-product-image,
body.thdw-cards li.wc-block-product > .wp-block-woocommerce-product-image,
body.thdw-cards .wc-block-grid__product .wc-block-grid__product-link,
body.thdw-cards .wc-block-grid__product .wc-block-grid__product-image {
	position: relative;
	display: block;
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
	background: #fff;
	line-height: 0;
	overflow: hidden;
	border-radius: 0 !important;
}
body.thdw-cards li.wc-block-product .kadence-product-collection-hover-zoom .wc-block-components-product-image,
body.thdw-cards li.wc-block-product .wc-block-components-product-image a,
body.thdw-cards .wc-block-grid__product .wc-block-grid__product-link .wc-block-grid__product-image {
	position: static;
	display: block;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 0;
}
body.thdw-cards ul.products li.product a.woocommerce-loop-image-link img,
body.thdw-cards li.wc-block-product .wc-block-components-product-image img,
body.thdw-cards .wc-block-grid__product .wc-block-grid__product-image img {
	display: block;
	width: 100% !important;
	height: auto !important;
	max-width: none !important;
	aspect-ratio: 1 / 1;
	object-fit: contain !important;
	object-position: center;
	margin: 0 !important;
	padding: var(--hdc-img-pad) !important;
	border-radius: 0 !important;
	box-sizing: border-box;
	background: #fff;
	backface-visibility: hidden;
	transition: opacity 0.4s, transform 2s cubic-bezier(0, 0, 0.4, 1.1);
}
/* Second image (gallery image) over the first: fades in and zooms on hover.
   Kadence prints img.secondary-product-image in the loop; the Product
   Collection block gets img.kadence-hover-image from product-display.php. */
body.thdw-cards ul.products li.product a.woocommerce-loop-image-link img.secondary-product-image,
body.thdw-cards li.wc-block-product .kadence-product-collection-hover-zoom img.kadence-hover-image {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	aspect-ratio: auto;
	object-fit: contain !important;
	object-position: center;
	margin: 0 !important;
	padding: var(--hdc-img-pad) !important;
	box-sizing: border-box;
	background: #fff;
	opacity: 0;
	transform: scale(1) translateZ(0);
	backface-visibility: hidden;
	transition: opacity 0.4s, transform 2s cubic-bezier(0, 0, 0.4, 1.1);
	z-index: 2;
	pointer-events: none;
	visibility: visible !important;
}
body.thdw-cards ul.products li.product a.woocommerce-loop-image-link:hover img.secondary-product-image,
body.thdw-cards ul.products li.product:hover a.woocommerce-loop-image-link img.secondary-product-image,
body.thdw-cards li.wc-block-product .kadence-product-collection-hover-zoom:hover img.kadence-hover-image {
	opacity: 1;
	transform: scale(1.08) translateZ(0);
}
body.thdw-cards ul.products li.product a.woocommerce-loop-image-link.product-has-hover-image:hover img:not(.secondary-product-image),
body.thdw-cards ul.products li.product:hover a.woocommerce-loop-image-link.product-has-hover-image img:not(.secondary-product-image),
body.thdw-cards li.wc-block-product .kadence-product-collection-hover-zoom:not(.kadence-product-collection-hover-zoom--single):hover .wc-block-components-product-image img {
	opacity: 0;
	transform: none !important;
}
/* One image only: zoom it. */
body.thdw-cards ul.products li.product:hover a.woocommerce-loop-image-link:not(.product-has-hover-image) img,
body.thdw-cards li.wc-block-product .kadence-product-collection-hover-zoom--single:hover .wc-block-components-product-image img,
body.thdw-cards .wc-block-grid__product:hover .wc-block-grid__product-image img {
	opacity: 1;
	transform: scale(1.08) translateZ(0);
}
@media (hover: none) {
	body.thdw-cards ul.products li.product a.woocommerce-loop-image-link:active img.secondary-product-image,
	body.thdw-cards li.wc-block-product .kadence-product-collection-hover-zoom:active img.kadence-hover-image {
		opacity: 1;
		transform: scale(1.08);
	}
	body.thdw-cards ul.products li.product a.woocommerce-loop-image-link.product-has-hover-image:active img:not(.secondary-product-image),
	body.thdw-cards li.wc-block-product .kadence-product-collection-hover-zoom:not(.kadence-product-collection-hover-zoom--single):active .wc-block-components-product-image img {
		opacity: 0;
	}
}
@media (prefers-reduced-motion: reduce) {
	body.thdw-cards ul.products li.product a.woocommerce-loop-image-link img,
	body.thdw-cards li.wc-block-product .wc-block-components-product-image img,
	body.thdw-cards li.wc-block-product img.kadence-hover-image,
	body.thdw-cards .wc-block-grid__product .wc-block-grid__product-image img {
		transition: none;
	}
}

/* Kadence product badges (image badges from Shop Kit) stay over the tile. */
body.thdw-cards li.product .kt-woo-badge,
body.thdw-cards li.wc-block-product .kt-woo-badge,
body.thdw-cards .wc-block-grid__product .kt-woo-badge {
	z-index: 3;
	line-height: 0;
}

/* --- Body (title, MSRP, price) ------------------------------------------ */
body.thdw-cards ul.products:not(.products-list-view) li.product .product-details,
body.thdw-cards .wc-block-grid__product .product-details {
	display: flex !important;
	flex-direction: column !important;
	flex: 1 1 auto !important;
	align-items: center !important;
	align-content: flex-start !important;
	justify-content: flex-start !important;
	width: 100%;
	margin: 0 !important;
	padding: 6px var(--hdc-pad) 14px !important;
	background: transparent !important;
	text-align: center !important;
}
/* The Product Collection card has no body wrapper: its blocks are the li's children. */
body.thdw-cards li.wc-block-product > h3,
body.thdw-cards li.wc-block-product > h2,
body.thdw-cards li.wc-block-product > .wp-block-post-title,
body.thdw-cards li.wc-block-product > .wc-msrp-display,
body.thdw-cards li.wc-block-product > .wp-block-woocommerce-product-price,
body.thdw-cards li.wc-block-product > .wc-block-components-product-price,
body.thdw-cards li.wc-block-product > .wp-block-woocommerce-product-rating,
body.thdw-cards li.wc-block-product > .wc-block-components-product-rating,
body.thdw-cards li.wc-block-product > .wp-block-post-excerpt,
body.thdw-cards li.wc-block-product > .wc-block-components-product-summary {
	width: auto;
	margin-left: var(--hdc-pad) !important;
	margin-right: var(--hdc-pad) !important;
	text-align: center !important;
}
body.thdw-cards li.wc-block-product > .wp-block-post-title,
body.thdw-cards li.wc-block-product > h3,
body.thdw-cards li.wc-block-product > h2 {
	margin-top: 6px !important;
}

/* Title */
body.thdw-cards ul.products li.product .woocommerce-loop-product__title,
body.thdw-cards ul.products li.product h2.woocommerce-loop-product__title,
body.thdw-cards li.wc-block-product .wp-block-post-title,
body.thdw-cards .wc-block-grid__product .wc-block-grid__product-title {
	display: block;
	width: 100%;
	margin: 0 0 6px !important;
	padding: 0 !important;
	font-family: var(--hdc-font) !important;
	font-size: 17px !important;
	font-weight: 500 !important;
	line-height: 1.4 !important;
	letter-spacing: 0;
	text-transform: none;
	text-align: center !important;
	color: var(--hdc-ink) !important;
	overflow-wrap: anywhere;
}
body.thdw-cards ul.products li.product .woocommerce-loop-product__title a,
body.thdw-cards li.wc-block-product .wp-block-post-title a,
body.thdw-cards .wc-block-grid__product .wc-block-grid__product-title a,
body.thdw-cards .wc-block-grid__product .wc-block-grid__product-link {
	font: inherit !important;
	color: var(--hdc-ink) !important;
	text-decoration: none !important;
}
body.thdw-cards ul.products li.product .woocommerce-loop-product__title a:hover,
body.thdw-cards li.wc-block-product .wp-block-post-title a:hover {
	color: var(--hdc-teal) !important;
}

/* MSRP line printed by the MSRP plugin */
body.thdw-cards li.product .wc-msrp-display--loop,
body.thdw-cards li.wc-block-product .wc-msrp-display--loop,
body.thdw-cards .wc-block-grid__product .wc-msrp-display--loop {
	margin: 0 0 4px !important;
	padding: 0 !important;
	font-family: var(--hdc-font) !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
	color: var(--hdc-grey) !important;
	text-align: center !important;
}
body.thdw-cards .wc-msrp-display--loop .woocommerce-Price-amount {
	font-size: inherit !important;
	color: inherit !important;
	font-weight: inherit !important;
}

/* Price */
body.thdw-cards ul.products li.product .price,
body.thdw-cards ul.products li.product span.price,
body.thdw-cards li.wc-block-product .wp-block-woocommerce-product-price,
body.thdw-cards li.wc-block-product .wc-block-components-product-price,
body.thdw-cards .wc-block-grid__product .wc-block-grid__product-price {
	display: block !important;
	width: 100%;
	margin: 0 0 6px !important;
	padding: 0 !important;
	font-family: var(--hdc-font) !important;
	font-size: 16px !important;
	font-weight: 500 !important;
	line-height: 1.4 !important;
	color: var(--hdc-grey) !important;
	text-align: center !important;
	order: 0;
}
body.thdw-cards li.wc-block-product .wp-block-woocommerce-product-price .wc-block-components-product-price {
	margin: 0 !important;
}
body.thdw-cards li.product .price .woocommerce-Price-amount,
body.thdw-cards li.product .price .amount,
body.thdw-cards li.wc-block-product .wc-block-components-product-price .woocommerce-Price-amount,
body.thdw-cards li.wc-block-product .wc-block-components-product-price .amount,
body.thdw-cards .wc-block-grid__product .wc-block-grid__product-price .woocommerce-Price-amount {
	font-size: 16px !important;
	font-weight: 500 !important;
	color: var(--hdc-grey) !important;
}
body.thdw-cards li.product .price del,
body.thdw-cards li.wc-block-product .wc-block-components-product-price del,
body.thdw-cards .wc-block-grid__product .wc-block-grid__product-price del {
	opacity: 0.55;
	margin-right: 6px;
	text-decoration: line-through;
}
body.thdw-cards li.product .price ins,
body.thdw-cards li.wc-block-product .wc-block-components-product-price ins,
body.thdw-cards .wc-block-grid__product .wc-block-grid__product-price ins {
	text-decoration: none;
	background: none;
}
body.thdw-cards li.product .price .subscription-details,
body.thdw-cards li.product .price .wcsatt-options-prompt-label,
body.thdw-cards li.wc-block-product .subscription-details {
	font-size: 14px !important;
	font-weight: 400 !important;
	color: #000 !important;
}

/* "Login to see prices" (guests – inc/woocommerce/wholesale-access.php) */
body.thdw-cards .login-price-wrap {
	display: block;
	width: 100%;
	text-align: center;
}
body.thdw-cards .login-price-button,
body.thdw-cards .login-price-button:link,
body.thdw-cards .login-price-button:visited {
	display: inline !important;
	font-family: var(--hdc-font) !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	line-height: 1.4 !important;
	color: var(--hdc-teal) !important;
	text-decoration: underline !important;
	text-underline-offset: 3px;
}
body.thdw-cards .login-price-button:hover,
body.thdw-cards .login-price-button:focus {
	color: var(--hdc-orange) !important;
}

/* Things the card does not show in grid view */
body.thdw-cards ul.products:not(.products-list-view) li.product .product-excerpt,
body.thdw-cards ul.products:not(.products-list-view) li.product .woocommerce-product-details__short-description,
body.thdw-cards ul.products:not(.products-list-view) li.product .product-meta,
body.thdw-cards ul.products:not(.products-list-view) li.product .product-action-wrap .screen-reader-text {
	display: none !important;
}

/* --- Foot: the button -------------------------------------------------- */
body.thdw-cards ul.products:not(.products-list-view) li.product .product-action-wrap,
body.thdw-cards .wc-block-grid__product .wc-block-grid__product-add-to-cart,
body.thdw-cards li.wc-block-product > .wc-block-components-product-button,
body.thdw-cards li.wc-block-product > .wp-block-woocommerce-product-button,
body.thdw-cards li.wc-block-product > .hd-card__foot,
body.thdw-cards .wc-block-grid__product > .hd-card__foot {
	position: static !important;
	display: block !important;
	width: 100% !important;
	margin: auto 0 0 !important;
	padding: 30px 0 0 !important;
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
	transition: none !important;
	text-align: center;
	background: transparent !important;
}
/* The Product Collection card and the grid block have no body padding of their own. */
body.thdw-cards li.wc-block-product > .wc-block-components-product-button,
body.thdw-cards li.wc-block-product > .wp-block-woocommerce-product-button,
body.thdw-cards li.wc-block-product > .hd-card__foot {
	width: auto !important;
	margin: auto var(--hdc-pad) 14px !important;
}
body.thdw-cards .wc-block-grid__product > .hd-card__foot {
	width: auto !important;
	margin: auto var(--hdc-pad) 14px !important;
}
/* A bare button link straight in the card (the Add to Cart block's output after
   the loop filter, when the PHP foot wrapping is switched off): same spot. */
body.thdw-cards li.wc-block-product > a.hd-card__btn,
body.thdw-cards li.wc-block-product > a.button,
body.thdw-cards .wc-block-grid__product > a.hd-card__btn,
body.thdw-cards .wc-block-grid__product > a.button {
	width: auto !important;
	margin: auto var(--hdc-pad) 14px !important;
}
body.thdw-cards ul.products:not(.products-list-view) li.product .product-action-wrap .button,
body.thdw-cards ul.products:not(.products-list-view) li.product .product-action-wrap .hd-card__btn,
body.thdw-cards .woocommerce ul.products.woo-archive-btn-button li.product .product-action-wrap .button:not(.kb-button),
body.thdw-cards .woocommerce ul.products li.woo-archive-btn-button .button:not(.kb-button),
body.thdw-cards li.wc-block-product .wc-block-components-product-button__button,
body.thdw-cards li.wc-block-product .wp-block-button__link,
body.thdw-cards li.wc-block-product .hd-card__btn,
body.thdw-cards .wc-block-grid__product .wc-block-grid__product-add-to-cart .wp-block-button__link,
body.thdw-cards .wc-block-grid__product .hd-card__btn,
body.thdw-cards .hd-card__btn {
	display: block !important;
	width: 100% !important;
	min-width: 0 !important;
	max-width: none !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 12px 18px !important;
	border: 0 !important;
	border-radius: 25px !important;
	background: var(--hdc-orange) !important;
	background-image: none !important;
	color: #fff !important;
	font-family: var(--hdc-serif) !important;
	font-size: 17px !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	letter-spacing: 0;
	text-align: center !important;
	text-decoration: none !important;
	text-transform: none !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	box-shadow: none !important;
	transform: none !important;
	transition: none !important;
	opacity: 1 !important;
	filter: none !important;
	cursor: pointer;
	box-sizing: border-box;
}
body.thdw-cards ul.products li.product .product-action-wrap .button:hover,
body.thdw-cards ul.products li.product .product-action-wrap .button:focus,
body.thdw-cards li.wc-block-product .wc-block-components-product-button__button:hover,
body.thdw-cards li.wc-block-product .wc-block-components-product-button__button:focus,
body.thdw-cards .wc-block-grid__product .wc-block-grid__product-add-to-cart .wp-block-button__link:hover,
body.thdw-cards .hd-card__btn:hover,
body.thdw-cards .hd-card__btn:focus {
	background: var(--hdc-orange) !important;
	color: #fff !important;
	box-shadow: none !important;
	transform: none !important;
}
body.thdw-cards .hd-card__btn:focus-visible,
body.thdw-cards ul.products li.product .product-action-wrap .button:focus-visible,
body.thdw-cards li.wc-block-product .wc-block-components-product-button__button:focus-visible {
	outline: 2px solid var(--hdc-teal);
	outline-offset: 2px;
}
/* WooCommerce's AJAX states */
body.thdw-cards ul.products li.product .product-action-wrap .button.loading::after,
body.thdw-cards li.wc-block-product .wc-block-components-product-button__button.loading::after {
	position: static;
	display: inline-block;
	margin-left: 8px;
}
body.thdw-cards ul.products li.product .product-action-wrap .added_to_cart,
body.thdw-cards li.wc-block-product .wc-block-components-product-button .added_to_cart,
body.thdw-cards li.wc-block-product .wc-block-components-product-button__button + a {
	display: inline-block;
	margin-top: 8px;
	font-family: var(--hdc-font);
	font-size: 14px;
	font-weight: 500;
	color: var(--hdc-teal);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* --- Phones: two cards per row, so the type and insets scale down a notch --- */
@media (max-width: 767px) {
	body.thdw-cards {
		--hdc-pad: 12px;
		--hdc-img-pad: 10px;
	}
	body.thdw-cards ul.products li.product .woocommerce-loop-product__title,
	body.thdw-cards ul.products li.product h2.woocommerce-loop-product__title,
	body.thdw-cards li.wc-block-product .wp-block-post-title,
	body.thdw-cards .wc-block-grid__product .wc-block-grid__product-title {
		font-size: 15px !important;
	}
	body.thdw-cards ul.products li.product .price,
	body.thdw-cards ul.products li.product span.price,
	body.thdw-cards li.wc-block-product .wc-block-components-product-price,
	body.thdw-cards .wc-block-grid__product .wc-block-grid__product-price,
	body.thdw-cards li.product .price .woocommerce-Price-amount,
	body.thdw-cards li.wc-block-product .wc-block-components-product-price .woocommerce-Price-amount {
		font-size: 15px !important;
	}
	body.thdw-cards li.product .wc-msrp-display--loop,
	body.thdw-cards li.wc-block-product .wc-msrp-display--loop,
	body.thdw-cards .login-price-button {
		font-size: 13px !important;
	}
	body.thdw-cards ul.products:not(.products-list-view) li.product .product-action-wrap,
	body.thdw-cards .wc-block-grid__product .wc-block-grid__product-add-to-cart {
		padding-top: 22px !important;
	}
	body.thdw-cards ul.products:not(.products-list-view) li.product .product-action-wrap .button,
	body.thdw-cards ul.products:not(.products-list-view) li.product .product-action-wrap .hd-card__btn,
	body.thdw-cards li.wc-block-product .wc-block-components-product-button__button,
	body.thdw-cards li.wc-block-product .hd-card__btn,
	body.thdw-cards .wc-block-grid__product .wc-block-grid__product-add-to-cart .wp-block-button__link,
	body.thdw-cards .hd-card__btn {
		padding: 11px 12px !important;
		font-size: 15px !important;
	}
}

/* ============================================================================
   3. THD Page Manager cards (home page carousel) – phones: 2 per view, 16px gap
   ============================================================================ */
@media (max-width: 767px) {
	body.thdw-cards .hdpc__track {
		gap: 16px;
	}
	body.thdw-cards .hdpc__track > .hdpc__card {
		flex-basis: calc(50% - 8px);
	}
	/* Same scale as the other cards on phones (the plugin's rules carry !important and an :not(#id) hook, hence the specificity). */
	body.thdw-cards .hdpc .hdpc__media img {
		padding: var(--hdc-img-pad);
	}
	body.thdw-cards .hdpc .hdpc__body {
		padding: 6px var(--hdc-pad) 14px;
	}
	body.thdw-cards .hdpc .hdpc__name a:not(#hd) {
		font-size: 15px !important;
	}
	body.thdw-cards .hdpc .hdpc__price {
		font-size: 15px !important;
	}
	body.thdw-cards .hdpc .hdpc__price-login {
		font-size: 13px !important;
	}
	body.thdw-cards .hdpc .hdpc__foot {
		padding: 8px var(--hdc-pad) 14px;
	}
	body.thdw-cards .hdpc__foot .hdpc__btn {
		padding: 11px 12px !important;
		font-size: 15px !important;
	}
}
@media (max-width: 1024px) and (min-width: 768px) {
	body.thdw-cards .hdpc__track {
		gap: var(--hdc-gap);
	}
	body.thdw-cards .hdpc__track > .hdpc__card {
		flex-basis: calc(33.3333% - 14.6667px);
	}
}

/* ============================================================================
   4. Kadence shop top row – same gutter as the grid
   ============================================================================ */
body.thdw-cards .kadence-shop-top-row {
	margin-bottom: var(--hdc-gap);
}
