/* Keyframes duplicated here so this sheet is self-sufficient. */
@keyframes rmcSaleGlow {
	0%   { box-shadow: 0 0 5px rgba(224, 145, 61, .35); }
	50%  { box-shadow: 0 0 14px rgba(224, 145, 61, .75), 0 0 24px rgba(224, 145, 61, .30); }
	100% { box-shadow: 0 0 5px rgba(224, 145, 61, .35); }
}

/* ==========================================================================
   RMC — SHOP & ARCHIVES v3
   Card system lives in global.css; only shop-specific layout is here.
   ========================================================================== */

.rmc-shop-active .elementor-loop-container.elementor-grid { gap: 28px !important; }
.rmc-shop-active .elementor-loop-container > .e-loop-item .e-con-inner { padding: 0 !important; gap: 0 !important; }

.rmc-shop-active .e-loop-item .elementor-widget-woocommerce-product-title {
	margin: 0 !important;
	padding: 22px 22px 0 !important;
}

.rmc-shop-active .e-loop-item .elementor-widget-woocommerce-product-price {
	margin: 0 !important;
	padding: 7px 22px 0 !important;
}

.rmc-shop-active .e-loop-item .elementor-widget-woocommerce-product-add-to-cart {
	margin: 0 !important;
	padding: 16px 22px 22px !important;
}

.rmc-shop-active .e-loop-item .elementor-widget-woocommerce-product-add-to-cart .elementor-widget-container,
.rmc-shop-active .e-loop-item .elementor-widget-woocommerce-product-add-to-cart .elementor-add-to-cart,
.rmc-shop-active .e-loop-item .elementor-widget-woocommerce-product-add-to-cart form.cart {
	width: 100% !important;
	display: block !important;
}

html body .rmc-shop-active .e-loop-item a.button {
	display: block !important;
	width: 100% !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	text-align: center !important;
	font-size: 13px !important;
	padding: 12px 16px !important;
}

/* Sale marker — a quiet label, not a colour tile */
.rmc-shop-active .elementor-loop-container > .e-loop-item.sale > .e-con { position: relative; }

.rmc-shop-active .elementor-loop-container > .e-loop-item.sale > .e-con::after {
	content: "Sale";
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 6;
	background: var(--rmc-accent);
	color: #412402;                      /* white is 2.53:1 on copper */
	border: 0;
	font-family: var(--rmc-font);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	padding: 7px 13px;
	border-radius: var(--rmc-radius);
	box-shadow: none;
	animation: rmcSaleGlow 2.6s ease-in-out infinite;
	pointer-events: none;
}

/* The badge sits outside the image, so the card must not clip it */
.rmc-shop-active .elementor-loop-container > .e-loop-item > .e-con { overflow: visible !important; }

.rmc-shop-active .e-loop-item .elementor-widget-theme-post-featured-image .elementor-widget-container {
	border-radius: var(--rmc-radius-card) var(--rmc-radius-card) 0 0 !important;
	overflow: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
	.rmc-shop-active .elementor-loop-container > .e-loop-item.sale > .e-con::after { animation: none; }
}

.rmc-shop-active .e-loop-item.outofstock .elementor-widget-theme-post-featured-image img {
	opacity: .4 !important;
	filter: grayscale(100%);
}

.rmc-shop-active .e-loop-item.outofstock .elementor-widget-theme-post-featured-image { position: relative; }

@media (max-width: 1024px) { .rmc-shop-active .elementor-loop-container.elementor-grid { gap: 20px !important; } }

@media (max-width: 600px) {
	.rmc-shop-active .elementor-loop-container.elementor-grid { gap: 16px !important; }
	.rmc-shop-active .e-loop-item .elementor-widget-woocommerce-product-title { padding: 16px 16px 0 !important; }
	.rmc-shop-active .e-loop-item .elementor-widget-woocommerce-product-price { padding: 5px 16px 0 !important; }
	.rmc-shop-active .e-loop-item .elementor-widget-woocommerce-product-add-to-cart { padding: 12px 16px 16px !important; }
}

/* ==========================================================================
   SHOP GRID — standard WooCommerce markup
   The shop now uses the Products widget / [products] shortcode, so it renders
   the same markup as the homepage grid and inherits the card defined in
   global.css. No bridge, no client-side assembly, no overrides.
   ========================================================================== */

.rmc-shop-active .woocommerce ul.products,
.rmc-shop-active ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 24px !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.rmc-shop-active ul.products::before,
.rmc-shop-active ul.products::after { display: none !important; }

.rmc-shop-active ul.products li.product {
	width: 100% !important;
	margin: 0 !important;
	float: none !important;
	clear: none !important;
}

/* Woo's default result count and ordering select */
.rmc-shop-active .woocommerce-result-count {
	font-size: 13px;
	color: var(--rmc-muted);
	margin: 0 0 18px;
}

.rmc-shop-active .woocommerce-ordering select {
	border: 1px solid var(--rmc-line) !important;
	border-radius: var(--rmc-radius) !important;
	padding: 10px 14px !important;
	font-size: 14px !important;
	min-height: 44px !important;
}

/* Pagination */
.rmc-shop-active .woocommerce-pagination ul {
	display: flex;
	gap: 8px;
	justify-content: center;
	border: 0 !important;
	margin: 40px 0 0;
	padding: 0;
	list-style: none;
}

.rmc-shop-active .woocommerce-pagination ul li { border: 0 !important; margin: 0; }

.rmc-shop-active .woocommerce-pagination a,
.rmc-shop-active .woocommerce-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--rmc-line);
	border-radius: var(--rmc-radius);
	background: var(--rmc-white);
	color: var(--rmc-navy);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
}

.rmc-shop-active .woocommerce-pagination a:hover { border-color: var(--rmc-line-strong); background: #F7F9FC; }

.rmc-shop-active .woocommerce-pagination .current {
	background: var(--rmc-navy) !important;
	border-color: var(--rmc-navy) !important;
	color: var(--rmc-white) !important;
}

@media (max-width: 1024px) {
	.rmc-shop-active .woocommerce ul.products,
	.rmc-shop-active ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 18px !important; }
}

@media (max-width: 767px) {
	.rmc-shop-active .woocommerce ul.products,
	.rmc-shop-active ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
}

@media (max-width: 359px) {
	.rmc-shop-active .woocommerce ul.products,
	.rmc-shop-active ul.products { gap: 10px !important; }
}

/* The shortcode output is wrapped so it can be spaced without touching the
   Elementor container around it. */
.rmc-shop-grid { width: 100%; }
.rmc-shop-grid .woocommerce { width: 100%; }


/* Cards fill their row so neighbours align, while the row itself sizes to
   content rather than to the tallest row on the page. */
.rmc-shop-active ul.products li.product {
	height: 100%;
	display: flex;
	flex-direction: column;
}

.rmc-shop-active ul.products li.product .astra-shop-summary-wrap { flex: 1 1 auto; }
.rmc-shop-active ul.products li.product .rmc-card-foot { margin-top: auto !important; }
