/*
 * Store pages revamp (inc/store-pages.php; Dev Docs/Design/store_pages_revamp/store-pages-plan.md).
 * Loaded only on store pages (body.pg-store). Builds on brand-refresh.css tokens and button variants:
 * product cards use the secondary (purple outline) button, the search box the primary (orange) button.
 */

/* ------------------------------------------------------------------ */
/* Product card: equal parts, one button pinned to the bottom          */
/* ------------------------------------------------------------------ */

body.pg-store ul.products li.product {
	display: flex;
	flex-direction: column;
}

body.pg-store ul.products li.product .astra-shop-summary-wrap {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	padding: var(--pg-space-2) var(--pg-space-1) 0;
}

body.pg-store ul.products li.product .ast-woo-product-category {
	margin-bottom: 4px;
}

body.pg-store ul.products li.product .woocommerce-loop-product__title {
	margin-bottom: var(--pg-space-1);
}

body.pg-store ul.products li.product .price {
	margin-bottom: var(--pg-space-2);
	font-size: 15px;
}

/* One button size for every card action (Select options, Add to cart, View panel/details). */
body.pg-store ul.products li.product .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: auto 0 0;
	padding: 10px 24px;
	font-size: 14px;
	line-height: 1.3;
	white-space: normal;
	text-align: center;
}

/* "Request a Quote" (YITH) on cards: a second button in the same style and size as the card button, inside the
   card padding, under the first button (Tao, 2026-09-27). */
body.pg-store ul.products li.product .yith-ywraq-add-to-quote {
	padding: var(--pg-space-1) var(--pg-space-1) 0;
	margin: 0;
}

/* Same metrics as the card button; YITH's own rule (padding 1rem 2rem, margin-top 1rem) is more specific than the
   shared card rule, and style.css forces font-size: 15px !important. */
body.pg-store ul.products li.product .yith-ywraq-add-to-quote .add-request-quote-button.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 10px 24px;
	font-size: 14px !important;
	line-height: 1.3;
	letter-spacing: 0.04em;
}

body.pg-store ul.products li.product .yith_ywraq_add_item_response_message,
body.pg-store ul.products li.product .yith_ywraq_add_item_product_message,
body.pg-store ul.products li.product .yith_ywraq_add_item_browse_message {
	font-size: 13px;
}

body.pg-store ul.products li.product .added_to_cart {
	margin-top: var(--pg-space-1);
	font-size: 14px;
	font-weight: 700;
	color: var(--pg-purple);
}

body.pg-store ul.products li.product .button:focus-visible,
body.pg-store .pg-store-search__input:focus-visible,
body.pg-store .pg-store-search__submit:focus-visible {
	outline: 3px solid var(--pg-purple-tint);
	outline-offset: 2px;
}

/* Shop page: category tiles are not printed; drop the empty list's box. */
body.pg-store ul.products:empty {
	display: none;
}

/* ------------------------------------------------------------------ */
/* Category archives                                                   */
/* ------------------------------------------------------------------ */

/* The banner already shows the category description; do not repeat it under the breadcrumb. */
body.pg-store.ast-advanced-headers .woocommerce-products-header .term-description {
	display: none;
}

/* Banner to breadcrumb: 48 px instead of about 100 px (style.css #content.site-content 50 px + primary 48 px). */
body.pg-store.archive #content.site-content {
	margin-top: 0;
}

body.pg-store.archive.ast-plain-container #primary {
	margin-top: var(--pg-space-5);
}

/* Pagination in brand purple. */
body.pg-store .woocommerce-pagination ul li a,
body.pg-store .woocommerce-pagination ul li span {
	border-color: var(--pg-border) !important;
	color: var(--pg-purple) !important;
	min-width: 44px;
	min-height: 44px;
	line-height: 42px !important;
	padding: 0 12px !important;
}

body.pg-store .woocommerce-pagination ul li span.current,
body.pg-store .woocommerce-pagination ul li a:hover {
	background: var(--pg-purple) !important;
	border-color: var(--pg-purple) !important;
	color: var(--pg-white) !important;
}

/* ------------------------------------------------------------------ */
/* Search box                                                          */
/* ------------------------------------------------------------------ */

body.pg-store .pg-store-toolbar {
	margin: 0 0 var(--pg-space-4);
}

body.pg-store .pg-store-toolbar--page {
	margin: 0;
}

body.pg-store .pg-store-search {
	max-width: 640px;
	margin: 0;
}

body.pg-store .pg-store-search__label {
	display: block;
	margin-bottom: var(--pg-space-1);
	color: var(--pg-ink);
	font-size: 14px;
	font-weight: 700;
}

body.pg-store .pg-store-search__row {
	display: flex;
	gap: var(--pg-space-1);
}

body.pg-store .pg-store-search__input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 44px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid var(--pg-border-strong);
	border-radius: var(--pg-radius-sm);
	background: var(--pg-white);
	color: var(--pg-ink);
	font-size: 16px;
}

body.pg-store .pg-store-search__input::placeholder {
	color: var(--pg-ink-muted);
	opacity: 1;
}

body.pg-store .pg-store-search .pg-store-search__submit {
	flex: 0 0 auto;
	min-height: 44px;
	margin: 0;
	padding: 10px 24px;
	background: var(--pg-orange-strong) !important;
	border: 0 !important;
	color: var(--pg-white) !important;
}

body.pg-store .pg-store-search .pg-store-search__submit:hover {
	background: var(--pg-orange-deep) !important;
}

