/*
 * Pharmacy Child Design System — "Professional Medical" foundation.
 *
 * Canonical design tokens, base typography, focus treatment, shared
 * containers and the product-grid primitives used by catalog views.
 * Loaded before homepage.css and all page-specific styles.
 *
 * Scope: storefront body scopes added by the child theme. Token names are
 * stable: shop, single-product, cart/checkout and account styles consume them.
 */

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

body.pharmacy-modern {
	/* Brand palette — deep emerald / teal */
	--primary:#075A50;
	--primary-deep:#064A43;
	--primary-strong:#0A6B5E;
	--mint:#DDF3EC;
	--navy:#18312E;
	--white:#fff;
	--muted:#64766F;
	--border:#e3eae6;
	--border-strong:#c9dad2;
	--border-accent:#c2e3d6;
	--soft:#f7f9f8;
	--peach:#fbf0e8;
	--blue:#edf3f9;
	--sand:#f7f3e9;
	--lilac:#f2eff8;
	--sale:#b3402e;
	--danger:#a13636;
	--danger-soft:#fff3f1;
	--danger-border:#e5b5b0;
	--warning:#815b19;

	/* Accent surfaces and subtle lines */
	--mint-soft:#f0f9f5;
	--mint-ring:#cdeade;
	--mint-orbit:#c4e5d9;
	--mint-leaf:#c5e7d9;
	--mint-hover:#b3d9cc;
	--mint-glow:#badcce;
	--mint-line:#d3e9e0;
	--media-border:#e7efec;
	--media-bg:#f5f9f7;
	--neutral-soft:#eef1f0;
	--neutral-text:#5c6d68;

	/* Elevation and overlays */
	--shadow-color:#0d4a4214;
	--shadow-soft-color:#0d4a4210;
	--shadow-subtle-color:#0d4a420c;
	--shadow-gallery-color:#0d4a4208;
	--shadow-purchase-color:#075a500c;
	--shadow-accent-color:#075a5033;
	--focus-ring-color:#075a501f;
	--overlay-color:#06302c73;
	--white-60:#ffffff60;
	--white-70:#ffffff70;

	/* Typography */
	--font-sans:Vazirmatn,sans-serif;
	--text-2xs:10px;
	--text-xs:12px;
	--text-sm:14px;
	--text-md:16px;
	--text-lg:20px;
	--text-xl:24px;
	--text-2xl:28px;
	--text-3xl:32px;

	/* Existing spacing aliases, kept for page-level compatibility */
	--s12:12px;
	--s14:14px;
	--s16:16px;
	--s20:20px;
	--s28:28px;
	--s48:48px;
	--space-1:4px;
	--space-2:8px;
	--space-3:12px;
	--space-4:16px;
	--space-6:24px;
	--space-8:32px;
	--space-12:48px;

	/* Layout */
	--container-max:1280px;
	--container-gutter:80px;
	--container-gutter-md:48px;
	--container-gutter-sm:32px;

	/* Radii */
	--radius-2xs:6px;
	--radius-xs:8px;
	--radius-sm:10px;
	--radius-14:14px;
	--radius:16px;
	--radius-18:18px;
	--radius-card:20px;
	--radius-hero:24px;
	--radius-32:32px;
	--radius-pill:999px;
	--control:12px;

	/* Controls */
	--control-h-sm:44px;
	--control-h:48px;
	--control-h-lg:52px;
	--field-h:52px;

	/* Motion and elevation */
	--motion:180ms;
	--shadow:0 14px 34px var(--shadow-color);
	--shadow-soft:0 8px 22px var(--shadow-soft-color);

	/* Blocksy and WooCommerce integration */
	--theme-font-family:var(--font-sans);
	--theme-headings-font-family:var(--font-sans);
	--theme-text-color:var(--navy);
	--theme-link-initial-color:var(--primary);
	--theme-link-hover-color:var(--primary-deep);
	--theme-button-background-initial-color:var(--primary);
	--theme-button-background-hover-color:var(--primary-deep);
	--theme-palette-color-1:var(--primary);
	--theme-palette-color-2:var(--navy);
	--theme-form-field-border-initial-color:var(--border-strong);
	--theme-form-field-border-focus-color:var(--primary);
	--theme-form-field-border-radius:var(--control);
	--theme-button-text-initial-color:var(--white);
	--theme-button-text-hover-color:var(--white);
	--theme-button-border-radius:var(--control);
}

/* Base */
body.pharmacy-modern * {
	box-sizing:border-box;
}
body.pharmacy-modern {
	margin:0;
	background:var(--soft);
	color:var(--navy);
	font-family:var(--font-sans);
	font-size:var(--s14);
	line-height:1.8;
}
body.pharmacy-modern button,
body.pharmacy-modern input,
body.pharmacy-modern select,
body.pharmacy-modern textarea {
	font:inherit;
}
body.pharmacy-modern button,
body.pharmacy-modern input,
body.pharmacy-modern a {
	-webkit-tap-highlight-color:transparent;
}
body.pharmacy-modern button,
body.pharmacy-modern a {
	touch-action:manipulation;
}
body.pharmacy-modern button {
	cursor:pointer;
	color:inherit;
	border:0;
	background:none;
}
body.pharmacy-modern a {
	color:inherit;
	text-decoration:none;
}
body.pharmacy-modern button,
body.pharmacy-modern a {
	transition:background var(--motion),color var(--motion),box-shadow var(--motion),transform var(--motion),border-color var(--motion);
}
body.pharmacy-modern img {
	max-inline-size:100%;
	display:block;
}
body.pharmacy-modern h1,
body.pharmacy-modern h2,
body.pharmacy-modern h3,
body.pharmacy-modern p {
	margin:0;
}
body.pharmacy-modern h1,
body.pharmacy-modern h2,
body.pharmacy-modern h3 {
	font-family:var(--font-sans);
	color:var(--navy);
	line-height:1.5;
}
body.pharmacy-modern i[data-lucide],
body.pharmacy-modern svg.lucide {
	inline-size:20px;
	block-size:20px;
	flex-shrink:0;
	stroke-width:1.7;
}

