/* MarkGallery child overrides — added per step. */

/* ------------------------------------------------------------------
 * Global font pairing
 *
 * Two families, one job each:
 *
 *   --mg-font-display   Arad      headings, product titles, section labels
 *   --mg-font           Estedad   body copy, prices, buttons, forms
 *
 * Both variables are defined once in assets/fonts.css next to the @font-face
 * rules, so changing the pairing is an edit there — no rule below names a
 * family and nothing here needs touching.
 *
 * The parent theme hardcodes `font-family: "Vazirmatn", Tahoma, ...` on
 * `body` (main.css line 6) and a separate stack on product titles (main.css
 * line 527). Restating both here is deliberate: child.css loads after
 * brand-main, so these win on cascade order without `!important` everywhere.
 *
 * Deliberately NOT using `*` or `html *`: that also repaints the WordPress
 * admin bar and plugin UI that ship their own icon fonts, where a swap turns
 * the glyphs into empty boxes.
 * ------------------------------------------------------------------ */
body,
body button,
body input,
body select,
body textarea {
	font-family: var(--mg-font, "Estedad", Tahoma, Arial, sans-serif);
}

/* Headings and everything that reads like one. The product title is listed
 * explicitly because WooCommerce prints it outside the heading hierarchy on
 * single-product pages, and the SEO guide headings because that block
 * restates font-size and would otherwise inherit the body face. */
h1, h2, h3, h4, h5, h6,
.site-title,
.logo-text,
.product_title,
.woocommerce-loop-product__title,
.mg-panel__title,
.mg-card__title,
.mg-cat-seo h2,
.mg-cat-seo h3 {
	font-family: var(--mg-font-display, var(--mg-font));
}

/* The parent already gives product titles a display face, so this keeps that
 * intent while following the switch instead of a hardcoded family name. */
.single-product .summary .product_title,
.single-product div.product .product_title {
	font-family: var(--mg-font-display, var(--mg-font)) !important;
}

/* Product name length, not viewport, is what decides this size.
 *
 * The parent scales the single-product title with clamp(24px, 2.4vw, 32px)
 * (main.css:546). With the longest names in the catalogue — "بافت سلانیک
 * نیم‌زیپ یقه‌ایستاده قهوه‌ای" and its siblings run to 39 characters — that
 * clamp ran out of room in the summary column and pushed the colour onto a
 * second line, which read as a break rather than a wrap.
 *
 * One fixed size for every product name fixes that without reflowing the page
 * per product: 22px keeps the whole longest name on one line from roughly
 * 1000px upwards, and because it is a single value (not a vw scale) every
 * product keeps the same size at the same window width. Phones keep the 20px
 * set in product-mobile.css; below about 1000px the longest names still take
 * two lines, which is the honest limit of the column rather than a defect. */
@media (min-width: 768px) {
	.single-product .summary .product_title,
	.single-product div.product .product_title {
		font-size: 22px;
		line-height: 1.6;
	}
}

/* -------------------------------------------------------------------------
 * HEADER WORDMARK — classic high-contrast serif
 *
 * The header used to read as an Arad 800 sans wordmark (heavy, modern), while
 * the footer was already Playfair. That left the two halves of the same brand
 * speaking two different type languages. This gives the header the serif, at a
 * light roman weight and wide tracking: thin hairlines, vertical stress, wide
 * airy caps — the classic-luxury register, not a bold logotype.
 *
 * WHY PLAYFAIR. The reference wordmark is a Didone-style face: high stroke
 * contrast, hairline horizontals, thin flat serifs. Playfair Display is the
 * closest face already licensed and self-hosted in this theme (assets/fonts/
 * playfair, OFL, 38KB latin, zero external requests). The other serif options
 * in the parent's customizer list (Cormorant, Cinzel) are pulled from
 * fonts.googleapis.com at runtime, which this project does not do.
 *
 * WEIGHT 500, NOT 400. At the 20-21px this sits at, 400's hairlines break up on
 * standard-DPI screens; 500 keeps the contrast readable while staying light.
 *
 * SCOPE: `.logo .logo-text` only — the header anchor. The footer (`.flogo`)
 * keeps the customizer's own Playfair 800 treatment and is not touched here.
 *
 * The negative inline-end margin cancels the trailing letter-space that CSS
 * adds after the last glyph. Without it the wordmark sits ~5px left of centre
 * inside its centred column, because the gap is part of the element's width.
 * ---------------------------------------------------------------------- */
.logo .logo-text {
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-weight: 500;
	font-size: 21px;
	letter-spacing: .25em;
	line-height: 1.15;
	text-transform: uppercase;
	/* The header's middle grid column is `auto`, sized from this text. With the
	 * space between the two words the string gained a break opportunity it never
	 * had as "MARKGALLERY", and the browser took it: measured, the wordmark
	 * wrapped to two lines inside a 214px column and pushed the header from 64px
	 * to 102px tall. nowrap keeps it on one line and lets the auto track size
	 * itself from the content. */
	white-space: nowrap;
	margin-inline-end: -.25em;
	/* A serif this fine gains nothing from faux-bolding. */
	font-synthesis: none;
}

/* ------------------------------------------------------------------
 * The header at phone size
 *
 * The wordmark and the four controls are the only way into the shop, and at
 * 14px / 19px they were the smallest marks on the screen. Both step up by about
 * 6–10%, which reads as "a little larger" without changing the bar's height:
 * the controls keep their 44px tap target and only the glyph inside grows.
 *
 * `.bar` becomes symmetric on purpose. The parent lays it out as
 * `auto 1fr auto`, which centres the wordmark only for as long as the two tool
 * groups happen to be equally wide — a cart badge on one side would push it off
 * centre. `1fr auto 1fr` keeps it centred whatever the groups contain.
 * ------------------------------------------------------------------ */
@media (max-width: 767px) {
	.bar {
		grid-template-columns: 1fr auto 1fr;
	}

	.logo .logo-text {
		font-size: 15px;
		letter-spacing: .2em;
		margin-inline-end: -.2em;
	}

	.ic svg {
		width: 21px;
		height: 21px;
	}

	/* The menu mark is three absolutely-placed lines, so it is re-spaced by hand
	 * rather than scaled: a transform would blur the 1px strokes. */
	.burger {
		width: 23px;
		height: 14px;
	}

	.burger i:nth-child(2) {
		top: 6.5px;
	}

	.burger i:nth-child(3) {
		top: 13px;
	}

	.open .burger i:nth-child(1),
	.open .burger i:nth-child(3) {
		top: 6.5px;
	}
}

/* ------------------------------------------------------------------
 * Drawer scroll lock — so the sticky header stops jolting
 *
 * The parent locks the page with `body.lock{overflow:hidden}` (main.css:78)
 * while the navigation drawer is open. That one declaration turns <body> into
 * the scroll container, and `.site-header` is `position:sticky;top:0`
 * (main.css:30). A sticky box is only pinned relative to the scroll container
 * that owns it: as soon as body becomes that container, the header is measured
 * against a box with no scroll offset and drops out of its pinned position —
 * which reads on a phone as the bar being tugged downwards for a moment every
 * time the menu opens.
 *
 * The lock moves to <html>, which is already the document's scroll container,
 * so pinning keeps working and the page simply stops scrolling.
 * `scrollbar-gutter` holds the space the desktop scrollbar occupied while it is
 * hidden, so nothing jumps sideways either when the drawer opens on desktop.
 * ------------------------------------------------------------------ */
