/* Amazing Products Showcase — front-end styles (v2.4)
   Palette + type are unchanged from the Kaak Alia brand: warm cream, espresso
   brown, a touch of gold, Poppins throughout. This pass is about restraint:
   hairlines instead of heavy shadows, one clear action per card, calm motion,
   and full RTL support through logical properties. */

.aps-wrapper,
.aps-qv-overlay {
	--aps-cream-light: #faf1de;
	--aps-cream: #f3e2c2;
	--aps-brown-soft: #8a6142;
	--aps-brown: #6b4226;
	--aps-brown-deep: #4a2d18;
	--aps-gold: #c99a54;
	--aps-ivory: #faf1de;
	--aps-paper: #fffaf3;
	--aps-primary: #6b4226;
	--aps-accent: #4a2d18;
	--aps-line: rgba(74, 45, 24, .14);
	--aps-line-soft: rgba(74, 45, 24, .08);
	--aps-muted: #8a6f5c;
	--aps-ok: #4a7a4e;
	--aps-warn: #a87420;
	--aps-bad: #a4452c;
	--aps-radius: 3px;
	--aps-ease: cubic-bezier(.2, .7, .2, 1);

	font-family: 'Poppins', 'Tajawal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.aps-wrapper {
	--aps-cols-desktop: 4;
	--aps-cols-laptop: 3;
	--aps-cols-tablet: 3;
	--aps-cols-mobile: 2;
	--aps-sticky-top: 0px;      /* raise this if your theme has a sticky header */
	--aps-media-ratio: 1 / 1;   /* e.g. 4 / 5 for portrait photos */

	box-sizing: border-box;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 16px;
}
.aps-wrapper *, .aps-wrapper *::before, .aps-wrapper *::after,
.aps-qv-overlay *, .aps-qv-overlay *::before, .aps-qv-overlay *::after { box-sizing: border-box; }

:where(.aps-wrapper, .aps-qv-overlay) button {
	font-family: inherit;
	font-size: inherit;
	line-height: normal;
	margin: 0;
	-webkit-appearance: none;
	appearance: none;
	text-transform: none;
	letter-spacing: normal;
}
.aps-wrapper :focus-visible,
.aps-qv-overlay :focus-visible { outline: 2px solid var(--aps-gold); outline-offset: 2px; }

/* ------------------------------------------------------------------ */
/* Toolbar                                                             */
/* ------------------------------------------------------------------ */
.aps-toolbar {
	position: sticky;
	top: var(--aps-sticky-top);
	z-index: 30;
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 32px;
	padding: 18px 20px;
	background: var(--aps-cream-light);
	border: 1px solid var(--aps-line-soft);
	border-radius: var(--aps-radius);
	transition: box-shadow .25s ease;
}
.aps-toolbar.is-stuck { box-shadow: 0 8px 24px rgba(74, 45, 24, .12); }
.admin-bar .aps-toolbar { top: calc(var(--aps-sticky-top) + 32px); }
@media (max-width: 782px) { .admin-bar .aps-toolbar { top: calc(var(--aps-sticky-top) + 46px); } }

.aps-toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.aps-toolbar-row-top { justify-content: space-between; }

.aps-cats {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	flex: 1 1 auto;
	padding: 2px;
	margin: -2px;
}
.aps-cats::-webkit-scrollbar { display: none; }

