/* =========================================================================
   Evermed — base (loaded on every page; keep it small)
   Colours, fonts and sizes come from the --ev-* tokens printed in <head>.
   ====================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overflow-x: clip; } /* no sideways scroll on phones */

body {
	margin: 0;
	font-family: var(--ev-font);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--ev-ink);
	background: var(--ev-page);
	-webkit-font-smoothing: antialiased;
}

/* ৳ has no glyph in Poppins — always take it from the Bengali font */
.woocommerce-Price-currencySymbol { font-family: var(--ev-font-bn); }

img, svg, video { max-width: 100%; height: auto; }
img { vertical-align: middle; }

a { color: var(--ev-primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ev-primary-dark); }

h1, h2, h3, h4, h5, h6 { line-height: 1.25; color: var(--ev-ink); margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); }
h3 { font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); }
p { margin: 0 0 1em; }

/* Keyboard focus is always visible */
:focus-visible { outline: 3px solid var(--ev-secondary); outline-offset: 2px; }

/* Layout */
.ev-container {
	width: 100%;
	max-width: var(--ev-container);
	margin-inline: auto;
	padding-inline: var(--ev-gutter);
}
.ev-main { display: block; min-height: 50vh; }
.ev-section { --ev-page-pad: clamp(24px, 4vw, 48px); padding-block: var(--ev-page-pad); }
.ev-prose { max-width: 75ch; }

/* Accessibility helpers (same names WordPress core uses) */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.ev-skip-link:focus {
	clip: auto; width: auto; height: auto; margin: 0;
	top: 8px; left: 8px; z-index: 100000;
	padding: 10px 16px;
	background: var(--ev-surface); color: var(--ev-ink);
	border-radius: var(--ev-radius-sm);
	box-shadow: 0 2px 10px rgb(0 0 0 / 20%);
}

