/*
Theme Name:   Bestmates Shop (Astra Child)
Theme URI:    https://shop.bestmates.travel/
Description:  Brand-parity child theme for the Bestmates merch shop. Ports the live bestmatestravel.com (Astro) design tokens — Garet + Domaine Display fonts, the aqua/teal palette, and the signature .btn treatment — onto WooCommerce. Survives Astra updates.
Author:       Matey (Bestmates ops)
Template:     astra
Version:      1.6.0
Text Domain:  bestmates-child
*/

/* ==========================================================================
   1. BRAND FONTS — self-hosted, mirrored from bestmates.travel/fonts/
   Body/UI = Garet (--font-sans) | Headings = Domaine Display (--font-display)
   ========================================================================== */

@font-face {
  font-family: "Garet";
  src: url("fonts/garet-book.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Garet";
  src: url("fonts/garet-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Garet";
  src: url("fonts/garet-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Garet";
  src: url("fonts/garet-heavy.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Domaine Display";
  src: url("fonts/domaine-display-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Domaine Display";
  src: url("fonts/domaine-display-bold-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ==========================================================================
   2. DESIGN TOKENS — re-derived live from bestmatestravel.com Astro bundle
   ========================================================================== */

:root {
  --bm-dark-1:    #0b1e1c;  /* dominant dark anchor */
  --bm-light-1:   #f4fbfa;  /* light bg / on-dark text */
  --bm-accent-1:  #2a6f69;  /* aqua-800 */
  --bm-accent-2:  #46b9af;  /* aqua-600 — teal accent */

  /* aqua ramp */
  --bm-aqua-50:  #f4fbfa;
  --bm-aqua-100: #edf8f7;
  --bm-aqua-200: #daf1ef;
  --bm-aqua-300: #b5e3df;
  --bm-aqua-400: #90d5cf;
  --bm-aqua-500: #6bc7bf;
  --bm-aqua-600: #46b9af;
  --bm-aqua-700: #38948c;
  --bm-aqua-800: #2a6f69;
  --bm-aqua-900: #1c4a46;
  --bm-aqua-950: #0e2523;

  --bm-font-sans:    "Garet", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bm-font-display: "Domaine Display", Georgia, "Times New Roman", serif;
}

/* ==========================================================================
   3. TYPOGRAPHY — body = Garet, headings = Domaine Display
   (Astra global font picker can't see self-hosted @font-face, so we assert
    the families here. Belt-and-suspenders with the Astra theme_mod text.)
   ========================================================================== */

body,
button,
input,
select,
textarea,
.ast-container,
.woocommerce,
.woocommerce-page {
  font-family: var(--bm-font-sans);
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title,
.widget-title,
.woocommerce-loop-product__title,
.product_title,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce div.product .product_title,
.cart_totals h2,
.cross-sells h2,
.related.products h2,
.upsells.products h2 {
  font-family: var(--bm-font-display);
  letter-spacing: -0.01em;
}

/* match Astro's tight display line-heights */
h1, .entry-title { line-height: 1.1; }
h2 { line-height: 1.2; }
h3 { line-height: 1.25; }

/* ==========================================================================
   4. GLOBAL COLOR — text/links/accents to the brand scale
   ========================================================================== */

body {
  color: var(--bm-dark-1);
  background-color: #ffffff;
}

a {
  color: var(--bm-accent-1);
}
a:hover,
a:focus {
  color: var(--bm-accent-2);
}

/* WooCommerce price + sale */
.woocommerce span.price,
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.woocommerce ul.products li.product .price {
  color: var(--bm-dark-1);
}
.woocommerce span.onsale {
  background-color: var(--bm-accent-2);
  color: var(--bm-light-1);
}

/* form focus rings -> teal */
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce .select2-container--focus .select2-selection,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--bm-accent-2) !important;
  box-shadow: 0 0 0 1px var(--bm-accent-2);
  outline: none;
}

/* notices / messages -> brand teal bar */
.woocommerce-message,
.woocommerce-info {
  border-top-color: var(--bm-accent-2);
}
.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--bm-accent-2);
}

/* ==========================================================================
   5. BUTTONS — the signature .btn ported onto WooCommerce
   bg #0b1e1c, text #f4fbfa, UPPERCASE, .15em tracking, Garet, ~.63em radius,
   padding-grow on hover. Secondary/outline = inset 2px teal ring.
   ========================================================================== */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce .single_add_to_cart_button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce #place_order,
.wc-block-components-button,
.wp-block-button__link {
  font-family: var(--bm-font-sans) !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background-color: var(--bm-dark-1) !important;
  color: var(--bm-light-1) !important;
  border: none !important;
  border-radius: 0.63em !important;
  padding: 0.85em 1.6em !important;
  line-height: 1.2;
  transition: padding 0.25s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce .single_add_to_cart_button:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce #place_order:hover,
.wc-block-components-button:hover,
.wp-block-button__link:hover {
  background-color: var(--bm-aqua-900) !important;
  color: var(--bm-light-1) !important;
  padding-left: 1.9em !important;
  padding-right: 1.9em !important;
}

/* secondary / outline variant — teal inset ring on transparent */
.woocommerce a.button.alt.disabled,
.woocommerce a.added_to_cart,
.woocommerce a.button.wc-backward,
.woocommerce .button.wc-backward,
.woocommerce-cart a.button,
.woocommerce-checkout a.button:not(#place_order) {
  background-color: transparent !important;
  color: var(--bm-dark-1) !important;
  box-shadow: inset 0 0 0 2px var(--bm-accent-2) !important;
}
.woocommerce a.added_to_cart:hover,
.woocommerce a.button.wc-backward:hover,
.woocommerce .button.wc-backward:hover,
.woocommerce-cart a.button:hover {
  background-color: var(--bm-accent-2) !important;
  color: var(--bm-light-1) !important;
  box-shadow: inset 0 0 0 2px var(--bm-accent-2) !important;
}

/* ==========================================================================
   6. HEADER + FOOTER
   Header: LIGHT, pixel-matched to the Astro home nav (rgba(244,251,250,.9)
     translucent + backdrop-blur, pink wordmark, dark #0b1e1c nav).
   Footer: stays DARK #0b1e1c (matches the Astro footer chrome).
   ========================================================================== */

/* ---- Header (Astra primary header) — LIGHT, matches Astro home nav ---- */
.site-header,
.ast-primary-header-bar,
header.site-header .ast-above-header-wrap,
header.site-header .ast-main-header-bar-alignment,
.main-header-bar {
  background-color: rgba(244, 251, 250, 0.9) !important; /* --light-1 @ 90% */
  -webkit-backdrop-filter: blur(8px) !important;
  backdrop-filter: blur(8px) !important;
}
.main-header-bar {
  border-bottom: none !important;
}

/* Pink wordmark SVG sizing — WP can't read SVG intrinsic dims (renders 0x0),
   so size it explicitly to match the Astro home logo (height 2em, max-width 155px). */
.custom-logo,
.site-logo-img .custom-logo,
.ast-site-identity .custom-logo {
  height: 2em !important;
  width: auto !important;
  max-width: 155px !important;
  object-fit: contain !important;
}

/* nav links + site title — dark on the light bar */
.main-header-bar .main-navigation a,
.ast-builder-menu .main-header-menu .menu-link,
.site-header .site-title a,
.ast-masthead-custom-menu-items,
.main-header-bar a {
  color: var(--bm-dark-1) !important;
}
.ast-builder-menu .main-header-menu .menu-link:hover,
.main-header-bar .main-navigation a:hover {
  color: var(--bm-accent-2) !important;
}

/* cart/account icons in header — dark on light */
.site-header .ast-site-header-cart .ast-cart-menu-wrap .count,
.site-header [class*="ast-icon"] svg,
.ast-header-account-wrap a {
  color: var(--bm-dark-1) !important;
  fill: var(--bm-dark-1) !important;
}
.site-header .ast-site-header-cart a {
  color: var(--bm-dark-1) !important;
}

/* mobile menu toggle — dark on light */
.ast-mobile-menu-buttons-fill.ast-mobile-menu-trigger-fill,
.ast-button-wrap .menu-toggle.main-header-menu-toggle {
  color: var(--bm-dark-1) !important;
  background: transparent !important;
}

/* ==========================================================================
   6b. BREADCRUMB BAR — replaces the Astra nav header site-wide (functions.php
   swaps the header markup; this styles the bar). Slim, minimal, on the same
   light translucent chrome as the header it replaces. The root crumb
   ("Bestmates") links to the apex Astro site.
   ========================================================================== */
.bm-crumb-bar {
  background-color: rgba(244, 251, 250, 0.9); /* --light-1 @ 90% — same as old header */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #daf1ef;           /* hairline aqua-200 */
  width: 100%;
}
.bm-crumb-inner {
  max-width: 80rem;                            /* container-large */
  margin: 0 auto;
  padding: 0 5%;                               /* padding-global */
  min-height: 3.25rem;
  display: flex;
  align-items: center;
}
.bm-crumb {
  list-style: none;
  margin: 0;
  padding: 0.6rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
}
/* the WooCommerce-rendered portion is wrapped in a span; keep it inline-flex
   so its <li> crumbs sit on the same row */
.bm-crumb-woo {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
}
.bm-crumb-item,
.bm-crumb-sep {
  font-family: var(--bm-font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0;
}
.bm-crumb-sep {
  color: rgba(11, 30, 28, 0.35);              /* muted dark separator */
  user-select: none;
}
.bm-crumb-item a {
  color: var(--bm-dark-1);                     /* dark crumb links */
  text-decoration: none;
  transition: color 0.2s ease;
}
.bm-crumb-item a:hover {
  color: var(--bm-accent-2);                   /* teal on hover */
}
/* root crumb = the Bestmates PINK WORDMARK (image) as the left home-link */
.bm-crumb-root {
  display: inline-flex;
  align-items: center;
}
.bm-crumb-root a {
  display: inline-flex;
  align-items: center;
  line-height: 0;                              /* kill inline-img baseline gap */
}
.bm-crumb-logo {
  height: 1.45rem;                             /* ~23px — slim-bar scale, vertically centered */
  width: auto;
  max-width: 130px;
  display: block;
  transition: opacity 0.2s ease;
}
.bm-crumb-root a:hover .bm-crumb-logo {
  opacity: 0.7;                                /* subtle hover affordance */
}
/* nudge the first separator a hair off the logo for breathing room */
.bm-crumb-root + .bm-crumb-sep {
  margin-left: 0.15em;
}
/* current page crumb — muted, non-link */
.bm-crumb-current {
  color: rgba(11, 30, 28, 0.55);
}
/* WooCommerce's own breadcrumb anchors inside our bar inherit our crumb style */
.bm-crumb-woo a {
  color: var(--bm-dark-1);
  text-decoration: none;
  font-family: var(--bm-font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.bm-crumb-woo a:hover { color: var(--bm-accent-2); }

/* ---- Footer ---- */
.site-footer,
.ast-small-footer,
footer.site-footer,
.footer-sml-layout,
.ast-footer-overlay,
.site-primary-footer-wrap,
.site-below-footer-wrap {
  background-color: var(--bm-dark-1) !important;
  color: var(--bm-light-1) !important;
}
.site-footer a,
.ast-small-footer a,
.site-below-footer-wrap a {
  color: var(--bm-light-1) !important;
}
.site-footer a:hover,
.ast-small-footer a:hover {
  color: var(--bm-accent-2) !important;
}
.site-footer p,
.ast-small-footer p {
  color: var(--bm-light-1) !important;
}