body.pg-store .pg-store-toolbar__status {
	margin: var(--pg-space-2) 0 0;
	color: var(--pg-ink-muted);
	font-size: 14px;
}

body.pg-store .pg-store-empty {
	max-width: 640px;
	padding: var(--pg-space-3);
	border: 1px solid var(--pg-border);
	border-radius: var(--pg-radius-md);
	background: var(--pg-surface);
}

body.pg-store .pg-store-empty__title {
	margin-bottom: var(--pg-space-1);
	color: var(--pg-ink);
	font-weight: 700;
}

body.pg-store .pg-store-empty__links {
	margin: var(--pg-space-1) 0 0 1.2em;
}

/* ------------------------------------------------------------------ */
/* Section rules under group headings                                  */
/* ------------------------------------------------------------------ */

/* Avada Separator elements with CSS class "pg-section-rule" (under the group headings on /store/ and /store_mgi/):
   a light 1 px line with a short brand accent at the left, instead of a heavy black line. */
body.pg-store .fusion-separator.pg-section-rule {
	position: relative;
	margin-bottom: var(--pg-space-3) !important;
	border-top: 1px solid var(--pg-border) !important;
}

body.pg-store .fusion-separator.pg-section-rule::before {
	content: "";
	position: absolute;
	top: -2px;
	left: 0;
	width: 64px;
	height: 3px;
	border-radius: 2px;
	background: var(--pg-ribbon);
}

/* ------------------------------------------------------------------ */
/* Featured product ([pg_featured_product])                            */
/* ------------------------------------------------------------------ */

body.pg-store .pg-store-featured {
	display: grid;
	grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
	gap: var(--pg-space-5);
	align-items: center;
	margin: 0 0 var(--pg-space-2);
	padding: var(--pg-space-4);
	border: 1px solid var(--pg-border);
	border-radius: var(--pg-radius-md);
	background: var(--pg-white);
	box-shadow: var(--pg-shadow-card);
}

body.pg-store .pg-store-featured__media {
	display: block;
	border-radius: calc(var(--pg-radius-md) - 4px);
	background: var(--pg-surface);
	overflow: hidden;
}

body.pg-store .pg-store-featured__media img {
	display: block;
	width: 100%;
	height: auto;
}

body.pg-store .pg-store-featured__label {
	margin: 0 0 var(--pg-space-1);
	color: var(--pg-orange-strong);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

body.pg-store .pg-store-featured__title {
	margin: 0 0 var(--pg-space-2);
	font-size: 28px;
	line-height: 1.25;
}

body.pg-store .pg-store-featured__title a {
	color: var(--pg-ink);
	text-decoration: none;
}

body.pg-store .pg-store-featured__title a:hover,
body.pg-store .pg-store-featured__title a:focus-visible {
	color: var(--pg-purple);
}

body.pg-store .pg-store-featured__summary {
	max-width: 60ch;
	margin: 0 0 var(--pg-space-3);
	color: var(--pg-ink);
	font-size: 16px;
	line-height: 1.6;
}

body.pg-store .pg-store-featured__price {
	margin: 0 0 var(--pg-space-3);
	font-size: 18px;
}

body.pg-store .pg-store-featured .pg-store-featured__cta {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 24px;
	background: var(--pg-orange-strong) !important;
	border: 0 !important;
	color: var(--pg-white) !important;
	font-size: 14px;
}

body.pg-store .pg-store-featured .pg-store-featured__cta:hover,
body.pg-store .pg-store-featured .pg-store-featured__cta:focus-visible {
	background: var(--pg-orange-deep) !important;
}

@media (max-width: 921px) {
	body.pg-store .pg-store-featured {
		grid-template-columns: 1fr;
		gap: var(--pg-space-3);
		padding: var(--pg-space-3);
	}

	body.pg-store .pg-store-featured__media {
		max-width: 360px;
	}

	body.pg-store .pg-store-featured__title {
		font-size: 22px;
	}
}

/* ------------------------------------------------------------------ */
/* Phones: one product per row, image beside the text                  */
/* ------------------------------------------------------------------ */

@media (max-width: 544px) {
	body.pg-store ul.products,
	body.pg-store .woocommerce ul.products {
		display: grid !important;
		grid-template-columns: 1fr !important;
		gap: var(--pg-space-2);
	}

	body.pg-store ul.products li.product {
		display: grid !important; /* Astra sets the phone column to display: block */
		grid-template-columns: 96px 1fr;
		grid-template-rows: auto auto;
		column-gap: var(--pg-space-2);
		min-height: 0; /* style.css sets li.product.type-product { min-height: 314px } */
		width: 100% !important;
		margin: 0 !important;
		padding: var(--pg-space-2);
	}

	body.pg-store ul.products li.product .astra-shop-thumbnail-wrap {
		grid-column: 1;
		grid-row: 1 / span 2;
		align-self: start;
		margin: 0;
	}

	body.pg-store ul.products li.product .astra-shop-summary-wrap,
	body.pg-store ul.products li.product .yith-ywraq-add-to-quote {
		grid-column: 2;
		padding-left: 0;
		padding-right: 0;
	}

	body.pg-store ul.products li.product .astra-shop-summary-wrap {
		padding-top: 0;
	}

	body.pg-store ul.products li.product .button {
		width: 100%;
	}

	body.pg-store .pg-store-search__row {
		flex-wrap: wrap;
	}

	body.pg-store .pg-store-search .pg-store-search__submit {
		flex: 1 1 100%;
	}
}