.aps-cat-btn {
	flex: 0 0 auto;
	background: transparent;
	border: 1px solid var(--aps-line);
	border-radius: var(--aps-radius);
	color: var(--aps-brown);
	padding: 8px 16px;
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: .01em;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.aps-cat-btn:hover { background: #fff; border-color: var(--aps-brown-soft); color: var(--aps-brown-deep); }
.aps-cat-btn.is-active { background: var(--aps-brown-deep); border-color: var(--aps-brown-deep); color: var(--aps-cream-light); }
.aps-count { opacity: .6; font-weight: 400; margin-inline-start: 2px; font-variant-numeric: tabular-nums; }

.aps-cats-mobile { display: none; width: 100%; align-items: center; gap: 10px; }
.aps-filters-toggle { display: none; }

/* shared field look */
.aps-cats-select,
.aps-sort-select,
.aps-variation-select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-color: #fff;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a2d18' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 14px;
	border: 1px solid var(--aps-line);
	border-radius: var(--aps-radius);
	color: var(--aps-accent);
	font-family: inherit;
	cursor: pointer;
	transition: border-color .2s ease, box-shadow .2s ease;
}
[dir="rtl"] .aps-cats-select,
[dir="rtl"] .aps-sort-select,
[dir="rtl"] .aps-variation-select { background-position: left 14px center; }
.aps-cats-select:hover, .aps-sort-select:hover, .aps-variation-select:hover { border-color: var(--aps-brown-soft); }
.aps-cats-select:focus, .aps-sort-select:focus, .aps-variation-select:focus,
.aps-search-input:focus { outline: none; border-color: var(--aps-gold); box-shadow: 0 0 0 3px rgba(201, 154, 84, .25); }

.aps-cats-select { width: 100%; padding: 11px 38px 11px 16px; font-size: 13.5px; font-weight: 600; }
[dir="rtl"] .aps-cats-select { padding: 11px 16px 11px 38px; }

.aps-search { position: relative; flex: 1 1 220px; min-width: 0; }
.aps-search-icon {
	position: absolute;
	inset-inline-start: 15px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	color: var(--aps-brown-soft);
	pointer-events: none;
	z-index: 1;
}
.aps-search-input {
	width: 100%;
	padding: 11px 16px !important;
	padding-inline-start: 42px !important;
	background: #fff;
	border: 1px solid var(--aps-line);
	border-radius: var(--aps-radius);
	color: var(--aps-accent);
	font-family: inherit;
	font-size: 13px;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.aps-search-input::placeholder { color: var(--aps-brown-soft); opacity: .85; }

.aps-price-filter {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--aps-accent);
}
.aps-price-range { accent-color: var(--aps-brown); cursor: pointer; width: 140px; }
.aps-price-output-wrap { display: inline-flex; align-items: baseline; gap: 4px; min-width: 52px; direction: ltr; unicode-bidi: isolate; }
.aps-price-output { font-weight: 600; color: var(--aps-brown); font-variant-numeric: tabular-nums; }
.aps-price-currency { font-size: 11px; font-weight: 600; color: var(--aps-brown); opacity: .8; }

.aps-sort { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; font-size: 12.5px; font-weight: 500; color: var(--aps-accent); }
.aps-sort-select { padding: 10px 34px 10px 14px; font-size: 13px; font-weight: 500; }
[dir="rtl"] .aps-sort-select { padding: 10px 14px 10px 34px; }

.aps-clear-filters {
	background: none;
	border: none;
	color: var(--aps-brown);
	font-size: 12.5px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	padding: 8px 4px;
	margin-inline-start: auto;
}
.aps-clear-filters:hover { color: var(--aps-accent); }
.aps-clear-filters[hidden] { display: none; }

.aps-results-count { font-size: 12px; font-weight: 500; color: var(--aps-muted); letter-spacing: .02em; }

/* ------------------------------------------------------------------ */
/* Grid                                                                */
/* ------------------------------------------------------------------ */
.aps-grid {
	--aps-c: var(--aps-cols-desktop);
	display: grid;
	grid-template-columns: repeat(var(--aps-c), minmax(0, 1fr));
	gap: 32px 24px;
}
@media (max-width: 1200px) { .aps-grid { --aps-c: var(--aps-cols-laptop); gap: 28px 20px; } }
@media (max-width: 900px)  { .aps-grid { --aps-c: var(--aps-cols-tablet); gap: 24px 16px; } .aps-toolbar { padding: 16px; } }

@media (max-width: 640px) {
	.aps-grid { --aps-c: var(--aps-cols-mobile); gap: 22px 10px; }

	.aps-toolbar { position: static; background: none; border: none; padding: 0; gap: 0; margin-bottom: 22px; }
	.aps-toolbar-row-top {
		position: sticky;
		top: var(--aps-sticky-top);
		z-index: 30;
		flex-wrap: nowrap;
		background: var(--aps-cream-light);
		border: 1px solid var(--aps-line-soft);
		border-radius: var(--aps-radius);
		padding: 10px;
		margin-bottom: 10px;
		transition: box-shadow .2s ease;
	}
	.admin-bar .aps-toolbar-row-top { top: calc(var(--aps-sticky-top) + 32px); }
	@media (max-width: 782px) { .admin-bar .aps-toolbar-row-top { top: calc(var(--aps-sticky-top) + 46px); } }
	.aps-toolbar.is-stuck .aps-toolbar-row-top { box-shadow: 0 8px 22px rgba(74, 45, 24, .14); }

	.aps-cats { display: none; }
	.aps-cats-mobile { display: flex; flex: 1 1 auto; min-width: 0; }
	.aps-cats-mobile .aps-sort-label { display: none; }
	.aps-cats-select { padding: 10px 30px 10px 12px; font-size: 13px; }
	[dir="rtl"] .aps-cats-select { padding: 10px 12px 10px 30px; }

	.aps-filters-toggle {
		flex: 0 0 auto;
		display: flex;
		align-items: center;
		gap: 7px;
		background: #fff;
		border: 1px solid var(--aps-line);
		border-radius: var(--aps-radius);
		color: var(--aps-accent);
		padding: 10px 14px;
		font-size: 13px;
		font-weight: 600;
		white-space: nowrap;
		cursor: pointer;
	}
	.aps-filters-toggle svg { flex: 0 0 auto; }
	.aps-filters-toggle .aps-chevron { transition: transform .2s ease; }
	.aps-toolbar.is-filters-open .aps-filters-toggle .aps-chevron { transform: rotate(180deg); }
	.aps-filters-toggle.is-active { background: var(--aps-brown-deep); border-color: var(--aps-brown-deep); color: var(--aps-cream-light); }

	.aps-toolbar-more {
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		background: var(--aps-cream-light);
		border: 1px solid var(--aps-line-soft);
		border-radius: var(--aps-radius);
		padding: 14px;
		margin-bottom: 10px;
	}
	.aps-toolbar.is-filters-open .aps-toolbar-more { display: flex; }
	.aps-search { flex: 0 0 auto; }
	.aps-search-input { padding-block: 13px !important; font-size: 15px; }
	.aps-price-filter { justify-content: space-between; flex-wrap: nowrap; }
	.aps-price-range { flex: 1 1 auto; width: auto; min-height: 40px; }
	.aps-sort { flex-direction: column; align-items: stretch; gap: 6px; }
	.aps-sort-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--aps-muted); font-weight: 600; }
	.aps-sort-select { width: 100%; padding-block: 12px; font-size: 14px; }
	.aps-clear-filters { margin-inline-start: 0; text-align: center; width: 100%; padding: 10px; }
	.aps-results-count { padding: 0 2px; }
}
@media (max-width: 380px) {
	.aps-grid { --aps-c: 1; }
}