body.lock {
	overflow: visible;
}

html:has(body.lock) {
	overflow: hidden;
	scrollbar-gutter: stable;
}

/* Browsers without :has() keep the parent's behaviour: the header may shift by
 * a few pixels there, but the page must never scroll behind the open drawer. */
@supports not selector(:has(*)) {
	body.lock {
		overflow: hidden;
	}
}

/* ------------------------------------------------------------------
 * Product gallery arrows — one SVG shape, painted with the current colour
 *
 * History, so nobody rebuilds the wrong thing: the arrows were the text glyphs
 * `‹` `›`, which are bidi-mirrored, so an RTL document painted them flipped.
 * They were then drawn from two borders — and a two-border chevron is not
 * symmetric with a shaft through it: the lower arm lands exactly on the line, so
 * the head reads as one arm plus a stray diagonal, and at the 18px size on a
 * phone it falls apart.
 *
 * So the arrow is a drawn polyline now, used as a mask so the colour still comes
 * from `currentColor` (and the disabled opacity keeps working). The shape cannot
 * be mirrored, the head is symmetric by construction, and it is crisp at any
 * pixel density because the browser rasterises the vector.
 *
 * Desktop: the arrows fade in while the pointer is over the image (180ms) and
 * stay out of the picture otherwise; keyboard focus brings them in as well. A
 * phone has no hover, so they are always visible there.
 * ------------------------------------------------------------------ */
.single-product .gal-arrow {
	--mg-gal-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 12' fill='none' stroke='%23000' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21%206H1M6%201.5L1%206l5%204.5'/%3E%3C/svg%3E");
	font-size: 0;               /* the typed glyph is replaced by the shape */
	color: #0a0a0a;
	background: currentColor;
	box-shadow: none;
	-webkit-mask: var(--mg-gal-arrow) center / 22px 12px no-repeat;
	mask: var(--mg-gal-arrow) center / 22px 12px no-repeat;
	-webkit-mask-mode: alpha;
	mask-mode: alpha;
	filter: drop-shadow(0 1px 2px rgba(255, 255, 255, .9));
}

/* «بعدی» sits on the left and points left; «قبلی» sits on the right and points
 * right. Physical sides on purpose: they match main.css's own
 * .gal-prev{right:10px} / .gal-next{left:10px}. */
.single-product .gal-prev {
	--mg-gal-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 12' fill='none' stroke='%23000' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1%206H21M16%201.5L21%206l-5%204.5'/%3E%3C/svg%3E");
}

@media (min-width: 768px) {
	.single-product .gal-arrow {
		opacity: 0;
		transition: opacity .18s ease;
	}

	.single-product .gal-stage:hover .gal-arrow,
	.single-product .gal-arrow:focus-visible {
		opacity: 1;
	}

	/* An arrow with nowhere to go still shows, but quietly. */
	.single-product .gal-stage:hover .gal-arrow:disabled {
		opacity: .35;
	}
}

@media (prefers-reduced-motion: reduce) {
	.single-product .gal-arrow {
		transition: none;
	}
}

/* Buttons are UI chrome rather than prose: they keep the body face so short
 * labels stay legible at small sizes. */
.mg-btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
	font-family: var(--mg-font, "Estedad", Tahoma, Arial, sans-serif);
}

/* ------------------------------------------------------------------
 * Parent SKU under the product title (inc/product-sku.php)
 *
 * A catalogue code is reference data, not a selling point: it sits under the
 * name in the summary, small and muted, so it can be read on the phone when a
 * customer quotes it without competing with the title or the price.
 *
 * Deliberately on its own line and without a box: the summary already has the
 * price, the size picker and the buy buttons; a badge would add weight this
 * store does not use anywhere else.
 *
 * The code itself is Latin and always LTR (dir="ltr" in the markup), so the
 * dash-separated groups stay in order inside the RTL page. The label is Persian
 * and keeps a normal tracking — no letter-spacing on Persian, per the project
 * rule that tracking is only ever applied to Latin uppercase.
 *
 * Colour: #6b6b6b on the white summary panel is ~5.3:1, which clears WCAG AA for
 * text this size while staying visually quiet.
 * ------------------------------------------------------------------ */
.single-product .mg-product-sku {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
	margin: 2px 0 14px;
	font-size: 13px;
	line-height: 1.7;
	color: #6b6b6b;
}

.single-product .mg-product-sku__label {
	letter-spacing: 0;
}

.single-product .mg-product-sku__label::after {
	content: ":";
	margin-inline-start: 2px;
}

