/*
Theme Name:   Edge Sportswear
Theme URI:    https://edge-sportswear.local/
Description:  Astra child theme for Edge Sportswear. Custom storefront chrome + design system. Lives in its own folder (edge-sportswear) to avoid the slug collision with the unrelated "Edge" theme.
Author:       Edge Sportswear
Author URI:   https://edge-sportswear.local/
Template:     astra
Version:      1.9.28
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  edge
Tags:         astra, child-theme, woocommerce
*/

/* ------------------------------------------------------------------
   Add your custom styles below this line.
   ------------------------------------------------------------------ */

/* ==================================================================
   Astra compatibility — keep Edge's intended look on the homepage.
   This file loads last, so these win over Astra at equal specificity.
   ================================================================== */

/* Astra sets explicit colors on h1–h6, which overrides the white our
   design system relies on via inheritance. Edge headings are always
   white (accents live on labels/spans, never on headings). */
.edge-app h1,
.edge-app h2,
.edge-app h3,
.edge-app h4,
.edge-app h5,
.edge-app h6 {
	color: var(--fg);
}

/* The mobile hamburger is an .edge-iconbtn.only-mobile. Because
   `.edge-iconbtn { display:inline-flex }` is declared after the
   `.only-mobile { display:none }` utility at equal specificity, the
   button would show on desktop. Re-assert the desktop/mobile toggle
   with a slightly more specific selector. */
.edge-header__inner .only-mobile {
	display: none;
}
.edge-app.is-mobile .edge-header__inner .only-mobile {
	display: inline-flex;
}

/* Remove Astra's built-in scroll-to-top arrow entirely (also disabled via
   theme_mod). Edge provides its own bottom nav instead. */
#ast-scroll-top {
	display: none !important;
}

/* Astra's WooCommerce integration applies a link-level color to every <a> on
   .woocommerce-* pages (specificity 0,1,1 via `.woocommerce a`). This bleeds
   into our <a class="edge-btn edge-btn--primary"> checkout buttons, making
   their text appear blue. Re-assert with (0,2,1) — beats Astra, style.css
   loads last so it wins over the design system at equal specificity. */
