/**
 * LinkCo storefront foundations.
 *
 * The project self-hosts one variable Persian font and maps WoodMart's public
 * typography variables to it so theme-generated type settings have a reliable
 * local fallback.
 */

@font-face {
	font-family: "Vazirmatn";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/Vazirmatn-wght.woff2") format("woff2");
}

html:root {
	--linkco-font-sans: "Vazirmatn", Tahoma, Arial, sans-serif;
	--linkco-font-data: "Vazirmatn", ui-monospace, SFMono-Regular, Consolas, monospace;
	--linkco-accent: var(--wd-primary-color, #83b735);
	--linkco-accent-strong: color-mix(in srgb, var(--linkco-accent) 68%, #17201b);
	--linkco-ink: #14201d;
	--linkco-ink-soft: #26332f;
	--linkco-muted: #5d6965;
	--linkco-border: #dce3df;
	--linkco-surface: #fbfcfa;
	--linkco-surface-soft: #f1f4f1;
	--linkco-surface-warm: #f4f1e8;
	--linkco-success: #16794b;
	--linkco-radius-sm: 10px;
	--linkco-radius-md: 18px;
	--linkco-radius-lg: 30px;
	--linkco-shadow-sm: 0 8px 24px rgba(20, 32, 29, 0.06);
	--linkco-shadow: 0 24px 70px rgba(20, 32, 29, 0.11);
	--linkco-shell: min(1240px, calc(100% - 48px));

	/* WoodMart typography tokens are corrected at child-theme level. */
	--wd-text-font: "Vazirmatn", Tahoma, Arial, sans-serif;
	--wd-title-font: "Vazirmatn", Tahoma, Arial, sans-serif;
	--wd-entities-title-font: "Vazirmatn", Tahoma, Arial, sans-serif;
	--wd-alternative-font: "Vazirmatn", Tahoma, Arial, sans-serif;
	--wd-widget-title-font: "Vazirmatn", Tahoma, Arial, sans-serif;
	--wd-header-el-font: "Vazirmatn", Tahoma, Arial, sans-serif;
}

body.wp-child-theme-woodmart-linkco,
body.wp-child-theme-woodmart-linkco button,
body.wp-child-theme-woodmart-linkco input,
body.wp-child-theme-woodmart-linkco select,
body.wp-child-theme-woodmart-linkco textarea {
	font-family: var(--linkco-font-sans);
}

.linkco-storefront,
.linkco-home {
	color: var(--linkco-ink);
	font-family: var(--linkco-font-sans);
}

.linkco-shell {
	width: var(--linkco-shell);
	margin-inline: auto;
}

.linkco-kicker {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 12px;
	color: var(--linkco-accent-strong);
	font-size: 12px;
	font-weight: 750;
	letter-spacing: 0;
}

.linkco-kicker::before {
	width: 30px;
	height: 2px;
	border-radius: 999px;
	background: var(--linkco-accent);
	content: "";
}

.linkco-button {
	display: inline-flex;
	min-height: 50px;
	align-items: center;
	justify-content: center;
	padding: 11px 24px;
	border: 1px solid transparent;
	border-radius: var(--linkco-radius-sm);
	font-weight: 750;
	line-height: 1.4;
	text-decoration: none;
	touch-action: manipulation;
	transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.linkco-button:hover {
	transform: translateY(-2px);
}

.linkco-button:active {
	transform: translateY(0) scale(0.985);
}

.linkco-button--primary {
	background: var(--linkco-ink);
	box-shadow: 0 12px 28px rgba(20, 32, 29, 0.18);
	color: #fff;
}

.linkco-button--primary:hover {
	background: var(--linkco-ink-soft);
	color: #fff;
}

.linkco-button--secondary {
	border-color: var(--linkco-border);
	background: rgba(255, 255, 255, 0.76);
	color: var(--linkco-ink);
}

.linkco-button--secondary:hover {
	border-color: var(--linkco-accent-strong);
	color: var(--linkco-accent-strong);
}

.linkco-button:focus-visible,
.linkco-text-link:focus-visible,
.linkco-category-card:focus-visible,
.linkco-storefront :where(a, button, input, select, textarea):focus-visible,
.linkco-home :where(a, button, input, select, textarea):focus-visible {
	outline: 3px solid color-mix(in srgb, var(--linkco-accent) 55%, white);
	outline-offset: 3px;
}

.linkco-product-sku {
	display: flex;
	min-height: 22px;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	margin-block: 7px 4px;
	color: var(--linkco-muted);
	font-family: var(--linkco-font-data);
	font-size: 11px;
	direction: ltr;
	text-align: left;
}

.linkco-product-sku span {
	padding: 2px 6px;
	border-radius: 5px;
	background: var(--linkco-surface-soft);
	font-size: 9px;
	font-weight: 750;
	letter-spacing: 0.08em;
}

.linkco-product-sku bdi {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (max-width: 767px) {
	html:root {
		--linkco-shell: min(1240px, calc(100% - 28px));
		--linkco-radius-lg: 22px;
	}

	.linkco-button {
		min-height: 48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.linkco-button {
		transition: none;
	}

	.linkco-button:hover,
	.linkco-button:active {
		transform: none;
	}
}