.single-product .mg-product-sku__code {
	font-family: var(--mg-font, "Estedad", Tahoma, Arial, sans-serif);
	font-weight: 500;
	font-size: 13px;
	letter-spacing: .02em;
	color: var(--ink, #0a0a0a);
	unicode-bidi: isolate;
	white-space: nowrap;
}

/* Phones: keeps the same size rather than shrinking it — 13px is the floor here
 * because the code is short and monospaced-looking, and the summary already
 * steps down around it. */
@media (max-width: 767px) {
	.single-product .mg-product-sku {
		margin: 0 0 12px;
		font-size: 13px;
	}
	.single-product .mg-product-sku__code {
		font-size: 13px;
	}
}

/* ------------------------------------------------------------------
 * Category SEO guide: long-form copy rendered below the product grid.
 * Full-bleed inside the shop container, plain typography, no card.
 * Scoped to .mg-cat-seo so nothing else on the store is affected.
 *
 * NOTE: the parent theme centres every h2 globally
 * (h2{...text-align:center} in main.css). Everything inside this
 * block is forced back to right alignment, headings included, so the
 * whole guide reads right-to-left like the rest of the store.
 * ------------------------------------------------------------------ */
.mg-cat-seo {
	width: 100%;
	max-width: none;
	margin: 44px 0 0;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
	color: var(--ink, #0a0a0a);
	font-size: 15.5px;
	line-height: 2;
	letter-spacing: 0;
	word-spacing: .04em;
	direction: rtl;
	text-align: right;
}

/* Force right alignment on every descendant. The parent's centred h2
 * would otherwise win on specificity for the headings. */
.mg-cat-seo * {
	text-align: right;
}

.mg-cat-seo h2 {
	margin: 44px 0 14px;
	font-size: clamp(21px, 2.3vw, 26px);
	line-height: 1.6;
	font-weight: 700;
	letter-spacing: 0;
	text-align: right;
}

/* The very first heading sits right under the grid, so it needs less air. */
.mg-cat-seo > .mg-cat-seo__intro > h2:first-child {
	margin-top: 0;
}

.mg-cat-seo h3 {
	margin: 30px 0 10px;
	font-size: clamp(16px, 1.6vw, 17.5px);
	line-height: 1.75;
	font-weight: 700;
	letter-spacing: 0;
	text-align: right;
}

.mg-cat-seo p {
	margin: 0 0 18px;
	color: #1f1f1f;
	text-align: right;
}

.mg-cat-seo ul {
	margin: 0 0 20px;
	padding: 0 20px 0 0;
	list-style: none;
	text-align: right;
}

.mg-cat-seo li {
	position: relative;
	margin: 0 0 11px;
	padding: 0 18px 0 0;
	color: #1f1f1f;
	line-height: 1.95;
	text-align: right;
}

.mg-cat-seo li::before {
	content: "";
	position: absolute;
	right: 0;
	top: .85em;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--yellow, #f8c13b);
}

.mg-cat-seo strong {
	font-weight: 700;
}

/* Blocks flow as one continuous article: no separators, no boxes. */
.mg-cat-seo__block,
.mg-cat-seo__outro {
	margin: 0;
	padding: 0;
	border: 0;
}

.mg-cat-seo__intro p:last-child,
.mg-cat-seo__block > p:last-child,
.mg-cat-seo__outro > p:last-child {
	margin-bottom: 0;
}

@media (max-width: 640px) {
	.mg-cat-seo {
		margin-top: 30px;
		font-size: 14px;
		line-height: 1.95;
	}
	.mg-cat-seo h2 {
		margin: 28px 0 10px;
	}
	.mg-cat-seo h3 {
		margin: 20px 0 8px;
	}
}


/* -------------------------------------------------------------------------
 * Brand Style band — slim ink bar, English display line
 *
 * Layout history. The parent paints this band with var(--ink) at 30px of
 * vertical padding (main.css line 103), which reads as a heavy slab; here it
 * loses about half its height so it behaves like a quiet section divider
 * rather than a banner. Colour stays var(--ink, #0a0a0a) — pure black matches
 * the store's buttons and headings — so a palette change carries it along.
 *
 * 2026-11-25: the label is now English ("Mark Gallery Selects", set in
 * front-page.php), so the typographic treatment went back to the one this
 * style was always meant for: Playfair Display, uppercase, wide tracking.
 *
 * That treatment is gated behind :lang(en), and front-page.php tags the h2 with
 * lang="en" only while the title is Latin. Two things are at stake:
 *
 *   - Tracking. It is what makes an uppercase Latin band look considered
 *     instead of typed — and exactly what broke cursive joins when the label
 *     was Persian. Scoping it to the Latin case means the owner can retype the
 *     title in Persian in the customizer and get the previous, correct
 *     rendering back instead of five disconnected word-fragments.
 *   - Uppercase. text-transform, not an all-caps string in PHP, so the source
 *     title stays in title case and retyping it never produces a shouty string.
 *
 * Playfair is loaded from assets/fonts.css (Latin only, variable 400-900) and
 * named nowhere else, so it can never reach Persian text.
 * ---------------------------------------------------------------------- */

/* Base bar. No type personality of its own, so it is safe for either script. */
.band {
	background: var(--ink, #0a0a0a) !important;
	color: #fff !important;
	padding: 14px 0 !important;
	font-size: clamp(15px, 1.9vw, 20px) !important;
	letter-spacing: 0 !important;
	font-weight: 400 !important;
	line-height: 1.35;
	text-align: center;
	margin-top: 36px !important;
}

/* Latin display line. 500 rather than 300/400: Playfair at a light weight in
 * an all-caps setting goes hairline-thin in Windows-rendered Chrome and greys
 * out against black. 500 holds the white.
 *
 * letter-spacing also adds its space after the LAST letter, which drags a
 * centred line half a tracking-unit off centre; text-indent of the same value
 * puts it back. That correction only works left-to-right, so direction is
 * stated here rather than inherited from the fa-IR document. */
.band:lang(en) {
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-size: clamp(17px, 2.1vw, 23px) !important;
	font-weight: 500 !important;
	direction: ltr;
	text-transform: uppercase;
	letter-spacing: .22em !important;
	text-indent: .22em;
	font-feature-settings: "kern" 1;
}

/* A single hairline at the bottom replaces the old inset shadows. It is the
 * thin divider under the bar — 1px, low-contrast white so it reads as an edge
 * rather than a second element. */
.band {
	box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .14);
}

/* Phones. Tracking has to shrink before the type does: at 390px,
 * "MARK GALLERY SELECTS" at .22em plus the desktop size overflows the viewport.
 * .12em keeps the editorial feel and still fits one line down to ~340px; below
 * that the tracking tightens again rather than the type.
 *
 * Padding grows slightly instead of shrinking: Playfair's caps have a tall
 * cap-height, and at 7px the bar clipped their breathing room. */
@media (max-width: 767px) {
	.band {
		padding: 11px 0 !important;
		font-size: 15px !important;
		letter-spacing: 0 !important;
		margin-top: 22px !important;
	}
	.band:lang(en) {
		font-size: 16px !important;
		letter-spacing: .12em !important;
		text-indent: .12em;
	}
}

/* Very small phones. Size stays at the 15px floor — the tracking and padding
 * tighten instead of the type. */
@media (max-width: 380px) {
	.band {
		padding: 10px 0 !important;
		font-size: 15px !important;
	}
	.band:lang(en) {
		font-size: 15px !important;
		letter-spacing: .08em !important;
		text-indent: .08em;
	}
}

/* ------------------------------------------------------------------
 * Legibility pass
 *
 * The parent theme ships a 16px body but drops the elements that carry the
 * actual shopping information to 13–14px at weight 400: product names,
 * prices, the result count, buttons. On a phone at arm's length that reads as
 * fine print rather than a product line, which is exactly the complaint.
 *
 * These rules raise the informative elements and leave decorative chrome
 * (footer links, small print) alone. Weight goes to 500 for prices so the
 * number leads, and 600 for the product name so it reads as a title without
 * competing with the real headings in Arad.
 *
 * Sizes are stated in rem where it matters so a user who raises their
 * browser font size takes the whole scale with them.
 * ------------------------------------------------------------------ */

/* Product name in the grid: was 14px/400. It is the title of the card. */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price {
	font-weight: 600;
}

/* Product name: deliberately softer than the price. The price is the number a
 * shopper scans for, so it keeps full --ink; the name steps back to a mid-grey
 * (#5f5f5f ≈ 6:1 on white, still clears WCAG AA). */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 15.5px;
	line-height: 1.55;
	color: #5f5f5f;
}

/* Price: was 14px/400 in a muted grey. Heavier and darker so it reads first.
 *
 * Centred under the name, matching the quick-add "+" that already sits centred
 * below it. The card's other text (name, badges) stays start-aligned, so this is
 * the number's own line rather than a change to the card's alignment. */
.woocommerce ul.products li.product .price {
	font-size: 14.5px;
	font-weight: 600;
	color: var(--ink, #0a0a0a);
	letter-spacing: 0;
	text-align: center;
}

/* Prices elsewhere (product page, cart, totals) get the same weight. */
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.woocommerce-Price-amount,
.cart_totals .amount {
	font-weight: 600;
}

/* "Showing all N results" and the sort dropdown: was 13px. */
.woocommerce-result-count,
.woocommerce-ordering select {
	font-size: 14px;
}

/* Buttons: was 13px/400. A call to action should not be the smallest type. */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit,
.button,
.search-form .button,
.mg-btn {
	font-size: 14.5px;
	font-weight: 500;
	letter-spacing: 0.01em;
}

/* Product-page tab labels and the short description body. */
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
	font-size: 15px;
	font-weight: 500;
}

.woocommerce div.product .woocommerce-product-details__short-description,
.woocommerce-Tabs-panel {
	font-size: 15.5px;
	line-height: 1.95;
}

/* Variation labels ("رنگ", "سایز") are read while choosing, so they matter. */
.summary table.variations label,
.woocommerce div.product form.cart .variations th,
.woocommerce div.product form.cart .variations td {
	font-size: 14.5px;
	font-weight: 500;
}

/* Phones: the name steps down a hair so a long title does not wrap. The price
 * needs nothing here — mobile.css already sets it to 14px at ≤767px, and the
 * centring below applies at every width. */
@media (max-width: 767px) {
	.woocommerce ul.products li.product .woocommerce-loop-product__title {
		font-size: 15px;
	}

	.woocommerce a.button,
	.woocommerce button.button,
	.woocommerce input.button,
	.button {
		font-size: 14px;
	}
}

/* ------------------------------------------------------------------
 * Specificity fix for the buttons
 *
 * The parent declares the shop button font-size on a seven-selector list
 * (main.css line 143). My legibility rule used a shorter list, so it lost on
 * specificity even though it came later in the cascade and the buttons stayed
 * at 13px. Repeating the parent's own selector shape is what wins here — not
 * another !important.
 * ------------------------------------------------------------------ */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce ul.products li.product .button,
.search-form .button,
.button,
.mg-btn {
	font-size: 14.5px;
	font-weight: 500;
	letter-spacing: 0.01em;
}

/* ------------------------------------------------------------------
 * Cart table legibility
 *
 * The cart shipped its line prices and totals at 12px, which is the smallest
 * type on the whole site and sits right where a shopper makes the decision.
 * These are the table cells WooCommerce styles inside .shop_table; the parent
 * sets 12px on td/ th generally, so the override names the same scope.
 * ------------------------------------------------------------------ */
.woocommerce table.shop_table td,
.woocommerce table.shop_table th,
.woocommerce table.shop_table td.product-price,
.woocommerce table.shop_table td.product-subtotal,
.woocommerce table.shop_table td.product-name,
.woocommerce-cart table.cart td.actions .coupon .input-text,
.cart_totals table td,
.cart_totals table th,
.cart_totals .amount {
	font-size: 14.5px;
}

.woocommerce table.shop_table td.product-subtotal,
.woocommerce table.shop_table td.product-price,
.cart_totals .amount {
	font-weight: 600;
}

.woocommerce table.shop_table td.product-name a {
	font-weight: 500;
}

/* Checkout and order-received tables get the same treatment, so a customer
 * never steps from 14.5px into 12px halfway through the funnel. */
.woocommerce-checkout table.shop_table td,
.woocommerce-checkout table.shop_table th,
.woocommerce-order table.shop_table td,
.woocommerce-order table.shop_table th {
	font-size: 14.5px;
}

/* ------------------------------------------------------------------
 * WooCommerce block-grid prices (cart cross-sells, related products)
 *
 * These are NOT the classic .woocommerce ul.products markup — they come from
 * WooCommerce's block templates and carry their own `wc-block-grid` classes,
 * which set 12px. The classic selectors above never reached them, which is
 * why the cart page still showed 12px prices after the first pass.
 * ------------------------------------------------------------------ */
.wc-block-grid__product-price,
.wc-block-grid__product-price .woocommerce-Price-amount,
.wc-block-grid__product-price .woocommerce-Price-currencySymbol,
.wc-block-grid .wc-block-grid__product-title,
.wc-block-grid__product .wp-block-woocommerce-product-price {
	font-size: 15.5px;
	line-height: 1.55;
}

.wc-block-grid__product-price,
.wc-block-grid__product-price .woocommerce-Price-amount {
	font-weight: 600;
	color: var(--ink, #0a0a0a);
}

.wc-block-grid .wc-block-grid__product-title {
	font-weight: 600;
}

@media (max-width: 767px) {
	.wc-block-grid__product-price,
	.wc-block-grid__product-price .woocommerce-Price-amount,
	.wc-block-grid .wc-block-grid__product-title {
		font-size: 15px;
	}
}

/* ------------------------------------------------------------------
 * Heading coverage fix
 *
 * The /branch/ page (and any page using a bespoke template rather than the
 * default one) renders a bare `<h1>` with no class. The parent theme styles
 * that element through its own `h1,h2,h3...` rule with a font-family it sets
 * further down the sheet, so the plain-element selector above lost.
 *
 * Repeating the element list with higher specificity — and covering bare
 * headings inside the content area — makes every heading on every template
 * resolve to Arad regardless of which template built the page.
 * ------------------------------------------------------------------ */
html body h1,
html body h2,
html body h3,
html body h4,
html body h5,
html body h6,
html body .entry h1,
html body .entry h2,
html body .entry h3,
html body main h1,
html body main h2,
html body main h3,
html body article h1,
html body article h2,
html body article h3 {
	font-family: var(--mg-font-display, var(--mg-font));
}

/* The brand-auth modals print their own h2 with .ba-t, and the parent gives
 * that class its own family. Match it so a modal never falls back to a Latin
 * face on a Persian heading. */
html body .ba-t {
	font-family: var(--mg-font-display, var(--mg-font));
}
/* ------------------------------------------------------------------
 * Hero banner: stop cutting off the top of the artwork
 *
 * The source art is 1.79:1 (2560x1429). The banner box is deliberately
 * left exactly as it is; only the crop anchor moves.
 *
 * `object-fit: cover` crops vertically only when the box is wider than
 * 1.79 (short desktop screens). The old default of `center` split that
 * crop evenly between top and bottom, which is what chopped the top off.
 * Anchoring to `top` means the loss always comes off the bottom, so the
 * model's head and the wordmark always stay in frame.
 *
 * Scoped to the hero so product images and tiles are unaffected.
 * ------------------------------------------------------------------ */
.hero .slide .bg,
.hero .slide img {
	object-position: center top;
}

/* ------------------------------------------------------------------
 * Product page: swap the two purchase buttons
 *
 * The parent theme (main.css 277-279) fills "افزودن به سبد خرید" with
 * var(--ink) and leaves "همین حالا خرید کنید" white. That puts the heavier
 * black weight on the secondary action. This block reverses the pair: buy-now
 * goes pure black, add-to-cart stays the lighter of the two.
 *
 * Done at the child level rather than editing the parent so a parent theme
 * update cannot silently undo it.
 *
 * Specificity notes, because the parent fights back — and the numbers matter:
 *
 *  - Parent base rule main.css 143 is `.woocommerce button.button.alt`, which
 *    is (0,3,1): two classes plus the `button` type. An earlier version of
 *    this block used `.summary .button.single_add_to_cart_button` (0,3,0) and
 *    LOST to it, so the "enabled charcoal" rule below never applied and
 *    add-to-cart stayed solid black. Every rule here that has to win is
 *    therefore written `.woocommerce .summary .button.<class>` at (0,4,0),
 *    which beats it on specificity rather than with !important.
 *  - Parent disabled rule main.css 447 carries !important at (0,3,2), so the
 *    disabled white below matches that with !important and outranks it on
 *    specificity (0,4,0 against 0,3,2).
 * ------------------------------------------------------------------ */

/* Primary action - buy now - solid ink, white label. The parent's base rule
 * has no !important, so (0,4,0) is enough here. */
.woocommerce .summary .button.buy-now {
	background: var(--ink, #0a0a0a);
	color: #fff;
	border: 1px solid var(--ink, #0a0a0a);
}

.woocommerce .summary .button.buy-now:hover {
	background: #fff;
	color: var(--ink, #0a0a0a);
}

/* Secondary action - add to cart. Two states matter here.
 *
 * main.css 444-449 is what makes this pair hard to style: it fills
 * `.woocommerce div.product form.cart .single_add_to_cart_button` with --ink
 * at (0,5,2) and !important, and it matches in EVERY state, the enabled one
 * included. That is why the "two buttons" ended up looking like two identical
 * black slabs: the intended charcoal never got a chance to apply. A child rule
 * without !important cannot touch it however specific it is, so the rules
 * below carry !important and sit above (0,5,2).
 *
 * The selectors use the real DOM order — .summary WRAPS form.cart, so
 * `form.cart` comes after `.summary` — and each one is verified to match the
 * button with el.matches in the browser rather than assumed.
 * `.woocommerce .summary.entry-summary form.cart .button...` is (0,6,1).
 *
 * States:
 *   no size chosen  stays exactly as the parent paints it — a dimmed dark
 *                   button. Deliberately NOT overridden: a white fill at the
 *                   parent's .4 opacity reads as an empty box, and this state
 *                   needs to stay obviously a button that is waiting for a size.
 *   size chosen     charcoal, not full black, so it stays visibly secondary
 *                   next to buy-now
 *   hover           full ink, matching the rest of the store's buttons
 */
.woocommerce .summary.entry-summary form.cart .button.single_add_to_cart_button:not(:disabled):not(.disabled) {
	background: #3a3a3a !important;
	color: #fff !important;
	border-color: #3a3a3a !important;
}

.woocommerce .summary.entry-summary form.cart .button.single_add_to_cart_button:not(:disabled):not(.disabled):hover {
	background: var(--ink, #0a0a0a) !important;
	color: #fff !important;
	border-color: var(--ink, #0a0a0a) !important;
}

/* ------------------------------------------------------------------
 * Equal type size and equal box on both buttons
 *
 * The two labels must read as one pair, so every value that affects their
 * type and padding is stated once, for both selectors, at a weight that
 * actually wins.
 *
 * Why the earlier attempt failed (measured in the browser, not guessed): the
 * rule here used to be `.summary .button.single_add_to_cart_button` at
 * (0,3,0). The legibility block further up this same file sets 14.5px on
 * `.woocommerce button.button.alt` at (0,3,1) — one class heavier — and
 * add-to-cart carries BOTH `.button` and `.alt`. So add-to-cart stayed at
 * 14.5px while buy-now, which has no `.alt` class, obeyed the 12px here. That
 * is the mismatch that made the two labels different sizes.
 *
 * Prefixing with `.woocommerce` lifts both selectors to (0,4,0), which beats
 * the 0,3,1 rule on specificity rather than with !important, and ties the
 * parent's `.single-product .summary .button.buy-now` (0,4,0) at 767px, where
 * child.css already loads later and so wins on source order.
 *
 * padding is unified too: add-to-cart was inheriting the parent's 10px 22px
 * while buy-now had 11px 12px, so the labels sat in visibly different boxes.
 * ------------------------------------------------------------------ */
.woocommerce .summary .button.single_add_to_cart_button,
.woocommerce .summary .button.buy-now {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	padding: 12px 16px;
	min-width: 0;
	white-space: nowrap;
}

/* ------------------------------------------------------------------
 * Phones: stack the purchase controls instead of squeezing them
 *
 * The single-product layout deliberately stays two columns on phones
 * (main.css 544-547), which leaves the summary about 179px wide at a 390px
 * viewport and roughly 144px at 320px. The parent lays the quantity stepper
 * and add-to-cart side by side, and the stepper alone takes 88px of that. The
 * button was then squeezed to 79px while its label still needed 141px, so the
 * text ran straight out past its border — that is the overflow fixed here.
 *
 * Forcing both buttons onto their own full-width rows removes the competition
 * for space entirely: quantity, then add-to-cart, then buy-now, each as wide
 * as the column. No magic numbers, so it holds at every phone width.
 * ------------------------------------------------------------------ */
@media (max-width: 767px) {
	.woocommerce .summary .button.single_add_to_cart_button,
	.woocommerce .summary .button.buy-now {
		flex: 1 1 100%;
		min-width: 0;
		font-size: 12.5px;
		padding: 11px 14px;
	}
}

/* The ripple used to be white because the button was dark. It now alternates
 * between white and charcoal, so currentColor keeps the wave visible in both
 * states instead of picking one and vanishing in the other. */
.summary .single_add_to_cart_button .mg-ripple {
	background: currentColor;
	--mg-ripple-peak: 0.22;
}

/* ------------------------------------------------------------------
 * Persian typography: tracking and the small-type floor
 *
 * Tracking. Every value below was copied from a Latin display style and breaks
 * Persian: added space between letters stops the joined forms of a word from
 * connecting (انتخاب → ا ن ت خ ا ب) and changes the meaning of the text for a
 * sighted reader. Persian has no use for letter-spacing, so it is zeroed on the
 * Persian-bearing selectors only. Latin-only chrome is left alone on purpose:
 * the wordmark (.logo-text, .flogo), the INSTAGRAM row (.soc) and the em-based
 * badges are Latin and their tracking is part of the design.
 *
 * Specificity, not !important, except where the parent already ships
 * !important: main.css line 103 and 386 set .band with !important, and
 * account.css reads its values from custom properties, so those two need a
 * changed source value rather than a competing declaration.
 *
 * Floor. 15px body copy on a 390px screen is the project rule. .band (2 sizes),
 * .tile figcaption, .home-title and the account eyebrows were under it — the
 * smallest, most contrast-stressed text on the page. Nothing decorative grew:
 * footer small print, badges and meta labels keep their size.
 * ------------------------------------------------------------------ */

.mg-cat-seo *,
.mg-cat-seo__intro *,
.mg-account,
.account-theme,
.mg-card__eyebrow,
.mg-panel__eyebrow,
.mg-contact__label,
.mg-contact__value,
.mg-foot-note,
.mg-about *,
.faq,
.mg-journal-page {
	letter-spacing: 0;
}

/* About/contact/account eyebrows and small print that hard-code the size
 * instead of reading a token. 13px is a step up from 11–11.5px but still
 * reads as secondary text. */
.mg-card__eyebrow,
.mg-panel__eyebrow,
.mg-foot-note {
	font-size: 13px;
}

/* The account cards' <small> lines ("وضعیت خریدهای خود را ببینید", the branch
 * address in the sidebar) render at the xs token, which is now 12px in
 * account-theme.css. On a phone that is still the smallest recurring text in
 * the account area, so the mobile floor applies here too. */
@media (max-width: 767px) {
	.mg-account small,
	.mg-account .mg-card__eyebrow,
	.mg-account .mg-panel__eyebrow,
	.mg-account .mg-foot-note,
	.mg-account .mg-stat small,
	.mg-account .mg-side__who small,
	.mg-account .mg-acc__linkText small {
		font-size: 13px;
		line-height: 1.8;
	}
}

/* Contact rows: the platform name was 11px with 1.1px tracking — the least
 * legible text on the page and a tracked Persian word at that. */
.mg-contact__label,
.mg-contact__value {
	font-size: 14px;
}

/* Category tiles carry the category name; 13px in white-on-photo was the
 * smallest text in the grid. 15px matches .band and the shop loop titles. */
.tile figcaption {
	font-size: 15px;
}

/* ==================================================================
 * MARK GALLERY SELECTS — the three picks as full-bleed image cards
 * ==================================================================
 * The row under the band used to be the plain shop loop: a photo with a
 * border, the name and price underneath, and a full-width button below
 * that. The owner asked for the "collection tile" look — photo fills the
 * card, dark veil at the bottom, name and price over the picture, an
 * arrow in the corner — with square corners, which is what the rest of
 * this store already uses.
 *
 * Everything here is scoped to .picks, the home section only. The shop
 * page, category pages, upsells and the related row keep the loop they
 * have. No PHP, no template override, no script: the markup being styled
 * is the one WooCommerce already prints (loop link > img + title + price,
 * with the add-to-cart button as a sibling), so nothing can break on a
 * WooCommerce update.
 *
 * Specificity: main.css styles these same elements at (0,4,3) and the
 * legibility pass in this file raised the title/price to the same weight.
 * The .picks + .woocommerce prefix takes every rule below to (0,5,3) or
 * higher, so it wins on specificity rather than on !important — the same
 * approach already used for the button text size further up this file.
 *
 * The one exception is the grid itself. main.css locks this row to three
 * columns and to a wide gap with !important at three breakpoints (its
 * "fill the sides" pass), so those two properties have to answer with
 * !important as well — including the parent's own [class*=columns-]
 * variant, otherwise its more specific selector would still win. Nothing
 * else here needs it.
 * ================================================================== */

.picks .woocommerce ul.products,
.picks .woocommerce ul.products[class*=columns-] {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: clamp(16px, 1.8vw, 26px) !important;
	margin-bottom: 0;
}

.picks .woocommerce ul.products li.product {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	background: #111;
	border: 0;
	border-radius: 0;
	text-align: right;
}

/* The loop link covers the whole card, so the whole picture is the target.
 * It is the positioned box the title and price are laid out against, which
 * keeps them inside the same stacking context as the veil and the arrow. */
.picks .woocommerce ul.products li.product > a.woocommerce-LoopProduct-link {
	position: absolute;
	inset: 0;
	display: block;
	color: #fff;
	text-decoration: none;
}

.picks .woocommerce ul.products li.product > a.woocommerce-LoopProduct-link img {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	aspect-ratio: auto;
	object-fit: cover;
	transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}

/* The veil. Weighted to the bottom so the Persian name and the price stay
 * readable over a pale studio shot and a dark garment alike. */
.picks .woocommerce ul.products li.product::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, .86) 0%,
		rgba(0, 0, 0, .55) 22%,
		rgba(0, 0, 0, .16) 46%,
		rgba(0, 0, 0, 0) 64%
	);
}

/* Name: two lines maximum, clamped, in the display face. The parent forces
 * nowrap + ellipsis for the loop; on a card a second line is better than a
 * cut-off tailoring name. */
.picks .woocommerce ul.products li.product .woocommerce-loop-product__title {
	position: absolute;
	inset-inline-start: 16px;
	inset-inline-end: 62px;
	bottom: 46px;
	z-index: 3;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	margin: 0;
	padding: 0;
	overflow: hidden;
	white-space: normal;
	font-family: var(--mg-font-display);
	font-size: clamp(15px, 1.25vw, 17px);
	line-height: 1.5;
	font-weight: 600;
	letter-spacing: 0;
	color: #fff;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
	transition: transform .38s cubic-bezier(.2, .7, .2, 1);
}

/* Price takes the place of the reference card's "120 pieces" line. The
 * digits are already Persian, so nothing is reformatted here.
 * `text-align:start` is deliberate: the catalogue cards centre their price, but
 * this one is an overlay line beside the name and the corner button, so it must
 * keep its own alignment. */
.picks .woocommerce ul.products li.product .price {
	position: absolute;
	inset-inline-start: 16px;
	inset-inline-end: 62px;
	bottom: 20px;
	z-index: 3;
	margin: 0;
	font-size: 13.5px;
	line-height: 1.4;
	font-weight: 500;
	letter-spacing: 0;
	color: rgba(255, 255, 255, .9);
	text-align: start;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
	transition: transform .38s cubic-bezier(.2, .7, .2, 1);
}

/* The corner action is the quick-view button, injected by
 * assets/js/quick-view.js — a pseudo-element cannot be clicked on its own,
 * and this control has to be a real button for the keyboard and for screen
 * readers. It keeps the hairline circle the site already uses. It is the
 * only thing in the card that does not navigate: the photo stays a plain
 * link to the product page. */
.picks .woocommerce ul.products li.product .mg-qv {
	position: absolute;
	inset-inline-end: 14px;
	bottom: 14px;
	z-index: 5;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .6);
	border-radius: 50%;
	background: rgba(0, 0, 0, .3);
	color: #fff;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	/* hidden at rest: the card is a photo first, and the control is a
	 * discovery for whoever is actually looking at it with a pointer */
	opacity: 0;
	transform: translateY(4px);
	pointer-events: none;
	transition: opacity .25s ease, transform .25s ease,
		background-color .25s, border-color .25s, color .25s;
}

/* revealed by pointing at the card, by keyboard focus anywhere inside it,
 * and whenever the button itself has focus */
@media (hover: hover) {
	.picks .woocommerce ul.products li.product:hover .mg-qv {
		opacity: 1;
		transform: none;
		pointer-events: auto;
	}
}

.picks .woocommerce ul.products li.product:focus-within .mg-qv,
.picks .woocommerce ul.products li.product .mg-qv:focus-visible {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.picks .woocommerce ul.products li.product .mg-qv svg {
	display: block;
	width: 15px;
	height: 15px;
}

/* The wording next to the magnifier. Decorative for assistive tech — the
 * button already carries the product-specific aria-label — and it is a
 * pseudo-pill rather than a real element so it can sit outside the circle
 * without clipping. */
.picks .woocommerce ul.products li.product .mg-qv-tip {
	position: absolute;
	/* inline-end is the left side on an RTL page, so `left: 100% + 8px`
	 * puts the pill to the right of the circle — inside the card, where it
	 * cannot be clipped by the card's own overflow. */
	inset-inline-end: calc(100% + 8px);
	bottom: 0;
	display: flex;
	align-items: center;
	height: 36px;
	padding: 0 10px;
	background: #fff;
	color: #0a0a0a;
	font-family: var(--mg-font, "Estedad", Tahoma, sans-serif);
	font-size: 11.5px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0;
	white-space: nowrap;
	opacity: 0;
	transform: translateX(-6px);
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease;
}

.picks .woocommerce ul.products li.product .mg-qv:hover .mg-qv-tip,
.picks .woocommerce ul.products li.product .mg-qv:focus-visible .mg-qv-tip {
	opacity: 1;
	transform: none;
}

.picks .woocommerce ul.products li.product .mg-qv:hover {
	background: #fff;
	border-color: #fff;
	color: #0a0a0a;
}

.picks .woocommerce ul.products li.product .mg-qv:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* The add-to-cart button is redundant here: the whole card already links to
 * the product, where the size is chosen. It is hidden rather than removed,
 * because WooCommerce keeps the product id on that element and the script
 * reads it. */
.picks .woocommerce ul.products li.product > a.button,
.picks .woocommerce ul.products li.product > a.added_to_cart {
	display: none;
}

@media (hover: hover) {
	.picks .woocommerce ul.products li.product:hover > a.woocommerce-LoopProduct-link img {
		transform: scale(1.06);
	}
}

/* Touch: no hover to reveal anything, so the control is visible from the
 * start and grows to the 44px minimum for a finger. The wording never
 * appears here — there is no pointing device to hover it with, and the
 * button's aria-label already names it. */
@media (hover: none) {
	.picks .woocommerce ul.products li.product .mg-qv {
		width: 44px;
		height: 44px;
		background: rgba(0, 0, 0, .42);
		opacity: 1;
		transform: none;
		pointer-events: auto;
	}
	.picks .woocommerce ul.products li.product .mg-qv svg {
		width: 17px;
		height: 17px;
	}
	.picks .woocommerce ul.products li.product .mg-qv-tip {
		display: none;
	}
}

/* Keyboard: a white frame with an ink rule just inside it, so the mark is
 * visible on a pale studio shot and on a black garment alike. It has to be
 * a pseudo-element rather than an outset outline or an inset shadow: the
 * photo is a positioned child, so a shadow on the link sits behind it, and
 * a single-colour ring vanished against one background or the other. z-index
 * 9 puts this above the veil (1) and the quick-view button (5). */
.picks .woocommerce ul.products li.product > a.woocommerce-LoopProduct-link:focus-visible {
	outline: none;
}

.picks .woocommerce ul.products li.product > a.woocommerce-LoopProduct-link:focus-visible::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 9;
	pointer-events: none;
	box-shadow:
		inset 0 0 0 3px #fff,
		inset 0 0 0 5px #0a0a0a;
}

/* Phones: one card per row. Three across at 390px left the Persian names
 * unreadable at 114px wide, which was the real cost of the old grid. */
/* The title and price repeat the .style-products class here on purpose:
 * mobile.css (which loads after this file) styles the same elements at
 * (0,5,2) and would otherwise pull the name back to 14px inside these
 * much larger cards. Same shape as that rule, one class heavier. */
@media (max-width: 767px) {
	.picks .woocommerce ul.products,
	.picks .woocommerce ul.products[class*=columns-] {
		/* Three products stacked one per row cost 1386px of vertical scroll on a
		 * 390px screen (measured: each card 362x453, tops at 713/1180/1646). A
		 * snapping row shows the same products in one swipe and leaves the next
		 * card peeking in, which is the cue that there is more to the side.
		 *
		 * `display:flex` beats the parent's grid on specificity alone — this
		 * selector carries one extra class. The gap needs !important because the
		 * desktop rule above it sets gap with !important. */
		display: flex;
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-ms-overflow-style: none;
		-webkit-overflow-scrolling: touch;
		gap: 12px !important;
		grid-template-columns: none !important;
	}

	.picks .woocommerce ul.products::-webkit-scrollbar {
		display: none;
	}

	.picks .woocommerce ul.products li.product {
		flex: 0 0 78%;
		max-width: 78%;
		scroll-snap-align: start;
	}

	.picks .woocommerce.style-products ul.products li.product .woocommerce-loop-product__title {
		bottom: 48px;
		font-size: 16px;
		line-height: 1.5;
	}
	.picks .woocommerce.style-products ul.products li.product .price {
		font-size: 14px;
		line-height: 1.4;
	}
}

@media (prefers-reduced-motion: reduce) {
	.picks .woocommerce ul.products li.product > a.woocommerce-LoopProduct-link img,
	.picks .woocommerce ul.products li.product .woocommerce-loop-product__title,
	.picks .woocommerce ul.products li.product .price,
	.picks .woocommerce ul.products li.product .mg-qv {
		transition: none;
	}
	.picks .woocommerce ul.products li.product:hover > a.woocommerce-LoopProduct-link img {
		transform: none;
	}
}

/* Breadcrumbs and the result count on a product page were 10–11px. They are
 * navigation, so they stay visually quiet — but at a size that can be read. */
.woocommerce .woocommerce-breadcrumb,
.single-product .woocommerce-breadcrumb {
	font-size: 13px;
	line-height: 1.8;
}

/* Variation labels are read while choosing a size; 11px on the label that
 * decides the purchase is below any acceptable floor. */
.summary table.variations label,
.woocommerce div.product form.cart .variations label {
	font-size: 14px;
}

/* Blocks/Gutenberg buttons on the cart and checkout ("انتخاب گزینه‌ها") shipped
 * at 10.875px. Two different sources:
 *   - the empty-cart "بازگشت به فروشگاه" button, which the block stylesheet
 *     sizes on the class chain;
 *   - the product grid rendered by the Product Collection block
 *     (.wc-block-grid__product-add-to-cart .add_to_cart_button), which is what
 *     appears in the "newest products" block on the cart and checkout pages.
 * Both are the same class of defect — a call to action smaller than body copy. */
.wc-block-cart .wp-block-button__link,
.wc-block-cart-items .wp-block-button__link,
.wc-block-components-button,
.wc-block-cart__submit-button,
.wp-block-woocommerce-cart .wp-block-button__link,
.wp-block-woocommerce-checkout .wp-block-button__link,
/* WooCommerce sets the grid item to 0.75em with a long selector chain
 * (all-products.css: ".wc-block-grid.has-4-columns:not(.alignwide):not(.alignfull)
 * .wc-block-grid__product"), which resolves to 11.25px and then cascades into
 * the 1em button. My first attempt copied that chain exactly — and lost, because
 * at equal specificity the later stylesheet wins and all-products.css loads
 * after child.css. One extra class on the item settles it without !important.
 * Measured at 390px: the button is 103px wide inside a 378px card, so a 15px
 * label still fits on one line and nothing reflows. */
.woocommerce .wc-block-grid.has-4-columns:not(.alignwide):not(.alignfull) .wc-block-grid__product,
.woocommerce .wc-block-grid.has-5-columns.alignfull .wc-block-grid__product,
.wp-block-woocommerce-cart .wc-block-grid.has-4-columns:not(.alignwide):not(.alignfull) .wc-block-grid__product,
.wp-block-woocommerce-cart .wc-block-grid.has-5-columns.alignfull .wc-block-grid__product {
	font-size: 15px;
}

/* ------------------------------------------------------------------
 * Close control for the navigation drawer
 *
 * The drawer opens from the hamburger, which then sits behind the panel, so
 * a phone shopper had no visible way out. assets/js/menu-close.js inserts the
 * button; this is only its shape and place.
 *
 * The search field gets inline-end padding so it never runs underneath the
 * button at any width — the drawer is ~300px wide on a phone.
 * ------------------------------------------------------------------ */
/* The drawer is `position:fixed; top:0`. While an admin is logged in the WP
 * toolbar sits at the very top with z-index 99999 and covered the first ~30px
 * of the panel — which cut the close button in half and made it look as if it
 * had slipped out of the panel's top edge. The panel now starts below the bar
 * exactly like `.site-header` does (parent main.css:31-32). */
body.admin-bar #panel {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar #panel {
		top: 46px;
	}
}

#panel .mg-panel-close {
	position: absolute;
	top: 12px;
	inset-inline-end: 12px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	background: #fff;
	border: 1px solid var(--line, #e9e9e9);
	border-radius: 50%;
	color: var(--ink, #0a0a0a);
	cursor: pointer;
}

/* the × is a 20px inline SVG; 16px keeps the mark light inside a smaller ring */
#panel .mg-panel-close svg {
	width: 16px;
	height: 16px;
}

#panel .mg-panel-close:hover {
	background: #f5f5f5;
}

