/*
Theme Name: Modrah Child
Theme URI: https://modrah.com
Description: قالب فرزند ووکامرس مدراه — پیاده‌سازی دیزاین‌سیستم «راهِ مد» روی Storefront.
Author: Modrah
Template: storefront
Version: 1.6.1
Text Domain: modrah-child
*/

/* ===================== Design tokens ===================== */
:root {
	--md-accent: #2145E6;
	--md-accent-dark: #1733AE;
	--md-accent-tint: #EBEFFD;
	--md-accent-soft: #7E96F5;
	--md-ink: #17191F;
	--md-ink-2: #5C6066;
	--md-ink-3: #9BA0A6;
	--md-bg: #F8F7F4;
	--md-bg-2: #F1F0EC;
	--md-line: #E8E6E0;
	--md-line-2: #C6C3BC;
	--md-surface: #FFFFFF;
	--md-success: #178A50;
	--md-success-tint: #E9F6EF;
	--md-warning: #B45309;
	--md-warning-tint: #FDF3E7;
	--md-danger: #C03A30;
	--md-danger-tint: #FBEAE9;
	--md-r-s: 8px;
	--md-r-m: 12px;
	--md-r-l: 16px;
	--md-shadow-sm: 0 1px 3px rgba(23, 25, 31, .08);
	--md-shadow-md: 0 4px 16px rgba(23, 25, 31, .10);
	--md-shadow-lg: 0 12px 32px rgba(23, 25, 31, .16);
	--md-font-fa: 'Vazirmatn', sans-serif;
	--md-font-la: 'DM Sans', sans-serif;
	--md-ease: cubic-bezier(.2, .8, .2, 1);
}

@keyframes mdPulse { 0% { box-shadow: 0 0 0 0 rgba(33,69,230,.35); } 70% { box-shadow: 0 0 0 10px rgba(33,69,230,0); } 100% { box-shadow: 0 0 0 0 rgba(33,69,230,0); } }
@keyframes mdPulseAmber { 0% { box-shadow: 0 0 0 0 rgba(180,83,9,.30); } 70% { box-shadow: 0 0 0 10px rgba(180,83,9,0); } 100% { box-shadow: 0 0 0 0 rgba(180,83,9,0); } }
@keyframes mdFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mdDrawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes mdSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes mdModalIn { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes mdShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(6px); } 75% { transform: translateX(-6px); } }
@keyframes mdDash { to { stroke-dashoffset: -20; } }
@keyframes mdSpin { to { transform: rotate(360deg); } }

/* ===================== Base / RTL ===================== */
/* Clamp page-level horizontal scroll on mobile. The rails, category nav,
   gallery and chips are their own overflow-x:auto scrollers, so this only
   kills the accidental page overflow (WC screen-reader region, a rail that
   escapes its container) — inner swipe-scrolling still works. On <html> it
   is position:sticky-safe (the header keeps sticking). */
html { direction: rtl; overflow-x: hidden; }
body,
body.woocommerce-page {
	margin: 0;
	max-width: 100%;
	background: var(--md-bg);
	font-family: var(--md-font-fa);
	color: var(--md-ink);
	-webkit-font-smoothing: antialiased;
	font-size: 16px;
	line-height: 1.9;
}
* { box-sizing: border-box; }
bdi, .md-latin {
	font-family: var(--md-font-la);
	direction: ltr;
	unicode-bidi: isolate;
}
h1, h2, h3, h4 { color: var(--md-ink); margin: 0; }
a { color: var(--md-accent); }
.md-container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* neutralize storefront chrome */
.storefront-breadcrumb, .site-header, .storefront-sorting select, #masthead,
.storefront-handheld-footer-bar, .site-footer { all: unset; }
.storefront-handheld-footer-bar { display: none !important; }
body.rtl .col-full, .col-full { max-width: none; padding: 0; margin: 0; }
.site-main { margin: 0; }
/* no sidebar anywhere — content always full width */
#secondary, .widget-area { display: none !important; }
#primary, .content-area { width: 100% !important; float: none !important; margin: 0 !important; }
/* plain pages (tracking, about, ...) get the standard container */
body.page .site-main { max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px; }
body.page .entry-title { font-size: 26px; font-weight: 800; margin-bottom: 16px; }

/* ===================== Single product layout (Storefront structure) ===== */
.single-product div.product {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); /* exactly two columns */
	gap: 24px 40px;
	max-width: 1080px;
	margin: 0 auto;
	padding: 24px 20px 48px;
	align-items: start;
}
/* explicit placement: image + summary share row 1 (RTL col 1 = right).
   Auto-placement was dropping them into separate rows because of the
   full-width tabs/related siblings. */
.single-product div.product > .md-gallery {
	grid-row: 1; grid-column: 1;
	width: 100%; max-width: 100%;
	position: sticky; top: 84px; /* image stays while the long summary scrolls */
}
.single-product div.product > .summary,
.single-product div.product > .entry-summary {
	grid-row: 1; grid-column: 2;
}
@media (max-width: 900px) {
	.single-product div.product { grid-template-columns: 1fr; gap: 20px; }
	.single-product div.product > .md-gallery,
	.single-product div.product > .summary,
	.single-product div.product > .entry-summary { grid-column: 1; }
	.single-product div.product > .md-gallery {
		/* relative, NOT static: only the sticky needs dropping here. Static made
		   div.product the containing block for the gallery's absolutely
		   positioned children, so the dots rendered ~1900px away at the foot of
		   the product block and the zoom hint anchored to the wrong box. */
		grid-row: 1; position: relative; max-width: 460px; margin: 0 auto;
	}
	.single-product div.product > .summary,
	.single-product div.product > .entry-summary { grid-row: 2; }
}
.single-product div.product .entry-summary,
.single-product div.product .summary {
	display: flex; flex-direction: column; gap: 14px;
	/* WC core gives .summary a percentage width + float, Storefront adds a
	   ~59px em-based margin-bottom that inflates the grid row — kill all */
	width: 100% !important; max-width: none !important; float: none !important;
	margin: 0 !important;
}
/* WooCommerce's clearfix pseudo-elements become EMPTY GRID ROWS here (each
   one adds a full row-gap of dead space before the related products); a grid
   container needs no float clearing */
.single-product div.product::before,
.single-product div.product::after { display: none; }
.single-product div.product .woocommerce-product-gallery { width: 100% !important; float: none !important; }
.single-product div.product .woocommerce-tabs,
.single-product div.product .related.products,
.single-product div.product .up-sells,
.single-product .mdr-other-colors { grid-column: 1 / -1; }
.single-product .entry-summary .product_title { display: none; } /* we render our own H1 */
.single-product span.onsale { display: none !important; } /* stray grid item */
.single-product .quantity { display: none; } /* one-of-a-kind purchases */
.single-product .single_add_to_cart_button {
	height: 48px; border: none; border-radius: var(--md-r-m); background: var(--md-accent);
	color: #fff; font-family: inherit; font-size: 15px; font-weight: 700; padding: 0 32px; cursor: pointer;
}
.single-product .single_add_to_cart_button:hover { background: var(--md-accent-dark); }
.single-product .single_add_to_cart_button.disabled { background: var(--md-line); color: var(--md-ink-3); }
.single-product table.variations { margin: 0; }
.single-product table.variations th.label { display: none; }
.single-product .woocommerce-variation-price { display: none; } /* price shown in our header */
.single-product .reset_variations { font-size: 12px; }
.related.products > h2, .up-sells > h2 { font-size: 20px; font-weight: 700; margin: 0 0 14px; text-align: right; }