/* Icons from assets/icons/sprite.svg */
.ev-icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Buttons */
.ev-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 20px;
	border: 0; border-radius: var(--ev-radius-sm);
	background: var(--ev-primary); color: #fff;
	font: inherit; font-weight: 600; text-decoration: none;
	cursor: pointer;
}
.ev-btn:hover { background: var(--ev-primary-dark); color: #fff; }
.ev-btn--ghost { background: transparent; color: var(--ev-primary); box-shadow: inset 0 0 0 2px var(--ev-primary); }
.ev-btn--ghost:hover { background: var(--ev-primary); color: #fff; }

/* Posts & pages */
.ev-entry-header { margin-bottom: 1.25rem; }
.ev-entry-meta { color: var(--ev-muted); font-size: .9rem; }
.ev-entry-content > * + * { margin-top: 1em; }
.ev-post-list { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.ev-card { background: var(--ev-surface); border: 1px solid var(--ev-line); border-radius: var(--ev-radius); overflow: hidden; }
.ev-card__body { padding: 16px 18px 20px; }
.ev-card__title { font-size: 1.1rem; margin: 0 0 .4em; }
.ev-card__title a { color: var(--ev-ink); text-decoration: none; }
.ev-card__title a:hover { color: var(--ev-primary); }

.ev-pagination { margin-top: 32px; }
.ev-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-pagination .page-numbers {
	min-width: 40px; min-height: 40px; padding: 0 10px;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--ev-line); border-radius: var(--ev-radius-sm);
	background: var(--ev-surface); color: var(--ev-ink); text-decoration: none;
}
.ev-pagination .page-numbers.current { background: var(--ev-primary); border-color: var(--ev-primary); color: #fff; }

.ev-empty { text-align: center; padding-block: 48px; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =========================================================================
   T3 — typography, widths, breadcrumbs, forms
   ====================================================================== */

/* Bengali text reads better a little larger and with more line height */
:lang(bn), .ev-bn { font-family: var(--ev-font-bn); line-height: 1.75; }

/* Content widths (Page layout box) */
.ev-width-narrow { max-width: calc(760px + 2 * var(--ev-gutter)); }
.ev-width-wide { max-width: var(--ev-container); }
.ev-width-full { width: 100%; }
:root { --ev-page-pad: clamp(20px, 3vw, 40px); }
.ev-width-narrow, .ev-width-wide { padding-block: var(--ev-page-pad); }

.ev-entry-title { margin-top: .25em; }

/* Breadcrumbs (Yoast, WooCommerce or theme) */
.ev-breadcrumbs, .woocommerce-breadcrumb {
	font-size: .875rem; color: var(--ev-muted); margin: 0 0 .75rem;
}
.ev-breadcrumbs a, .woocommerce-breadcrumb a { color: var(--ev-muted); text-decoration: none; }
.ev-breadcrumbs a:hover, .woocommerce-breadcrumb a:hover { color: var(--ev-primary); text-decoration: underline; }
.ev-breadcrumbs__sep { margin-inline: .45em; opacity: .6; }

/* Coloured breadcrumb bar right under the menu (full width background, text in the container) */
.ev-crumb-band .ev-breadcrumbs, .ev-crumb-band .woocommerce-breadcrumb {
	margin: calc(-1 * var(--ev-page-pad)) 0 18px;
	padding: 11px 0;
	background: var(--ev-crumb-bg);
	box-shadow: 0 0 0 100vmax var(--ev-crumb-bg);
	clip-path: inset(0 -100vmax);
	font-size: .9rem;
}

/* Readable content (posts, plain pages) */
.ev-prose { font-size: 1.0625rem; }
.ev-prose > * { max-width: 100%; }
.ev-prose h2 { margin-top: 1.8em; }
.ev-prose h3 { margin-top: 1.5em; }
.ev-prose ul, .ev-prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.ev-prose li + li { margin-top: .35em; }
.ev-prose blockquote {
	margin: 1.5em 0; padding: .75em 1.25em;
	border-left: 4px solid var(--ev-primary); background: var(--ev-surface);
	border-radius: 0 var(--ev-radius-sm) var(--ev-radius-sm) 0; color: var(--ev-ink);
}
.ev-prose figure { margin: 1.5em 0; }
.ev-prose figcaption, .wp-element-caption { font-size: .85rem; color: var(--ev-muted); margin-top: .4em; }
.ev-prose img { border-radius: var(--ev-radius-sm); }
.ev-prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; display: block; overflow-x: auto; }
.ev-prose th, .ev-prose td { padding: .6em .8em; border: 1px solid var(--ev-line); text-align: left; }
.ev-prose th { background: var(--ev-page); font-weight: 600; }
.ev-prose code { font-size: .9em; background: var(--ev-page); padding: .1em .35em; border-radius: 4px; }
/* Divider lines: thin and light everywhere (descriptions pasted from other editors bring their own classes/borders) */
hr, .ev-prose hr, .woocommerce-Tabs-panel hr, .term-description hr, .ev-archive__details hr {
	height: 0 !important; margin: 1.6em 0 !important; border: 0 !important;
	border-top: 1px solid var(--ev-hr, #e8ecea) !important; background: none !important; opacity: 1 !important;
}
.ev-entry-thumb { margin: 0 0 1.5em; }
.ev-entry-thumb img { width: 100%; border-radius: var(--ev-radius); }

/* Core block buttons follow the brand */
.wp-block-button__link { background: var(--ev-primary); color: #fff; border-radius: var(--ev-radius-sm); padding: .7em 1.4em; font-weight: 600; text-decoration: none; }
.wp-block-button__link:hover { background: var(--ev-primary-dark); color: #fff; }

/* Forms (comments, search, WooCommerce account/checkout inherit these) */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"],
input[type="password"], input[type="number"], select, textarea {
	font: inherit; color: var(--ev-ink);
	min-height: 44px; padding: 8px 12px;
	background: var(--ev-surface);
	border: 1px solid color-mix(in srgb, var(--ev-line) 70%, var(--ev-muted));
	border-radius: var(--ev-radius-sm);
	max-width: 100%;
}
textarea { min-height: 120px; }
input:focus, select:focus, textarea:focus { border-color: var(--ev-primary); outline: 2px solid color-mix(in srgb, var(--ev-primary) 30%, transparent); outline-offset: 0; }
button, input[type="submit"] { font: inherit; }

.search-form { display: flex; gap: 8px; max-width: 520px; margin-inline: auto; }
.search-form label { flex: 1; }
.search-form .search-field { width: 100%; }
.search-form .search-submit, .woocommerce-product-search button {
	min-height: 44px; padding: 0 18px; border: 0; border-radius: var(--ev-radius-sm);
	background: var(--ev-primary); color: #fff; font-weight: 600; cursor: pointer;
}
.woocommerce-product-search { display: flex; gap: 8px; max-width: 520px; margin-inline: auto; }
.woocommerce-product-search .search-field { flex: 1; }

/* ---------- "More this way" arrows on horizontal rows (scroll-hints.js) ---------- */
.ev-edge {
	position: absolute; z-index: 4; top: 50%; transform: translateY(-50%);
	width: 36px; height: 36px; padding: 0; display: grid; place-items: center;
	border: 1px solid var(--ev-line); border-radius: 50%; cursor: pointer;
	background: rgb(255 255 255 / 96%); color: var(--ev-ink);
	box-shadow: 0 4px 14px rgb(16 24 20 / 16%);
	transition: transform .15s, color .15s;
}
.ev-edge[hidden] { display: none; }
.ev-edge--prev { left: 4px; }
.ev-edge--next { right: 4px; animation: ev-edge-nudge 1.6s ease-in-out 2; }
.ev-edge:hover { color: var(--ev-primary); }
.ev-edge svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes ev-edge-nudge { 0%, 100% { transform: translateY(-50%); } 50% { transform: translate(4px, -50%); } }
@media (prefers-reduced-motion: reduce) { .ev-edge--next { animation: none; } }
/* Computers already have the arrow pair next to slider titles */
@media (min-width: 768px) { .ev-slider > .ev-edge { display: none; } }