#panel .mg-panel-close:focus-visible {
	outline: 2px solid var(--ink, #0a0a0a);
	outline-offset: 2px;
}

#panel .srch {
	padding-inline-end: 52px;
}

/* ------------------------------------------------------------------
 * Drawer accordion: the «+» mark and the category rows
 *
 * SYMMETRY. The parent builds the plus from two absolutely-placed bars
 * (main.css:64-67). The horizontal bar was centred by pulling it back half its
 * width (`margin:0 -6px`); the vertical one never got that correction, so it
 * started at the exact centre and grew to one side — the cross sat about half a
 * pixel right of centre, which is exactly what reads as "نامتقارن" at this size.
 * Both are centred the same way now, with a transform, and the strokes go from
 * 1px to 1.5px so the mark has a little more presence without becoming heavy.
 *
 * COLOUR. The category rows inside the open accordion were `--muted`, the
 * lightest text in the drawer, and they are the main way into the catalogue on
 * a phone. They use full ink now. The hover rule is restated at the same
 * specificity, otherwise the ID in the selector below would keep black text on
 * the black hover background.
 * ------------------------------------------------------------------ */
#panel .sub-toggle::before,
#panel .sub-toggle::after {
	transform: translate(-50%, -50%);
}

#panel .sub-toggle::before {
	width: 12px;
	height: 1.5px;
	margin: 0;
}

