/* AYRAERYNA brand foundation: colour and type tokens, small utilities, the WhatsApp button.
   Scheme from the approved mockups: black (ink) and white, with greys in between, set in Outfit.
   RED IS NOT A BRAND COLOUR HERE. Red #DC2626 (--ay-red) is used only for: the sale price, the cart-count
   badge in the header and the phone nav, the NEW label in the mega menu, the cart/checkout upsell panel and the
   video "Added" state. Every button is ink (black) and turns a soft black on hover. The reward pill is white on green.
   Contrast (measured): ink #111 on white 18.9:1; muted #666 on white 5.74:1; white on --ay-red 4.83:1;
   white on --ay-ok #2F6B4F 6.4:1; white on --ay-wa 5.06:1.
   The names with the "ay" prefix are the ones this theme's own CSS uses. The "qav" / "e-global" lines at the end are
   bridges: IGSHOP Shop Kit and TikTok Style Checkout read them, so one colour set here drives the theme and both plugins. */

:root {
	/* colours */
	--ay-ink: #111111;
	--ay-ink-2: #3A3A3A;
	--ay-muted: #666666;        /* 5.74:1 on white */
	--ay-line: #E5E5E5;
	--ay-line-2: #D2D2D2;
	--ay-wash: #F2F2F2;
	--ay-mist: #F6F6F6;
	--ay-paper: #FFFFFF;
	--ay-hover: #333333;        /* ink buttons, hovered */
	--ay-red: #DC2626;          /* sale price, cart badge, NEW label, upsell panel, video "Added": nothing else */
	--ay-ok: #2F6B4F;           /* reward pill (white text on this green) */
	--ay-wa: #157F43;           /* WhatsApp green, darkened so white text reads (5.06:1; the brand green #1FAF54 gives only 2.87:1) */
	--ay-sale: #DC2626;         /* "RMxx off" / "You've saved" labels: this red on every site, never ink or flash red */

	/* type: Outfit for everything. "Outfit Fallback" is a resized Arial (assets/fonts.css) so text does not jump. */
	--ay-sans: "Outfit", "Outfit Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	/* layout */
	--ay-wrap: 1280px;
	--ay-gut: clamp(16px, 2.2vw, 32px);
	--ann-h: 38px;              /* announcement bar height; the header is placed below it when it lies over a hero */
	--ay-top-h: 72px;           /* header bar height */

	/* Plugin bridges: the accent is ink, because this brand has no colour accent */
	--qav-brand-primary: #111111;
	--qav-brand-accent: #111111;
	--e-global-color-primary: #111111;
	--e-global-color-secondary: #111111;
	--e-global-color-accent: #111111;
	--e-global-color-text: #3A3A3A;

	/* TikTok Style Video (milestone 6, SUPERSUNDAY format): ink, square corners; the plugin's red only for
	   "Added to cart", a liked heart and the "pick a size" label */
	--tsv-accent: #111111;
	--tsv-ink: #111111;
	--tsv-muted: #666666;
	--tsv-line: #E5E5E5;
	--tsv-soft: #F2F2F2;
	--tsv-radius: 0;
	--tsv-chip-radius: 0;
	--tsv-sale: #111111;         /* the sheet's price: ink, like the product page (the plugin uses it for every price) */
	--tsv-off-bg: #DC2626;       /* its "-20%" badge: sale red */
	--tsv-red: #DC2626;
	--tsv-mini-bottom: 20px;     /* the minimised video, bottom left */
}

@media (max-width: 900px) {
	:root { --ann-h: 34px; --ay-top-h: 56px; --tsv-mini-bottom: 78px; } /* minimised video clear of TSC's phone bar */
}

body {
	background: var(--ay-paper);
	color: var(--ay-ink);
	font-family: var(--ay-sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

/* Headings are regular weight (400); nav, tabs, buttons and size boxes are 500 uppercase (set where they are drawn). */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--ay-sans);
	font-weight: 400;
	color: var(--ay-ink);
	text-wrap: balance;
}

a { color: var(--ay-ink); }
a:hover { color: var(--ay-ink); }

:focus-visible {
	outline: 2px solid var(--ay-ink);
	outline-offset: 2px;
}

/* Text for screen readers only. Every size is !important: the parent theme gives form fields
   width:100%, which would otherwise stretch a hidden field across the page and add a sideways scroll. */
.nl-sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	min-width: 0 !important;
	margin: -1px !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
}

/* ---------------------------------------------------------------- buttons (theme-printed ones: Main page, About, shop pages)
   Ink with white text, going soft black on hover; "--white" is for use over photos (white, turning ink). Never a coloured button. */
.ay-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 32px; border: 1px solid var(--ay-ink);
	border-radius: 0; background: var(--ay-ink); color: #fff; font-family: var(--ay-sans); font-size: 13px; font-weight: 500; line-height: 1.2;
	letter-spacing: .1em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.ay-btn:hover { background: var(--ay-hover); border-color: var(--ay-hover); color: #fff; }
.ay-btn--white { background: #fff; border-color: #fff; color: var(--ay-ink); }
.ay-btn--white:hover { background: var(--ay-ink); border-color: var(--ay-ink); color: #fff; }
.ay-btn--white:focus-visible { outline-color: #fff; }
/* "--ghost": an outlined second choice next to an ink button (Show more reviews, the 404 page's "Back to home"). */
.ay-btn--ghost { background: transparent; color: var(--ay-ink); }
.ay-btn--ghost:hover { background: var(--ay-ink); color: #fff; }

/* ---------------------------------------------------------------- WhatsApp float (printed on the main page only, see functions.php) */
.ay-wa {
	position: fixed;
	right: 20px;
	bottom: 22px;
	z-index: 45;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--ay-wa);
	color: #fff;
	border-radius: 999px;
	padding: 11px 18px 11px 14px;
	font-size: 13.5px;
	font-weight: 500;
	box-shadow: 0 8px 24px rgba(21, 127, 67, .35);
}
.ay-wa:hover { color: #fff; background: #0F6A38; }
.ay-wa svg { flex: none; }

@media (max-width: 900px) {
	/* round icon button, clear of TikTok Style Checkout's phone bottom bar */
	.ay-wa { padding: 0; width: 48px; height: 48px; justify-content: center; right: 14px; bottom: 78px; }
	.ay-wa span { display: none; }
}

/* ---------------------------------------------------------------- "Recently bought" bubble (Shop Kit)
   Shop Kit draws the bubble 16px above the bottom edge. On phones that is behind TSC's fixed bottom bar
   (z-index 9990). Shop Kit reads --qav-notif-bottom: set here to the height of the bar on screen plus a
   12px gap; Shop Kit adds the iPhone safe area itself. */
@media (max-width: 767px) {
	body { --qav-notif-bottom: 69px; }                          /* Home / Orders / Profile nav: 56px + 1px line */
	body.tsc-has-pbar { --qav-notif-bottom: 77px; }             /* product page bar: 64px + 1px line */
	body:has(.tsc-listbar) { --qav-notif-bottom: 77px; }        /* shop page cart bar: 64px + 1px line */
	body:has(.tsc-listbar .tsc-cart__freeship) { --qav-notif-bottom: 135px; } /* the same bar with the free-shipping strip: 122px + 1px line */
}
@media (max-width: 480px) {
	/* Shop Kit stretches the bubble across the whole phone; stop it short of the WhatsApp button (48px, 14px from the edge). */
	body .qav-notif { right: calc(76px + env(safe-area-inset-right, 0px)); }
}