.edge-app a.edge-btn--primary { background: var(--accent); color: #fff; }
.edge-app a.edge-btn--primary:hover,
.edge-app a.edge-btn--primary:focus { background: var(--edge-red); color: #fff; }

/* Astra sets a global blue background on all <button> elements via its palette.
   Re-assert Edge's icon buttons as transparent dark circles. */
.edge-app .edge-iconbtn { background: transparent !important; color: var(--fg) !important; }
.edge-app .edge-iconbtn:hover { background: rgba(255,255,255,0.08) !important; }
.edge-app .edge-iconbtn:active { background: rgba(255,255,255,0.14) !important; }

/* ==================================================================
   WooCommerce surgical overrides — must beat WC + Astra inline CSS.
   style.css loads last; !important ensures we win every specificity
   battle the theme/plugin CSS tries to start.
   ================================================================== */

/* FIX 1 — WooCommerce checkout button.
   WC outputs <a class="checkout-button button alt wc-forward"> inside
   .wc-proceed-to-checkout. Astra colours it with its palette primary.
   We completely restyle it to match the Edge ADD TO CART button. */
.wc-proceed-to-checkout a.checkout-button,
.woocommerce a.checkout-button,
.woocommerce-page a.checkout-button,
a.checkout-button.button {
	display: block !important;
	background: #C8102E !important;
	color: #fff !important;
	border: 1px solid transparent !important;
	border-radius: 0 !important;
	font-family: 'Rajdhani', 'Oswald', 'Arial Narrow', sans-serif !important;
	font-weight: 700 !important;
	font-size: 14px !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
	text-align: center !important;
	padding: 18px 24px !important;
	width: 100% !important;
	box-sizing: border-box !important;
	transition: background 0.18s ease !important;
}
.wc-proceed-to-checkout a.checkout-button:hover,
.wc-proceed-to-checkout a.checkout-button:focus,
.woocommerce a.checkout-button:hover,
.woocommerce-page a.checkout-button:hover {
	background: #a30d26 !important;
	color: #fff !important;
	text-decoration: none !important;
}
.wc-proceed-to-checkout a.checkout-button:active,
a.checkout-button.button:active {
	background: #8c0b20 !important;
}

/* FIX 2 — Qty input: WC/Astra default is a white box. Dark-theme it. */
.woocommerce .quantity input.qty,
.woocommerce-cart .quantity input.qty,
.woocommerce-page .quantity input.qty,
.woocommerce input.qty {
	background: var(--bg-elevated, #111) !important;
	background-color: var(--bg-elevated, #111) !important;
	color: #fff !important;
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
	border-radius: 0 !important;
	-moz-appearance: textfield !important;
	appearance: textfield !important;
}
.woocommerce .quantity input.qty::-webkit-outer-spin-button,
.woocommerce .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none !important; margin: 0 !important; }
.woocommerce .quantity input.qty:focus,
.woocommerce-cart .quantity input.qty:focus {
	border-color: rgba(255, 255, 255, 0.45) !important;
	outline: none !important;
	box-shadow: none !important;
}

/* FIX 3 (CSS) — Cross-sells area: WC default loop with red italic names,
   blue "Select options" buttons, white SALE badge. Nuke them all. */
.cross-sells h2 {
	font-family: 'Rajdhani', 'Oswald', 'Arial Narrow', sans-serif !important;
	font-weight: 700 !important;
	font-size: 13px !important;
	letter-spacing: 0.18em !important;
	text-transform: uppercase !important;
	color: #fff !important;
	font-style: normal !important;
}
.cross-sells a,
.cross-sells ul.products li.product a { color: #fff !important; font-style: normal !important; text-decoration: none !important; }
.cross-sells .woocommerce-loop-product__title,
.cross-sells h2.woocommerce-loop-product__title { color: #fff !important; font-style: normal !important; font-size: 13px !important; line-height: 1.3 !important; }
.cross-sells .price, .cross-sells .amount, .cross-sells .woocommerce-Price-amount { color: rgba(255,255,255,0.7) !important; }
.cross-sells .button,
.cross-sells a.button,
.cross-sells .add_to_cart_button,
.cross-sells a.add_to_cart_button {
	background: #C8102E !important;
	background-color: #C8102E !important;
	color: #fff !important;
	border: none !important;
	border-radius: 0 !important;
	font-family: 'Rajdhani', 'Oswald', 'Arial Narrow', sans-serif !important;
	font-weight: 700 !important;
	font-size: 11px !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
	padding: 10px 14px !important;
}
.cross-sells .button:hover,
.cross-sells a.button:hover,
.cross-sells .add_to_cart_button:hover {
	background: #a30d26 !important;
	background-color: #a30d26 !important;
	color: #fff !important;
	text-decoration: none !important;
}
/* SALE badge — restyle to match Edge's label system (red, no radius, condensed). */
.cross-sells .onsale {
	background: #C8102E !important;
	background-color: #C8102E !important;
	color: #fff !important;
	border-radius: 0 !important;
	font-family: 'Rajdhani', 'Oswald', 'Arial Narrow', sans-serif !important;
	font-weight: 700 !important;
	font-size: 10px !important;
	letter-spacing: 0.1em !important;
	text-transform: uppercase !important;
	line-height: 1 !important;
	padding: 4px 8px !important;
}

/* FIX 4 — Pagination (page numbers).
   Astra colours the active page + link hover/focus with its global palette
   swatch (blue), via `.woocommerce nav.woocommerce-pagination ul li span.current`
   (0,3,4) — which outranks the Edge design-system rule (0,3,0). Re-assert Edge's
   look: transparent boxes with a visible border, white text, and the active page
   filled brand red. Selectors match Astra's specificity + !important so we win. */
.woocommerce nav.woocommerce-pagination ul.page-numbers,
.woocommerce nav.woocommerce-pagination ul.page-numbers li {
	border: 0 !important;
}
.woocommerce nav.woocommerce-pagination ul.page-numbers li a,
.woocommerce nav.woocommerce-pagination ul.page-numbers li span {
	background: transparent !important;
	color: #fff !important;
	border: 1px solid var(--border, #252525) !important;
	border-radius: 0 !important;
}
.woocommerce nav.woocommerce-pagination ul.page-numbers li a:hover,
.woocommerce nav.woocommerce-pagination ul.page-numbers li a:focus {
	background: transparent !important;
	border-color: #fff !important;
	color: #fff !important;
}
.woocommerce nav.woocommerce-pagination ul.page-numbers li span.current,
.woocommerce nav.woocommerce-pagination ul.page-numbers li a.current {
	background: #C8102E !important;
	border-color: #C8102E !important;
	color: #fff !important;
}

/* ==================================================================
   FIX 5 — Astra blue purge. Astra paints every bare <button> with its
   palette primary (blue). Any Edge button that doesn't explicitly set
   its own background inherits that blue at trust-critical moments.
   Hard-assert the Edge look on the confirmed leaks + selection.
   ================================================================== */

/* Systemic safety net: remap Astra's global palette accents to Edge brand
   colours. Astra's generated CSS references these variables for buttons,
   links and focus states — so any leak we haven't found yet surfaces as
   brand red instead of off-brand blue. */
:root {
	--ast-global-color-0: #C8102E; /* Astra "Primary" (was palette blue) */
	--ast-global-color-1: #A50C25; /* Astra "Secondary" / hover           */
}

/* A) Checkout order-summary collapse bar (mobile). */
.edge-checkout__summary-toggle {
	background: #181818 !important;
	background-color: #181818 !important;
	border: 1px solid #2a2a2a !important;
	color: #fff !important;
}
.edge-checkout__summary-toggle:hover,
.edge-checkout__summary-toggle:focus,
.edge-checkout__summary-toggle:active {
	background: #181818 !important;
	background-color: #181818 !important;
	color: #fff !important;
}
.edge-checkout__summary-toggle .edge-checkout__summary-total { color: #C8102E !important; }

/* B) PDP colour swatch cards (button elements). */
.edge-pdp .edge-swatch-card,
.edge-pdp .edge-swatch-card:hover,
.edge-pdp .edge-swatch-card:focus,
.edge-pdp .edge-swatch-card:active {
	background: transparent !important;
	background-color: transparent !important;
	box-shadow: none !important;
}
.edge-pdp .edge-swatch-card__name { background: transparent !important; }

/* B2) Filter chips (homepage "Core Line" + archives) — bare <button>s again.
   Astra's `button:hover/:focus` (0,1,1) outranks `.edge-chip` (0,1,0), so the
   focused/hovered chip turned palette blue. Assert every state. */
.edge-app .edge-chip,
.edge-app .edge-chip:hover,
.edge-app .edge-chip:focus,
.edge-app .edge-chip:active {
	background: transparent !important;
	background-color: transparent !important;
	border-color: #252525 !important;
	box-shadow: none !important;
}
.edge-app .edge-chip:hover { border-color: #3a3a3a !important; color: #fff !important; }
.edge-app .edge-chip.is-active,
.edge-app .edge-chip.is-active:hover,
.edge-app .edge-chip.is-active:focus,
.edge-app .edge-chip.is-active:active {
	background: #C8102E !important;
	background-color: #C8102E !important;
	border-color: #C8102E !important;
	color: #fff !important;
}

/* C2) PDP accordion heads (Description / How to Wash / Shipping & Returns)
   are bare <button>s — same Astra blue leak as the rest. */
.edge-pdp .edge-acc__head,
.edge-pdp .edge-acc__head:hover,
.edge-pdp .edge-acc__head:focus,
.edge-pdp .edge-acc__head:active,
.edge-acc.is-open .edge-acc__head {
	background: transparent !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	color: #fff !important;
}

/* C) Size-guide modal close button. */
.edge-sg-modal__close,
.edge-sg-modal__close:focus,
.edge-sg-modal__close:active {
	background: transparent !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	color: #fff !important;
}
.edge-sg-modal__close:hover { background: rgba(255,255,255,0.08) !important; }

/* Kill the blue text-selection flash on tap for UI controls (the blue
   box behind the selected swatch caption was the browser's default
   ::selection highlight), and brand the selection colour site-wide. */
.edge-swatch-card, .edge-swatch-card *,
.edge-pill,
.edge-chip,
.edge-sg-modal__close,
.edge-acc__head, .edge-acc__head *,
.edge-checkout__summary-toggle, .edge-checkout__summary-toggle * {
	-webkit-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}
::selection { background: rgba(200, 16, 46, 0.6); color: #fff; }

/* ==================================================================
   FIX 6 — Edge sliver. A pinkish-white strip (Astra's body background)
   peeked through at screen edges / behind the fixed bottom nav. Make
   the backdrop behind everything Edge-black so any sub-pixel overflow
   or unpainted area stays invisible.
   ================================================================== */
html, body {
	background-color: #0a0a0a !important;
}

/* ==================================================================
   BACKGROUND PATTERN — simplified Art-Deco line motif (vertical hexagon
   columns + pinstripes), drawn as crisp SVG line-art rather than the heavy
   source image. Fixed, low-opacity layer behind ALL content; never
   intercepts clicks. Tune --edge-pattern-opacity to taste (0 = off).
   ================================================================== */
:root { --edge-pattern-opacity: 0.05; }
body.edge-surface::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	opacity: var(--edge-pattern-opacity);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='160' viewBox='0 0 120 160'%3E%3Cg fill='none' stroke='%23C0C0C0' stroke-width='1.1'%3E%3Cpath d='M60 0L96 40L96 120L60 160L24 120L24 40Z'/%3E%3Cpath d='M60 0V160'/%3E%3Cpath d='M0 0V160'/%3E%3Cpath d='M120 0V160'/%3E%3C/g%3E%3C/svg%3E");
	background-size: 156px 208px;
	background-repeat: repeat;
	background-position: center top;
}
/* Content sits above the pattern layer. */
.edge-app { position: relative; z-index: 1; }

/* ==================================================================
   PDP price colour — force white. On live, Astra's palette was leaking
   a blue onto the variation price; this wins the cascade (loads last).
   ================================================================== */
.edge-pdp__price,
.edge-pdp__price .woocommerce-Price-amount,
.edge-pdp__price .woocommerce-Price-amount bdi,
.edge-pdp .woocommerce-variation-price,
.edge-pdp .woocommerce-variation-price .price,
.edge-pdp .woocommerce-variation-price .woocommerce-Price-amount,
.edge-pdp .woocommerce-variation-price .woocommerce-Price-amount bdi {
	color: #fff !important;
}
.edge-pdp .woocommerce-variation-price del,
.edge-pdp .woocommerce-variation-price del .woocommerce-Price-amount,
.edge-pdp__price del,
.edge-pdp__price del .woocommerce-Price-amount { color: #fff !important; opacity: 0.55; }
