/*!
 * Zardis Toolkit — scoped RTL footer
 * Woodmart 8.5.0 keeps its real widgets, links and trust-seal markup. PHP puts
 * brand + seals in column 1, information in 2, and contact in 3. This sheet
 * never styles an unrelated sidebar or relies on CSS visual reordering.
 */

.zardis-footer,
.zardis-footer-enabled .wd-footer {
	--zf-text: rgba(255, 255, 255, 0.82);
	--zf-muted: rgba(255, 255, 255, 0.68);
	--zf-strong: #ffffff;
	--zf-gold: var(--ztk-gold, #c9a247);
	--zf-line: rgba(255, 255, 255, 0.16);
	--zf-gap: 28px;
	/* Woodmart focus-visible uses these tokens in its !important outline. */
	--wd-otl-width: 2px;
	--wd-otl-style: solid;
	--wd-otl-color: var(--zf-gold);

	color: var(--zf-text);
	font-family: var(--ztk-font, "iranyekan", "IRANSans", Tahoma, sans-serif);
	font-size: 14px;
	line-height: 1.85;
	text-align: start;
}

/* Use actual gap, not --wd-gap-lg/sm: the template sets those inline. */
.zardis-footer-enabled .wd-footer .footer-sidebar {
	gap: var(--zf-gap);
	align-items: start;
	padding-block: 36px;
}

.zardis-footer-enabled.zardis-footer-columns .wd-footer .footer-sidebar {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.zardis-footer-enabled.zardis-footer-columns .wd-footer .footer-column {
	grid-column: auto;
}

.zardis-footer-enabled .wd-footer .footer-column {
	min-inline-size: 0;
	padding-block: 0;
}

.zardis-footer-enabled .wd-footer .footer-widget {
	min-inline-size: 0;
	margin-block: 0 20px;
	padding-block-end: 0;
	border-block-end: 0;
	color: var(--zf-text);
	font-size: 14px;
	line-height: 1.85;
}

.zardis-footer-enabled .wd-footer .footer-widget:last-child {
	margin-block-end: 0;
}

.zardis-footer-enabled .wd-footer .footer-widget .widget-title {
	margin-block: 0 12px;
	padding-block-end: 10px;
	border-block-end: 1px solid var(--zf-line);
	color: var(--zf-strong);
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.6;
	text-align: start;
}

.zardis-footer-enabled .wd-footer .footer-widget .textwidget {
	color: var(--zf-text);
	font-size: inherit;
	line-height: inherit;
}

.zardis-footer-enabled .wd-footer .footer-widget .textwidget ul,
.zardis-footer-enabled .wd-footer .footer-widget .textwidget ol {
	--li-mb: 0;
	--li-pl: 0;
	--list-mb: 0;

	display: grid;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.zardis-footer-enabled .wd-footer .footer-widget .textwidget li {
	margin: 0;
	padding: 0;
	color: var(--zf-text);
	line-height: 1.85;
	overflow-wrap: anywhere;
}

/* Reset both theme list bullets and the old anchor chevrons. Phone/hours
   are mixed inline text, not navigation rows; never indent only their link. */
.zardis-footer-enabled .wd-footer .footer-widget .textwidget li::before,
.zardis-footer-enabled .wd-footer .footer-widget .textwidget li::after,
.zardis-footer-enabled .wd-footer .footer-widget .textwidget li > a::before,
.zardis-footer-enabled .wd-footer .footer-widget .textwidget li > a::after,
.zardis-footer .zardis-footer__meta li::before,
.zardis-footer .zardis-footer__meta li::after {
	content: none;
	display: none;
}

.zardis-footer-enabled .wd-footer .footer-widget .textwidget li > a {
	display: inline-block;
	max-inline-size: 100%;
	padding-block: 3px;
	padding-inline: 0;
	color: var(--zf-text);
	text-decoration: none;
	vertical-align: baseline;
	transition: color 0.16s ease;
}

.zardis-footer-enabled .wd-footer .footer-widget .textwidget a:hover,
.zardis-footer-enabled .wd-footer .footer-widget .textwidget a:focus-visible {
	color: var(--zf-gold);
	text-decoration: none;
}

/* An LTR isolate preserves telephone digits without reversing the RTL label. */
.zardis-footer-enabled .wd-footer a[href^="tel:"],
.zardis-footer .zardis-footer__meta bdi {
	direction: ltr;
	unicode-bidi: isolate;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
}

.zardis-footer-enabled .wd-footer a:focus-visible,
.zardis-footer a:focus-visible {
	outline: 2px solid var(--zf-gold);
	outline-offset: 3px;
	border-radius: 2px;
}

/* Brand card: a bounded real mark with a readable name, never an oversized
   square logo or an unlabelled icon. Explicit height reserves loading space. */
.zardis-footer {
	min-inline-size: 0;
}

.zardis-footer .zardis-footer__brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	max-inline-size: 100%;
	min-block-size: 48px;
	margin-block-end: 12px;
	color: var(--zf-strong);
	text-decoration: none;
}

.zardis-footer .zardis-footer__brand:hover,
.zardis-footer .zardis-footer__brand:focus-visible {
	color: var(--zf-gold);
	text-decoration: none;
}

.zardis-footer .zardis-footer__logo {
	display: block;
	flex: 0 0 48px;
	inline-size: 48px;
	block-size: 48px;
	max-inline-size: 48px;
	max-block-size: 48px;
	object-fit: contain;
}

/* Only the default navy/transparency mark gets the dark-footer modifier.
   A merchant-selected footer attachment is always displayed as uploaded. */
.zardis-footer .zardis-footer__logo--light {
	filter: brightness(0) invert(1);
	opacity: 0.94;
}

.zardis-footer .zardis-footer__name {
	min-inline-size: 0;
	color: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.zardis-footer .zardis-footer__about {
	max-inline-size: 42ch;
	margin: 0 0 12px;
	padding: 0;
	color: var(--zf-text);
	font-size: 14px;
	line-height: 1.9;
	text-align: start;
	overflow-wrap: anywhere;
}

.zardis-footer .zardis-footer__meta {
	display: grid;
	gap: 2px;
	max-inline-size: 42ch;
	margin: 0;
	padding: 8px 0 0;
	border-block-start: 1px solid var(--zf-line);
	list-style: none;
	font-size: 14px;
	line-height: 1.8;
}

.zardis-footer .zardis-footer__meta li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.zardis-footer .zardis-footer__meta-label {
	color: var(--zf-muted);
}

.zardis-footer .zardis-footer__meta a {
	display: inline-flex;
	align-items: center;
	min-block-size: 28px;
	max-inline-size: 100%;
	padding-block: 2px;
	color: var(--zf-strong);
	text-decoration: none;
	transition: color 0.16s ease;
}

.zardis-footer .zardis-footer__meta a:hover,
.zardis-footer .zardis-footer__meta a:focus-visible {
	color: var(--zf-gold);
	text-decoration: none;
}

/* Verified social profiles. The whole pill is the target, so the Persian label
   remains the accessible name and the mark is purely decorative (#fff on the
   navy footer is 17:1; gold on navy is 7:1). Logical properties keep RTL right. */
.zardis-footer .zardis-footer__social {
	max-inline-size: 42ch;
	margin-block-start: 14px;
}

.zardis-footer .zardis-footer__social-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.zardis-footer .zardis-footer__social-item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.zardis-footer .zardis-footer__social-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	box-sizing: border-box;
	min-block-size: 40px;
	padding-block: 6px;
	padding-inline: 12px;
	border: 1px solid var(--zf-line);
	border-radius: 999px;
	background-color: rgba(255, 255, 255, 0.04);
	color: var(--zf-strong);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.6;
	text-decoration: none;
	transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.zardis-footer .zardis-footer__social-icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	inline-size: 20px;
	block-size: 20px;
	color: inherit;
}

.zardis-footer .zardis-footer__social-icon svg {
	display: block;
	inline-size: 20px;
	block-size: 20px;
}

.zardis-footer .zardis-footer__social-label {
	min-inline-size: 0;
	overflow-wrap: anywhere;
}

.zardis-footer .zardis-footer__social-link:hover,
.zardis-footer .zardis-footer__social-link:focus-visible {
	border-color: var(--zf-gold);
	background-color: rgba(255, 255, 255, 0.08);
	color: var(--zf-gold);
	text-decoration: none;
}

.zardis-footer .zardis-footer__social-link:focus-visible {
	outline: 2px solid var(--zf-gold);
	outline-offset: 2px;
	border-radius: 999px;
}

/* Keep original trust-seal links and sources. Do not recolor these images.
   This image cap also prevents a mistakenly large widget logo from overflowing. */
.zardis-footer-enabled .wd-footer .footer-widget .textwidget img {
	inline-size: auto;
	block-size: auto;
	max-inline-size: 120px;
	max-block-size: 120px;
	object-fit: contain;
	vertical-align: middle;
}

/* Enamad is hidden for now at the merchant's request. This only hides the
   seal on the front end; the widget content, the link and the image src are
   untouched, so deleting this rule (or turning the module off) brings it back.
   The selector list below avoids modern selector functions so older
   browsers hide the seal just as reliably. */
.zardis-footer-enabled .wd-footer .footer-widget .textwidget a[href*="trustseal.enamad.ir"],
.zardis-footer-enabled .wd-footer .footer-widget .textwidget a[href*="trustseal.enamad.ir"] img,
.zardis-footer-enabled .wd-footer .footer-widget .textwidget a[href*="trustseal.enamad.ir"] > img,
.zardis-footer-enabled .wd-footer .footer-widget .textwidget p:empty {
	display: none;
}

.zardis-footer-enabled.zardis-footer-columns .wd-footer .footer-column-1 > .zardis-footer {
	margin-block: 0 16px;
}

.zardis-footer-enabled.zardis-footer-columns .wd-footer .footer-column-1 .textwidget p {
	margin-block: 0;
}

.zardis-footer-enabled .wd-footer .wd-copyrights {
	padding-block: 14px;
	border-block-start: 1px solid var(--zf-line);
	color: var(--zf-muted);
	font-size: 12px;
	line-height: 1.8;
}

/* copyrights2 is suppressed in PHP; avoid leaving an empty second grid track. */
.zardis-footer-enabled .wd-footer .wd-copyrights > .container {
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
}

.zardis-footer-enabled .wd-footer .wd-copyrights .wd-col-start {
	min-inline-size: 0;
	text-align: center;
	overflow-wrap: anywhere;
}

/* Compact changes the real sidebar padding, not additional main-footer
   padding on top of Woodmart's 40px. Typography stays legible. */
.zardis-footer-enabled.zardis-footer-compact .wd-footer {
	--zf-gap: 24px;
}

.zardis-footer-enabled.zardis-footer-compact .wd-footer .footer-sidebar {
	padding-block: 28px;
}

.zardis-footer-enabled.zardis-footer-compact .wd-footer .footer-widget .widget-title {
	margin-block-end: 10px;
	padding-block-end: 8px;
}

.zardis-footer-enabled.zardis-footer-compact .wd-footer .wd-copyrights {
	padding-block: 12px;
}

@media (min-width: 601px) and (max-width: 1024px) {
	.zardis-footer-enabled.zardis-footer-columns .wd-footer .footer-sidebar {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* DOM-first brand/seals span the tablet row; links follow in RTL order. */
	.zardis-footer-enabled.zardis-footer-columns .wd-footer .footer-column-1 {
		grid-column: 1 / -1;
	}
}

@media (max-width: 600px) {
	.zardis-footer-enabled .wd-footer {
		--zf-gap: 24px;
	}

	.zardis-footer-enabled.zardis-footer-columns .wd-footer .footer-sidebar {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Woodmart .container supplies 15px; the module contract requires 16px. */
	.zardis-footer-enabled .wd-footer .main-footer,
	.zardis-footer-enabled .wd-footer .wd-copyrights > .container {
		padding-inline: 16px;
	}

	.zardis-footer-enabled .wd-footer .footer-sidebar,
	.zardis-footer-enabled.zardis-footer-compact .wd-footer .footer-sidebar {
		padding-block: 24px;
	}

	.zardis-footer-enabled .wd-footer .footer-widget {
		font-size: 15px;
	}

	.zardis-footer-enabled .wd-footer .footer-widget .textwidget li > a {
		min-block-size: 44px;
		padding-block: 8px;
	}

	.zardis-footer .zardis-footer__meta a {
		min-block-size: 44px;
		padding-block: 7px;
	}

	/* 44px minimum touch target; the pill may still wrap the label. */
	.zardis-footer .zardis-footer__social-link {
		min-block-size: 44px;
		padding-block: 9px;
		padding-inline: 14px;
		font-size: 15px;
	}

	.zardis-footer .zardis-footer__about,
	.zardis-footer .zardis-footer__meta {
		max-inline-size: none;
		font-size: 15px;
	}

	.zardis-footer .zardis-footer__social {
		max-inline-size: none;
	}
}

/* Coarse pointers (phones/tablets) get the same 44px minimum target even
   above the 600px breakpoint. */
@media (hover: none), (pointer: coarse) {
	.zardis-footer .zardis-footer__social-link {
		min-block-size: 44px;
		padding-block: 9px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.zardis-footer-enabled .wd-footer .footer-widget .textwidget a,
	.zardis-footer .zardis-footer__meta a,
	.zardis-footer .zardis-footer__social-link {
		transition: none;
	}
}
