/* =========================================================================
   Atheer — product screens: product card + grid, shop / category / search / offers pages,
   single product page, sticky buy bar. Owner: product builder.
   Tokens come from base.css. RTL: logical properties only.
   ========================================================================= */

/* Star shape used as a mask (alpha only, colour comes from background-color). */
:root {
	--atheer-star-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6l2.9 6 6.5.8-4.8 4.5 1.2 6.5L12 17.2l-5.8 3.2 1.2-6.5L2.6 9.4l6.5-.8z'/%3E%3C/svg%3E");
}

/* ---------- Stars (WooCommerce's star font is not loaded) ---------- */
.atheer-stars {
	--size: 18px;
	position: relative;
	display: inline-block;
	flex: none;
	width: calc(var(--size) * 5);
	height: var(--size);
	background-color: var(--line);
	-webkit-mask: var(--atheer-star-mask) repeat-x 0 0 / var(--size) var(--size);
	mask: var(--atheer-star-mask) repeat-x 0 0 / var(--size) var(--size);
	vertical-align: middle;
}
.atheer-stars__fill { position: absolute; inset-block: 0; inset-inline-start: 0; background-color: var(--star); }

/* ---------- Quiet tag ("الأكثر مبيعاً") ---------- */
.atheer-tag {
	display: inline-flex; align-items: center;
	min-height: 28px; padding: 2px var(--space-3);
	background: var(--ivory); color: var(--gold-700);
	border: 1px solid var(--gold); border-radius: var(--radius-pill);
	font-size: var(--text-xs); font-weight: 600; line-height: 1.2; white-space: nowrap;
}

/* ---------- Price pieces ---------- */
.atheer-price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2); }
.atheer-price .amount { color: var(--olive-800); font-weight: 700; }
.atheer-price del, .atheer-price del .amount { color: var(--sale); font-weight: 500; text-decoration-thickness: 1px; }
.atheer-price ins { text-decoration: none; }
.atheer-save { margin: 0; color: var(--sale); font-size: var(--text-sm); font-weight: 600; }
.atheer-price__from { color: var(--ink-600); font-weight: 500; }
.atheer-save[hidden], .atheer-single__size[hidden], .atheer-buybar__opts[hidden] { display: none !important; }

/* =========================================================================
   Grid + product card
   ========================================================================= */
.atheer-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-4) 14px;
	margin: 0; padding: 0; list-style: none;
}
.atheer-grid::before, .atheer-grid::after { content: none; }
@media (min-width: 768px) {
	.atheer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6) var(--space-5); }
}
@media (min-width: 1024px) {
	.atheer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-7) var(--space-6); }
}

/* A framed tile: the photo sits inside the card with its own corners, the words line up with the Arabic reading edge. */
.atheer-pcard {
	position: relative;
	display: flex; flex-direction: column;
	min-width: 0; margin: 0; padding: var(--space-2);
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 18px;
	transition: border-color 0.2s var(--ease);
}
.atheer-pcard:hover, .atheer-pcard:focus-within { border-color: var(--gold); }

.atheer-pcard__media { position: relative; aspect-ratio: 1 / 1; background: var(--cream-100); border-radius: 12px; overflow: hidden; }
.atheer-pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.atheer-pcard:hover .atheer-pcard__media img { transform: scale(1.03); }
.atheer-pcard__tag { position: absolute; z-index: 2; inset-block-end: var(--space-2); inset-inline-start: var(--space-2); pointer-events: none; }

/* Red discount badge on the photo (card and product page). */
.atheer-discount {
	display: inline-flex; align-items: center;
	min-height: 26px; padding: 0 10px;
	background: var(--sale); color: var(--white);
	border-radius: 8px;
	font-size: var(--text-xs); font-weight: 700; line-height: 1; white-space: nowrap;
}
.atheer-pcard__media .atheer-discount { position: absolute; z-index: 2; inset-block-start: var(--space-2); inset-inline-start: var(--space-2); pointer-events: none; }

/* Name and size across the card, price and cart button on one line at the bottom. */
.atheer-pcard__body {
	display: grid; flex: 1;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto auto 1fr;
	align-items: end;
	gap: 2px var(--space-2);
	padding: var(--space-3) var(--space-1) var(--space-1);
	text-align: start;
}
.atheer-pcard__body > * { grid-column: 1 / -1; }
.atheer-pcard__body > .atheer-pcard__price { grid-column: 1; grid-row: -2; }
.atheer-pcard__body > .atheer-pcard__action { grid-column: 2; grid-row: -2; }
@media (min-width: 768px) {
	.atheer-pcard { padding: var(--space-3); }
	.atheer-pcard__body { padding: var(--space-4) var(--space-1) var(--space-1); }
}

.atheer-pcard__title {
	margin: 0;
	font-family: var(--font-body); font-size: 0.9375rem; font-weight: 600; line-height: 1.45;
	color: var(--ink-900);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	text-wrap: pretty;
}
.atheer-pcard__link { color: inherit; text-decoration: none; }
.atheer-pcard__link:hover { color: var(--olive-800); }
/* The title link covers the whole card, so a tap on the photo opens the product too. */
.atheer-pcard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 18px; }
.atheer-pcard__link:focus-visible { outline: none; }
.atheer-pcard__link:focus-visible::after { outline: 2px solid var(--olive-600); outline-offset: -3px; }

