/* =========================================================================
   Atheer — cart: drawer, free-shipping bar, cart page, checkout, order received,
   my account and WooCommerce notices. Owner: cart builder.
   Tokens from base.css only. RTL with logical properties.
   ========================================================================= */

/* ---------- Shared pieces ---------- */
.atheer-card {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	padding: var(--space-5);
}
@media (min-width: 768px) { .atheer-card { padding: var(--space-6); } }
.atheer-card__title { font-size: var(--text-xl); margin-block-end: var(--space-4); }
.atheer-card__lead { color: var(--ink-600); margin-block: calc(-1 * var(--space-2)) var(--space-5); }

.atheer-totals { width: 100%; margin-block: var(--space-4); }
.atheer-totals th, .atheer-totals td { padding-block: var(--space-3); border-block-end: 1px solid var(--line); vertical-align: top; }
.atheer-totals th { text-align: start; font-weight: 500; color: var(--ink-600); white-space: nowrap; padding-inline-end: var(--space-3); }
.atheer-totals td { text-align: end; }
.atheer-totals .order-total th, .atheer-totals .order-total td { border-block-end: 0; padding-block-start: var(--space-4); color: var(--ink-900); font-weight: 700; font-size: var(--text-lg); }
.atheer-totals .order-total .amount { font-size: var(--text-xl); }
.atheer-totals .includes_tax { display: block; font-size: var(--text-sm); font-weight: 400; color: var(--ink-600); }
.atheer-ship-hint { color: var(--ink-600); font-size: var(--text-sm); }

.atheer-check { display: flex; align-items: center; gap: var(--space-3); min-height: var(--tap); font-weight: 500; cursor: pointer; margin: 0; }
.atheer-check input { inline-size: 22px; block-size: 22px; accent-color: var(--olive-800); flex: none; margin: 0; }

/* ---------- Cart count bubble: soft bump when the number changes ---------- */
@keyframes atheer-bump {
	0% { transform: scale(0.6); opacity: 0.4; }
	60% { transform: scale(1.18); opacity: 1; }
	100% { transform: scale(1); opacity: 1; }
}
.atheer-cart-count.is-bumped { animation: atheer-bump 0.45s var(--ease); }

/* ---------- Drawer ---------- */
html.atheer-drawer-open, html.atheer-drawer-open body { overflow: hidden; }

.atheer-drawer-overlay {
	position: fixed; inset: 0; z-index: 900;
	background: rgba(22, 41, 10, 0.45);
	opacity: 0; visibility: hidden;
	transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
}
.atheer-drawer-overlay.is-open { opacity: 1; visibility: visible; transition: opacity 0.3s var(--ease); }

.atheer-drawer {
	position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 910;
	display: flex; flex-direction: column;
	inline-size: min(380px, 80vw); block-size: 100%; block-size: 100dvh;
	background: var(--ivory);
	box-shadow: var(--shadow);
	transform: translateX(-100%);
	visibility: hidden;
	transition: transform 0.35s var(--ease), visibility 0s linear 0.35s;
	outline: none;
}
[dir="ltr"] .atheer-drawer { transform: translateX(100%); }
.atheer-drawer.is-open { transform: none; visibility: visible; transition: transform 0.35s var(--ease); }

.atheer-drawer__head {
	display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
	padding: var(--space-3) var(--space-5);
	border-block-end: 1px solid var(--line);
	background: var(--white);
}
.atheer-drawer__title { margin: 0; font-size: var(--text-xl); display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; }
.atheer-drawer__count { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; color: var(--ink-600); }
.atheer-drawer__close {
	display: inline-flex; align-items: center; gap: var(--space-2);
	min-height: var(--tap); padding: 0 var(--space-3);
	background: transparent; border: 0; border-radius: var(--radius-pill);
	color: var(--olive-800); font-weight: 600; font-size: var(--text-sm);
}
.atheer-drawer__close:hover { background: var(--cream-100); }
.atheer-drawer__close .atheer-icon { width: 22px; height: 22px; }

.atheer-drawer__body { flex: 1; display: flex; flex-direction: column; min-block-size: 0; }
.atheer-drawer__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: var(--space-4) var(--space-5); }
.atheer-drawer__message:empty { display: none; }
.atheer-drawer__message { margin: 0 0 var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); background: var(--cream-100); color: var(--ink-900); font-size: var(--text-md); }

.atheer-drawer__foot {
	padding: var(--space-4) var(--space-5) calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
	background: var(--white);
	border-block-start: 1px solid var(--line);
	display: grid; gap: var(--space-2);
}
.atheer-drawer__subtotal { display: flex; justify-content: space-between; align-items: baseline; margin: 0; font-size: var(--text-lg); font-weight: 600; }
.atheer-drawer__subtotal .amount { font-size: var(--text-xl); }
.atheer-drawer__note { margin: 0 0 var(--space-2); color: var(--ink-600); font-size: var(--text-md); line-height: 1.6; }
.atheer-drawer__cart-link {
	display: flex; align-items: center; justify-content: center; min-height: var(--tap);
	color: var(--olive-800); font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold-200);
}
.atheer-drawer__body.is-busy { opacity: 0.6; pointer-events: none; transition: opacity 0.2s var(--ease); }