.aps-empty { text-align: center; padding: 56px 0; color: var(--aps-muted); font-size: 14px; }
.aps-no-results[hidden] { display: none; }
.aps-no-results .aps-clear-filters { display: inline-block; width: auto; margin: 10px 0 0; }

/* ------------------------------------------------------------------ */
/* Card                                                                */
/* ------------------------------------------------------------------ */
.aps-card {
	display: flex;
	flex-direction: column;
	background: var(--aps-paper);
	border: 1px solid var(--aps-line-soft);
	border-radius: var(--aps-radius);
	overflow: hidden;
	transition: transform .35s var(--aps-ease), box-shadow .35s ease, border-color .25s ease;
	animation: apsFadeIn .4s ease both;
}
.aps-card.aps-hover-lift:hover {
	transform: translateY(-4px);
	border-color: var(--aps-line);
	box-shadow: 0 18px 34px -12px rgba(74, 45, 24, .22);
}
.aps-card.aps-hover-zoom:hover .aps-media-trigger img { transform: scale(1.06); }
.aps-card.aps-hover-none:hover { transform: none; box-shadow: none; }

.aps-card-media { position: relative; aspect-ratio: var(--aps-media-ratio); overflow: hidden; background: var(--aps-ivory); }
.aps-media-trigger { display: block; width: 100%; height: 100%; padding: 0; border: none; background: none; cursor: pointer; }
.aps-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--aps-ease), opacity .3s ease; }
.aps-card.is-oos .aps-card-media img { opacity: .55; }