/* Size, or what an offer holds: one quiet line. */
.atheer-pcard__size { margin: 0; color: var(--ink-600); font-size: var(--text-xs); line-height: 1.5; }
.atheer-pcard__rating { display: inline-flex; align-items: center; gap: var(--space-1); margin: 0; color: var(--ink-600); font-size: var(--text-xs); }
.atheer-pcard__rating .atheer-stars { --size: 14px; }
/* New price and red old price together stay within the 42 px of the cart button, so a discount never grows the card. */
.atheer-pcard__price { font-family: var(--font-head); font-size: 1.25rem; line-height: 1.2; }
.atheer-pcard__price .atheer-price { flex-direction: column; align-items: flex-start; gap: 0; }
.atheer-pcard__price .atheer-price.is-from { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-1); }
.atheer-pcard__price .atheer-price__from { font-family: var(--font-body); font-size: var(--text-xs); }
.atheer-pcard__price del, .atheer-pcard__price del .amount { font-family: var(--font-body); font-size: 0.75rem; font-weight: 500; line-height: 1.25; color: var(--sale); }

.atheer-pcard__action { position: relative; z-index: 2; }
.atheer-pcard__action .button {
	width: 42px; min-width: 42px; height: 42px; min-height: 42px; padding: 0;
	border-radius: 12px; font-size: var(--text-xs);
}
.atheer-pcard__action .button .atheer-icon { width: 20px; height: 20px; }
.atheer-pcard__cart-full, .atheer-pcard__cart-short {
	position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
}
.atheer-pcard__action .button.loading { opacity: 0.7; cursor: progress; }
/* Sold out: the words take the whole line, nothing to tap here. */
.atheer-pcard__body:has(.is-unavailable) > .atheer-pcard__action { grid-column: 1 / -1; grid-row: auto; }
.atheer-pcard__action .button.is-unavailable { width: 100%; background: transparent; color: var(--ink-600); border-color: var(--line); }
.atheer-pcard__action .button.is-unavailable:hover { background: var(--cream-100); color: var(--ink-900); box-shadow: none; }
.atheer-pcard__action .button.is-unavailable .atheer-pcard__cart-full { position: static; width: auto; height: auto; margin: 0; clip: auto; }
/* The cart drawer opens after "added"; WooCommerce's extra "View cart" link is not needed in the card. */
.atheer-pcard__action .added_to_cart { display: none; }