/* Items in the drawer */
.atheer-mini-items { display: grid; gap: var(--space-3); }
.atheer-mini-item {
	display: grid; grid-template-columns: 88px 1fr; gap: var(--space-4);
	padding: var(--space-3); background: var(--white);
	border: 1px solid var(--line); border-radius: var(--radius);
}
.atheer-mini-item__img { display: block; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--cream-100); }
.atheer-mini-item__img img { width: 100%; height: 100%; object-fit: cover; }
.atheer-mini-item__info { min-inline-size: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.atheer-mini-item__name { margin: 0; font-weight: 600; line-height: var(--leading-tight); }
.atheer-mini-item__name a { color: var(--ink-900); text-decoration: none; }
.atheer-mini-item__meta { margin: 0; color: var(--ink-600); font-size: var(--text-sm); }
.atheer-mini-item__price { margin: 0; }
.atheer-mini-item__actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; margin-block-start: var(--space-1); }
.atheer-mini-item__remove {
	min-height: var(--tap); min-width: var(--tap); padding: 0 var(--space-3);
	background: transparent; border: 0; border-radius: var(--radius-pill);
	color: var(--sale); font-weight: 600; font-size: var(--text-sm);
	text-decoration: underline; text-underline-offset: 0.25em;
}
.atheer-mini-item__remove:hover { background: var(--danger-bg); }

/* Quantity buttons (drawer and cart page) */
.atheer-mini-qty, .atheer-step {
	display: inline-flex; align-items: center;
	border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--white);
}
.atheer-mini-qty__btn, .atheer-step__btn {
	display: inline-flex; align-items: center; justify-content: center;
	inline-size: var(--tap); block-size: var(--tap); padding: 0;
	background: transparent; border: 0; border-radius: var(--radius-pill);
	color: var(--olive-800);
}
.atheer-mini-qty__btn .atheer-icon, .atheer-step__btn .atheer-icon { width: 20px; height: 20px; }
.atheer-mini-qty__btn:hover:not(:disabled), .atheer-step__btn:hover:not(:disabled) { background: var(--cream-100); }
.atheer-mini-qty__btn:disabled, .atheer-step__btn:disabled { color: var(--ink-600); opacity: 0.45; cursor: not-allowed; }
.atheer-mini-qty__value { min-inline-size: 2ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Free-shipping bar ---------- */
.atheer-ship-bar { margin-block-end: var(--space-4); padding: var(--space-3) var(--space-4); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.atheer-ship-bar__text { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-2); font-size: var(--text-md); line-height: 1.6; color: var(--ink-900); }
@media (min-width: 768px) { .atheer-ship-bar__text { font-size: var(--text-md); } }
.atheer-ship-bar__text .atheer-icon { width: 22px; height: 22px; flex: none; color: var(--olive-600); }
.atheer-ship-bar__text strong { color: var(--olive-800); }
.atheer-ship-bar__track { position: relative; block-size: 6px; border-radius: var(--radius-pill); background: var(--cream-100); overflow: hidden; }
.atheer-ship-bar__fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: inherit; background: var(--olive-600); transition: inline-size 0.5s var(--ease); }

/* The drawer leaves room to tap outside it on phones, so its items sit tighter: quantity and remove stay on one line. */
@media (max-width: 480px) {
	.atheer-drawer__scroll { padding-inline: var(--space-3); }
	.atheer-drawer__foot { padding-inline: var(--space-4); padding-block-start: var(--space-3); }
	.atheer-drawer__note { margin-block-end: 0; font-size: var(--text-sm); }
	.atheer-drawer .atheer-ship-bar__text { font-size: var(--text-sm); }
	.atheer-mini-item { grid-template-columns: 64px 1fr; gap: var(--space-2); padding: var(--space-2); }
	.atheer-mini-qty__btn { inline-size: 44px; block-size: 44px; }
	.atheer-mini-item__remove { padding-inline: 0; }
}
.atheer-ship-bar.is-done { background: var(--olive-100); border-color: var(--olive-100); }
.atheer-ship-bar.is-done .atheer-ship-bar__text { color: var(--olive-800); font-weight: 600; }
.atheer-ship-bar.is-done .atheer-ship-bar__track { background: var(--white); }

/* ---------- Empty cart ---------- */
.atheer-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); padding-block: var(--space-6); }
.atheer-empty__mark { display: inline-flex; align-items: center; justify-content: center; inline-size: 88px; block-size: 88px; border-radius: 50%; background: var(--cream-100); color: var(--olive-600); margin-block-end: var(--space-3); }
.atheer-empty__mark .atheer-icon { width: 40px; height: 40px; }
.atheer-empty__title { margin: 0; font-family: var(--font-head); font-size: var(--text-xl); font-weight: 700; color: var(--olive-800); }
.atheer-empty__text { margin: 0 0 var(--space-3); color: var(--ink-600); max-inline-size: 32ch; }
.atheer-empty__btn { min-inline-size: 220px; }
.atheer-empty__or { margin: var(--space-5) 0 0; color: var(--ink-600); font-size: var(--text-sm); }
.atheer-empty__cats { display: grid; gap: var(--space-2); inline-size: 100%; max-inline-size: 360px; }
.atheer-empty__cats a {
	display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
	min-height: var(--tap); padding: var(--space-2) var(--space-4);
	background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-pill);
	color: var(--olive-800); font-weight: 600; text-decoration: none;
}
.atheer-empty__cats a:hover { border-color: var(--olive-600); }
.atheer-empty__cats .atheer-icon { width: 18px; height: 18px; color: var(--gold-700); }

