/*--------------------------------------------------------------
  APG — Single Product · Redesign
--------------------------------------------------------------*/

:root {
	--apg-accent: #ff930d;
	--apg-accent-dark: #e17f00;
	--apg-accent-darker: #c96f00;
	--apg-ink: #1a1a1a;
	--apg-ink-2: #4b5563;
	--apg-muted: #6b7280;
	--apg-faint: #9aa1ab;
	--apg-line: #eef0f3;
	--apg-line-2: #d6dae0;
	--apg-surface: #ffffff;
	--apg-surface-2: #fafbfc;
	--apg-surface-3: #f5f6f8;
	--apg-radius: 16px;
	--apg-radius-sm: 10px;
	--apg-shadow-sm: 0 2px 10px rgba(17, 24, 39, .05);
	--apg-shadow-md: 0 14px 40px rgba(17, 24, 39, .10);
	--apg-shadow-lg: 0 26px 70px rgba(17, 24, 39, .16);
	--apg-ease: cubic-bezier(.22, .61, .36, 1);
}

.apg-product {
	max-width: 1320px;
	margin: 0 auto;
	padding: .5rem 1.25rem 4rem;
}

/* ---------- Breadcrumb ---------- */
.apg-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .55rem;
	padding: 1.25rem 0 2rem;
	font-size: 1rem;
	color: var(--apg-faint);
	font-weight: 500;
}
.apg-breadcrumb a {
	color: var(--apg-muted);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	transition: color .18s var(--apg-ease);
}
.apg-breadcrumb a i { font-size: .8rem; }
.apg-breadcrumb a:hover { color: var(--apg-accent); }
.apg-breadcrumb__sep {
	color: var(--apg-line-2);
	display: inline-flex;
	font-size: .7rem;
}
.apg-breadcrumb__current {
	color: var(--apg-ink);
	font-weight: 700;
	padding: .25rem .7rem;
	background: var(--apg-surface-2);
	border-radius: 999px;
	border: 1px solid var(--apg-line);
}

/* ---------- Two-column layout ---------- */
.apg-product__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}
@media (min-width: 992px) {
	.apg-product__layout {
		grid-template-columns: minmax(0, 44%) minmax(0, 56%);
		gap: 3.5rem;
		align-items: start;
	}
}

/* ---------- Gallery (left column) ---------- */
.apg-gallery {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Desktop: vertical thumbnail rail on the left, stage on the right */
@media (min-width: 992px) {
	.apg-gallery {
		flex-direction: row;
		gap: 1.25rem;
		position: sticky;
		top: 1.5rem;
	}
	.apg-gallery__stage { order: 2; flex: 1 1 auto; }
	.apg-gallery__thumbs {
		order: 1;
		flex: 0 0 auto;
		width: 84px;
		flex-direction: column;
	}
}

.apg-gallery__stage {
	position: relative;
	background:
		radial-gradient(120% 90% at 50% 18%, #ffffff 0%, var(--apg-surface-2) 78%);
	border: 1px solid var(--apg-line);
	border-radius: var(--apg-radius);
	overflow: hidden;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--apg-shadow-sm);
	transition: box-shadow .3s var(--apg-ease);
}
.apg-gallery__stage:hover { box-shadow: var(--apg-shadow-md); }
.apg-gallery__stage::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(60% 50% at 50% 120%, rgba(255, 147, 13, .06), transparent 70%);
	pointer-events: none;
}
.apg-gallery__main {
	appearance: none;
	border: 0;
	background: transparent;
	padding: 0;
	margin: 0;
	width: 100%;
	height: 100%;
	cursor: zoom-in;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 1;
}
.apg-gallery__main-img {
	max-width: 88%;
	max-height: 88%;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: opacity .25s var(--apg-ease), transform .6s var(--apg-ease);
}
.apg-gallery__main:hover .apg-gallery__main-img { transform: scale(1.03); }

/* Sale flash badge */
.apg-gallery__stage .onsale {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 3;
	background: linear-gradient(135deg, var(--apg-accent), var(--apg-accent-dark));
	color: #fff;
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: .35rem .8rem .3rem;
	border-radius: 999px;
	pointer-events: none;
	box-shadow: 0 6px 16px rgba(255, 147, 13, .35);
}