#panel .sub-toggle::after {
	width: 1.5px;
	height: 12px;
	margin: 0;
}

/* The mark must be white exactly when the row behind it is black.
 *
 * The row turns black from `.nav-list>li>a:hover` and `.sub-open>a` (parent
 * main.css:63); the mark itself inherits the li's ink colour. So it needs the
 * same trigger as the dark background, not a broader one:
 *   - `a:hover ~ .sub-toggle` — the pointer is on the row, which is black;
 *   - `.sub-open > .sub-toggle` — already handled by the parent.
 * An earlier attempt keyed this to `li:hover`, which also matches while the
 * pointer sits on the button itself — the row is white there, so the mark
 * turned white on white and looked as if it had disappeared. */
#panel .nav-list > li > a:hover ~ .sub-toggle {
	color: #fff;
}

#panel .nav-list .sub-menu a {
	color: var(--ink, #0a0a0a);
}

#panel .nav-list .sub-menu a:hover,
#panel .nav-list .sub-menu a:focus-visible {
	color: #fff;
}

/* ------------------------------------------------------------------
 * Account mark in the drawer footer
 *
 * assets/js/account-icon.js swaps the parent's outline glyph for a solid
 * Phosphor one (plain user when logged out, user with a check when a session is
 * open). The parent styles that svg as an outline — `fill:none` plus a 1.3px
 * stroke — which would leave a solid path as an empty box, so the fill/stroke
 * pair is inverted here. Size stays the parent's 14px and the colour follows the
 * row's white text via currentColor.
 * ------------------------------------------------------------------ */