/* ---------- Page shell (cart, checkout, account) ---------- */
.atheer-woo-page { padding-block: var(--space-5) var(--space-7); }
@media (min-width: 1024px) { .atheer-woo-page { padding-block: var(--space-6) var(--space-8); } }
.atheer-woo-page__head { margin-block-end: var(--space-5); }
.atheer-woo-page__title { font-size: var(--text-2xl); margin: 0; }
.atheer-woo-page__note { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: var(--space-2) 0 0; color: var(--ink-600); font-size: var(--text-sm); }
.atheer-woo-page__note .atheer-icon { width: 20px; height: 20px; color: var(--olive-600); }
.atheer-woo-page__dot { color: var(--gold-700); padding-inline: var(--space-1); }
.atheer-woo-page .woocommerce { min-inline-size: 0; }

/* ---------- Notices ---------- */
.atheer-woo-page .woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-error, .woocommerce-message, .woocommerce-info { font-size: var(--text-md); line-height: 1.7; }
.woocommerce-error { display: block; padding-inline-start: var(--space-5); }
.woocommerce-error li { padding-block: var(--space-1); }
.woocommerce-error li + li { border-block-start: 1px solid var(--line); }
.woocommerce-error a { color: inherit; font-weight: 600; }
.woocommerce-info { background: var(--cream-100); border-color: var(--line); }
.woocommerce-message a:not(.button), .woocommerce-info a:not(.button) { font-weight: 600; }
.woocommerce-message .button, .woocommerce-info .button { min-height: var(--tap); font-size: var(--text-sm); }
.woocommerce-NoticeGroup { grid-column: 1 / -1; }
.woocommerce-NoticeGroup .woocommerce-error:focus { outline: 2px solid var(--olive-600); outline-offset: 2px; }
.checkout-inline-error-message, .woocommerce-invalid .checkout-inline-error-message { margin: var(--space-2) 0 0; color: var(--sale); font-size: var(--text-sm); font-weight: 600; }
.woocommerce-store-notice, p.demo_store { display: none; }

/* ---------- Form rows (checkout and account) ---------- */
.atheer-woo-page .form-row { margin: 0 0 var(--space-4); padding: 0; }
.atheer-woo-page .form-row label:not(.atheer-check):not(.checkbox) { font-size: var(--text-md); }
.atheer-woo-page .form-row .optional { font-weight: 400; color: var(--ink-600); font-size: var(--text-sm); }
.atheer-woo-page .form-row .description { display: block; margin-block-start: var(--space-1); color: var(--ink-600); font-size: var(--text-sm); }
.atheer-woo-page .woocommerce-input-wrapper { display: block; }
.atheer-woo-page .input-text, .atheer-woo-page select, .atheer-woo-page textarea { min-height: 52px; font-size: var(--text-md); }
.atheer-woo-page textarea { min-height: 110px; }
.atheer-woo-page .woocommerce-invalid .input-text,
.atheer-woo-page .woocommerce-invalid select,
.atheer-woo-page .woocommerce-invalid .select2-selection { border-color: var(--sale); }
.atheer-woo-page .woocommerce-validated .input-text { border-color: var(--line); }
.atheer-hidden-field { display: none !important; }

/* Searchable governorate list (selectWoo) */
.atheer-woo-page .select2-container { inline-size: 100% !important; font-size: var(--text-md); }
.atheer-woo-page .select2-container--default .select2-selection--single {
	display: flex; align-items: center;
	block-size: 52px; padding-inline: var(--space-4) var(--space-6);
	background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.atheer-woo-page .select2-container--default .select2-selection--single .select2-selection__rendered { padding: 0; line-height: 1.4; color: var(--ink-900); }
.atheer-woo-page .select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--ink-600); }
.atheer-woo-page .select2-container--default .select2-selection--single .select2-selection__arrow { block-size: 50px; inset-inline-start: auto; inset-inline-end: var(--space-2); left: auto; right: auto; }
[dir="rtl"] .atheer-woo-page .select2-container--default .select2-selection--single .select2-selection__arrow { left: var(--space-2); }
.atheer-woo-page .select2-container--focus .select2-selection--single,
.atheer-woo-page .select2-container--open .select2-selection--single { border-color: var(--olive-600); box-shadow: 0 0 0 3px rgba(71, 112, 28, 0.18); }
.select2-dropdown { border-color: var(--line); border-radius: var(--radius-sm); overflow: hidden; font-family: var(--font-body); }
.select2-container--default .select2-search--dropdown .select2-search__field { min-height: var(--tap); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: var(--text-md); padding: var(--space-2) var(--space-3); }
.select2-results__option { padding: var(--space-3) var(--space-4); font-size: var(--text-md); min-height: var(--tap); }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected] { background: var(--olive-800); color: var(--ivory); }
.select2-container--default .select2-results__option[aria-selected="true"],
.select2-container--default .select2-results__option[data-selected="true"] { background: var(--olive-100); color: var(--ink-900); }
.select2-container--default .select2-results > .select2-results__options { max-block-size: 320px; }