/* ===================== Buttons ===================== */
.md-btn {
	height: 48px;
	padding: 0 24px;
	border: none;
	border-radius: var(--md-r-m);
	background: var(--md-accent);
	color: #fff !important;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	text-decoration: none !important;
	transition: background .2s;
}
.md-btn:hover { background: var(--md-accent-dark); }
.md-btn--ghost { background: transparent; border: 1.5px solid var(--md-ink); color: var(--md-ink) !important; font-weight: 600; }
.md-btn--ghost:hover { background: var(--md-ink); color: #fff !important; }
.md-btn--text { background: transparent; color: var(--md-accent) !important; font-weight: 600; height: 44px; }
.md-btn--text:hover { background: var(--md-accent-tint); }
.md-btn--success { background: var(--md-success); }
.md-btn--success:hover { background: #106B3D; }
.md-btn:disabled, .md-btn--disabled { background: var(--md-line); color: var(--md-ink-3) !important; cursor: not-allowed; }

/* ===================== Badges & chips ===================== */
.md-badge { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: var(--md-r-s); display: inline-block; width: fit-content; }
.md-badge--warn { background: var(--md-warning-tint); color: var(--md-warning); }
.md-badge--info { background: var(--md-accent-tint); color: var(--md-accent-dark); }
.md-badge--ok { background: var(--md-success-tint); color: var(--md-success); }
.md-badge--err { background: var(--md-danger-tint); color: var(--md-danger); }

.md-rate-chip {
	display: flex; align-items: center; gap: 8px;
	background: var(--md-accent-tint); border: 1px dashed var(--md-accent);
	border-radius: 999px; padding: 8px 16px; width: fit-content;
	font-size: 12px; font-weight: 600; color: var(--md-accent-dark);
}
.md-pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--md-accent); animation: mdPulse 2s infinite; flex-shrink: 0; }