#panel .pf svg[data-mg-account-icon="1"] {
	fill: currentColor;
	stroke: none;
}

/* ------------------------------------------------------------------
 * The floating support button must not paint over the drawer
 *
 * The header is `position:sticky; z-index:50`, which makes it a stacking
 * context. The drawer (`z-index:99`) and its scrim (`z-index:98`) live *inside*
 * that context, so their numbers only compete with each other — against the
 * rest of the page the whole header counts as 50.
 *
 * The plugin's support chooser (`details#mgt-support`) is `position:fixed;
 * z-index:90` and sits directly under `<body>`, outside the header. So it wins
 * against the whole header: when the drawer opened, the black chooser button
 * stayed on top of the panel and of the dimmed scrim, even though it sits below
 * the drawer in the DOM and looks like it should be behind it.
 *
 * Measured with elementFromPoint at the button's own centre — before this rule
 * the top element at 390, 768 and 1440 was the button itself, i.e. it really
 * did paint over the open drawer at every width, not only on phones.
 *
 * `body.lock` is the theme's own "a modal layer is open" state: the drawer and
 * the theme's modals both set it. Dropping the chooser under 50 puts it behind
 * the header's context, so it is covered by the scrim exactly like the rest of
 * the page — which is what "goes under the menu" should look like.
 *
 * Nothing changes while the menu is closed: no lock, no override, and the
 * button keeps its own z-index:90. The theme's modals are z-index:300 and
 * already covered it, so they are unaffected too.
 * ------------------------------------------------------------------ */