/* ---------- Cart page ---------- */
.atheer-cart { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.atheer-cart__main, .atheer-cart__aside { min-inline-size: 0; }
@media (min-width: 1024px) { .atheer-cart { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--space-6); } }
.atheer-cart__count { margin: 0 0 var(--space-3); color: var(--ink-600); }

.atheer-cart-table { border: 0; }
.atheer-cart-table thead { display: none; }
.atheer-cart-table tbody { display: grid; gap: var(--space-3); }
.atheer-cart-table tr.cart_item {
	display: grid; grid-template-columns: 88px 1fr auto; column-gap: var(--space-4); row-gap: var(--space-2);
	grid-template-areas: "img name name" "img price remove" "img qty qty";
	padding: var(--space-4); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.atheer-cart-table td { display: block; padding: 0; border: 0; }
.atheer-cart-table .product-thumbnail { grid-area: img; }
.atheer-cart-table .product-thumbnail a, .atheer-cart-table .product-thumbnail img { display: block; inline-size: 88px; block-size: 88px; border-radius: var(--radius-sm); object-fit: cover; background: var(--cream-100); }
.atheer-cart-table .product-name { grid-area: name; font-weight: 600; line-height: var(--leading-tight); }
.atheer-cart-table .product-name a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--ink-900); text-decoration: none; }
.atheer-cart-table__size { display: block; margin-block-start: var(--space-1); color: var(--ink-600); font-size: var(--text-sm); font-weight: 400; }
.atheer-cart-table .product-name dl.variation { margin: var(--space-1) 0 0; font-size: var(--text-sm); font-weight: 400; color: var(--ink-600); }
.atheer-cart-table .product-name dl.variation dt, .atheer-cart-table .product-name dl.variation dd { display: inline; margin: 0; }
.atheer-cart-table .product-name dl.variation dd p { display: inline; margin: 0; }
.atheer-cart-table .product-price { display: none; }
.atheer-cart-table .product-subtotal { grid-area: price; }
.atheer-cart-table .product-quantity { grid-area: qty; }
.atheer-cart-table .product-remove { grid-area: remove; align-self: center; justify-self: end; }
.atheer-cart-table__remove {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: var(--tap); min-width: var(--tap); padding: 0 var(--space-3);
	color: var(--sale); font-weight: 600; font-size: var(--text-sm); border-radius: var(--radius-pill);
}
.atheer-cart-table__remove:hover { background: var(--danger-bg); color: var(--sale); }

.atheer-step .quantity { display: inline-flex; }
.atheer-step .quantity label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; margin: 0; }
.atheer-step .qty {
	inline-size: 3.2em; min-height: var(--tap); padding: 0;
	border: 0; background: transparent; box-shadow: none !important;
	text-align: center; font-weight: 700; direction: ltr;
	-moz-appearance: textfield; appearance: textfield;
}
.atheer-step .qty::-webkit-outer-spin-button, .atheer-step .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

@media (min-width: 768px) {
	.atheer-cart-table { display: table; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); border-collapse: separate; border-spacing: 0; overflow: hidden; }
	.atheer-cart-table thead { display: table-header-group; }
	.atheer-cart-table tbody { display: table-row-group; }
	.atheer-cart-table tr.cart_item { display: table-row; padding: 0; border: 0; background: none; }
	.atheer-cart-table th { padding: var(--space-3) var(--space-4); text-align: start; font-size: var(--text-sm); font-weight: 600; color: var(--ink-600); background: var(--cream-100); }
	.atheer-cart-table td { display: table-cell; padding: var(--space-4); vertical-align: middle; border-block-start: 1px solid var(--line); }
	.atheer-cart-table .product-thumbnail { inline-size: 120px; }
	.atheer-cart-table .product-thumbnail a, .atheer-cart-table .product-thumbnail img { inline-size: 88px; block-size: 88px; }
	.atheer-cart-table .product-price { display: table-cell; }
	.atheer-cart-table .product-subtotal { font-weight: 700; }
	.atheer-cart-table .product-remove { inline-size: 1%; white-space: nowrap; }
}

.atheer-cart__actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-3); margin-block-start: var(--space-4); }
html:not(.no-js) .atheer-cart__update { display: none; }
.atheer-coupon { flex: 1 1 280px; }
.atheer-coupon summary {
	display: inline-flex; align-items: center; min-height: var(--tap); cursor: pointer;
	color: var(--olive-600); font-weight: 600; text-decoration: underline; text-underline-offset: 0.25em; list-style: none;
}
.atheer-coupon summary::-webkit-details-marker { display: none; }
.atheer-coupon .coupon { padding-block-start: var(--space-2); }
.atheer-coupon__row { display: flex; gap: var(--space-2); }
.atheer-coupon__row .input-text { flex: 1; min-inline-size: 0; }
.coupon-error-notice { color: var(--sale); font-size: var(--text-md); margin: var(--space-2) 0 0; }

.atheer-cart__aside .cart_totals { position: relative; }
@media (min-width: 1024px) {
	.atheer-cart__aside { position: sticky; inset-block-start: calc(var(--header-h) + var(--space-4)); }
}
.atheer-cart-totals .atheer-ship-bar { background: var(--ivory); }
.atheer-cart-totals .atheer-ship-bar.is-done { background: var(--olive-100); }
.atheer-cart-totals__trust { display: flex; align-items: center; justify-content: center; gap: var(--space-2); margin: var(--space-3) 0 0; color: var(--ink-600); font-size: var(--text-sm); }
.atheer-cart-totals__trust .atheer-icon { width: 20px; height: 20px; color: var(--olive-600); }
.atheer-cart-empty { max-inline-size: 640px; margin-inline: auto; }