/* ---------- Wishlist (MoreConvert) ---------- */
.atheer-wishlist .wlfmc-add-to-wishlist { margin: 0 !important; padding: 0 !important; }
.atheer-wishlist .wlfmc-add-button { margin: 0 !important; }
.atheer-wishlist .wlfmc-add-button > a {
	display: inline-flex !important; align-items: center; justify-content: center; gap: var(--space-2);
	min-height: var(--tap); margin: 0 !important;
	background: var(--white) !important; color: var(--olive-800) !important;
	border: 1px solid var(--line) !important; border-radius: var(--radius-pill) !important;
	box-shadow: none !important;
	font-family: var(--font-body) !important; font-size: var(--text-md) !important; font-weight: 600 !important;
	line-height: 1 !important; text-decoration: none !important;
	transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.atheer-wishlist .wlfmc-add-button > a:hover { border-color: var(--olive-600) !important; background: var(--cream-100) !important; }
.atheer-wishlist .wlfmc-add-button > a i { display: inline-flex; font-style: normal; color: inherit !important; font-size: inherit !important; }
.atheer-wishlist i.wlfmc-svg { width: 22px !important; height: 22px !important; flex: none; }
.atheer-wishlist .wlfmc-add-button svg { width: 22px; height: 22px; }
.atheer-wishlist .wlfmc-removefromwishlist svg { fill: currentColor; }

.atheer-wishlist--card { position: absolute; z-index: 2; inset-block-start: var(--space-1); inset-inline-end: var(--space-1); }
.atheer .atheer-wishlist--card .wlfmc-loop-btn .wlfmc-add-button > a {
	width: 40px !important; height: 40px !important; min-width: 40px !important; min-height: 40px !important; padding: 0 !important;
	background: color-mix(in srgb, var(--white) 90%, transparent) !important; border-color: transparent !important;
}
.atheer-wishlist--card i.wlfmc-svg, .atheer-wishlist--card .wlfmc-add-button svg { width: 20px !important; height: 20px !important; }
.atheer-wishlist--card .wlfmc-add-button > a span {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* =========================================================================
   Shop, category, search and offers pages
   ========================================================================= */
.atheer-wc--archive { padding-block-end: var(--space-8); }

.atheer-shop { padding-block-start: var(--space-4); } /* 16 px phone, 24 px tablet and up */
/* Top of list pages: just the word, on the page background. */
.atheer-shop-head { margin-block-end: var(--space-3); text-align: center; }
.atheer-shop-head__title { margin: 0; font-family: var(--font-head); font-size: var(--text-xl); line-height: var(--leading-tight); color: var(--olive-800); }
.atheer-shop-head__text { max-width: 60ch; margin-inline: auto; margin-block: calc(-1 * var(--space-1)) var(--space-3); color: var(--ink-600); text-align: center; }
.atheer-shop-head__text p:last-child, .atheer-shop-head__text .term-description p:last-child { margin-block-end: 0; }
@media (min-width: 768px) {
	.atheer-shop { padding-block-start: var(--space-5); }
}

/* Round category row: home page and every product list. Well below product-card size, so it reads as navigation. */
.atheer-cats { margin-block-end: var(--space-6); }
.cat-grid {
	display: flex; justify-content: center; gap: var(--space-1);
	padding-block: 3px;
}
/* Phones: every circle shares the width, so all of them show with no sideways scrolling. */
.cat-grid__item { flex: 1 1 0; min-width: 0; max-width: 92px; }
.cat-card {
	display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
	min-height: var(--tap); padding-block: 3px;
	color: var(--ink-900); text-align: center; text-decoration: none;
	border-radius: var(--radius-sm);
}
.cat-card:hover { color: var(--olive-800); }
.cat-card__media {
	display: block; flex: none; width: min(100% - 6px, 64px); aspect-ratio: 1; overflow: hidden;
	border-radius: 50%; background: var(--cream-100);
	outline: 1px solid var(--gold-200); outline-offset: 2px;
	transition: outline-color 0.2s var(--ease);
}
.cat-card:hover .cat-card__media { outline-color: var(--gold); }
.cat-card.is-current .cat-card__media { outline: 2px solid var(--olive-800); }
.cat-card__img { width: 100%; height: 100%; object-fit: cover; }
.cat-card__media--empty { background: var(--cream-100) url("../icons/ornament-leaf.svg") center / 40px auto no-repeat; }
.cat-card__name { font-size: 0.75rem; font-weight: 500; line-height: 1.35; }
.cat-card.is-current .cat-card__name { color: var(--olive-800); font-weight: 700; }
@media (min-width: 768px) {
	.cat-grid { gap: var(--space-5); }
	.cat-grid__item { flex: 0 0 112px; max-width: none; }
	.cat-card__media { width: 92px; }
	.cat-card__name { font-size: var(--text-sm); }
}
@media (min-width: 1024px) {
	.cat-grid { gap: var(--space-6); }
	.cat-grid__item { flex-basis: 128px; }
	.cat-card__media { width: 112px; }
}

/* Toolbar: result count + sort. */
.atheer-toolbar {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: var(--space-3) var(--space-4);
	margin-block-end: var(--space-5);
}
.woocommerce-result-count { margin: 0; color: var(--ink-600); font-size: var(--text-sm); }
.atheer-sort { display: flex; align-items: center; gap: var(--space-2); }
.atheer-sort__label { color: var(--ink-600); font-size: var(--text-sm); white-space: nowrap; }
.woocommerce-ordering { margin: 0; }
.woocommerce-ordering select {
	width: auto; min-width: 10rem; min-height: 42px;
	padding-block: 0; padding-inline: var(--space-4) var(--space-6);
	border-radius: var(--radius-pill);
	font-size: var(--text-sm);
	cursor: pointer;
}

/* Pagination: big round buttons. */
.woocommerce-pagination { margin-block-start: var(--space-7); }
.woocommerce-pagination ul.page-numbers {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
	gap: var(--space-2); margin: 0; padding: 0; list-style: none; border: 0;
}
.woocommerce-pagination .page-numbers li { margin: 0; border: 0; }
.woocommerce-pagination a.page-numbers,
.woocommerce-pagination span.page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: var(--tap); min-height: var(--tap); padding: 0 var(--space-3);
	background: var(--white); color: var(--ink-900);
	border: 1px solid var(--line); border-radius: var(--radius-pill);
	font-weight: 600; text-decoration: none;
}
.woocommerce-pagination a.page-numbers:hover { border-color: var(--olive-600); color: var(--olive-800); }
.woocommerce-pagination span.page-numbers.current { background: var(--olive-800); border-color: var(--olive-800); color: var(--ivory); }
.woocommerce-pagination span.page-numbers.dots { background: transparent; border-color: transparent; }
.woocommerce-pagination .prev, .woocommerce-pagination .next { padding-inline: var(--space-5); }

/* Empty state. */
.atheer-noresults { max-width: 560px; margin: var(--space-6) auto; padding: var(--space-7) var(--space-5); text-align: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.atheer-noresults__mark { display: inline-flex; color: var(--gold); margin-block-end: var(--space-3); }
.atheer-noresults__mark .atheer-icon { width: 44px; height: 44px; }
.atheer-noresults__title { font-size: var(--text-xl); margin-block-end: var(--space-2); }
.atheer-noresults__text { color: var(--ink-600); }
.atheer-noresults__links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin-block-start: var(--space-5); }

/* The offers page shortcode wrapper behaves like the shop. */
.atheer-shop > .woocommerce { margin: 0; }

/* ---------- Breadcrumb ---------- */
/* One quiet line above the photo; a long product name fades into "…" instead of wrapping. */
.atheer-crumbs {
	display: flex; align-items: center; gap: 0 var(--space-1);
	margin: 0 0 var(--space-2); color: var(--ink-600); font-size: var(--text-xs);
	white-space: nowrap; overflow: hidden;
}
.atheer-crumbs a, .atheer-crumbs__item { display: inline-flex; align-items: center; min-height: 32px; flex: none; }
.atheer-crumbs a { color: var(--ink-600); text-decoration: none; }
.atheer-crumbs a:hover { color: var(--olive-800); text-decoration: underline; }
.atheer-crumbs__item:last-child { display: block; flex: 0 1 auto; min-width: 0; line-height: 32px; overflow: hidden; text-overflow: ellipsis; }
.atheer-crumbs__sep { display: inline-flex; flex: none; }
.atheer-crumbs__sep .atheer-icon { width: 12px; height: 12px; color: var(--ink-600); opacity: 0.5; }

/* =========================================================================
   Single product page
   ========================================================================= */
.atheer-wc--single { padding-block: var(--space-4) var(--space-8); }
@media (max-width: 767px) {
	/* Room for the sticky buy bar. */
	.atheer-wc--single { padding-block-end: calc(var(--space-8) + 72px); }
}

.atheer-wc--single div.product {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-5);
	align-items: start;
}
.atheer-wc--single div.product > * { min-width: 0; }
.atheer-wc--single div.product > *:not(.summary):not(.woocommerce-product-gallery):not(.atheer-photo-overlay) { grid-column: 1 / -1; }
/* Discount badge and heart float over the photo: a zero-height item in the gallery's own grid cell. */
.atheer-wc--single div.product > .woocommerce-product-gallery { grid-row: 1; grid-column: 1; }
.atheer-wc--single div.product > .atheer-photo-overlay {
	grid-row: 1; grid-column: 1;
	position: relative; z-index: 5; align-self: start; height: 0;
}
.atheer-photo-overlay .atheer-discount { position: absolute; inset-block-start: var(--space-3); inset-inline-start: var(--space-3); }
.atheer-photo-overlay .atheer-wishlist--card { inset-block-start: var(--space-2); inset-inline-end: var(--space-2); }
@media (min-width: 768px) {
	/* RTL: the first column is on the right, so details sit right and the gallery left. */
	.atheer-wc--single div.product { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); column-gap: var(--space-6); }
	.atheer-wc--single div.product > .summary { grid-column: 1; grid-row: 1; }
	.atheer-wc--single div.product > .woocommerce-product-gallery { grid-column: 2; grid-row: 1; }
	.atheer-wc--single div.product > .atheer-photo-overlay { grid-column: 2; grid-row: 1; }
}
@media (min-width: 1024px) {
	.atheer-wc--single div.product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-7); }
}