/* ===================== Rate bar + header ===================== */
.md-rate-bar {
	background: var(--md-ink); color: #D7DAE0; font-size: 12px;
	display: flex; align-items: center; justify-content: center; gap: 8px;
	padding: 8px 16px; text-align: center;
}
.md-rate-bar strong { color: #fff; }
.md-rate-bar .md-pulse-dot { background: var(--md-accent-soft); width: 6px; height: 6px; }
.md-rate-bar span:last-child { min-width: 0; }
@media (max-width: 480px) {
	.md-rate-bar { font-size: 11px; line-height: 1.7; padding: 7px 12px; }
}

.md-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .92);
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--md-line);
}
.md-header__row {
	max-width: 1080px; margin: 0 auto; padding: 0 16px; height: 56px;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.md-header__group { display: flex; align-items: center; gap: 4px; }
.md-iconbtn {
	width: 44px; height: 44px; border: none; background: transparent; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	color: var(--md-ink); position: relative; border-radius: var(--md-r-m);
}
.md-iconbtn:hover { background: var(--md-bg-2); }
/* something in core/parent zeroes svg width inside <button>; pin it */
.md-iconbtn svg { width: 22px; height: 22px; flex-shrink: 0; display: block; }
.md-cart-badge {
	position: absolute; top: 4px; left: 4px; background: var(--md-accent); color: #fff;
	font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; padding: 0 3px;
	border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
}
.md-logo svg { height: 26px; display: block; }
.md-nav { border-top: 1px solid var(--md-line); }
.md-nav__inner {
	max-width: 1080px; margin: 0 auto; padding: 0 16px; height: 44px;
	display: flex; align-items: center; justify-content: center; gap: 4px;
	overflow-x: auto; scrollbar-width: none;
}
.md-nav__inner::-webkit-scrollbar { display: none; }
.md-nav__inner a {
	flex-shrink: 0; padding: 8px 14px; border-radius: 999px; text-decoration: none;
	color: var(--md-ink); font-size: 14px; font-weight: 600; transition: background .2s;
}
.md-nav__inner a:hover { background: var(--md-bg-2); }
.md-nav__inner a.md-nav--muted { color: var(--md-ink-2); font-weight: 500; }
.md-nav__inner a.md-nav__cta { background: var(--md-accent); color: #fff; font-weight: 700; }
.md-nav__inner a.md-nav__cta:hover { background: var(--md-accent-dark); }

/* --- category dropdowns (desktop) --- */
.md-nav__item { position: relative; flex-shrink: 0; }
.md-nav__item > a { display: flex; align-items: center; gap: 5px; }
.md-nav__chev { opacity: .45; margin-top: 1px; }
.md-nav__panel {
	position: absolute; top: 100%; right: 0; z-index: 80;
	background: #fff; border: 1px solid var(--md-line); border-radius: 14px;
	box-shadow: 0 14px 38px rgba(23, 25, 31, .16); padding: 12px;
	min-width: 320px; opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.md-nav__item:hover .md-nav__panel,
.md-nav__item:focus-within .md-nav__panel { opacity: 1; visibility: visible; transform: none; }
.md-nav__grid { display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: 2px; }
.md-nav__grid a {
	padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 500;
	color: var(--md-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.md-nav__all {
	display: block; margin-top: 8px; padding: 8px 10px; border-top: 1px solid var(--md-line);
	font-size: 12.5px; font-weight: 700; color: #2145E6;
}
/* the nav row scrolls horizontally on small screens — panels only exist on
   desktop where overflow can be visible without breaking the scroll row */
@media (min-width: 900px) {
	.md-nav__inner { overflow: visible; }
}
@media (max-width: 899px) {
	.md-nav__panel { display: none; }
	.md-nav__chev { display: none; }
}

/* drawer */
.md-drawer-overlay { position: fixed; inset: 0; background: rgba(23,25,31,.45); z-index: 90; animation: mdFade .2s; }
.md-drawer {
	position: fixed; top: 0; bottom: 0; right: 0; z-index: 100; width: min(320px, 86vw);
	background: #fff; box-shadow: -12px 0 32px rgba(23,25,31,.16);
	animation: mdDrawerIn .28s var(--md-ease); display: flex; flex-direction: column; overflow-y: auto;
}
.md-drawer[hidden], .md-drawer-overlay[hidden] { display: none; }
.md-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--md-line); }
.md-drawer__head svg { height: 22px; }
.md-drawer__section { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.md-drawer__section + .md-drawer__section { border-top: 1px solid var(--md-line); }
.md-drawer__label { font-size: 11px; font-weight: 700; color: var(--md-ink-3); padding: 4px 12px; }
.md-drawer__item {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	padding: 12px; border-radius: var(--md-r-m); text-decoration: none;
	color: var(--md-ink); font-size: 15px; font-weight: 600;
}
.md-drawer__item:hover { background: var(--md-bg-2); }
.md-drawer__item .md-arrow { color: var(--md-ink-3); }
.md-drawer__item--muted { color: var(--md-ink-3); }

/* --- drawer category accordions --- */
.md-drawer__acc > summary { list-style: none; cursor: pointer; }
.md-drawer__acc > summary::-webkit-details-marker { display: none; }
.md-drawer__acc > summary .md-arrow { transition: transform .15s; display: inline-block; }
.md-drawer__acc[open] > summary .md-arrow { transform: rotate(-90deg); }
.md-drawer__sub { display: flex; flex-direction: column; padding: 2px 14px 10px; }
.md-drawer__sub a {
	padding: 8px 10px; border-radius: 8px; text-decoration: none;
	color: var(--md-ink-2); font-size: 13.5px;
}
.md-drawer__sub a:hover { background: var(--md-bg-2); }
.md-drawer__sub a strong { color: #2145E6; font-weight: 700; }
.md-drawer__foot { margin-top: auto; padding: 16px; border-top: 1px solid var(--md-line); display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--md-ink-2); }
.md-tg-btn { height: 38px; padding: 0 14px; border-radius: 10px; background: var(--md-accent-tint); color: var(--md-accent-dark) !important; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; text-decoration: none !important; }

/* ===================== Home ===================== */
.md-hero { background: var(--md-surface); border-bottom: 1px solid var(--md-line); }
.md-hero__inner {
	max-width: 1080px; margin: 0 auto; padding: 40px 20px 44px;
	display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 32px; align-items: center;
}
.md-hero h1 { font-size: clamp(30px, 6vw, 44px); font-weight: 800; line-height: 1.5; letter-spacing: -.5px; }
.md-hero p { font-size: 15px; color: var(--md-ink-2); line-height: 2; max-width: 440px; margin: 0; }
.md-hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }
.md-hero__img { width: 100%; height: 340px; object-fit: cover; border-radius: 20px; background: var(--md-bg-2); }

.md-section { max-width: 1080px; margin: 0 auto; padding: 40px 20px 8px; display: flex; flex-direction: column; gap: 20px; }
.md-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.md-section__head h2 { font-size: 24px; font-weight: 700; }
.md-section__head .md-more { font-size: 13px; font-weight: 600; color: var(--md-accent); text-decoration: none; }
.md-section__hint { font-size: 13px; color: var(--md-ink-2); }

.md-steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.md-steps::-webkit-scrollbar { display: none; }
.md-step { background: var(--md-surface); border: 1px solid var(--md-line); border-radius: var(--md-r-l); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.md-step--hl { border: 2px solid var(--md-accent); }
.md-step__num { width: 36px; height: 36px; border-radius: 50%; background: var(--md-accent-tint); color: var(--md-accent-dark); font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; }
.md-step--hl .md-step__num { background: var(--md-accent); color: #fff; }
.md-step strong { font-size: 15px; }
.md-step span { font-size: 13px; color: var(--md-ink-2); line-height: 1.9; }

.md-cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.md-cat-tile { position: relative; display: block; text-decoration: none; color: inherit; }
.md-cat-tile img { width: 100%; height: 210px; object-fit: cover; border-radius: var(--md-r-l); background: var(--md-bg-2); display: block; }
.md-cat-tile__ph { display: block; width: 100%; height: 210px; border-radius: var(--md-r-l); background: linear-gradient(135deg, var(--md-bg-2), var(--md-line)); }
.md-cat-tile .md-cat-label { position: absolute; bottom: 10px; right: 10px; background: rgba(255,255,255,.94); backdrop-filter: blur(4px); padding: 7px 14px; border-radius: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; line-height: 1.35; box-shadow: var(--md-shadow-sm); }
.md-cat-tile .md-cat-name { font-size: 14px; font-weight: 700; color: var(--md-ink); }
.md-cat-tile .md-cat-count { font-size: 11px; font-weight: 600; color: var(--md-ink-2); }

.md-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 180px; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.md-rail::-webkit-scrollbar { display: none; }
.md-rail .md-card { width: auto; }

.md-trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; align-items: stretch; padding-bottom: 40px; }
.md-trust { background: var(--md-surface); border: 1px solid var(--md-line); border-radius: var(--md-r-l); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.md-trust--dark { background: var(--md-ink); border: none; color: #fff; }
.md-trust h3 { font-size: 19px; font-weight: 700; line-height: 1.7; }
.md-trust--dark h3 { color: #fff; }
.md-trust p { margin: 0; font-size: 13px; color: var(--md-ink-2); line-height: 2; }
.md-trust--dark p { color: var(--md-ink-3); }
.md-trust img { width: 100%; height: 150px; object-fit: cover; border-radius: var(--md-r-m); background: var(--md-bg-2); }

/* --- USP trust strip (under hero) --- */
.md-usp-wrap { background: var(--md-surface); border-bottom: 1px solid var(--md-line); }
.md-usp-grid {
	max-width: 1080px; margin: 0 auto; padding: 20px;
	display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px;
}
.md-usp { display: flex; flex-direction: column; gap: 6px; padding: 4px; }
.md-usp__ic {
	width: 40px; height: 40px; border-radius: 12px; margin-bottom: 4px;
	background: var(--md-accent-tint); color: var(--md-accent-dark);
	display: inline-flex; align-items: center; justify-content: center;
}
.md-usp strong { font-size: 14.5px; font-weight: 700; }
.md-usp small { font-size: 12px; color: var(--md-ink-2); line-height: 1.85; }

/* --- category banners --- */
.md-banners { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.md-banner {
	position: relative; overflow: hidden; border-radius: var(--md-r-l);
	padding: 26px 22px; min-height: 150px; text-decoration: none !important;
	display: flex; flex-direction: column; gap: 6px; justify-content: flex-end;
	color: #fff !important; box-shadow: var(--md-shadow-sm);
	transition: transform .18s var(--md-ease), box-shadow .18s var(--md-ease);
}
.md-banner:hover { transform: translateY(-3px); box-shadow: var(--md-shadow-md); }
.md-banner--a { background: linear-gradient(135deg, #2145E6, #1733AE); }
.md-banner--b { background: linear-gradient(135deg, #17191F, #3A3F4C); }
.md-banner--c { background: linear-gradient(135deg, #178A50, #106B3D); }
.md-banner--d { background: linear-gradient(135deg, #B45309, #E0791A); }
.md-banner__kicker { font-size: 11px; font-weight: 600; opacity: .8; }
.md-banner__title { font-size: 26px; font-weight: 800; line-height: 1.3; }
.md-banner__meta { font-size: 12.5px; opacity: .82; }
.md-banner__cta { font-size: 13px; font-weight: 700; margin-top: 6px; }

/* --- guarantee band --- */
.md-guarantee { background: var(--md-surface); border: 1px solid var(--md-line); border-radius: var(--md-r-l); padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.md-guarantee__head h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.md-guarantee__head p { margin: 0; font-size: 14px; color: var(--md-ink-2); line-height: 1.9; max-width: 640px; }
.md-guarantee__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.md-guarantee__item { display: flex; gap: 12px; align-items: flex-start; }
.md-guarantee__ic { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--md-success-tint); color: var(--md-success); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.md-guarantee__item strong { display: block; font-size: 14.5px; font-weight: 700; margin-bottom: 2px; }
.md-guarantee__item span { font-size: 12.5px; color: var(--md-ink-2); line-height: 1.85; }

/* --- buy guides --- */
.md-guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.md-guide-card {
	display: flex; flex-direction: column; gap: 8px; padding: 20px;
	background: var(--md-surface); border: 1px solid var(--md-line); border-radius: var(--md-r-l);
	text-decoration: none !important; color: var(--md-ink) !important;
	transition: transform .15s, box-shadow .15s, border-color .15s;
}
.md-guide-card:hover { transform: translateY(-2px); box-shadow: var(--md-shadow-md); border-color: var(--md-accent-soft); }
.md-guide-card__tag { align-self: flex-start; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--md-accent-tint); color: var(--md-accent-dark); }
.md-guide-card strong { font-size: 15px; font-weight: 700; line-height: 1.6; }
.md-guide-card span { font-size: 12.5px; color: var(--md-ink-2); line-height: 1.85; }

/* --- home FAQ list --- */
.md-faq-list { display: flex; flex-direction: column; gap: 10px; }
.md-faq-list .md-breakdown { background: var(--md-surface); }
.md-faq-list .md-breakdown__row { line-height: 2; color: var(--md-ink-2); }
.md-faq-list .md-breakdown__row span { font-size: 13.5px; }

/* --- final CTA band --- */
.md-cta-band {
	background: linear-gradient(120deg, var(--md-accent), var(--md-accent-dark));
	border-radius: var(--md-r-l); padding: 32px; margin-bottom: 16px; color: #fff;
	display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.md-cta-band__text h2 { color: #fff; font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.md-cta-band__text p { margin: 0; font-size: 14px; color: rgba(255,255,255,.85); line-height: 1.9; max-width: 520px; }
.md-cta-band__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.md-cta-band .md-btn { background: #fff; color: var(--md-accent-dark) !important; }
.md-cta-band .md-btn:hover { background: var(--md-bg-2); }
.md-btn--ghost-light { background: transparent; border-color: rgba(255,255,255,.7); color: #fff !important; }
.md-btn--ghost-light:hover { background: rgba(255,255,255,.14); color: #fff !important; }

/* --- admin-defined custom sections --- */
.md-section--custom .md-custom__body { font-size: 15px; line-height: 2; color: var(--md-ink-2); }
.md-section--custom .md-custom__body > :first-child { margin-top: 0; }
.md-section--custom .md-custom__body > :last-child { margin-bottom: 0; }
.md-section--custom .md-custom__body h2,
.md-section--custom .md-custom__body h3 { color: var(--md-ink); font-weight: 700; margin: 18px 0 10px; }
.md-section--custom .md-custom__body p { margin: 0 0 12px; }
.md-section--custom .md-custom__body a { color: var(--md-accent); }
.md-section--custom .md-custom__body img { max-width: 100%; height: auto; border-radius: var(--md-r-m); }
.md-section--custom .md-custom__body ul,
.md-section--custom .md-custom__body ol { padding-inline-start: 22px; margin: 0 0 12px; }

/* ===================== Product card ===================== */
ul.products { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; width: 100%; }
/* WC/Storefront clearfix pseudo-elements become phantom grid items and
   steal the first/last cells — remove them */
ul.products::before, ul.products::after { content: none !important; display: none !important; }
ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; }

/* Pagination — WC renders a floated list the theme never styled, so it
   collapsed (products past page 1 looked unreachable). Style it as a centered
   row of page buttons. Selectors target the links inside <li>, not the
   <ul class="page-numbers"> wrapper. */
.md-pagination { padding: 44px 0 16px; display: flex; justify-content: center; }
.md-pagination .woocommerce-pagination { width: auto; max-width: 100%; }
.woocommerce-pagination ul.page-numbers {
	display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
	list-style: none; margin: 0; padding: 0; border: 0; width: auto;
}
.woocommerce-pagination ul.page-numbers li { display: inline-flex; margin: 0; border: 0; overflow: visible; }
.woocommerce-pagination li .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; height: 44px; padding: 0 14px; border-radius: 14px;
	background: var(--md-surface); border: 1px solid var(--md-line);
	color: var(--md-ink-2); font-family: var(--md-font-la);
	font-size: 15px; font-weight: 600; line-height: 1;
	text-decoration: none; box-shadow: var(--md-shadow-sm);
	transition: all .18s var(--md-ease);
}
.woocommerce-pagination li a.page-numbers:hover {
	border-color: var(--md-accent); color: var(--md-accent);
	transform: translateY(-2px); box-shadow: var(--md-shadow-md);
}
.woocommerce-pagination li .page-numbers.current {
	background: var(--md-accent); border-color: var(--md-accent); color: #fff;
	box-shadow: 0 6px 16px rgba(33, 69, 230, .28);
}
.woocommerce-pagination li .page-numbers.dots {
	border-color: transparent; background: transparent; box-shadow: none;
	color: var(--md-ink-3); min-width: 22px; padding: 0 2px;
}
.woocommerce-pagination li .page-numbers.prev,
.woocommerce-pagination li .page-numbers.next { font-size: 18px; }
@media (max-width: 480px) {
	.md-pagination { padding: 32px 0 12px; }
	.woocommerce-pagination li .page-numbers { min-width: 40px; height: 40px; padding: 0 11px; font-size: 14px; }
}

.md-card {
	background: var(--md-surface); border: 1px solid var(--md-line); border-radius: var(--md-r-l);
	overflow: hidden; text-decoration: none !important; color: inherit !important; display: block;
	box-shadow: var(--md-shadow-sm); transition: box-shadow .2s;
	/* MUST stay positioned: WooCommerce prints absolutely-positioned
	   .screen-reader-text price labels inside the card. With a static card their
	   containing block becomes <body>, so inside a horizontally scrolling
	   .md-rail their static offsets (~1900px) leak into the DOCUMENT scroll
	   width and create a phantom horizontal scroll on mobile. */
	position: relative;
}
.md-card:hover { box-shadow: var(--md-shadow-md); }
.md-card__media { position: relative; aspect-ratio: 3/4; background: var(--md-bg-2); overflow: hidden; }
.md-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.md-card__noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.md-card__badge { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: var(--md-r-s); }
.md-card__off { position: absolute; top: 8px; left: 8px; background: var(--md-danger); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: var(--md-r-s); line-height: 1; }
.md-card__body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.md-card__name { font-family: var(--md-font-la); font-size: 13px; font-weight: 500; direction: ltr; text-align: right; unicode-bidi: isolate; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--md-ink); }
.md-card__meta { display: flex; align-items: center; justify-content: space-between; }
.md-card__price { font-size: 14px; font-weight: 700; color: var(--md-ink); }
.md-card__price del { color: var(--md-ink-3); font-weight: 400; font-size: 12px; margin-inline-start: 4px; }
.md-card__price ins { text-decoration: none; }
.md-dots { display: flex; gap: 5px; }
.md-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--md-line-2); display: inline-block; }

/* ===================== Archive ===================== */
.md-subcat-title { font-size: 18px; font-weight: 800; margin: 8px 0 14px; }
.md-subcat-grid { margin-bottom: 32px; }
.md-subcat-grid .md-cat-tile img, .md-subcat-grid .md-cat-tile__ph { height: 180px; }
.md-archive-head { display: flex; flex-direction: column; gap: 14px; padding: 28px 0 16px; }
.md-archive-head h1 { font-size: 26px; font-weight: 800; }
.md-archive-head .md-count { font-size: 13px; color: var(--md-ink-2); }
.md-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.md-chips::-webkit-scrollbar { display: none; }
.md-chip {
	flex-shrink: 0; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--md-line);
	background: var(--md-surface); color: var(--md-ink); font-size: 13px; font-weight: 600;
	text-decoration: none !important; cursor: pointer;
}
.md-chip--active { background: var(--md-ink); color: #fff; border-color: var(--md-ink); }
.md-filter-btn { position: relative; }
.md-filter-btn .md-cart-badge { position: static; margin-inline-start: 6px; }
.woocommerce-result-count, .woocommerce-ordering, .storefront-sorting { display: none !important; }
.md-active-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.md-active-filters a { background: var(--md-accent-tint); color: var(--md-accent-dark); font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; text-decoration: none; }

/* Filters dialog — a centered modal on desktop (the bottom-sheet pattern
   glued edge-to-edge to a wide screen read as broken), a real bottom sheet
   only on mobile where that pattern actually fits the UX. */
.md-sheet-overlay { position: fixed; inset: 0; background: rgba(23,25,31,.45); z-index: 90; animation: mdFade .2s; }
.md-sheet {
	position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
	width: min(560px, calc(100vw - 32px)); z-index: 100; background: #fff;
	border-radius: var(--md-r-l); box-shadow: var(--md-shadow-lg);
	animation: mdModalIn .22s var(--md-ease); max-height: 82vh; overflow-y: auto;
	padding: 8px 24px 24px;
}
.md-sheet[hidden], .md-sheet-overlay[hidden] { display: none; }
.md-sheet__handle { display: none; } /* mobile-only drag handle */
.md-sheet__head { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; }
.md-sheet__title { font-size: 17px; font-weight: 800; margin: 0; }
.md-sheet__close {
	width: 32px; height: 32px; border: none; border-radius: 50%; background: var(--md-bg-2);
	color: var(--md-ink-2); font-size: 14px; cursor: pointer; display: inline-flex;
	align-items: center; justify-content: center; flex-shrink: 0; transition: background .15s;
}
.md-sheet__close:hover { background: var(--md-line); color: var(--md-ink); }
@media (max-width: 782px) {
	.md-sheet {
		top: auto; left: 0; right: 0; bottom: 0; transform: none; width: auto;
		border-radius: 20px 20px 0 0; animation: mdSheetUp .28s var(--md-ease);
		padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
	}
	.md-sheet__handle { display: block; width: 44px; height: 4px; border-radius: 999px; background: var(--md-line-2); margin: 8px auto 16px; }
}
.md-sheet h3 { font-size: 15px; font-weight: 700; margin: 18px 0 10px; }
.md-size-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.md-size-opt {
	min-width: 48px; height: 48px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
	border: 1.5px solid var(--md-line); border-radius: var(--md-r-s); font-size: 14px; font-weight: 600;
	font-family: var(--md-font-la); background: #fff; cursor: pointer; color: var(--md-ink);
	text-decoration: none !important;
}
.md-size-opt--sel { border: 2px solid var(--md-accent); background: var(--md-accent-tint); color: var(--md-accent-dark); font-weight: 700; }
.md-size-opt--off { border-style: dashed; color: var(--md-line-2); text-decoration: line-through !important; pointer-events: none; }
.md-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.md-swatch { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--md-line-2); cursor: pointer; display: inline-block; }
.md-swatch--sel { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--md-accent); }

/* ===================== Single product ===================== */
.md-product { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; padding: 24px 0 40px; }
.md-gallery { position: relative; }
.md-gallery__stage { position: relative; } /* containing block for arrows/dots/hint */
.md-gallery__track {
	display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
	overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--md-r-l);
	scrollbar-width: none; direction: ltr;
}
.md-gallery__track::-webkit-scrollbar { display: none; }
.md-gallery__track img { width: 100%; aspect-ratio: 3/4; object-fit: cover; scroll-snap-align: center; display: block; background: var(--md-bg-2); }

/* arrows: the only way to page through images with a mouse */
.md-gallery__arrow {
	position: absolute; inset-block-start: 50%; transform: translateY(-50%); z-index: 2;
	width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(255,255,255,.92); color: var(--md-ink); box-shadow: var(--md-shadow-sm);
	font-size: 24px; line-height: 1; display: flex; align-items: center; justify-content: center;
	opacity: 0; transition: opacity .18s, background .18s;
}
.md-gallery__stage:hover .md-gallery__arrow { opacity: 1; }
.md-gallery__arrow:hover { background: #fff; }
.md-gallery__arrow:disabled { opacity: 0 !important; pointer-events: none; }
.md-gallery__arrow--prev { inset-inline-end: 10px; }
.md-gallery__arrow--next { inset-inline-start: 10px; }
/* touch devices have no hover: swipe + dots + thumbs are the affordance there */
@media (hover: none) {
	.md-gallery__arrow { display: none; }
}

/* thumbnail strip */
.md-gallery__thumbs {
	display: flex; gap: 8px; margin-top: 10px;
	overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
}
.md-gallery__thumbs::-webkit-scrollbar { display: none; }
.md-gallery__thumb {
	flex: 0 0 auto; width: 64px; padding: 0; border: 2px solid transparent;
	border-radius: var(--md-r-s, 8px); overflow: hidden; cursor: pointer;
	background: var(--md-bg-2); line-height: 0; transition: border-color .18s, opacity .18s;
	opacity: .6;
}
.md-gallery__thumb img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.md-gallery__thumb:hover { opacity: 1; }
.md-gallery__thumb--on { border-color: var(--md-accent); opacity: 1; }

.md-gallery__dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.md-gallery__dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.7); box-shadow: var(--md-shadow-sm); transition: all .2s; }
.md-gallery__dot--on { width: 22px; background: var(--md-accent); }
.md-gallery__img { cursor: zoom-in; }
.md-gallery__hint {
	position: absolute; inset-block-start: 10px; inset-inline-end: 10px;
	width: 32px; height: 32px; border-radius: 50%;
	background: rgba(0,0,0,.5); color: #fff; font-size: 15px;
	display: flex; align-items: center; justify-content: center;
	pointer-events: none; /* never swallow a click meant for the image */
}

/* ---- full-size zoom lightbox ---- */
.md-zoom { position: fixed; inset: 0; z-index: 100000; background: rgba(0,0,0,.93); }
.md-zoom[hidden] { display: none; }
.md-zoom__stage {
	width: 100%; height: 100%;
	display: flex; align-items: center; justify-content: center;
	overflow: auto; -webkit-overflow-scrolling: touch;
}
.md-zoom__stage img { max-width: 100%; max-height: 100vh; object-fit: contain; cursor: zoom-in; }
/* zoomed: the image overflows and the stage becomes the scroller */
.md-zoom__stage.is-zoomed { align-items: flex-start; justify-content: flex-start; }
.md-zoom__stage.is-zoomed img { max-width: none; max-height: none; width: 230%; cursor: zoom-out; }
.md-zoom__close {
	position: absolute; inset-block-start: 12px; inset-inline-end: 16px; z-index: 2;
	background: none; border: 0; color: #fff; font-size: 34px; line-height: 1; cursor: pointer;
}
.md-zoom__nav {
	position: absolute; inset-block-start: 50%; transform: translateY(-50%); z-index: 2;
	width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(255,255,255,.15); color: #fff; font-size: 28px; line-height: 1;
}
.md-zoom__nav:hover { background: rgba(255,255,255,.28); }
.md-zoom__nav--prev { inset-inline-end: 12px; }
.md-zoom__nav--next { inset-inline-start: 12px; }
.md-zoom__count {
	position: absolute; inset-block-end: 14px; inset-inline: 0; z-index: 2;
	text-align: center; color: #fff; font-size: 13px; pointer-events: none;
}

.md-pinfo { display: flex; flex-direction: column; gap: 10px; }
.md-pinfo__badges { display: flex; gap: 8px; }
/* Titles are Persian (the trailing Latin ref code is stripped for display),
   so they get the site font and RTL — not the old Latin/LTR treatment. */
.md-pinfo h1 { font-size: 22px; font-weight: 800; line-height: 1.6; margin: 0; color: var(--md-ink); }
.md-pinfo__sub { font-size: 14px; color: var(--md-ink-2); }
.md-pinfo__ref { font-family: var(--md-font-la); direction: ltr; font-size: 12px; color: var(--md-ink-3); text-align: right; }
.md-pinfo__pricerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.md-pinfo .price { font-size: 24px; font-weight: 800; color: var(--md-ink); }
.md-pinfo .price del { font-size: 15px; color: var(--md-ink-3); font-weight: 400; }
.md-pinfo .price ins { text-decoration: none; }
.md-off-chip {
	background: var(--md-danger-tint, #FDE8E6); color: var(--md-danger, #C03A30);
	font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}

/* buy box: sizes + add-to-cart grouped where the decision happens */
.md-buybox {
	border: 1px solid var(--md-line); border-radius: var(--md-r-l);
	background: var(--md-surface); padding: 16px;
}
.md-buybox form.cart { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.md-buybox table.variations { margin: 0; }
.md-buybox table.variations td, .md-buybox table.variations th { padding: 0; border: 0; }
.md-buybox table.variations label { font-size: 13px; font-weight: 700; color: var(--md-ink-2); }
.md-buybox .single_variation_wrap .woocommerce-variation { margin-bottom: 6px; }
.md-buybox .single_add_to_cart_button { width: 100%; }
.md-buybox .reset_variations { font-size: 12px; }

/* Storefront's floating prev/next product arrows — removed by hook, hidden
   here too in case the parent theme moves the hook in an update */
.storefront-product-pagination { display: none !important; }

/* breakdown box */
.md-breakdown { border: 1px solid var(--md-line); border-radius: var(--md-r-m); overflow: hidden; }
.md-breakdown summary { padding: 12px 16px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--md-accent-dark); list-style: none; }
.md-breakdown summary::-webkit-details-marker { display: none; }
.md-breakdown__row { display: flex; justify-content: space-between; padding: 12px 16px; font-size: 14px; border-top: 1px dashed var(--md-line); }
.md-breakdown__row span:first-child { color: var(--md-ink-2); }
.md-breakdown__row span:last-child { font-weight: 600; }
.md-breakdown__total { display: flex; justify-content: space-between; padding: 12px 16px; font-size: 15px; background: var(--md-accent-tint); border-top: 1px solid var(--md-line); font-weight: 700; color: var(--md-accent-dark); }

/* source-product link (verify at Zara) */
.md-source-link {
	display: inline-flex; align-items: center; gap: 8px; width: fit-content;
	padding: 10px 16px; border: 1.5px dashed var(--md-accent);
	border-radius: var(--md-r-m); background: var(--md-accent-tint);
	color: var(--md-accent-dark) !important; font-size: 13px; font-weight: 700;
	text-decoration: none !important; transition: background .2s;
}
.md-source-link:hover { background: #DDE5FC; }
.md-source-link svg { flex-shrink: 0; width: 16px; height: 16px; }

/* size buttons on product (rendered by JS from the variations select) */
.md-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; max-width: 372px; }
.md-sizes .md-size-opt { width: auto; }
.md-scarcity { font-size: 13px; color: var(--md-warning); font-weight: 600; }
.md-size-link { font-size: 13px; color: var(--md-accent); text-decoration: none; font-weight: 600; }
table.variations td.value select { visibility: hidden; position: absolute; }
.mdr-no-returns, .md-no-returns {
	background: var(--md-warning-tint); border: 1px solid #FDBA74; border-radius: var(--md-r-s);
	padding: 12px 16px; font-size: 13px; line-height: 2; color: var(--md-ink);
}

/* other colors (styles the plugin's block) */
.mdr-other-colors h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.mdr-other-colors ul { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.mdr-other-colors li a { display: block; text-decoration: none; text-align: center; }
.mdr-other-colors img { width: 56px; height: 68px; object-fit: cover; border-radius: var(--md-r-s); border: 1.5px solid var(--md-line); display: block; }
.mdr-other-colors li a:hover img { border-color: var(--md-accent); }
.mdr-other-colors .mdr-color-name { font-size: 11px; color: var(--md-ink-2); }

/* tabs */
.woocommerce-tabs ul.wc-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--md-line); padding: 0; margin: 0 0 16px; list-style: none; overflow-x: auto; }
.woocommerce-tabs ul.wc-tabs li { margin: 0; border: none; background: none; }
.woocommerce-tabs ul.wc-tabs li a { display: inline-block; padding: 10px 16px; font-size: 14px; font-weight: 600; color: var(--md-ink-2); text-decoration: none; border-bottom: 2px solid transparent; }
.woocommerce-tabs ul.wc-tabs li.active a { color: var(--md-accent-dark); border-bottom-color: var(--md-accent); }
.mdr-size-chart table, .md-size-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mdr-size-chart th, .mdr-size-chart td, .md-size-table th, .md-size-table td { border: 1px solid var(--md-line); padding: 8px 12px; text-align: center; }
.mdr-size-chart th, .md-size-table th { background: var(--md-bg-2); font-weight: 700; }

/* sticky CTA */
.md-sticky-cta {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
	background: #fff; border-top: 1px solid var(--md-line); box-shadow: var(--md-shadow-lg);
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
	display: none; align-items: center; gap: 12px; justify-content: space-between;
}
.md-sticky-cta .md-btn { flex: 1; max-width: 300px; }
.md-sticky-cta__price { font-size: 16px; font-weight: 800; white-space: nowrap; }
@media (max-width: 782px) {
	.md-sticky-cta { display: flex; }
	body.single-product { padding-bottom: 84px; }
}

/* ===================== Checkout ===================== */
.md-checkout-wrap { display: flex; flex-direction: column; gap: 20px; padding: 24px 0 48px; max-width: 720px; margin: 0 auto; }
.md-citem { display: flex; gap: 12px; background: var(--md-surface); border: 1px solid var(--md-line); border-radius: var(--md-r-l); padding: 12px; }
.md-citem img { width: 72px; height: 90px; object-fit: cover; border-radius: var(--md-r-s); background: var(--md-bg-2); }
.md-citem__body { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.md-citem__name { font-family: var(--md-font-la); direction: ltr; text-align: right; font-weight: 600; font-size: 14px; color: var(--md-ink); }
.md-citem--failed { border: 1.5px solid var(--md-danger); animation: mdShake .4s; }
.md-stock-error { background: var(--md-danger-tint); border-radius: var(--md-r-m); padding: 14px 16px; font-size: 13px; line-height: 1.9; color: var(--md-ink); }
.md-stock-error strong { color: var(--md-danger); }
.woocommerce-checkout .form-row input.input-text, .woocommerce-checkout .form-row textarea, .woocommerce-checkout select {
	height: 48px; border: 1.5px solid var(--md-line); border-radius: var(--md-r-m); padding: 0 14px;
	font-family: inherit; font-size: 15px; background: #fff; width: 100%;
}
.woocommerce-checkout .form-row textarea { height: auto; padding: 12px 14px; }
.woocommerce-checkout .form-row input:focus, .woocommerce-checkout textarea:focus { border-color: var(--md-accent); box-shadow: 0 0 0 3px var(--md-accent-tint); outline: none; }
.woocommerce-checkout .form-row label { font-size: 13px; font-weight: 600; }
#place_order { width: 100%; height: 52px; border-radius: var(--md-r-m); background: var(--md-accent); color: #fff; font-size: 16px; font-weight: 700; border: none; }
#place_order:hover { background: var(--md-accent-dark); }
.md-summary { background: var(--md-surface); border: 1px solid var(--md-line); border-radius: var(--md-r-l); padding: 16px; }
.md-free-logistics { color: var(--md-success); font-weight: 700; }

/* checkout spinner overlay */
.md-check-overlay {
	position: fixed; inset: 0; z-index: 200; background: rgba(255,255,255,.94);
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
	backdrop-filter: blur(4px); text-align: center; padding: 24px;
}
.md-check-overlay[hidden] { display: none; }
.md-spinner { width: 44px; height: 44px; border: 4px solid var(--md-accent-tint); border-top-color: var(--md-accent); border-radius: 50%; animation: mdSpin .9s linear infinite; }
.md-check-overlay p { font-size: 15px; font-weight: 600; margin: 0; animation: mdFade .4s; }

/* ===================== Tracking timeline (plugin markup restyled) ===================== */
.md-track-hero {
	background: var(--md-ink); color: #fff; border-radius: var(--md-r-l);
	padding: 24px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px;
}
.md-track-hero .md-progress { height: 8px; border-radius: 999px; background: #2A2D35; overflow: hidden; }
.md-track-hero .md-progress__fill { height: 100%; border-radius: 999px; background: linear-gradient(270deg, var(--md-accent), var(--md-accent-soft)); transition: width .4s var(--md-ease); }
.md-track-hero small { color: var(--md-ink-3); font-size: 12px; }

.mdr-timeline h3 { font-size: 20px; font-weight: 800; margin-bottom: 20px; }
.mdr-timeline ol { list-style: none; margin: 0; padding: 0; position: relative; }
.mdr-timeline ol::before { content: ""; position: absolute; top: 8px; bottom: 8px; right: 13px; width: 2px; background: var(--md-line); }
.mdr-stop { position: relative; padding: 0 44px 26px 0; }
.mdr-stop-icon {
	position: absolute; right: 0; top: 0; width: 28px; height: 28px; z-index: 1;
	display: flex; align-items: center; justify-content: center;
	background: var(--md-line); border-radius: 50%; font-size: 13px; filter: grayscale(1);
}
.mdr-stop.is-done .mdr-stop-icon { background: var(--md-success); filter: none; }
.mdr-stop.is-active .mdr-stop-icon { background: var(--md-accent); filter: none; animation: mdPulse 2s infinite; }
.mdr-stop.is-pending { opacity: .55; }
.mdr-stop.is-pending .mdr-stop-icon { background: #fff; border: 2px dashed var(--md-line-2); }
.mdr-stop-label { font-weight: 600; display: block; font-size: 14px; }
.mdr-stop.is-active .mdr-stop-label { color: var(--md-accent-dark); font-weight: 700; }
.mdr-stop-date { font-size: 12px; color: var(--md-ink-2); }
.mdr-wh-photos { margin-top: 10px; background: var(--md-surface); border: 1px solid var(--md-line); border-radius: var(--md-r-m); padding: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.mdr-wh-photo { border-radius: var(--md-r-s); max-width: 200px; height: auto; }
.mdr-tracking-code { margin-top: 8px; background: var(--md-bg-2); border-radius: var(--md-r-s); padding: 6px 12px; display: inline-block; font-size: 13px; }

/* ===================== My account orders ===================== */
.md-order-card { background: var(--md-surface); border: 1px solid var(--md-line); border-radius: var(--md-r-l); padding: 16px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.md-order-card__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.md-order-card__num { font-weight: 700; font-size: 15px; }
.md-order-card__date { font-size: 12px; color: var(--md-ink-2); }
.md-order-card__thumbs { display: flex; gap: 6px; }
.md-order-card__thumbs img { width: 44px; height: 54px; object-fit: cover; border-radius: 6px; background: var(--md-bg-2); }
.md-order-card .md-badge--pulse { animation: mdPulseAmber 2s infinite; }
.md-acc-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
/* ===================== My Account ===================== */
.md-account { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; padding: 8px 0 40px; }
/* Storefront's own woocommerce.css sets width:17.6%/float:right on
   .woocommerce-MyAccount-navigation (kept on this element for compat) —
   neutralize it or the nav shrink-wraps to a sliver instead of filling
   its grid column. */
.md-account-nav.woocommerce-MyAccount-navigation,
.md-account > .woocommerce-MyAccount-content { float: none; width: 100%; margin: 0; }
/* Storefront also injects its own icon-font glyph via ::before on every
   nav link (base/icons.css) — doubled up with our inline SVG icon. Kill it. */
.md-account-nav .woocommerce-MyAccount-navigation-link a::before { content: none !important; }
.md-account-nav ul { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 2px; background: var(--md-surface); border: 1px solid var(--md-line); border-radius: var(--md-r-l); box-shadow: var(--md-shadow-sm); position: sticky; top: 84px; }
.md-account-nav a {
	display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--md-r-m);
	font-size: 14px; font-weight: 600; color: var(--md-ink-2); text-decoration: none; transition: background .15s, color .15s;
}
.md-account-nav a svg { flex-shrink: 0; opacity: .75; }
.md-account-nav a:hover { background: var(--md-bg-2); color: var(--md-ink); }
.md-account-nav li.is-active a { background: var(--md-accent-tint); color: var(--md-accent-dark); }
.md-account-nav li.is-active a svg { opacity: 1; }
.md-account-nav li.woocommerce-MyAccount-navigation-link--customer-logout { border-top: 1px solid var(--md-line); margin-top: 6px; padding-top: 6px; }

.md-account-welcome {
	display: flex; align-items: center; gap: 16px; background: var(--md-surface); border: 1px solid var(--md-line);
	border-radius: var(--md-r-l); padding: 20px 22px; margin-bottom: 20px; box-shadow: var(--md-shadow-sm);
}
.md-account-avatar {
	width: 48px; height: 48px; border-radius: 50%; background: var(--md-accent); color: #fff;
	font-size: 19px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.md-account-welcome > div { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.md-account-welcome strong { font-size: 15px; }
.md-account-welcome span { font-size: 13px; color: var(--md-ink-2); }
.md-account-logout { font-size: 13px; font-weight: 600; color: var(--md-ink-2); text-decoration: none; white-space: nowrap; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--md-line); }
.md-account-logout:hover { border-color: var(--md-danger); color: var(--md-danger); }

.md-account-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.md-account-tile {
	display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
	background: var(--md-surface); border: 1px solid var(--md-line); border-radius: var(--md-r-l);
	padding: 22px 12px; text-decoration: none; color: var(--md-ink); font-size: 13px; font-weight: 600;
	transition: transform .15s, box-shadow .15s, border-color .15s;
}
.md-account-tile svg { color: var(--md-accent); }
.md-account-tile:hover { transform: translateY(-2px); box-shadow: var(--md-shadow-md); border-color: var(--md-accent-soft); }

@media (max-width: 782px) {
	.md-account { grid-template-columns: 1fr; gap: 16px; }
	.md-account-nav ul { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 8px; }
	.md-account-nav ul::-webkit-scrollbar { display: none; }
	.md-account-nav a { flex-direction: column; gap: 5px; padding: 10px 14px; font-size: 11px; white-space: nowrap; }
	.md-account-nav li.woocommerce-MyAccount-navigation-link--customer-logout { border-top: 0; margin-top: 0; padding-top: 0; }
	.md-account-welcome { flex-wrap: wrap; }
	.md-account-tiles { grid-template-columns: repeat(2, 1fr); }
}

/* ===================== Halt banner (plugin) ===================== */
.mdr-halt-banner { background: var(--md-danger); color: #fff; text-align: center; padding: 10px 16px; font-weight: 600; }

/* ===================== Footer ===================== */
.md-footer { background: var(--md-ink); color: var(--md-ink-3); margin-top: 48px; }
.md-footer__inner { max-width: 1080px; margin: 0 auto; padding: 40px 20px 28px; display: flex; flex-direction: column; gap: 28px; }
.md-footer__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.md-footer__brand { display: flex; flex-direction: column; gap: 12px; max-width: 300px; }
.md-footer__brand svg { height: 40px; align-self: flex-start; }
.md-footer__brand p { margin: 0; font-size: 12px; line-height: 2; }
.md-footer__app {
	display: flex; align-items: center; gap: 10px; margin-top: 4px;
	background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
	border-radius: 12px; padding: 10px 14px; color: inherit; font-family: inherit;
	cursor: pointer; text-align: right; transition: background .15s, border-color .15s;
}
.md-footer__app:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); }
.md-footer__app-icon {
	width: 34px; height: 34px; border-radius: 9px; background: #fff; color: #17191F;
	display: flex; align-items: center; justify-content: center;
	font-weight: 800; font-size: 17px; flex: none;
}
.md-footer__app-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.md-footer__app-text strong { font-size: 13px; color: #fff; }
.md-footer__app-text small { font-size: 11px; opacity: .65; }
.md-footer__app > svg { height: 16px; flex: none; opacity: .7; align-self: center; }
.md-footer__strip {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px;
	padding-bottom: 28px; border-bottom: 1px solid #2A2D35;
}
.md-footer__strip-item { display: flex; align-items: center; gap: 12px; }
.md-footer__strip-item svg { color: var(--md-accent-soft); flex: none; }
.md-footer__strip-item strong { display: block; color: #fff; font-size: 13.5px; font-weight: 700; }
.md-footer__strip-item small { font-size: 11.5px; color: var(--md-ink-3); }
.md-footer__contact { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.md-footer__contact span, .md-footer__contact a { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--md-ink-3); text-decoration: none; line-height: 1.7; }
.md-footer__contact a:hover { color: #fff; }
.md-footer__contact svg { flex: none; opacity: .75; }
.md-footer__cols { display: flex; gap: 48px; flex-wrap: wrap; }
.md-footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.md-footer__col strong { color: #fff; }
.md-footer__col a { color: var(--md-ink-3); text-decoration: none; }
.md-footer__col a:hover { color: #fff; }
.md-footer__bottom { border-top: 1px solid #2A2D35; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.md-enamad { background: #fff; border-radius: 12px; padding: 6px 10px; display: inline-flex; align-items: center; }
.md-enamad img { height: 68px; width: auto; display: block; }
.md-paytrust { color: #9BA0A6; display: inline-flex; align-items: center; gap: 6px; }

/* product-page delivery/guarantee rows */
.md-delivery {
	display: flex; flex-direction: column; gap: 10px;
	background: var(--md-bg-2); border-radius: var(--md-r-m);
	padding: 14px 16px; margin: 14px 0 4px; font-size: 13px; color: var(--md-ink-2);
}
.md-delivery__row { display: flex; align-items: center; gap: 10px; line-height: 1.8; }
.md-delivery__row svg { flex-shrink: 0; color: var(--md-accent); }
.md-delivery strong { color: var(--md-ink); }

/* ===================== Mobile polish ===================== */
@media (max-width: 480px) {
	ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.md-archive-head { padding: 20px 0 12px; gap: 10px; }
	.md-archive-head h1 { font-size: 22px; }
	.md-hero__inner { padding: 28px 16px 32px; gap: 20px; }
	.md-hero__img { height: 260px; }
	.md-section { padding: 28px 16px 4px; }
	.md-section__head h2 { font-size: 20px; }
	.md-cat-tile img, .md-cat-tile__ph { height: 160px; }
	.md-trust-grid { padding-bottom: 28px; }
	.md-usp-grid { padding: 16px; gap: 12px; }
	.md-banner__title { font-size: 22px; }
	.md-guarantee { padding: 20px; }
	.md-cta-band { padding: 24px; }
	.md-cta-band__text h2 { font-size: 20px; }
	.md-cta-band__actions { width: 100%; }
	.md-cta-band__actions .md-btn { flex: 1; }
	.md-footer__cols { gap: 28px; }
	.single-product div.product { padding: 12px 16px 32px; gap: 16px; }
	.md-pinfo h1 { font-size: 20px; }
}

/* ===================== WooCommerce notices ===================== */
.woocommerce-error, .woocommerce-message, .woocommerce-info {
	border: none; border-radius: var(--md-r-m); padding: 14px 16px !important; font-size: 14px;
	background: var(--md-accent-tint); color: var(--md-accent-dark); list-style: none; margin-bottom: 16px;
}
.woocommerce-error { background: var(--md-danger-tint); color: var(--md-ink); }
.woocommerce-error li strong { color: var(--md-danger); }
.woocommerce-message { background: var(--md-success-tint); color: var(--md-success); }