/* WooCommerce's blockUI overlay while updating */
.blockUI.blockOverlay { border-radius: inherit; }

/* ---------- Checkout ---------- */
.atheer-checkout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.atheer-checkout__main { min-inline-size: 0; }
@media (min-width: 1024px) { .atheer-checkout { grid-template-columns: minmax(0, 1fr) 420px; gap: var(--space-6); } }
.atheer-checkout__aside { min-inline-size: 0; }
@media (min-width: 1024px) { .atheer-checkout__aside { position: sticky; inset-block-start: calc(var(--header-h) + var(--space-4)); } }
.atheer-checkout .woocommerce-billing-fields__field-wrapper,
.atheer-checkout .woocommerce-additional-fields__field-wrapper { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--space-4); }
@media (min-width: 768px) {
	.atheer-checkout .woocommerce-billing-fields__field-wrapper { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.atheer-checkout .form-row-wide { grid-column: 1 / -1; }
}
.atheer-checkout .form-row-first, .atheer-checkout .form-row-last { float: none; inline-size: auto; }
.atheer-checkout .woocommerce-additional-fields { margin-block-start: var(--space-2); }
.atheer-checkout .woocommerce-account-fields { margin-block-start: var(--space-2); }
.atheer-checkout input[type="tel"] { text-align: start; direction: ltr; }
[dir="rtl"] .atheer-checkout input[type="tel"] { text-align: right; }
.atheer-checkout input[type="email"] { direction: ltr; text-align: right; }

/* Summary list */
.atheer-review__items { display: grid; gap: var(--space-3); margin-block-end: var(--space-4); }
.atheer-review__item { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: var(--space-3); }
.atheer-review__img { position: relative; display: block; inline-size: 64px; block-size: 64px; border-radius: var(--radius-sm); background: var(--cream-100); border: 1px solid var(--line); }
.atheer-review__img img { inline-size: 100%; block-size: 100%; object-fit: cover; border-radius: inherit; }
.atheer-review__qty {
	position: absolute; inset-block-start: -8px; inset-inline-end: -8px;
	display: inline-flex; align-items: center; justify-content: center;
	min-inline-size: 24px; block-size: 24px; padding-inline: 6px;
	border-radius: var(--radius-pill); background: var(--olive-800); color: var(--ivory);
	font-size: 0.8125rem; font-weight: 700; line-height: 1; box-shadow: 0 0 0 2px var(--white);
}
.atheer-review__name { font-weight: 600; line-height: var(--leading-tight); min-inline-size: 0; }
.atheer-review__size { display: block; margin-block-start: var(--space-1); font-weight: 400; font-size: var(--text-sm); color: var(--ink-600); }
.atheer-review__name dl.variation { margin: var(--space-1) 0 0; font-size: var(--text-sm); font-weight: 400; color: var(--ink-600); }
.atheer-review__name dl.variation dt, .atheer-review__name dl.variation dd, .atheer-review__name dl.variation p { display: inline; margin: 0; }
.atheer-review__price { white-space: nowrap; }
.atheer-review .atheer-ship-bar { background: var(--ivory); }
.atheer-ship-methods { margin: 0; }
.atheer-ship-methods li + li { margin-block-start: var(--space-2); }
.atheer-ship-methods label { display: inline; font-weight: 700; margin: 0; }
.atheer-ship-methods__free { color: var(--olive-800); font-weight: 700; }
.atheer-ship-methods__name { display: block; font-weight: 400; color: var(--ink-600); font-size: var(--text-sm); }

/* Payment */
.atheer-pay-title { font-size: var(--text-lg); margin: var(--space-5) 0 var(--space-3); }
.atheer-checkout #payment { background: none; }
.atheer-checkout .wc_payment_methods { display: grid; gap: var(--space-2); margin: 0 0 var(--space-4); }
.atheer-checkout .wc_payment_method {
	position: relative; padding: var(--space-4); border: 2px solid var(--olive-600); border-radius: var(--radius); background: var(--olive-100);
}
.atheer-checkout .wc_payment_method > label { display: flex; align-items: center; gap: var(--space-3); margin: 0; font-weight: 700; color: var(--olive-800); font-size: var(--text-lg); }
.atheer-checkout .wc_payment_method > label .atheer-icon { width: 28px; height: 28px; color: var(--olive-800); }
.atheer-checkout .wc_payment_methods .wc_payment_method:only-child > input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.atheer-checkout .payment_box { margin-block-start: var(--space-2); color: var(--ink-900); font-size: var(--text-md); }
.atheer-checkout .payment_box p { margin: 0; }
.atheer-checkout .woocommerce-privacy-policy-text, .atheer-checkout .woocommerce-terms-and-conditions-wrapper { font-size: var(--text-md); color: var(--ink-600); line-height: 1.7; }
.atheer-checkout .woocommerce-privacy-policy-text p { margin: 0 0 var(--space-3); }
.atheer-checkout .place-order { margin: 0; padding: 0; }
.atheer-checkout #place_order { inline-size: 100%; min-height: 60px; font-size: var(--text-lg); }
.atheer-pay-later { display: flex; align-items: center; justify-content: center; gap: var(--space-2); margin: var(--space-3) 0 0; color: var(--ink-900); font-size: var(--text-md); text-align: center; }
.atheer-pay-later .atheer-icon { width: 20px; height: 20px; color: var(--olive-600); flex: none; }
.woocommerce-form-coupon-toggle .woocommerce-info { background: var(--white); }
.woocommerce-form-coupon-toggle .showcoupon { display: inline-flex; align-items: center; min-height: var(--tap); padding-inline: var(--space-2); margin-block: calc((var(--tap) - 1.7em) / -2); }
.checkout_coupon { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-block-end: var(--space-5); }
.checkout_coupon .form-row { margin: 0; flex: 1 1 200px; }
.checkout_coupon .form-row-last { flex: 0 0 auto; }
.checkout_coupon .clear { display: none; }

/* ---------- Order received ---------- */
.atheer-thanks { display: grid; gap: var(--space-5); max-inline-size: 820px; margin-inline: auto; }
.atheer-thanks__head { text-align: center; padding-block: var(--space-7); }
.atheer-thanks__mark { display: inline-flex; align-items: center; justify-content: center; inline-size: 84px; block-size: 84px; border-radius: 50%; background: var(--olive-100); color: var(--olive-800); margin-block-end: var(--space-4); }
.atheer-thanks__mark .atheer-icon { width: 44px; height: 44px; }
.atheer-thanks__title { font-size: var(--text-2xl); margin-block-end: var(--space-3); }
.atheer-thanks__lead { color: var(--ink-600); font-size: var(--text-lg); margin-block-end: var(--space-5); }
.atheer-thanks__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }
.atheer-thanks__actions .btn { flex: 1 1 240px; max-inline-size: 320px; }
.atheer-thanks__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
@media (min-width: 768px) { .atheer-thanks__facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.atheer-thanks__facts li { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.atheer-thanks__facts span { color: var(--ink-600); font-size: var(--text-sm); }
.atheer-thanks__facts strong { font-size: var(--text-md); }

/* WooCommerce order details (thank-you page and "view order") */
.woocommerce-order-details, .woocommerce-customer-details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-sm); }
.woocommerce-customer-details { margin-block-start: var(--space-5); }
.woocommerce-order-details__title, .woocommerce-column__title { font-size: var(--text-xl); }
.woocommerce-table--order-details th, .woocommerce-table--order-details td { padding: var(--space-3) 0; border-block-end: 1px solid var(--line); text-align: start; vertical-align: top; }
.woocommerce-table--order-details td:last-child, .woocommerce-table--order-details tfoot td { text-align: end; }
.woocommerce-table--order-details thead th { color: var(--ink-600); font-size: var(--text-sm); font-weight: 600; }
.woocommerce-table--order-details tfoot tr:last-child th, .woocommerce-table--order-details tfoot tr:last-child td { border-block-end: 0; font-size: var(--text-lg); font-weight: 700; }
.woocommerce-table--order-details .product-quantity { font-weight: 600; color: var(--ink-600); }
.woocommerce-customer-details address { font-style: normal; line-height: 1.9; }
.woocommerce-customer-details--phone, .woocommerce-customer-details--email { margin: var(--space-2) 0 0; direction: ltr; text-align: end; }
.woocommerce-order-details .order-again { margin-block-start: var(--space-4); }