/* ---------- Gallery ---------- */
/* Shown at once (WooCommerce hides it until its slider starts); extra photos stay hidden until then, so nothing jumps.
   The slider first wraps the photos, then sets their widths about 100 ms later: until it does, photos 2+ stay hidden
   and the first one is never wider than the gallery (100cqi). The thumbnail row's height is kept free from the start. */
.woocommerce-product-gallery { position: relative; margin: 0; opacity: 1 !important; container-type: inline-size; }
.woocommerce-product-gallery:has(.woocommerce-product-gallery__image:nth-child(2)):not(:has(.flex-control-thumbs)) { padding-block-end: calc(var(--space-3) + 68px); }
@media (min-width: 1024px) {
	.woocommerce-product-gallery:has(.woocommerce-product-gallery__image:nth-child(2)):not(:has(.flex-control-thumbs)) { padding-block-end: calc(var(--space-3) + 88px); }
}
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery .flex-viewport,
.woocommerce-product-gallery__wrapper {
	background: var(--cream-100);
	border-radius: var(--radius-lg);
	overflow: hidden;
}
.woocommerce-product-gallery__image { position: relative; max-inline-size: 100cqi; background: var(--cream-100); }
.woocommerce-product-gallery__image a { display: block; cursor: zoom-in; }
.woocommerce-product-gallery__image img:not(.zoomImg) { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.woocommerce-product-gallery__image:nth-child(n+2) { display: none; }
.woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__image[style*="width"] { display: block; }
.woocommerce-product-gallery__trigger { display: none; } /* The photo itself opens the full-screen view. */

.woocommerce-product-gallery .flex-control-thumbs {
	display: flex; gap: var(--space-2);
	margin: var(--space-3) 0 0; padding: 2px; list-style: none;
	overflow-x: auto; scrollbar-width: none;
}
.woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar { display: none; }
.woocommerce-product-gallery .flex-control-thumbs li { flex: 0 0 64px; margin: 0; }
@media (min-width: 1024px) {
	.woocommerce-product-gallery .flex-control-thumbs { gap: var(--space-3); }
	.woocommerce-product-gallery .flex-control-thumbs li { flex-basis: 84px; }
}
.woocommerce-product-gallery .flex-control-thumbs img {
	width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
	background: var(--cream-100);
	border: 1px solid var(--line); border-radius: var(--radius-sm);
	opacity: 0.7; cursor: pointer;
	transition: opacity 0.2s var(--ease), border-color 0.2s var(--ease);
}
.woocommerce-product-gallery .flex-control-thumbs img:hover { opacity: 1; }
.woocommerce-product-gallery .flex-control-thumbs img.flex-active { opacity: 1; border-color: var(--olive-600); box-shadow: 0 0 0 1px var(--olive-600); }

/* ---------- Details column ---------- */
.atheer-wc--single .summary { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); margin: 0; }
.atheer-wc--single .summary > * { margin-block: 0; max-width: 100%; }
.atheer-single__tag { margin-block-start: var(--space-1); }
.atheer-single__title { margin: 0; font-size: clamp(1.625rem, 1.45rem + 0.8vw, 2.125rem); line-height: 1.4; }
.atheer-single__size { color: var(--ink-600); font-size: var(--text-sm); margin-block-start: calc(-1 * var(--space-3)) !important; }
.atheer-single__rating {
	display: inline-flex; align-items: center; gap: var(--space-2);
	min-height: var(--tap); color: var(--ink-600); text-decoration: none;
}
.atheer-single__rating:hover { color: var(--olive-800); text-decoration: underline; }

/* Price band: the price between two thin gold lines, the saving at the far end. */
.atheer-priceband {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-1) var(--space-4);
	width: 100%; padding-block: var(--space-3);
	border-block: 1px solid var(--line);
}
.atheer-single__price { font-family: var(--font-head); line-height: 1.4; }
.atheer-single__price .amount,
.atheer-single__price .atheer-price__now { font-size: 1.75rem; }
.atheer-single__price del, .atheer-single__price del .amount { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; }
.atheer-single__save { font-size: var(--text-sm); }