/* One visible keyboard focus treatment for the whole storefront. */
body.pharmacy-modern :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible {
	outline:3px solid var(--primary);
	/* WooCommerce block buttons ship a transparent focus outline. */
	outline-color:var(--primary)!important;
	outline-offset:4px;
}
body.pharmacy-modern :is(input,select,textarea) {
	accent-color:var(--primary);
}

/* Shared page shell */
body.pharmacy-modern #main {
	padding:0;
}
body.pharmacy-modern .wrap {
	inline-size:calc(100% - var(--container-gutter));
	max-inline-size:var(--container-max);
	margin-inline:auto;
}
body.pharmacy-shop #main > [class*="ct-container"],
body.pharmacy-single #main > [class*="ct-container"],
body.pharmacy-transaction #main > [class*="ct-container"],
body.pharmacy-account #main > [class*="ct-container"] {
	inline-size:calc(100% - var(--container-gutter));
	max-inline-size:var(--container-max);
	margin-inline:auto;
	display:block;
}
@media(max-width:1180px) {
	body.pharmacy-modern .wrap,
	body.pharmacy-shop #main > [class*="ct-container"],
	body.pharmacy-single #main > [class*="ct-container"],
	body.pharmacy-transaction #main > [class*="ct-container"],
	body.pharmacy-account #main > [class*="ct-container"] {
		inline-size:calc(100% - var(--container-gutter-md));
	}
}
@media(max-width:600px) {
	body.pharmacy-modern .wrap,
	body.pharmacy-shop #main > [class*="ct-container"],
	body.pharmacy-single #main > [class*="ct-container"],
	body.pharmacy-transaction #main > [class*="ct-container"],
	body.pharmacy-account #main > [class*="ct-container"] {
		inline-size:calc(100% - var(--container-gutter-sm));
	}
}

/* Shared primary button primitive */
body.pharmacy-modern .button {
	display:inline-flex;
	align-items:center;
	justify-content:center;
	gap:20px;
	min-block-size:var(--control-h);
	border-radius:var(--control);
	padding:12px 24px;
	font-weight:600;
}
body.pharmacy-modern .primary {
	background:var(--primary);
	color:var(--white);
	box-shadow:0 10px 22px var(--shadow-purchase-color);
}
body.pharmacy-modern .primary:hover {
	background:var(--primary-deep);
	transform:translateY(-1px);
}

/* Shared catalog grid primitives used by shop and related products. */
body.pharmacy-shop ul.products,
body.pharmacy-single ul.products {
	display:grid;
	grid-template-columns:repeat(4,minmax(0,1fr));
	gap:20px;
	padding:0;
	margin:0;
	list-style:none;
}
body.pharmacy-shop ul.products::before,
body.pharmacy-shop ul.products::after,
body.pharmacy-single ul.products::before,
body.pharmacy-single ul.products::after {
	content:none;
}
body.pharmacy-shop ul.products > li.pharmacy-shop-item,
body.pharmacy-single ul.products > li.pharmacy-shop-item {
	display:flex;
	min-inline-size:0;
	inline-size:auto;
	margin:0;
	padding:0;
	background:transparent;
	border:0;
	box-shadow:none;
}
body.pharmacy-shop .pharmacy-shop-item > .product-card,
body.pharmacy-single .pharmacy-shop-item > .product-card {
	inline-size:100%;
}
body.pharmacy-shop .product-media img,
body.pharmacy-single .product-media img {
	border-radius:var(--control);
}
@media(max-width:900px) {
	body.pharmacy-shop ul.products,
	body.pharmacy-single ul.products {
		grid-template-columns:repeat(3,minmax(0,1fr));
		gap:16px;
	}
}
@media(max-width:600px) {
	body.pharmacy-shop ul.products,
	body.pharmacy-single ul.products {
		grid-template-columns:repeat(2,minmax(0,1fr));
		gap:12px;
	}
}

/* Shared page banner used by cart, checkout and account. */
body.pharmacy-transaction .hero-section,
body.pharmacy-account .hero-section {
	inline-size:100%;
	max-inline-size:none;
	padding:28px 32px;
	margin-block-end:32px;
	border:1px solid var(--border);
	border-radius:var(--radius-card);
	background:var(--mint);
}
@media(max-width:600px) {
	body.pharmacy-transaction .hero-section,
	body.pharmacy-account .hero-section {
		padding:20px;
		margin-block-end:24px;
		border-radius:var(--radius);
	}
}

@media(prefers-reduced-motion:reduce) {
	body.pharmacy-modern *,
	body.pharmacy-modern *::before,
	body.pharmacy-modern *::after {
		animation:none !important;
		scroll-behavior:auto !important;
		transition:none !important;
	}
}