/* ---------- My account ---------- */
.atheer-login-lead { max-inline-size: 60ch; color: var(--ink-600); margin-block-end: var(--space-5); }
.atheer-login { display: grid; gap: var(--space-5); max-inline-size: 520px; }
.atheer-login--two { max-inline-size: none; }
@media (min-width: 768px) { .atheer-login--two { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.atheer-login__hint { color: var(--ink-600); font-size: var(--text-md); }
.atheer-login .lost_password { margin: var(--space-3) 0 0; }
.atheer-login .lost_password a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }
.atheer-login .woocommerce-form-login__rememberme { margin-block-end: var(--space-4); }
.atheer-woo-page .woocommerce-privacy-policy-text { font-size: var(--text-md); color: var(--ink-600); }

/* Logged-in account: compact head, latest order, list menu; slim side menu on desktop inner pages. */
.atheer-woo-page--account:has(.atheer-account) { padding-block-start: var(--space-4); }
.atheer-account { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.atheer-account__main { min-inline-size: 0; }
.atheer-account--dashboard .atheer-account__main { max-inline-size: 720px; }
/* Desktop dashboard: the menu at the start, the latest order beside it. */
@media (min-width: 1024px) {
	.atheer-account--dashboard .atheer-account__main { max-inline-size: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-6); align-items: start; }
	.atheer-account--dashboard .atheer-account__main > * { grid-column: 1 / -1; }
	.atheer-account--dashboard .atheer-account__main > .atheer-account-menu { grid-column: 1; grid-row: 3; }
	.atheer-account--dashboard .atheer-account__main > .atheer-last-order { grid-column: 2; grid-row: 3; }
}
.atheer-account-side { display: none; }
@media (min-width: 1024px) {
	.atheer-account--inner { grid-template-columns: 260px minmax(0, 1fr); gap: var(--space-6); }
	.atheer-account-side { display: block; position: sticky; inset-block-start: calc(var(--header-h) + var(--space-4)); }
}

.atheer-account-head { margin-block-end: var(--space-4); }
.atheer-account-head__title { font-size: var(--text-xl); margin: 0; }
.atheer-account-head__note { margin: var(--space-1) 0 0; color: var(--ink-600); font-size: var(--text-sm); }
.atheer-account-back {
	display: inline-flex; align-items: center; gap: var(--space-1);
	min-height: var(--tap); padding-inline-end: var(--space-3); margin-block-start: calc(-1 * var(--space-2));
	color: var(--olive-600); font-weight: 600; text-decoration: none;
}
.atheer-account-back .atheer-icon { width: 20px; height: 20px; flex: none; }
@media (min-width: 1024px) { .atheer-account-back { display: none; } }

/* Menu rows (dashboard list and desktop side menu) */
.atheer-account-rows { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.atheer-account-rows li + li { border-block-start: 1px solid var(--line); }
.atheer-account-row {
	display: flex; align-items: center; gap: var(--space-3);
	min-height: 64px; padding: var(--space-2) var(--space-4);
	color: var(--ink-900); text-decoration: none; line-height: 1.4;
	transition: background-color 0.2s var(--ease);
}
.atheer-account-row:hover { background: var(--ivory); color: var(--ink-900); }
.atheer-account-row__icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; flex: none; border-radius: 50%; background: var(--olive-100); color: var(--olive-600); }
.atheer-account-row__icon .atheer-icon { width: 20px; height: 20px; }
.atheer-account-row__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-inline-size: 0; }
.atheer-account-row__title { font-size: var(--text-md); font-weight: 600; }
.atheer-account-row__note { font-size: var(--text-sm); color: var(--ink-600); }
.atheer-account-row__arrow { width: 18px; height: 18px; flex: none; color: var(--ink-600); }
.atheer-account-row--logout, .atheer-account-row--logout:hover { color: var(--sale); }
.atheer-account-row--logout .atheer-account-row__title { font-weight: 500; }
.atheer-account-row--logout .atheer-account-row__icon { background: var(--danger-bg); color: var(--sale); }
.atheer-account-side .atheer-account-row { min-height: 52px; padding-block: var(--space-1); }
.atheer-account-side .atheer-account-row__icon { inline-size: 32px; block-size: 32px; }
.atheer-account-side .atheer-account-row__icon .atheer-icon { width: 18px; height: 18px; }
.atheer-account-side .atheer-account-row__note, .atheer-account-side .atheer-account-row__arrow { display: none; }
.atheer-account-side .atheer-account-row[aria-current="page"] { background: var(--olive-100); color: var(--olive-800); }
.atheer-account-side .atheer-account-row[aria-current="page"] .atheer-account-row__icon { background: var(--white); }