.atheer-features { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.atheer-features__item { display: flex; align-items: baseline; gap: var(--space-3); color: var(--ink-900); font-size: 0.9375rem; line-height: 1.6; }
.atheer-features__item::before { content: ""; flex: none; width: 7px; height: 7px; background: var(--gold); transform: translateY(-2px) rotate(45deg); }

.woocommerce-product-details__short-description { color: var(--ink-600); font-size: 0.9375rem; line-height: 1.9; }
.woocommerce-product-details__short-description > :last-child { margin-block-end: 0; }

/* ---------- Add to cart form ---------- */
.atheer-wc--single form.cart { width: 100%; margin-block-start: var(--space-2) !important; }
.atheer-wc--single form.cart:not(.variations_form),
.atheer-wc--single .woocommerce-variation-add-to-cart {
	display: flex; align-items: stretch; gap: var(--space-3);
}
.atheer-wc--single .single_add_to_cart_button {
	flex: 1 1 auto;
	min-height: 52px; padding-inline: var(--space-5);
	font-size: var(--text-md);
}
.atheer-wc--single .single_add_to_cart_button.disabled { opacity: 0.55; cursor: not-allowed; }

.quantity { position: relative; }
.atheer-wc--single .quantity {
	display: inline-flex; align-items: center; flex: none;
	padding: var(--space-1);
	background: var(--white);
	border: 1px solid var(--line); border-radius: var(--radius-pill);
}
.atheer-wc--single .quantity:has(input[type="hidden"]) { display: none; }
.atheer-qty__btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: var(--tap); height: var(--tap); padding: 0;
	background: transparent; color: var(--olive-800);
	border: 0; border-radius: 50%;
	transition: background-color 0.2s var(--ease);
}
.atheer-qty__btn:hover { background: var(--cream-100); }
.atheer-qty__btn:disabled { color: var(--ink-600); opacity: 0.45; cursor: not-allowed; background: transparent; }
.atheer-qty__btn .atheer-icon { width: 22px; height: 22px; }
.atheer-wc--single .quantity input.qty {
	width: 3.2ch; min-width: var(--tap); min-height: var(--tap); padding: 0;
	background: transparent; border: 0; box-shadow: none;
	font-size: var(--text-lg); font-weight: 700; text-align: center; direction: ltr;
	-moz-appearance: textfield;
}
.atheer-wc--single .quantity input.qty:focus { box-shadow: none; outline: 2px solid var(--olive-600); outline-offset: 2px; border-radius: var(--radius-sm); }
.atheer-wc--single .quantity input.qty::-webkit-inner-spin-button,
.atheer-wc--single .quantity input.qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Variable products: each choice (الحجم، العبوة) is a row of big buttons (Variation Swatches markup, theme look). */
.atheer-wc--single table.variations { width: 100%; margin-block-end: var(--space-2); border: 0; }
.atheer-wc--single table.variations tbody, .atheer-wc--single table.variations tr { display: block; }
.atheer-wc--single table.variations tr { margin-block-end: var(--space-4); }
.atheer-wc--single table.variations th, .atheer-wc--single table.variations td { display: block; padding: 0; text-align: start; border: 0; background: none; }
.atheer-wc--single table.variations th { margin-block-end: var(--space-2); }
.atheer-wc--single table.variations th label { font-weight: 700; color: var(--ink-900); font-size: var(--text-md); }
.atheer-wc--single table.variations .woo-selected-variation-item-name { display: none; } /* the selected button already shows it */
.atheer-wc--single table.variations select { max-width: 360px; }
.atheer-wc--single .variable-items-wrapper { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.atheer-wc--single .variable-item {
	position: relative;
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 96px; min-height: var(--tap); margin: 0; padding: var(--space-2) var(--space-4);
	background: var(--white); color: var(--ink-900);
	border: 1px solid var(--line); border-radius: var(--radius-sm);
	font-size: var(--text-md); font-weight: 600; line-height: 1.3;
	cursor: pointer; user-select: none;
	transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.atheer-wc--single .variable-item:hover { border-color: var(--olive-600); }
.atheer-wc--single .variable-item:focus-visible { outline: 2px solid var(--olive-600); outline-offset: 2px; }
.atheer-wc--single .variable-item.selected {
	background: var(--olive-100); color: var(--olive-800);
	border-color: var(--olive-800); box-shadow: inset 0 0 0 1px var(--olive-800);
}
.atheer-wc--single .variable-item-contents { display: flex; flex-direction: column; align-items: center; gap: 0; }
.atheer-wc--single .variable-item.disabled, .atheer-wc--single .variable-item.is-out {
	background: var(--cream-100); color: var(--ink-600);
	border-style: dashed; cursor: not-allowed; box-shadow: none;
}
.atheer-wc--single .variable-item.disabled .variable-item-span, .atheer-wc--single .variable-item.is-out .variable-item-span { text-decoration: line-through; text-decoration-thickness: 1px; }
.atheer-var__out { font-size: var(--text-xs); font-weight: 600; color: var(--sale); }
/* Offers: the full offer price under each choice, and the line about the product the choice changes. */
.atheer-wc--single .variable-item.has-price { min-width: 128px; padding-block: var(--space-2); }
.atheer-var__price { font-size: var(--text-sm); font-weight: 500; color: var(--ink-600); line-height: 1.4; }
.atheer-wc--single .variable-item.selected .atheer-var__price { color: var(--olive-800); font-weight: 600; }
.atheer-offer-choice { margin: calc(-1 * var(--space-2)) 0 var(--space-3); color: var(--ink-600); font-size: var(--text-md); line-height: 1.6; }
.atheer-offer-choice[hidden] { display: none; }
.atheer-wc--single .reset_variations { display: none !important; }
/* The big price at the top already follows the choice. */
.atheer-wc--single .woocommerce-variation-price { display: none; }
.atheer-wc--single .woocommerce-variation-availability:not(:empty) { margin-block-end: var(--space-3); }
.atheer-wc--single .single_variation_wrap { width: 100%; }

/* Out of stock: calm and clear. */
.atheer-wc--single .stock { margin: 0; font-weight: 600; }
.atheer-wc--single .stock.out-of-stock {
	width: 100%; padding: var(--space-3) var(--space-4);
	background: var(--cream-100); color: var(--ink-900);
	border: 1px solid var(--line); border-radius: var(--radius);
}
.atheer-wc--single .stock.in-stock { color: var(--olive-600); }

/* ---------- Trust lines under the button ---------- */
.atheer-trust { display: grid; gap: var(--space-2); width: 100%; margin: var(--space-1) 0 0; padding: 0; list-style: none; }
.atheer-trust__item { display: flex; align-items: center; gap: var(--space-3); color: var(--ink-600); font-size: var(--text-sm); }
.atheer-trust__item .atheer-icon { width: 20px; height: 20px; flex: none; color: var(--olive-600); }
.atheer-trust__item a { color: var(--olive-600); font-weight: 600; display: inline-flex; align-items: center; min-height: var(--tap); }

/* ---------- WhatsApp ---------- */
.atheer-single__actions {
	display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
	width: 100%; padding-block-start: var(--space-4); margin-block-start: var(--space-1) !important;
	border-block-start: 1px solid var(--line);
}
.atheer-wa { flex: 1 1 240px; }
.atheer-wa .atheer-icon { width: 22px; height: 22px; }

/* ---------- Tabs (tablet/desktop) / accordion (phone) ---------- */
.atheer-tabs { margin-block-start: var(--space-6); }
.atheer-tabs__list { display: none; }
.atheer-tabs__panel { border-block-end: 1px solid var(--line); }
.atheer-tabs__panel:first-of-type { border-block-start: 1px solid var(--line); }
.atheer-tabs__acc { margin: 0; font-size: var(--text-lg); }
.atheer-tabs__acc-btn {
	display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
	width: 100%; min-height: 60px; padding: 0;
	background: none; border: 0; color: var(--olive-800);
	font-family: var(--font-head); font-size: inherit; font-weight: 700; text-align: start;
}
.atheer-tabs__chev { width: 22px; height: 22px; flex: none; color: var(--olive-600); transition: transform 0.25s var(--ease); }
.atheer-tabs__panel.is-open .atheer-tabs__chev { transform: rotate(180deg); }
.atheer-tabs__body { padding-block-end: var(--space-5); }
.atheer-tabs__body > :last-child { margin-block-end: 0; }
/* Before product.js runs (or without it) every panel shows. */
.atheer-tabs:not(.is-ready) .atheer-tabs__chev { display: none; }
.atheer-tabs.is-ready .atheer-tabs__panel:not(.is-open) .atheer-tabs__body { display: none; }

@media (min-width: 768px) {
	.atheer-tabs { margin-block-start: var(--space-7); }
	.atheer-tabs.is-ready .atheer-tabs__list {
		display: flex; gap: var(--space-6);
		border-block-end: 1px solid var(--line);
		overflow-x: auto; scrollbar-width: none;
	}
	.atheer-tabs__tab {
		flex: none;
		min-height: 56px; padding: 0 var(--space-1);
		background: none; border: 0; border-block-end: 2px solid transparent; margin-block-end: -1px;
		color: var(--ink-600);
		font-family: var(--font-head); font-size: var(--text-lg); font-weight: 600;
		transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
	}
	.atheer-tabs__tab:hover { color: var(--olive-800); }
	.atheer-tabs__tab.is-active { color: var(--olive-800); border-block-end-color: var(--olive-800); }
	.atheer-tabs.is-ready .atheer-tabs__panel { border: 0; }
	.atheer-tabs.is-ready .atheer-tabs__panel:not(.is-active) { display: none; }
	.atheer-tabs.is-ready .atheer-tabs__acc { display: none; }
	.atheer-tabs.is-ready .atheer-tabs__panel.is-active .atheer-tabs__body { display: block; padding-block: var(--space-5) 0; }
	.atheer-tabs__body { max-width: 75ch; }
	.atheer-tabs__body:has(#reviews) { max-width: none; }
}

/* Attributes table ("المواصفات"). */
.woocommerce-product-attributes { width: 100%; max-width: 640px; border: 1px solid var(--line); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; overflow: hidden; background: var(--white); }
.woocommerce-product-attributes th, .woocommerce-product-attributes td { padding: var(--space-3) var(--space-4); text-align: start; vertical-align: top; border-block-end: 1px solid var(--line); }
.woocommerce-product-attributes tr:last-child th, .woocommerce-product-attributes tr:last-child td { border-block-end: 0; }
.woocommerce-product-attributes th { width: 35%; background: var(--cream-100); color: var(--ink-600); font-weight: 600; }
.woocommerce-product-attributes td p { margin: 0; }

/* ---------- Reviews ---------- */
#reviews .woocommerce-Reviews-title { font-size: var(--text-lg); margin-block-end: var(--space-4); }
#reviews .woocommerce-noreviews { color: var(--ink-600); }
#reviews ol.commentlist { margin: 0 0 var(--space-6); padding: 0; list-style: none; display: grid; gap: var(--space-4); }
#reviews ol.commentlist li { margin: 0; }
#reviews .comment_container { display: flex; gap: var(--space-3); padding: var(--space-4); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
#reviews .comment_container img.avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--cream-100); }
#reviews .comment-text { flex: 1; min-width: 0; }
#reviews .comment-text .meta { margin: var(--space-1) 0; color: var(--ink-600); font-size: var(--text-sm); }
#reviews .comment-text .woocommerce-review__author { color: var(--ink-900); font-weight: 700; }
#reviews .comment-text .description p:last-child { margin: 0; }
#reviews .woocommerce-review__verified { color: var(--olive-600); font-style: normal; }

#review_form_wrapper { max-width: 640px; padding: var(--space-5); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); }
#review_form .comment-reply-title { display: block; margin-block-end: var(--space-3); font-family: var(--font-head); font-size: var(--text-lg); font-weight: 700; color: var(--olive-800); }
#review_form .comment-notes, #review_form .comment-form-cookies-consent { color: var(--ink-600); font-size: var(--text-md); }
#review_form .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: var(--space-2); }
#review_form .comment-form-cookies-consent input { width: 22px; height: 22px; margin-block-start: 3px; flex: none; }
#review_form .comment-form-cookies-consent label { font-weight: 400; margin: 0; }
#review_form p { margin-block-end: var(--space-4); }
#review_form .form-submit { margin: 0; }
#review_form .form-submit input[type="submit"] { min-height: var(--tap); padding: 0 var(--space-6); border-radius: var(--radius-pill); border: 1px solid var(--olive-800); background: var(--olive-800); color: var(--ivory); font-weight: 600; cursor: pointer; }
#review_form .form-submit input[type="submit"]:hover { background: var(--olive-700); }

/* Rating input: 5 big stars, each a 48 px tap target. */
#respond p.stars { margin: 0 0 var(--space-2); line-height: 0; }
#respond p.stars > span { display: inline-flex; gap: 2px; }
#respond p.stars a {
	display: inline-block; width: var(--tap); height: var(--tap);
	font-size: 0; color: transparent; text-decoration: none;
	background-color: var(--line);
	-webkit-mask: var(--atheer-star-mask) center / 36px 36px no-repeat;
	mask: var(--atheer-star-mask) center / 36px 36px no-repeat;
	transition: background-color 0.15s var(--ease);
}
#respond p.stars a:focus-visible { outline: none; background-color: var(--olive-600); }
#respond p.stars.selected span a { background-color: var(--star); }
#respond p.stars.selected span a.active ~ a { background-color: var(--line); }
#respond p.stars:hover span a,
#respond p.stars.selected:hover span a { background-color: var(--star); }
#respond p.stars span a:hover ~ a,
#respond p.stars.selected:hover span a:hover ~ a { background-color: var(--line); }

/* ---------- Related / upsells ---------- */
.atheer-wc--single .related, .atheer-wc--single .upsells { margin-block-start: var(--space-8); }
.atheer-wc--single .related > h2, .atheer-wc--single .upsells > h2 {
	display: flex; align-items: center; justify-content: center; gap: var(--space-4);
	margin-block-end: var(--space-6); font-size: var(--text-2xl); text-align: center;
}
.atheer-wc--single .related > h2::before, .atheer-wc--single .related > h2::after,
.atheer-wc--single .upsells > h2::before, .atheer-wc--single .upsells > h2::after {
	content: ""; flex: 0 1 72px; height: 18px;
	background: url("../icons/ornament-diamonds.svg") center / contain no-repeat;
}
.atheer-wc--single .related > h2::before, .atheer-wc--single .upsells > h2::before { transform: scaleX(-1); }

/* "منتجات مقترحة لك" under the buy area: 3 mini cards with a tick, a total and one button. */
.atheer-wc--single .atheer-related { margin-block-start: var(--space-4); padding-block: var(--space-5) 0; border-block-start: 1px solid var(--line); }
.atheer-related .atheer-related__title { margin-block-end: var(--space-4); }
.atheer-related .atheer-related__title h2 { font-size: var(--text-xl); }
.atheer-bundle { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.atheer-bundle__item {
	position: relative; min-width: 0; padding: 6px;
	background: var(--white); border: 1px solid var(--line); border-radius: 14px;
	transition: border-color 0.2s var(--ease), opacity 0.2s var(--ease);
}
.atheer-bundle__item:hover { border-color: var(--gold); }
.atheer-bundle__item.is-off { opacity: 0.55; }
.atheer-bundle__link { display: flex; flex-direction: column; height: 100%; color: var(--ink-900); text-decoration: none; }
.atheer-bundle__media { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 10px; background: var(--cream-100); }
.atheer-bundle__media img { width: 100%; height: 100%; object-fit: cover; }
.atheer-bundle__name {
	margin-block-start: var(--space-2); padding-inline: 2px;
	font-size: 0.8125rem; font-weight: 600; line-height: 1.4;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.atheer-bundle__size { padding-inline: 2px; color: var(--ink-600); font-size: 0.75rem; line-height: 1.5; }
.atheer-bundle__price { margin-block-start: auto; padding: 2px 2px 2px; font-family: var(--font-head); font-size: 1.0625rem; font-weight: 700; color: var(--olive-800); line-height: 1.4; }

/* The tick sits on the photo; the label around it keeps a comfortable tap area. */
.atheer-bundle__check {
	position: absolute; z-index: 2; inset-block-start: 2px; inset-inline-start: 2px;
	display: grid; place-items: center; width: 40px; height: 40px; margin: 0; cursor: pointer;
}
.atheer-bundle__check input {
	width: 24px; height: 24px; min-height: 0; margin: 0; padding: 0;
	background: var(--white); border: 1px solid var(--gold); border-radius: 7px;
	-webkit-appearance: none; appearance: none; cursor: pointer;
}
.atheer-bundle__check input:checked {
	background: var(--olive-800) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fffefb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat;
	border-color: var(--gold);
}
.atheer-bundle__check input:focus-visible { outline: 2px solid var(--olive-600); outline-offset: 2px; }

.atheer-bundle__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-block-start: var(--space-4); }
.atheer-bundle__total { display: flex; align-items: baseline; gap: var(--space-2); margin: 0; color: var(--ink-600); font-size: var(--text-sm); }
.atheer-bundle__total strong { font-family: var(--font-head); font-size: 1.375rem; color: var(--olive-800); }
.atheer-bundle__add { flex: 1 1 180px; max-width: 280px; min-height: 46px; font-size: var(--text-sm); }
.atheer-bundle__add.is-loading { opacity: 0.7; cursor: progress; }
.no-js .atheer-bundle__foot, .no-js .atheer-bundle__check { display: none; }
@media (min-width: 768px) {
	.atheer-bundle { gap: var(--space-4); max-width: 760px; margin-inline: auto; }
	.atheer-bundle__item { padding: var(--space-2); }
	.atheer-bundle__name { font-size: 0.9375rem; }
	.atheer-bundle__size { font-size: var(--text-xs); }
	.atheer-bundle__price { font-size: 1.25rem; }
	.atheer-bundle__foot { max-width: 760px; margin-inline: auto; margin-block-start: var(--space-5); }
}
/* ---------- Sticky buy bar (phones only) ---------- */
.atheer-buybar {
	position: fixed; z-index: 110;
	inset-inline: 0; inset-block-end: env(safe-area-inset-bottom, 0px);
	display: flex; align-items: center; gap: var(--space-3);
	padding: var(--space-2) var(--gutter);
	background: var(--white);
	border-block-start: 1px solid var(--line);
	box-shadow: var(--shadow);
	transform: translateY(calc(100% + var(--bottom-bar-h)));
	visibility: hidden;
	transition: transform 0.3s var(--ease), visibility 0.3s;
}
body.has-bottom-bar .atheer-buybar { inset-block-end: calc(var(--bottom-bar-h) + env(safe-area-inset-bottom, 0px)); }
.atheer-buybar.is-visible { transform: none; visibility: visible; }
.atheer-buybar__media { flex: none; width: 48px; height: 48px; border-radius: var(--radius-sm); overflow: hidden; background: var(--cream-100); }
.atheer-buybar__media img { width: 100%; height: 100%; object-fit: cover; }
.atheer-buybar__info { flex: 1; min-width: 0; }
.atheer-buybar__name { margin: 0; font-size: var(--text-sm); font-weight: 600; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atheer-buybar__opts { margin: 0; color: var(--ink-600); font-size: var(--text-xs); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atheer-buybar__price { font-size: var(--text-md); line-height: 1.3; }
.atheer-buybar__price del, .atheer-buybar__price del .amount { font-size: var(--text-xs); }
.atheer-buybar__btn { flex: none; min-height: var(--tap); padding-inline: var(--space-4); }
@media (min-width: 768px) {
	.atheer-buybar { display: none; }
}

@media (max-width: 767px) {
	.atheer-wc--single .related > h2, .atheer-wc--single .upsells > h2 { gap: var(--space-2); font-size: var(--text-xl); }
	.atheer-wc--single .related > h2::before, .atheer-wc--single .related > h2::after,
	.atheer-wc--single .upsells > h2::before, .atheer-wc--single .upsells > h2::after { flex-basis: 40px; }
}

/* =========================================================================
   Wishlist page (inc/wishlist.php, template-parts/product/wishlist-*.php)
   ========================================================================= */
.atheer-wl { min-inline-size: 0; }
.atheer-wl__notices:empty { display: none; }
.atheer-wl__notices { margin-block-end: var(--space-4); }
.atheer-wl__head {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4);
	margin-block-end: var(--space-5); padding-block-end: var(--space-3); border-block-end: 1px solid var(--line);
}
.atheer-wl__count { margin: 0; font-family: var(--font-head); font-size: var(--text-lg); font-weight: 700; color: var(--olive-800); line-height: var(--leading-tight); }
.atheer-wl__more {
	display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--tap);
	color: var(--olive-600); font-weight: 600; text-decoration: none;
}
.atheer-wl__more:hover { color: var(--olive-800); text-decoration: underline; }
.atheer-wl__more .atheer-icon { width: 18px; height: 18px; }
.atheer-pcard.is-removing { opacity: 0.45; pointer-events: none; transition: opacity 0.2s var(--ease); }

.atheer-wl-remove { display: block; align-self: stretch; inline-size: 100%; margin: var(--space-2) 0 0; }
.atheer-wl-remove__full { display: none; }
@media (min-width: 768px) {
	.atheer-wl-remove__full { display: inline; }
	.atheer-wl-remove__short { display: none; }
}
.atheer-wl-remove__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1);
	inline-size: 100%; min-height: var(--tap); padding: var(--space-1) var(--space-2);
	background: transparent; border: 1px solid var(--line); border-radius: var(--radius-pill);
	color: var(--ink-600); font: inherit; font-size: var(--text-sm); font-weight: 600; line-height: 1.3; white-space: nowrap; cursor: pointer;
}
.atheer-wl-remove__btn:hover { border-color: var(--olive-600); color: var(--olive-800); background: var(--cream-100); }
.atheer-wl-remove__btn:focus-visible { outline: 2px solid var(--olive-600); outline-offset: 2px; }
.atheer-wl-remove__btn .atheer-icon { inline-size: 18px; block-size: 18px; flex: none; }
.atheer-wl-remove__btn[disabled] { opacity: 0.6; cursor: progress; }

.atheer-wl__empty .atheer-empty__title { font-size: var(--text-xl); line-height: var(--leading-tight); }
.atheer-wl__empty .atheer-empty__text { max-inline-size: 40ch; }
.atheer-wl__inline-heart { display: inline-flex; vertical-align: middle; color: var(--olive-600); }
.atheer-wl__inline-heart .atheer-icon { inline-size: 20px; block-size: 20px; }