body.lock .mgt-support {
	z-index: 40;
}

.wc-block-grid__product-add-to-cart .wp-block-button__link,
.wc-block-grid__product-add-to-cart .add_to_cart_button {
	font-size: 15px;
	line-height: 1.6;
}

/* ------------------------------------------------------------------
 * Footer link columns sit centred, not against the right edge
 *
 * main.css centres the footer (`.site-footer{text-align:center}`) and then
 * overrides it on the three-column grid (`.fgrid{text-align:right}`) — while the
 * theme's own ≤900px block sets `.fgrid` back to `center`. So the footer was
 * centred on tablets and phones but hugged the right edge of each column on
 * desktop, which is the only place the three-column layout runs.
 *
 * The columns are equal (measured at 1440: 353.33px each across 170–1270), and
 * every link's right edge landed exactly on its column's right edge
 * (1250 / 896.7 / 543.3) with 120–260px of empty space beside it. Because the
 * two links in a column have different widths they did not share a left edge
 * either, so each pair read as a stray block floating in its third rather than
 * as a column.
 *
 * Fixed in the child theme, not the parent, so a theme update cannot undo it.
 * Specificity is untouched (`.fgrid`); the child stylesheet simply loads later.
 * ------------------------------------------------------------------ */
.fgrid {
	text-align: center;
}