.aps-badge {
	position: absolute;
	top: 12px;
	inset-inline-start: 12px;
	z-index: 2;
	padding: 5px 11px;
	font-size: 10.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .12em;
	line-height: 1.3;
	color: var(--aps-cream-light);
	border-radius: 2px;
}
.aps-badge-sale { background: var(--aps-brown); }
.aps-badge-oos { background: var(--aps-brown-deep); }

.aps-quickview {
	position: absolute;
	inset: auto 0 0 0;
	display: flex;
	justify-content: center;
	padding: 14px;
	transform: translateY(100%);
	opacity: 0;
	transition: transform .3s var(--aps-ease), opacity .25s ease;
	background: linear-gradient(0deg, rgba(74, 45, 24, .5), transparent);
	pointer-events: none;
}
.aps-card-media:hover .aps-quickview,
.aps-card-media:focus-within .aps-quickview { transform: translateY(0); opacity: 1; pointer-events: auto; }
.aps-quickview-btn {
	background: #fff;
	color: var(--aps-brown-deep);
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: 9px 20px;
	border: none;
	border-radius: 2px;
	cursor: pointer;
	transition: background-color .2s ease;
}
.aps-quickview-btn:hover { background: var(--aps-cream-light); }
@media (hover: none) { .aps-quickview { display: none; } }

.aps-card-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 16px 16px 18px; }
.aps-cat-tag { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--aps-gold); line-height: 1.4; }
.aps-title { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 600; letter-spacing: -.005em; }

.aps-title-trigger {
	display: inline;
	padding: 0 !important;
	margin: 0;
	font: inherit;
	color: var(--aps-accent) !important;
	-webkit-text-fill-color: currentColor !important;
	text-align: start;
	text-decoration: none !important;
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: color .2s ease;
}
.aps-title-trigger:hover, .aps-title-trigger:active { color: var(--aps-brown) !important; -webkit-text-fill-color: var(--aps-brown) !important; background: none !important; box-shadow: none !important; }
.aps-title-trigger:focus { outline: none; }
.aps-title-trigger:focus-visible { outline: 2px solid var(--aps-gold); outline-offset: 3px; }