.apg-gallery__zoom-hint {
	position: absolute;
	right: 14px;
	bottom: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(17, 24, 39, .55);
	color: #fff;
	font-size: 1rem;
	pointer-events: none;
	opacity: 0;
	transform: scale(.85);
	transition: opacity .2s var(--apg-ease), transform .2s var(--apg-ease);
	backdrop-filter: blur(4px);
}
.apg-gallery__main:hover .apg-gallery__zoom-hint { opacity: 1; transform: scale(1); }

.apg-gallery__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: var(--apg-ink);
	font-size: 1rem;
	display: none;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(17, 24, 39, .14);
	transition: background .18s var(--apg-ease), transform .18s var(--apg-ease), color .18s var(--apg-ease);
	z-index: 2;
	backdrop-filter: blur(6px);
}
.apg-gallery.is-ready.apg-gallery--multi .apg-gallery__nav { display: flex; }
.apg-gallery__nav:hover {
	background: #fff;
	color: var(--apg-accent);
	transform: translateY(-50%) scale(1.08);
}
.apg-gallery__nav--prev { left: 12px; }
.apg-gallery__nav--next { right: 12px; }

/* Thumbnails */
.apg-gallery__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	padding: .25rem .15rem .5rem;
}
.apg-gallery__thumb {
	flex: 0 0 auto;
	width: 84px;
	height: 84px;
	padding: 0;
	border: 2px solid var(--apg-line);
	border-radius: var(--apg-radius-sm);
	background: var(--apg-surface);
	overflow: hidden;
	cursor: pointer;
	transition: border-color .18s var(--apg-ease), box-shadow .18s var(--apg-ease), transform .18s var(--apg-ease);
}
.apg-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.apg-gallery__thumb:hover { border-color: var(--apg-line-2); transform: translateY(-2px); }
.apg-gallery__thumb.is-active {
	border-color: var(--apg-accent);
	box-shadow: 0 0 0 3px rgba(255, 147, 13, .18);
}

@media (max-width: 575px) {
	.apg-gallery__stage { aspect-ratio: 1 / 1; }
	.apg-gallery__thumb { width: 72px; height: 72px; }
}

/* ---------- Buy box (right column) ---------- */
.apg-buybox { padding: 0; position: relative; }
@media (min-width: 992px) { .apg-buybox { padding-top: .25rem; } }

.apg-buybox__inner > * + * { margin-top: 1.35rem; }

/* Eyebrow / category chip (if present) */
.apg-buybox .product_title,
.apg-buybox h1.product_title {
	font-family: 'CreatoDisplay', sans-serif;
	font-size: clamp(1.7rem, 3.1vw, 2.35rem) !important;
	font-weight: 800 !important;
	line-height: 1.15 !important;
	color: var(--apg-ink) !important;
	margin: 0 !important;
	letter-spacing: -.015em;
}