/* Order status label */
.atheer-status { display: inline-flex; align-items: center; padding: 1px var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: 600; line-height: 1.7; white-space: nowrap; }
.atheer-status--olive { background: var(--olive-100); color: var(--olive-800); }
.atheer-status--green { background: var(--olive-800); color: var(--ivory); }
.atheer-status--red { background: var(--danger-bg); color: var(--sale); }
.atheer-status--gold { background: var(--cream-100); color: var(--gold-700); box-shadow: inset 0 0 0 1px var(--gold-200); }
.atheer-status--muted { background: var(--cream-100); color: var(--ink-600); }
.atheer-dot { color: var(--gold-700); }

/* Latest order card (dashboard) */
.atheer-last-order { display: grid; gap: var(--space-1); margin-block-end: var(--space-4); padding: var(--space-3) var(--space-4) var(--space-1); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.atheer-last-order__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.atheer-last-order__title { margin: 0; font-family: var(--font-body); font-size: var(--text-md); font-weight: 700; color: var(--ink-900); }
.atheer-last-order__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; color: var(--ink-600); font-size: var(--text-sm); }
.atheer-last-order__link { display: inline-flex; align-items: center; gap: var(--space-1); justify-self: start; min-height: var(--tap); font-weight: 600; text-decoration: none; }
.atheer-last-order__link .atheer-icon { width: 18px; height: 18px; }

/* Orders: compact cards */
.atheer-orders { display: grid; gap: var(--space-3); }
@media (min-width: 768px) { .atheer-orders { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.atheer-order-card { display: grid; gap: var(--space-1); padding: var(--space-3) var(--space-4); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); min-inline-size: 0; }
.atheer-order-card__top, .atheer-order-card__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); }
.atheer-order-card__num { font-weight: 700; }
.atheer-order-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; color: var(--ink-600); font-size: var(--text-sm); }
.atheer-order-card__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.atheer-order-card__view, .atheer-order-card__action {
	display: inline-flex; align-items: center; gap: var(--space-1);
	min-height: var(--tap); padding-inline: var(--space-4);
	border: 1px solid var(--olive-800); border-radius: var(--radius-pill);
	color: var(--olive-800); font-weight: 600; text-decoration: none;
}
.atheer-order-card__view:hover, .atheer-order-card__action:hover { background: var(--olive-800); color: var(--ivory); }
.atheer-order-card__view .atheer-icon { width: 18px; height: 18px; }
.atheer-orders-pages { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-block-start: var(--space-4); }
.atheer-orders-empty { padding: var(--space-5); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }

