/**
 * Glowflare WooCommerce charcoal palette.
 *
 * Colour-only adaptation of the owner's Glowflare Horror Film Festival storefront.
 * The Glowflare's geometry, Glowflare's 940px desktop layout, product cards,
 * basket/checkout mechanics and mobile breakpoints remain unchanged.
 * Loaded AFTER the source styles and the 940px layout sheet.
 */

/* The Glowflare's source uses --green for most dark content backgrounds.
 * These scoped tokens update those surfaces without changing typography
 * outside WooCommerce, the festival's header, or its navigation. */
body.na-commerce-live {
  --green: #353535;
  --green2: #535353;
  --ink: #353535;
  --gf-commerce-surface-dark: #353535;
  --gf-commerce-surface-raised: #535353;
  --gf-commerce-on-dark: #ffffff;
}

/* Main dark content sections. Preserve the white products, white forms,
 * image canvases and transparent outer shop background. */
body.na-commerce-live :is(
  .shop-divider,
  .na-shop-sowing-bundle__panel,
  .na-shop-merch-banner__panel,
  .na-merch-home__panel,
  .na-merch-hero,
  .na-merch-hero__inner,
  .na-merch-collection-banner,
  .na-official-merch-banner,
  .na-category-hero,
  .product-bundle__panel,
  .na-category-card,
  .na-help-strip,
  .na-account-welcome,
  .na-account-welcome-hero
) {
  background-color: var(--gf-commerce-surface-dark) !important;
  color: var(--gf-commerce-on-dark);
}

/* White lettering on charcoal content areas; don't recolour headings
 * inside white product/merchandise cards nested within those areas. */
body.na-commerce-live :is(
  .na-shop-sowing-bundle__copy h2,
  .na-shop-merch-banner__copy h2,
  .na-merch-home__copy h2,
  .na-merch-hero__copy h1,
  .na-merch-collection-banner h2,
  .na-official-merch-banner h2,
  .na-category-hero h1,
  .product-bundle__copy h2,
  .na-help-strip h2,
  .na-account-welcome h2,
  .na-account-welcome-hero h2
) {
  color: #ffffff !important;
}

/* Shop filter area is a charcoal content panel, not a white form card.
 * Its headings and choices must remain legible when dark surfaces change. */
body.na-commerce-live .na-shop-filter-form--flat {
  color: #ffffff !important;
}
body.na-commerce-live .na-shop-filter-column h3,
body.na-commerce-live .na-shop-filter-column .na-filter-choice {
  color: #ffffff !important;
}

/* Gray secondary dark treatments from the same site-wide palette.
 * These are not global surface rules; product/card imagery stays intact. */
body.na-commerce-live :is(
  .shop-category-link:hover,
  .shop-category-link:focus-visible,
  .na-shop-filter-button:hover,
  .na-shop-filter-button:focus-visible,
  .na-btn.primary:hover,
  .na-btn.primary:focus-visible
) {
  background-color: var(--gf-commerce-surface-raised) !important;
  color: #ffffff !important;
}

/* Glowflare's dark tab bar carried to Glowflare charcoal. Red indicates
 * the active panel; white text stays readable against its deeper red. */
body.single-product.na-commerce-live :is(
  .product-tabs__nav,
  .na-product-tabs-nav
) {
  background-color: var(--gf-commerce-surface-dark) !important;
}
body.single-product.na-commerce-live :is(
  .product-tab,
  .na-product-tab
):not(.is-active) {
  background-color: var(--gf-commerce-surface-dark) !important;
  color: #ffffff !important;
}
body.single-product.na-commerce-live :is(
  .product-tab.is-active,
  .na-product-tab.is-active
) {
  background-color: #c90000 !important;
  color: #ffffff !important;
}
body.single-product.na-commerce-live .woocommerce-tabs ul.tabs li.active {
  background-color: #c90000 !important;
}
body.single-product.na-commerce-live .woocommerce-tabs ul.tabs li.active a {
  color: #ffffff !important;
}

/* Controls and star/review text on white cards continue to use dark ink.
 * Never flatten browser focus indicators or colourize form inputs here. */

/* ==============================================================
 * Glowflare catalogue controls | one-row desktop, white-on-red.
 * This file is the final WooCommerce palette layer. Keep the
 * original Glowflare's mobile layout and core checkout rules.
 * ============================================================== */

/* Darker festival red passes white text contrast for small labels.
 * Keep standard white controls and their native dropdown options. */