/* Rating */
.apg-buybox .woocommerce-product-rating { margin: .25rem 0 0; }
.apg-buybox .star-rating { color: #f5a623; }

/* Stock badge */
.apg-buybox .stock {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	margin-top: 18px;
	padding: .35rem .8rem .3rem;
	font-size: 1rem !important;
	font-weight: 700;
	border-radius: 999px;
	line-height: 1;
	letter-spacing: .01em;
}
.apg-buybox .stock.in-stock { color: #15803d; background: #e8f5ee; }
.apg-buybox .stock.in-stock i { color: #15803d; margin-right: 0 !important; font-size: 1rem; }
.apg-buybox .stock.out-of-stock { color: #b91c1c; background: #fce8e8; }
.apg-buybox .stock.out-of-stock i { color: #b91c1c; }

/* Price */
.woocommerce .apg-buybox div.product p.price,
.woocommerce .apg-buybox div.product span.price,
.apg-buybox .price {
	font-size: clamp(1.85rem, 3.6vw, 2.4rem) !important;
	font-weight: 800 !important;
	color: var(--apg-ink) !important;
	line-height: 1.05 !important;
	margin: 0 !important;
	font-family: 'CreatoDisplay', sans-serif;
	letter-spacing: -.02em;
}
.apg-buybox .price del {
	color: var(--apg-faint) !important;
	font-weight: 400 !important;
	opacity: .85;
	margin-right: .6rem;
	font-size: 1.25rem !important;
}
.apg-buybox .price ins {
	text-decoration: none;
	color: var(--apg-accent) !important;
}

/* Short description */
.apg-buybox .woocommerce-product-details__short-description {
	font-size: 1rem;
	line-height: 1.75;
	color: var(--apg-ink-2);
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
}
.apg-buybox .woocommerce-product-details__short-description > span:first-child {
	display: inline-block;
	font-size: .7rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--apg-accent);
	font-weight: 800;
	margin-bottom: .5rem;
}

/* SKU / meta */
.apg-buybox .product_meta {
	padding-top: 1.25rem;
	border-top: 1px solid var(--apg-line);
	font-size: 1rem;
	color: var(--apg-muted);
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}
.apg-buybox .product_meta .sku_wrapper {
	font-weight: 600;
	background: var(--apg-surface-2);
	border: 1px solid var(--apg-line);
	padding: .35rem .75rem;
	border-radius: 999px;
}
.apg-buybox .product_meta .sku { color: var(--apg-ink); font-weight: 700; }

/* ---------- Add to cart area ---------- */
.apg-buybox form.cart {
	display: flex !important;
	flex-wrap: wrap;
	align-items: stretch;
	gap: .85rem;
	clear: both;
	margin-top: 1.5rem !important;
	padding-top: 1.5rem;
	border-top: 1px solid var(--apg-line);
}
.apg-buybox form.cart .quantity-field {
	display: flex;
	align-items: center;
	gap: .5rem;
}
.apg-buybox form.cart .quantity-field p {
	margin: 0;
	font-weight: 600;
	color: var(--apg-ink-2);
	font-size: 1rem;
}

/* Quantity stepper (JS wraps the input) */
.apg-qty {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--apg-line-2);
	border-radius: var(--apg-radius-sm);
	background: var(--apg-surface);
	overflow: hidden;
	height: 48px;
}
.apg-qty__btn {
	appearance: none;
	border: 0;
	background: var(--apg-surface-2);
	color: var(--apg-ink);
	width: 42px;
	font-size: 1.05rem;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s var(--apg-ease), color .15s var(--apg-ease);
}
.apg-qty__btn:hover { background: var(--apg-accent); color: #fff; }
.apg-qty__btn:active { transform: scale(.94); }
.apg-qty input.input-text.qty {
	width: 56px !important;
	height: 100% !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: var(--apg-surface);
	text-align: center;
	font-size: 1rem;
	font-weight: 700;
	color: var(--apg-ink);
	-moz-appearance: textfield;
	appearance: textfield;
}
.apg-qty input.input-text.qty::-webkit-outer-spin-button,
.apg-qty input.input-text.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
}
.apg-qty input.input-text.qty:focus {
	outline: none;
	box-shadow: inset 0 0 0 2px rgba(255, 147, 13, .35);
}

/* Fallback styling for the raw qty input (before JS wraps it) */
.apg-buybox form.cart .input-text.qty {
	width: 60px;
	height: 48px;
	border-radius: var(--apg-radius-sm);
	border: 1px solid var(--apg-line-2);
	text-align: center;
	font-size: 1rem;
	font-weight: 700;
	color: var(--apg-ink);
}
.apg-buybox form.cart .input-text.qty:focus {
	border-color: var(--apg-accent);
	outline: none;
	box-shadow: 0 0 0 2px rgba(255, 147, 13, .15);
}

.apg-buybox .single_add_to_cart_button,
.apg-buybox button.single_add_to_cart_button {
	flex: 1 1 auto;
	min-width: 200px !important;
	height: 52px !important;
	padding: 0 2.2rem !important;
	font-size: 1rem !important;
	font-weight: 600 !important;
	letter-spacing: .01em;
	color: #fff !important;
	background: #ff930d !important;
	border: 2px solid #ece6d8 !important;
	border-radius: 100px !important;
	transition: background .18s var(--apg-ease), transform .12s var(--apg-ease);
	cursor: pointer;
	text-transform: none;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: .55rem;
	position: relative;
}
.apg-buybox .single_add_to_cart_button::before {
	content: "\f217"; /* fa-cart-plus */
	font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome";
	font-weight: 900;
	font-size: 1rem;
}
.apg-buybox .single_add_to_cart_button:hover {
	background: #E17F00 !important;
	transform: translateY(-1px);
}
.apg-buybox .single_add_to_cart_button:active {
	transform: translateY(0) scale(.99);
}
.apg-buybox .single_add_to_cart_button:focus-visible {
	outline: 2px solid rgba(255, 147, 13, .5);
	outline-offset: 3px;
}

/* ---------- Related products (below) ---------- */
.apg-product .related.products,
.apg-product .related {
	margin-top: 4.5rem;
	padding-top: 0;
	border-top: 0;
	clear: both;
}
.apg-product .related > h2,
.apg-related > h2 {
	font-family: 'CreatoDisplay', sans-serif;
	font-size: 1.6rem !important;
	font-weight: 800 !important;
	color: var(--apg-ink) !important;
	margin: 0 0 2rem !important;
	padding-bottom: 0;
	border-bottom: 0;
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	letter-spacing: -.02em;
}
.apg-product .related > h2 .apg-title-arr,
.apg-related > h2 .apg-title-arr {
	width: 13px;
	height: 29px;
	object-fit: contain;
	flex-shrink: 0;
}

/* Grid layout — 4 columns, single row */
.apg-related__grid {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
	margin: 0 !important;
	padding: 0 !important;
	width: 100%;
}

/* Card */
.apg-related__card {
	width: 100% !important;
	max-width: none !important;
	flex: none !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: var(--apg-surface);
	border: 1px solid var(--apg-line);
	border-radius: var(--apg-radius);
	overflow: hidden;
	transition: box-shadow .35s var(--apg-ease), transform .35s var(--apg-ease), border-color .35s var(--apg-ease);
	display: flex;
	flex-direction: column;
}
.apg-related__card:hover {
	box-shadow: var(--apg-shadow-md);
	transform: translateY(-8px);
	border-color: transparent;
}

.apg-related__inner {
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* Media / image area */
.apg-related__media {
	position: relative;
	background: radial-gradient(120% 90% at 50% 20%, #fff, var(--apg-surface-2));
	border-bottom: 1px solid var(--apg-line);
	aspect-ratio: 1 / 1;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
.apg-related__media figure,
.apg-related__media .imglink > figure {
	margin: 0 !important;
	padding: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}
.apg-related__media img,
.apg-related__media picture {
	max-width: 85%;
	max-height: 85%;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: transform .45s var(--apg-ease);
}
.apg-related__card:hover .apg-related__media img { transform: scale(1.1) rotate(-1deg); }
.apg-related__imglink {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	text-decoration: none !important;
}

/* Sale flash */
.apg-related__media .onsale {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	background: linear-gradient(135deg, var(--apg-accent), var(--apg-accent-dark));
	color: #fff;
	font-size: .7rem;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: .28rem .65rem .24rem;
	border-radius: 999px;
	box-shadow: 0 4px 12px rgba(255, 147, 13, .3);
}

/* Add to cart — slides up over the image on hover */
.apg-related__add {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 3;
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: .45rem;
	width: 100%;
	height: 48px;
	margin: 0 !important;
	padding: 0 1rem !important;
	font-size: 1rem !important;
	font-weight: 600 !important;
	color: #fff !important;
	background: #ff930d !important;
	border: 2px solid #ece6d8 !important;
	border-left: 0 !important;
	border-right: 0 !important;
	border-bottom: 0 !important;
	border-radius: 0 !important;
	text-decoration: none !important;
	text-transform: none;
	letter-spacing: .01em;
	transform: translateY(100%);
	transition: transform .3s var(--apg-ease), background .18s var(--apg-ease);
	cursor: pointer;
}
.apg-related__add::before {
	content: "\f217";
	font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome";
	font-weight: 900;
}
.apg-related__add:hover { background: #E17F00 !important; color: #fff !important; }
.apg-related__add:active { background: #c96f00 !important; }
.apg-related__add--oos { background: #6b7280 !important; }
.apg-related__add--oos:hover { background: #4b5563 !important; }
.apg-related__add--oos::before { content: "\f06e"; /* eye */ }

@media (min-width: 768px) {
	.apg-related__card:hover .apg-related__add { transform: translateY(0); }
}

/* Body */
.apg-related__body {
	display: flex;
	flex-direction: column;
	padding: 1.25rem;
	flex: 1;
}

.apg-related__title {
	font-size: 1.05rem !important;
	font-weight: 800 !important;
	margin: 0 0 .4rem !important;
	padding: 0 !important;
	line-height: 1.3;
}
.apg-related__title a {
	color: var(--apg-ink) !important;
	text-decoration: none;
	transition: color .15s var(--apg-ease);
}
.apg-related__title a:hover { color: var(--apg-accent) !important; }

.apg-related__desc {
	font-size: 1rem;
	line-height: 1.55;
	color: var(--apg-muted);
	margin: 0 0 .7rem !important;
	padding: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.apg-related__body .price {
	font-size: 1.3rem !important;
	font-weight: 800 !important;
	color: var(--apg-ink) !important;
	margin: auto 0 0 !important;
	padding: 0;
	display: block;
	font-family: 'CreatoDisplay', sans-serif;
}
.apg-related__body .price .woocommerce-Price-amount { color: var(--apg-accent) !important; }

/* Responsive grid */
@media (max-width: 991px) {
	.apg-related__grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}
@media (max-width: 575px) {
	.apg-related__grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
	.apg-related__body { padding: .85rem; }
	.apg-related__title { font-size: 1rem !important; }
	.apg-related__desc { font-size: 1rem; -webkit-line-clamp: 1; line-clamp: 1; }
	.apg-related__body .price { font-size: 1.05rem !important; }
	.apg-related__media figure { padding: 1rem; }
	.apg-related__add {
		transform: translateY(0) !important;
		height: 40px !important;
		font-size: 1rem !important;
	}
}

/* ---------- Lightbox ---------- */
.apg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(15, 18, 24, .94);
	backdrop-filter: blur(8px);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 2rem;
}
.apg-lightbox.is-open { display: flex; animation: apg-fade .25s var(--apg-ease); }

.apg-lightbox__stage {
	max-width: 90vw;
	max-height: 82vh;
	display: flex;
	align-items: center;
	justify-content: center;
}
.apg-lightbox__img {
	max-width: 90vw;
	max-height: 82vh;
	object-fit: contain;
	border-radius: 8px;
	cursor: zoom-in;
	transition: transform .25s var(--apg-ease);
	animation: apg-zoom-in .3s var(--apg-ease);
}
.apg-lightbox__img.is-zoomed { transform: scale(2); cursor: zoom-out; }

.apg-lightbox__close,
.apg-lightbox__nav {
	position: absolute;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s var(--apg-ease), transform .15s var(--apg-ease);
}
.apg-lightbox__close {
	top: 1.5rem;
	right: 1.5rem;
	width: 46px;
	height: 46px;
	font-size: 1.25rem;
}
.apg-lightbox__nav {
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	font-size: 1.35rem;
}
.apg-lightbox__nav--prev { left: 1.5rem; }
.apg-lightbox__nav--next { right: 1.5rem; }
.apg-lightbox__close:hover,
.apg-lightbox__nav:hover { background: rgba(255, 255, 255, .25); transform: translateY(-50%) scale(1.06); }
.apg-lightbox__close:hover { transform: scale(1.06); }

.apg-lightbox__count {
	position: absolute;
	bottom: 1.75rem;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	background: rgba(255, 255, 255, .14);
	padding: .35rem .9rem;
	border-radius: 999px;
	letter-spacing: .02em;
}

/* ---------- Animations ---------- */
@keyframes apg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes apg-zoom-in { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes apg-rise {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: translateY(0); }
}
.apg-product[data-apg-anim] .apg-breadcrumb,
.apg-product[data-apg-anim] .apg-gallery,
.apg-product[data-apg-anim] .apg-buybox,
.apg-product[data-apg-anim] .apg-related {
	animation: apg-rise .6s var(--apg-ease) both;
}
.apg-product[data-apg-anim] .apg-gallery { animation-delay: .05s; }
.apg-product[data-apg-anim] .apg-buybox { animation-delay: .12s; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Legacy cleanup ---------- */
.product-template-default .apg-product #slider,
.product-template-default .apg-product #carousel { display: none !important; }
.product-template-default main > .row { padding: 0 !important; }
.product-template-default .apg-product .apg-product__layout,
.product-template-default .apg-product .apg-gallery,
.product-template-default .apg-product .apg-buybox {
	width: 100% !important;
	max-width: 100% !important;
	flex: none !important;
}

/* ============================================================
   Add-to-cart notice (woocommerce-notices-wrapper)
   Shown after adding a product to the cart.
   ============================================================ */
.apg-product .woocommerce-notices-wrapper,
.product-template-default .woocommerce-notices-wrapper {
	margin: 0 0 1.75rem;
	padding: 0;
}

.apg-product .woocommerce-message,
.product-template-default .woocommerce-message {
	display: block;
	margin: 0 0 1.75rem !important;
	padding: 1.1rem 1.25rem !important;
	background: var(--apg-surface) !important;
	border: 1px solid var(--apg-line) !important;
	border-left: 4px solid var(--apg-accent) !important;
	border-radius: var(--apg-radius-sm) !important;
	box-shadow: var(--apg-shadow-sm);
	text-align: left !important;
	overflow: visible;
	list-style: none;
}

.apg-product .woocommerce-message #add-msg,
.product-template-default .woocommerce-message #add-msg {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
	width: 100%;
}

/* Check icon */
.apg-product .woocommerce-message #add-msg > i,
.product-template-default .woocommerce-message #add-msg > i {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(255, 147, 13, .12);
	color: var(--apg-accent-dark) !important;
	font-size: 1rem;
	margin: 0 !important;
}

/* Product thumbnail */
.apg-product .woocommerce-message #add-msg .msg-fig,
.product-template-default .woocommerce-message #add-msg .msg-fig {
	flex: 0 0 64px;
	width: 64px !important;
	height: 64px;
	margin: 0 !important;
	border-radius: var(--apg-radius-sm);
	overflow: hidden;
	border: 1px solid var(--apg-line);
	background:
		radial-gradient(120% 90% at 50% 18%, #ffffff 0%, var(--apg-surface-2) 78%);
	display: flex;
	align-items: center;
	justify-content: center;
}
.apg-product .woocommerce-message #add-msg .msg-fig img,
.product-template-default .woocommerce-message #add-msg .msg-fig img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 6px;
	max-width: 100%;
}

/* Message text */
.apg-product .woocommerce-message #add-msg > p,
.product-template-default .woocommerce-message #add-msg > p {
	flex: 1 1 220px;
	width: auto !important;
	margin: 0 !important;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--apg-ink-2);
	font-weight: 500;
}
.apg-product .woocommerce-message #add-msg > p b,
.product-template-default .woocommerce-message #add-msg > p b {
	color: var(--apg-ink);
	font-weight: 700;
}

/* Button row */
.apg-product .woocommerce-message #add-msg .msg-btn-holder,
.product-template-default .woocommerce-message #add-msg .msg-btn-holder {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	white-space: nowrap;
	margin: 0 !important;
	width: auto !important;
	justify-content: flex-end;
}

.apg-product .woocommerce-message #add-msg .msg-btn-holder .button,
.apg-product .woocommerce-message .msg-btn-holder .button,
.product-template-default .woocommerce-message #add-msg .msg-btn-holder .button,
.product-template-default .woocommerce-message .msg-btn-holder .button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	min-width: 130px !important;
	height: 44px !important;
	margin: 0 !important;
	padding: 0 1.25rem !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	font-size: 1rem !important;
	font-weight: 600 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	border-radius: var(--apg-radius-sm) !important;
	border: 2px solid transparent !important;
	box-sizing: border-box;
	transition: background-color .2s var(--apg-ease), border-color .2s var(--apg-ease), color .2s var(--apg-ease), transform .2s var(--apg-ease);
}

/* Checkout button — solid accent (primary) */
.apg-product .woocommerce-message #add-msg .msg-btn-holder .apg-notice-checkout,
.apg-product .woocommerce-message .msg-btn-holder .apg-notice-checkout,
.product-template-default .woocommerce-message #add-msg .msg-btn-holder .apg-notice-checkout,
.product-template-default .woocommerce-message .msg-btn-holder .apg-notice-checkout {
	color: #fff !important;
	background-color: var(--apg-accent) !important;
	border: 2px solid var(--apg-accent) !important;
}
.apg-product .woocommerce-message #add-msg .msg-btn-holder .apg-notice-checkout:hover,
.apg-product .woocommerce-message .msg-btn-holder .apg-notice-checkout:hover,
.product-template-default .woocommerce-message #add-msg .msg-btn-holder .apg-notice-checkout:hover,
.product-template-default .woocommerce-message .msg-btn-holder .apg-notice-checkout:hover {
	background-color: var(--apg-accent-dark) !important;
	border: 2px solid var(--apg-accent-dark) !important;
	transform: translateY(-1px);
}

/* View Cart button — outline navy (secondary) */
.apg-product .woocommerce-message #add-msg .msg-btn-holder .apg-notice-viewcart,
.apg-product .woocommerce-message .msg-btn-holder .apg-notice-viewcart,
.product-template-default .woocommerce-message #add-msg .msg-btn-holder .apg-notice-viewcart,
.product-template-default .woocommerce-message .msg-btn-holder .apg-notice-viewcart {
	color: var(--apg-ink) !important;
	background-color: transparent !important;
	border: 2px solid var(--apg-line-2) !important;
}
.apg-product .woocommerce-message #add-msg .msg-btn-holder .apg-notice-viewcart:hover,
.apg-product .woocommerce-message .msg-btn-holder .apg-notice-viewcart:hover,
.product-template-default .woocommerce-message #add-msg .msg-btn-holder .apg-notice-viewcart:hover,
.product-template-default .woocommerce-message .msg-btn-holder .apg-notice-viewcart:hover {
	border: 2px solid var(--apg-accent) !important;
	transform: translateY(-1px);
}

/* WooCommerce info/error variants share the card treatment */
.apg-product .woocommerce-info,
.apg-product .woocommerce-error,
.product-template-default .woocommerce-info,
.product-template-default .woocommerce-error {
	margin: 0 0 1.75rem !important;
	padding: 1.1rem 1.25rem !important;
	border-radius: var(--apg-radius-sm) !important;
	border-left: 4px solid var(--apg-accent) !important;
	background: var(--apg-surface) !important;
	box-shadow: var(--apg-shadow-sm);
	font-size: 1rem;
}
.apg-product .woocommerce-error,
.product-template-default .woocommerce-error { border-left-color: #b91c1c !important; }

/* Mobile — stack the notice vertically */
@media (max-width: 767px) {
	.apg-product .woocommerce-message #add-msg,
	.product-template-default .woocommerce-message #add-msg {
		gap: .75rem;
	}
	.apg-product .woocommerce-message #add-msg .msg-fig,
	.product-template-default .woocommerce-message #add-msg .msg-fig {
		flex: 0 0 56px;
		width: 56px !important;
		height: 56px;
	}
	.apg-product .woocommerce-message #add-msg > p,
	.product-template-default .woocommerce-message #add-msg > p {
		flex: 1 1 100%;
	}
	.apg-product .woocommerce-message #add-msg .msg-btn-holder,
	.product-template-default .woocommerce-message #add-msg .msg-btn-holder {
		flex: 1 1 100%;
		justify-content: stretch;
	}
	.apg-product .woocommerce-message #add-msg .msg-btn-holder .button,
	.apg-product .woocommerce-message .msg-btn-holder .button,
	.product-template-default .woocommerce-message #add-msg .msg-btn-holder .button,
	.product-template-default .woocommerce-message .msg-btn-holder .button {
		flex: 1 1 0;
		min-width: 0 !important;
	}
}