/* Edit address: the page h1 already says "تعديل عنوان التوصيل"; WooCommerce's own h2 repeats it. */
.atheer-account__main > form > h2:first-child { display: none; }

/* One order */
.atheer-order-summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-block-end: var(--space-4); color: var(--ink-600); font-size: var(--text-sm); }
.atheer-order-updates__title { font-size: var(--text-lg); }
.atheer-order-updates { display: grid; gap: var(--space-3); margin-block-end: var(--space-5); }
.atheer-order-updates li { padding: var(--space-3) var(--space-4); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.atheer-order-updates__date { margin: 0; color: var(--ink-600); font-size: var(--text-sm); }
.atheer-order-updates__text p:last-child { margin: 0; }

/* Slim notices on the account pages */
.atheer-woo-page--account .woocommerce-message,
.atheer-woo-page--account .woocommerce-info,
.atheer-woo-page--account .woocommerce-error {
	gap: var(--space-2) var(--space-3); margin-block-end: var(--space-4);
	padding: var(--space-2) var(--space-4); border: 0; border-radius: var(--radius-sm);
	font-size: var(--text-sm); line-height: 1.6;
}
.atheer-woo-page--account .woocommerce-error { padding-inline-start: var(--space-4); }
.atheer-woo-page--account .woocommerce-error li { padding-block: 2px; }
.atheer-woo-page--account .woocommerce-message .button,
.atheer-woo-page--account .woocommerce-info .button {
	min-height: 40px; padding: var(--space-1) var(--space-4);
	background: transparent; border: 1px solid var(--olive-800); color: var(--olive-800); font-size: var(--text-sm);
}
.atheer-woo-page--account .woocommerce-info > .button:first-child { order: 2; margin-inline-start: 0; }
/* WooCommerce moves focus to a new notice (for screen readers); the ring around a text box only looks like a second border. */
.atheer-woo-page--account .woocommerce-message:focus,
.atheer-woo-page--account .woocommerce-info:focus,
.atheer-woo-page--account .woocommerce-error:focus { outline: none; }

/* Addresses and account details forms */
.woocommerce-Addresses { display: grid; gap: var(--space-4); }
.woocommerce-Address { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-5); }
.woocommerce-Address-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.woocommerce-Address-title h2, .woocommerce-Address-title h3 { font-size: var(--text-lg); margin: 0; }
.woocommerce-Address-title .edit { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }
.woocommerce-Address address { font-style: normal; line-height: 1.9; margin-block-start: var(--space-3); }
.woocommerce-address-fields__field-wrapper, .woocommerce-EditAccountForm { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--space-4); }
@media (min-width: 768px) {
	.woocommerce-address-fields__field-wrapper, .woocommerce-EditAccountForm { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.woocommerce-address-fields__field-wrapper .form-row-wide,
	.woocommerce-EditAccountForm .form-row-wide,
	.woocommerce-EditAccountForm fieldset,
	.woocommerce-EditAccountForm > p:not(.form-row-first):not(.form-row-last),
	.woocommerce-EditAccountForm > .clear { grid-column: 1 / -1; }
}
.woocommerce-EditAccountForm fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4) var(--space-5); margin: 0 0 var(--space-4); }
.woocommerce-EditAccountForm legend { font-weight: 700; padding-inline: var(--space-2); }
.woocommerce-EditAccountForm em { display: block; font-style: normal; color: var(--ink-600); font-size: var(--text-sm); margin-block-start: var(--space-1); }
.atheer-woo-page .clear { display: none; }
.woocommerce-MyAccount-content mark { background: var(--olive-100); color: var(--ink-900); padding-inline: var(--space-1); border-radius: 4px; }

/* ---------- Single product: AJAX add to cart ---------- */
.single_add_to_cart_button.is-loading { opacity: 0.75; cursor: progress; }
.atheer-add-error { flex-basis: 100%; margin: var(--space-3) 0 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); background: var(--danger-bg); color: var(--sale); font-size: var(--text-md); }
.atheer-add-error:empty { display: none; }

/* base.css gives button.button a transparent border (higher specificity than .btn--outline): put the outline back. */
.atheer-woo-page button.btn--outline { border-color: var(--olive-800); background: transparent; color: var(--olive-800); }
.atheer-woo-page button.btn--outline:hover { background: var(--olive-800); color: var(--ivory); }

/* WooCommerce's "show password" button (its own CSS is off). */
.atheer-woo-page .password-input { position: relative; display: block; }
.atheer-woo-page .password-input .input-text { padding-inline-end: 84px; }
.atheer-woo-page .show-password-input {
	position: absolute; inset-block: 2px; inset-inline-end: 2px;
	display: inline-flex; align-items: center; justify-content: center;
	min-inline-size: 76px; padding: 0 var(--space-3);
	background: transparent; border: 0; border-radius: var(--radius-sm);
	color: var(--olive-600); font-size: var(--text-sm); font-weight: 600;
}
.atheer-woo-page .show-password-input::after { content: "إظهار"; }
.atheer-woo-page .show-password-input.display-password::after { content: "إخفاء"; }
.atheer-woo-page .show-password-input:hover { background: var(--cream-100); }