body.na-commerce-live #shop-content.na-shop-page .na-shop-toolbar__utility {
  background-color: #d50000 !important;
  color: #ffffff !important;
}
body.na-commerce-live #shop-content.na-shop-page .na-shop-toolbar__utility .woocommerce-result-count,
body.na-commerce-live #shop-content.na-shop-page .na-shop-sort label {
  color: #ffffff !important;
}
body.na-commerce-live #shop-content.na-shop-page .na-shop-sort select {
  color: #353535 !important;
  background-color: #ffffff !important;
  border-color: #ffffff !important;
}
body.na-commerce-live #shop-content.na-shop-page .na-shop-filter-button {
  color: #ffffff !important;
  background-color: #353535 !important;
  border-color: rgba(255,255,255,.88) !important;
  white-space: nowrap;
  text-decoration: none !important;
}
body.na-commerce-live #shop-content.na-shop-page .na-shop-filter-button:hover {
  background-color: #535353 !important;
}

/* The same white-on-red treatment for other Glowflare's bright red
 * promotional buttons and surface labels. Not for text on white cards. */
body.na-commerce-live #shop-content.na-commerce-page :is(.btn.gold, .na-btn.gold) {
  background-color: #d50000 !important;
  color: #ffffff !important;
  border-color: #d50000 !important;
}
body.na-commerce-live #shop-content.na-commerce-page :is(.btn.gold, .na-btn.gold):hover {
  background-color: #c90000 !important;
  color: #ffffff !important;
}
body.na-commerce-live #shop-content.na-commerce-page :is(.service, .delivery-banner) {
  color: #ffffff !important;
}
body.na-commerce-live #shop-content.na-commerce-page :is(.shop-category-link.is-active, .shop-category-link[aria-current="page"]) {
  color: #ffffff !important;
}

/* Compact shop toolbar: count, Sort + select, Apply filters, Clear.
 * All controls share one slim 36px row within the existing 940px desktop shell.
 * Keep Glowflare's original tablet/mobile stacking below 901px unchanged. */
@media (min-width: 901px) {
  body.na-commerce-live #shop-content.na-shop-page .na-shop-toolbar__utility {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 0 !important;
    height: auto !important;
    width: 100% !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
  }
  body.na-commerce-live #shop-content.na-shop-page .na-shop-toolbar__utility .woocommerce-result-count {
    display: block !important;
    min-width: 0 !important;
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
  }
  body.na-commerce-live #shop-content.na-shop-page .na-shop-toolbar__actions {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  body.na-commerce-live #shop-content.na-shop-page .na-shop-toolbar__actions > * {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    width: auto !important;
    margin: 0 !important;
  }
  body.na-commerce-live #shop-content.na-shop-page .na-shop-sort {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
  }
  body.na-commerce-live #shop-content.na-shop-page .na-shop-sort label {
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
  }
  body.na-commerce-live #shop-content.na-shop-page .na-shop-sort select {
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
    width: 220px !important;
    max-width: 220px !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 28px 0 10px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    line-height: normal !important;
    font-weight: 700 !important;
    color: #353535 !important;
    background-color: #ffffff !important;
  }
  body.na-commerce-live #shop-content.na-shop-page .na-shop-filter-button {
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: auto !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 12px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    color: #ffffff !important;
    background: #353535 !important;
    border: 1px solid #ffffff !important;
  }
  body.na-commerce-live #shop-content.na-shop-page .na-shop-filter-button:hover {
    background: #535353 !important;
  }
  body.na-commerce-live #shop-content.na-shop-page .na-shop-filter-button:focus-visible {
    outline: 2px solid #ffffff !important;
    outline-offset: 2px !important;
  }
  body.na-commerce-live #shop-content.na-shop-page .na-shop-sort select:focus-visible {
    outline: 2px solid #353535 !important;
    outline-offset: 2px !important;
  }
}

/* Other source components with a festival-red fill: use white lettering,
 * including child headings that otherwise inherit charcoal ink. */
body.na-commerce-live #shop-content.na-commerce-page :is(
  .na-shop-assurance__item,
  .na-delivery-inner,
  .service,
  .delivery-banner
) {
  background-color: #d50000 !important;
  color: #ffffff !important;
}
body.na-commerce-live #shop-content.na-commerce-page :is(
  .na-shop-assurance__item strong,
  .na-shop-assurance__item small,
  .na-delivery-copy .eyebrow,
  .na-delivery-copy h3,
  .na-delivery-copy p,
  .service strong,
  .service small,
  .delivery-banner h3,
  .delivery-banner p
) {
  color: #ffffff !important;
}
body.na-commerce-live #shop-content.na-commerce-page :is(
  .na-shop-merch-label--limited,
  .shop-image-badge-selection
) {
  color: #ffffff !important;
}
