/* SUPER SUNDAY brand foundation: colour and type tokens, small utilities, the WhatsApp button.
   Scheme from the approved mockups: signal red #D22402, ink #111 and white, with greys in between.
   Red is for the brand moments (header, links on hover, sale prices, the footer lettering); every
   button that does something is ink (black) and turns red on hover.
   Contrast (measured): white on this red and this red on white are both 5.26:1, so either way round
   passes for normal-size text; --ss-red-deep (7.42:1 on white) is the darker red for hover states.
   The names with the "ss" prefix are the ones this theme's own CSS uses. The "qav" lines at the end are
   bridges: IGSHOP Shop Kit and TikTok Style Checkout read them, so one brand colour set here drives the
   theme and both plugins. */

:root {
	/* colours */
	--ss-red: #D22402;
	--ss-red-deep: #A81C00;     /* darker red for hover states (7.42:1 on white) */
	--ss-ink: #111111;
	--ss-ink-2: #333333;
	--ss-muted: #6B6B6B;        /* 5.3:1 on white */
	--ss-line: #E6E6E6;
	--ss-line-2: #CFCFCF;
	--ss-wash: #F2F2F2;
	--ss-mist: #F5F5F5;
	--ss-paper: #FFFFFF;
	--ss-hover: #2B2B2B;        /* ink buttons, hovered */
	--ss-ok: #1F7A4D;
	--ss-wa: #157F43;            /* WhatsApp green, darkened so white text reads (5.06:1; the brand green #1FAF54 gives only 2.87:1) */
	--ss-sale: #DC2626;         /* "RMxx off" / "You've saved" labels: this red on every site, never ink or flash red */

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

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

	/* Plugin bridges */
	--qav-brand-primary: #111111;
	--qav-brand-accent: #D22402;
	--e-global-color-primary: #111111;
	--e-global-color-secondary: #D22402;
	--e-global-color-accent: #D22402;
	--e-global-color-text: #333333;

	/* TikTok Style Video (milestone 6): red + ink, square corners, the plugin's red for "Added to cart" */
	--tsv-accent: #D22402;
	--tsv-ink: #111111;
	--tsv-muted: #6B6B6B;
	--tsv-line: #E6E6E6;
	--tsv-soft: #F5F5F5;
	--tsv-radius: 0;
	--tsv-chip-radius: 0;
	--tsv-red: #DC2626;
	--tsv-price: #111111;        /* a regular price in the product sheet is ink; a sale price keeps the red accent */
	--tsv-mini-bottom: 20px;     /* the minimised video, bottom left */
}

@media (max-width: 900px) {
	:root { --ann-h: 30px; --ss-top-h: 56px; --tsv-mini-bottom: 78px; } /* clear of TSC's phone bars */
}

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

h1, h2, h3, h4, h5, h6 {
	font-family: var(--ss-sans);
	font-weight: 700;
	color: var(--ss-ink);
	text-wrap: balance;
}

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

:focus-visible {
	outline: 2px solid var(--ss-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, turning red on hover; "--white" is for use over photos (white, turning ink). Never a red button. */
.ss-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 32px; border: 1px solid var(--ss-ink);
	border-radius: 0; background: var(--ss-ink); color: #fff; font-family: var(--ss-sans); font-size: 13px; font-weight: 600; line-height: 1.2;
	letter-spacing: .1em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.ss-btn:hover { background: var(--ss-red); border-color: var(--ss-red); color: #fff; }
.ss-btn--white { background: #fff; border-color: #fff; color: var(--ss-ink); }
.ss-btn--white:hover { background: var(--ss-ink); border-color: var(--ss-ink); color: #fff; }
.ss-btn--white:focus-visible { outline-color: #fff; }

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

@media (max-width: 900px) {
	/* round icon button, clear of TikTok Style Checkout's phone bottom bar */
	.ss-wa { padding: 0; width: 48px; height: 48px; justify-content: center; right: 14px; bottom: 78px; }
	.ss-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)); }
}

/* IGSHOP Live Shop: the live page (/live/) in the brand colours and font (milestone 7). The plugin reads these tokens;
   "body .igls" outranks the plugin's own ".igls" defaults whichever stylesheet loads first. */
body .igls {
	--igls-accent: var(--ss-red);
	--igls-sale: var(--ss-sale);
	--igls-ink: var(--ss-ink);
	--igls-ink-2: var(--ss-ink-2);
	--igls-muted: var(--ss-muted);
	--igls-line: var(--ss-line);
	--igls-line-2: var(--ss-line-2);
	--igls-font: var(--ss-sans);
}