.aps-rating { font-size: 12px; letter-spacing: 2px; line-height: 1; }
.aps-star { color: #e6d9c4; }
.aps-star.is-filled { color: var(--aps-gold); }

.aps-price,
.aps-qv-price,
.aps-qv-related-price { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .aps-price, [dir="rtl"] .aps-qv-price, [dir="rtl"] .aps-qv-related-price { justify-content: flex-end; }
.aps-price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 2px; font-size: 15.5px; font-weight: 600; color: var(--aps-brown); font-variant-numeric: tabular-nums; }
.aps-price del { order: 1; color: #b8a390; font-weight: 400; font-size: 13px; }
.aps-price ins { order: 2; text-decoration: none; color: var(--aps-brown); font-weight: 600; }
.aps-price .woocommerce-Price-amount { white-space: nowrap; }

.aps-actions { display: flex; align-items: stretch; gap: 8px; margin-top: auto; padding-top: 14px; }
.aps-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 11px 18px;
	border: 1px solid transparent;
	border-radius: var(--aps-radius);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .04em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}
.aps-btn-cart { flex: 1 1 auto; background: var(--aps-brown-deep); color: var(--aps-cream-light); }
.aps-btn-cart:hover, .aps-btn-cart:focus-visible { background: var(--aps-brown); color: var(--aps-cream-light); }
.aps-btn-cart.is-loading { opacity: .65; pointer-events: none; }
.aps-btn-cart.is-added { background: var(--aps-ok); }
.aps-btn-cart[disabled] { opacity: .5; cursor: not-allowed; }

.aps-btn-whatsapp { background: transparent; color: #1f9d4f; border-color: rgba(31, 157, 79, .45); }
.aps-btn-whatsapp:hover { background: #25D366; border-color: #25D366; color: #fff; }
/* on cards the WhatsApp action is a compact square so the primary button leads */
.aps-actions .aps-btn-whatsapp { flex: 0 0 44px; padding: 0; }
.aps-actions .aps-btn-whatsapp .aps-wa-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.aps-card.aps-hidden, .aps-card.aps-collapsed { display: none; }
@keyframes apsFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.aps-load-more-row { display: flex; justify-content: center; margin-top: 40px; }
.aps-load-more {
	background: transparent;
	border: 1px solid var(--aps-brown-deep);
	border-radius: var(--aps-radius);
	color: var(--aps-brown-deep);
	padding: 13px 36px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .12em;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}
.aps-load-more:hover { background: var(--aps-brown-deep); color: var(--aps-cream-light); }
.aps-load-more[hidden] { display: none; }

/* Toast */
.aps-toast {
	position: fixed;
	bottom: 24px;
	inset-inline-end: 24px;
	z-index: 100001;
	display: flex;
	align-items: center;
	gap: 16px;
	max-width: calc(100vw - 32px);
	padding: 13px 20px;
	background: var(--aps-brown-deep, #4a2d18);
	color: var(--aps-cream-light, #faf1de);
	font-family: 'Poppins', 'Tajawal', sans-serif;
	font-size: 13px;
	font-weight: 500;
	border-radius: var(--aps-radius, 3px);
	box-shadow: 0 14px 34px rgba(74, 45, 24, .35);
	opacity: 0;
	transform: translateY(10px);
	transition: opacity .25s ease, transform .25s ease;
	pointer-events: none;
}
.aps-toast.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.aps-toast a { color: var(--aps-gold, #c99a54); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
@media (max-width: 640px) {
	.aps-toast { inset-inline: 16px; bottom: 16px; justify-content: space-between; }
}

/* ------------------------------------------------------------------ */
/* Responsive card tweaks                                              */
/* ------------------------------------------------------------------ */
@media (max-width: 640px) {
	.aps-card-body { padding: 12px 12px 14px; gap: 5px; }
	.aps-title { font-size: 13.5px; }
	.aps-price { font-size: 14px; }
	.aps-btn { padding: 11px 10px; font-size: 12px; letter-spacing: .02em; }
	.aps-badge { top: 8px; inset-inline-start: 8px; padding: 4px 9px; font-size: 9.5px; }
}

/* ------------------------------------------------------------------ */
/* Quick view                                                          */
/* ------------------------------------------------------------------ */
.aps-qv-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(42, 24, 12, .6);
	overflow-y: auto;
	overscroll-behavior: contain;
	visibility: hidden;
	opacity: 0;
	transition: opacity .3s ease, visibility 0s linear .3s;
}
.aps-qv-overlay.is-open { visibility: visible; opacity: 1; transition: opacity .3s ease; }

.aps-qv-modal {
	position: relative;
	width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0 auto;
	padding: 24px clamp(16px, 5vw, 72px) 72px;
	display: flex;
	flex-direction: column;
	background: #fff;
	transform: translateY(24px);
	opacity: 0;
	transition: transform .4s var(--aps-ease), opacity .3s ease;
}
.aps-qv-overlay.is-open .aps-qv-modal { transform: none; opacity: 1; }

.aps-qv-close {
	position: sticky;
	top: 16px;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	flex: 0 0 auto;
	align-self: flex-end;
	margin-bottom: -18px;
	padding: 0;
	background: var(--aps-accent, #4a2d18);
	color: #fff;
	border: none;
	border-radius: 50%;
	box-shadow: 0 4px 14px rgba(74, 45, 24, .25);
	font-size: 0;
	cursor: pointer;
	transition: background-color .2s ease, transform .2s ease;
}
.aps-qv-close:hover { background: var(--aps-primary, #6b4226); transform: rotate(90deg); }
.aps-qv-close svg { width: 16px; height: 16px; }

.aps-qv-body { width: 100%; padding-top: 8px; }
.aps-qv-loading { display: flex; align-items: center; justify-content: center; min-height: 320px; }
.aps-spinner { width: 38px; height: 38px; border: 3px solid #f0e5d3; border-top-color: var(--aps-primary, #6b4226); border-radius: 50%; animation: apsSpin .8s linear infinite; }
@keyframes apsSpin { to { transform: rotate(360deg); } }

.aps-qv-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 64px; max-width: 1360px; margin: 0 auto; align-items: start; }
.aps-qv-gallery { position: sticky; top: 24px; }
@media (max-width: 900px) {
	.aps-qv-inner { grid-template-columns: 1fr; gap: 28px; }
	.aps-qv-gallery { position: static; }
}
@media (max-width: 480px) {
	.aps-qv-modal { padding: 14px 14px 48px; }
	.aps-qv-close { width: 38px; height: 38px; }
	.aps-qv-thumb { width: 54px; height: 54px; }
}

/* Gallery */
.aps-qv-main-image { position: relative; aspect-ratio: 1 / 1; background: var(--aps-ivory); overflow: hidden; }
.aps-qv-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s ease; }
.aps-qv-slide.is-active { opacity: 1; }
.aps-qv-main-image .aps-badge { top: 16px; inset-inline-start: 16px; }
.aps-qv-nav {
	position: absolute;
	top: 50%;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	margin-top: -21px;
	background: rgba(255, 255, 255, .9);
	color: var(--aps-brown-deep);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color .2s ease;
}
.aps-qv-nav:hover { background: #fff; }
.aps-qv-nav svg { width: 16px; height: 16px; }
.aps-qv-prev { inset-inline-start: 14px; }
.aps-qv-next { inset-inline-end: 14px; }
[dir="rtl"] .aps-qv-nav svg { transform: scaleX(-1); }

.aps-qv-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.aps-qv-thumb { width: 68px; height: 68px; padding: 0; border: none; border-radius: 2px; background: var(--aps-ivory); overflow: hidden; cursor: pointer; opacity: .6; box-shadow: 0 0 0 1px var(--aps-line-soft); transition: opacity .2s ease, box-shadow .2s ease; }
.aps-qv-thumb:hover { opacity: 1; }
.aps-qv-thumb.is-active { opacity: 1; box-shadow: 0 0 0 2px var(--aps-primary); }
.aps-qv-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Details */
.aps-qv-details { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.aps-qv-cats { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--aps-gold); }
.aps-qv-cats a { color: inherit; text-decoration: none; pointer-events: none; }
.aps-qv-title { margin: 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.2; font-weight: 600; letter-spacing: -.01em; color: var(--aps-accent); }
.aps-qv-rating { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--aps-muted); }
.aps-qv-price { display: inline-flex; align-items: baseline; gap: 12px; font-size: 26px; font-weight: 600; color: var(--aps-primary); font-variant-numeric: tabular-nums; }
.aps-qv-price del { order: 1; font-size: 16px; font-weight: 400; color: #b8a390; }
.aps-qv-price ins { order: 2; text-decoration: none; }
.aps-qv-short-desc { color: #5b4a3d; font-size: 14.5px; line-height: 1.75; }
.aps-qv-short-desc p { margin: 0 0 .6em; }

.aps-qv-stock-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-block: 12px; border-block: 1px solid var(--aps-line-soft); font-size: 12.5px; }
.aps-stock { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.aps-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.aps-stock-in { color: var(--aps-ok); }
.aps-stock-in em { color: var(--aps-muted); font-weight: 400; font-style: normal; }
.aps-stock-backorder { color: var(--aps-warn); }
.aps-stock-out { color: var(--aps-bad); }
.aps-sku { color: var(--aps-muted); }

/* Variations */
.aps-qv-variations { display: flex; flex-direction: column; gap: 16px; padding: 18px; background: var(--aps-ivory); border-radius: var(--aps-radius); }
.aps-qv-attribute { display: flex; flex-direction: column; gap: 7px; }
.aps-qv-attribute label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--aps-accent); }
.aps-variation-select { width: 100%; max-width: 380px; padding: 12px 42px 12px 16px; font-size: 14.5px; font-weight: 500; }
[dir="rtl"] .aps-variation-select { padding: 12px 16px 12px 42px; }
.aps-variation-select.aps-select-empty { color: #7a6a5c; }
.aps-variation-select option { color: var(--aps-accent); }
.aps-qv-variation-price { min-height: 1.4em; font-size: 15px; font-weight: 600; color: var(--aps-primary); direction: ltr; unicode-bidi: isolate; }
.aps-qv-variation-price:empty { display: none; }

/* Quantity */
.aps-qv-qty-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.aps-qv-qty-row label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--aps-accent); }
.aps-qty-stepper { display: flex; align-items: stretch; width: fit-content; border: 1px solid var(--aps-line); border-radius: var(--aps-radius); overflow: hidden; background: #fff; }
.aps-qty-btn { width: 42px; padding: 0; background: transparent; border: none; color: var(--aps-accent); font-size: 18px; cursor: pointer; transition: background-color .2s ease; }
.aps-qty-btn:hover { background: var(--aps-cream-light); }
.aps-qty-input { width: 54px; height: 44px; padding: 0; text-align: center; border: none; border-inline: 1px solid var(--aps-line-soft); background: transparent; color: var(--aps-accent); font-family: inherit; font-size: 14px; font-weight: 600; -moz-appearance: textfield; appearance: textfield; }
.aps-qty-input::-webkit-outer-spin-button, .aps-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.aps-qv-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.aps-qv-actions .aps-btn { flex: 1 1 180px; min-height: 50px; padding: 13px 22px; font-size: 13px; }

.aps-qv-share { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--aps-muted); }
.aps-share-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	background: transparent;
	color: var(--aps-accent);
	border: 1px solid var(--aps-line);
	border-radius: 50%;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.aps-share-link:hover { background: var(--aps-brown-deep); border-color: var(--aps-brown-deep); color: var(--aps-cream-light); }
.aps-share-link svg { width: 14px; height: 14px; }

/* Tabs */
.aps-qv-tabs { margin-top: 18px; padding-top: 8px; }
.aps-qv-tab-nav { display: flex; flex-wrap: wrap; gap: 4px 26px; margin-bottom: 18px; border-bottom: 1px solid var(--aps-line-soft); }
.aps-tab-btn { padding: 10px 0; margin-bottom: -1px; background: none; border: none; border-bottom: 2px solid transparent; color: var(--aps-muted); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; cursor: pointer; transition: color .2s ease, border-color .2s ease; }
.aps-tab-btn:hover { color: var(--aps-accent); }
.aps-tab-btn.is-active { color: var(--aps-accent); border-bottom-color: var(--aps-primary); }
.aps-qv-tab-panel { display: none; color: #5b4a3d; font-size: 14px; line-height: 1.8; }
.aps-qv-tab-panel.is-active { display: block; }
.aps-qv-tab-panel p:first-child { margin-top: 0; }
.aps-qv-attr-table { width: 100%; border-collapse: collapse; }
.aps-qv-attr-table th, .aps-qv-attr-table td { text-align: start; padding: 11px 0; border-bottom: 1px solid var(--aps-line-soft); font-size: 13px; }
.aps-qv-attr-table th { width: 36%; color: var(--aps-muted); font-weight: 500; }
.aps-qv-review { padding: 14px 0; border-bottom: 1px solid var(--aps-line-soft); }
.aps-qv-review p { margin: 4px 0 0; }
.aps-qv-review-head { display: flex; align-items: center; gap: 10px; }

/* Related */
.aps-qv-related { max-width: 1360px; margin: 64px auto 0; padding-top: 32px; border-top: 1px solid var(--aps-line-soft); }
.aps-qv-related h3 { margin: 0 0 20px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--aps-accent); }
.aps-qv-related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 700px) { .aps-qv-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.aps-qv-related-item { display: block; color: inherit; text-decoration: none; }
.aps-qv-related-item img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; margin-bottom: 10px; background: var(--aps-ivory); transition: opacity .25s ease; }
.aps-qv-related-item:hover img { opacity: .85; }
.aps-qv-related-title { display: block; font-size: 13.5px; font-weight: 600; color: var(--aps-accent); }
.aps-qv-related-price { display: inline-flex; align-items: baseline; gap: 6px; margin-top: 3px; font-size: 13px; font-weight: 500; color: var(--aps-primary); }
.aps-qv-related-price del { order: 1; color: #b8a390; font-weight: 400; }
.aps-qv-related-price ins { order: 2; text-decoration: none; }

body.aps-qv-locked { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	.aps-wrapper *, .aps-qv-overlay *, .aps-toast { animation: none !important; transition-duration: .01ms !important; }
}
