/**
 * Blocksy parent theme compatibility overrides.
 * Add Blocksy-specific resets and selector fixes here.
 *
 * @package log-core
 */

/* Hide Blocksy's built-in breadcrumb on pages with our own breadcrumb */
body.single-product .ct-breadcrumbs,
body.woocommerce-page.single-product .ct-breadcrumbs {
    display: none !important;
}

/* Blocksy ships a default blue palette (--theme-palette-color-1 #2872fa and
 * friends) and drives its links, buttons, body text and form focus states
 * from it. Anything we haven't explicitly styled — plugin-rendered forms,
 * the skip link, logo link, stray editor content — inherits that blue and
 * breaks the black+gold system.
 *
 * Re-pointing Blocksy's own variables here converts all of it in one place
 * instead of chasing individual selectors, and keeps the fix in the compat
 * layer so swapping the parent theme means deleting this file, not unpicking
 * overrides scattered across the theme.
 *
 * !important: Blocksy injects these via an inline <style> block in wp_head
 * (dynamic-styles), usually after this stylesheet, so a plain :root override
 * loses the tie on load order alone. */
:root {
    /* Accent → gold */
    --theme-palette-color-1: var(--gold-600) !important;
    --theme-palette-color-2: var(--gold-700) !important;
    /* Text + headings → ink */
    --theme-palette-color-3: var(--ink-600) !important;
    --theme-palette-color-4: var(--ink-900) !important;
    /* Borders + light surfaces */
    --theme-palette-color-5: var(--line) !important;
    --theme-palette-color-6: var(--surface) !important;
    --theme-palette-color-7: var(--paper) !important;
    --theme-palette-color-8: var(--white) !important;

    --theme-text-color: var(--ink-600) !important;
    --theme-link-initial-color: var(--gold-600) !important;
    --theme-link-hover-color: var(--gold-700) !important;

    /* Buttons: dark fill, gold on hover — matches the primary buttons the
     * theme's own components already render. */
    --theme-button-background-initial-color: var(--ink-900) !important;
    --theme-button-background-hover-color: var(--gold-600) !important;
    --theme-button-text-initial-color: var(--white) !important;
    --theme-button-text-hover-color: var(--ink-900) !important;

    --theme-form-field-border-focus-color: var(--gold-600) !important;
    --theme-form-text-focus-color: var(--ink-900) !important;
    --theme-form-field-background-focus-color: var(--white) !important;
}

/* Blocksy forces `width: var(--theme-block-width)` (effectively 100%) on
 * every direct child of `.entry-content.is-layout-constrained`. Our page
 * hero/stats-bar components (.page-banner, .stats-bar, etc.) also set
 * non-zero left/right margins, so the two combine into an overflow: full
 * container width PLUS margin on each side pushes the box past its
 * container edge (clips content on narrow-content pages like Shipping
 * Policy). Resetting to width:auto restores normal margin-aware sizing
 * for any content-area child, sitewide. This file already loads after
 * Blocksy's ct-main-styles (see inc/compat/blocksy.php dependency), so
 * no !important is needed to win the cascade tie. */
.entry-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    width: auto;
}
