/* =========================================================================
   CLUTCHES — Base / global styles
   ========================================================================= */

html { scroll-behavior: smooth; }

body {
	font-family: var(--font-ui);
	font-size: var(--fs-base);
	font-weight: var(--fw-regular);
	line-height: var(--lh-base);
	color: var(--c-ink);
	background: var(--c-bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

/* When a drawer/overlay is open we lock scroll. */
body.is-locked { overflow: hidden; }

h1,h2,h3,h4,h5,h6 { margin: 0 0 var(--sp-3); line-height: var(--lh-snug); font-weight: var(--fw-medium); }
p { margin: 0 0 var(--sp-4); }
a { color: var(--c-link); transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--c-muted); }

/* Serif accent headings */
.font-serif,
.accent-heading { font-family: var(--font-serif); font-weight: var(--fw-regular); }

/* Uppercase Latin label utility */
.eyebrow,
.label-caps {
	font-size: var(--fs-xxs);
	letter-spacing: var(--ls-wide);
	text-transform: uppercase;
	color: var(--c-muted);
	font-weight: var(--fw-medium);
}

/* Guard against horizontal overflow from edge-bleed elements.
   `hidden` first as a fallback for older iOS Safari (no `clip` support) —
   without it the marquee track expands the layout viewport and the whole
   page renders zoomed-out and cut on those devices. */
html, body { overflow-x: hidden; overflow-x: clip; max-inline-size: 100vw; }

/* ---- Visually hidden (a11y) + skip link ---- */
.screen-reader-text {
	position: absolute !important;
	left: 0; top: 0; /* physical: keeps the 1px box inside the viewport in RTL */
	width: 1px; height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
.skip-link:focus-visible {
	clip-path: none;
	width: auto; height: auto;
	inset-block-start: 8px; inset-inline-start: 8px;
	background: var(--c-black); color: #fff;
	padding: 10px 16px; z-index: 9999;
}

/* ---- Buttons ---- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--sp-2);
	padding: 14px 28px;
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	letter-spacing: .08em;
	text-transform: uppercase;
	border: 1px solid var(--c-black);
	background: var(--c-black);
	color: var(--c-white);
	border-radius: 0;
	cursor: pointer;
	transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
	text-align: center;
}
.btn:hover { background: var(--c-white); color: var(--c-black); }
.btn--outline { background: transparent; color: var(--c-black); }
.btn--outline:hover { background: var(--c-black); color: var(--c-white); }
.btn--ghost { background: transparent; color: var(--c-ink); border-color: var(--c-line-strong); }
.btn--block { width: 100%; }
.btn--lg { padding: 18px 34px; font-size: var(--fs-base); }
.btn--sale { border-color: var(--c-sale); background: var(--c-sale); color: #fff; }
.btn--sale:hover { background: #fff; color: var(--c-sale); }

/* ---- Forms ---- */
input[type="text"], input[type="email"], input[type="search"], input[type="tel"],
input[type="password"], input[type="number"], select, textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--c-line-strong);
	border-radius: var(--radius-sm);
	background: var(--c-white);
	font-size: var(--fs-base);
	transition: border-color var(--dur-fast) var(--ease);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-black); }

/* ---- Focus visibility (a11y) ---- */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 2px solid var(--c-focus);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

/* ---- Badges ---- */
.badge {
	display: inline-flex; align-items: center;
	padding: 4px 8px;
	font-size: var(--fs-xxs);
	font-weight: var(--fw-bold);
	letter-spacing: var(--ls-wide);
	text-transform: uppercase;
	background: var(--c-badge-bg); color: var(--c-badge-text);
	border-radius: 0;
	line-height: 1;
}
.badge--sale { background: var(--c-hl); color: var(--c-on-hl); }
.badge--new  { background: var(--c-black); }
.badge--out  { background: var(--c-muted); }

/* ---- Price ---- */
.price { font-weight: var(--fw-medium); }
.price del { color: var(--c-muted); font-weight: var(--fw-regular); margin-inline-end: var(--sp-2); }
.price ins { text-decoration: none; color: var(--c-sale); }
.price .pct { color: var(--c-sale); font-size: var(--fs-xs); margin-inline-start: var(--sp-2); }

/* ---- Toast ---- */
#clutches-toast {
	position: fixed;
	inset-block-end: 24px; inset-inline-start: 50%;
	transform: translateX(50%) translateY(20px);
	background: var(--c-black); color: #fff;
	padding: 14px 22px; border-radius: var(--radius);
	font-size: var(--fs-sm); z-index: var(--z-toast);
	opacity: 0; pointer-events: none;
	transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
html[dir="rtl"] #clutches-toast { transform: translateX(-50%) translateY(20px); }
#clutches-toast.is-show { opacity: 1; transform: translateX(50%) translateY(0); }
html[dir="rtl"] #clutches-toast.is-show { transform: translateX(-50%) translateY(0); }

/* Placeholder content marker */
.is-placeholder { position: relative; }
mark.placeholder-tag {
	background: #fff6cc; color: #6b5b00; padding: 0 4px; border-radius: 2px;
	font-size: .85em;
}
