/* ============================================
   CHESTERTON 2030 CUSTOM STYLES
   ============================================ */

/* ============================================
   1. SITE HEADER
   ============================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Yellow top stripe */
.header-stripe {
    height: 6px;
    background-color: #FEDB00 !important;
}

/* Top bar: Logo + utility — awc-main: #FFFFFF white (same as chesterton.com logo row) */
.header-top {
    background-color: #ffffff;
    padding: 12px 0;
}

.header-top > .wp-block-group {
    padding-inline: clamp(1rem, 3vw, 1rem) !important;
}

.header-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo img,
.wp-block-site-logo img {
    width: 235px !important;
    max-width: 235px;
    height: auto;
    display: block;
}

/* Utility nav (Careers, Partner Login, Language) — on white (awc-main) bg, fs-7, fw-normal */
.utility-navigation {
    font-size: 0.875rem;
}

.utility-navigation .wp-block-navigation__container a {
    color: #53565A;
    padding: 4px 8px;
    font-size: 0.875rem;
    font-weight: 400;
    text-decoration: none;
}

.utility-navigation .wp-block-navigation__container a:hover {
    color: #1E1E1E;
    text-decoration: underline;
}

/* Main nav bar — dark background
   Use :has() so it works even if FSE DB loses the header-nav-bar className */
.header-nav-bar,
.site-header > .wp-block-group:has(.main-navigation),
.site-header > header > .wp-block-group:has(.main-navigation),
.wp-block-group:has(> .wp-block-navigation.main-navigation) {
    background-color: #53565A !important;
}

.header-nav-bar > .wp-block-group {
    padding-inline: clamp(1rem, 3vw, 1rem) !important;
}

.header-nav-bar .wp-block-navigation,
.site-header .wp-block-navigation.main-navigation {
    background-color: #53565A !important;
    color: #ffffff !important;
}

.header-nav-bar .wp-block-navigation__container,
.main-navigation .wp-block-navigation__container {
    background-color: #53565A !important;
}

/* ============================================
   2. MAIN NAVIGATION — styled like chesterton.com
      WCAG/BITV compliant: visible focus, sufficient contrast
   ============================================ */

.main-navigation .wp-block-navigation__container {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    align-items: stretch;
    justify-content: flex-start;
}

/* Top-level nav links — matches awc-mega-menu-custom: fs-6 (1rem), fw-normal (400) */
.main-navigation .wp-block-navigation-item > a,
.main-navigation .wp-block-navigation-item__content {
    color: #ffffff !important;
    background-color: transparent !important;
    padding: 18px 16px !important;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0;
    display: flex !important;
    align-items: center;
    gap: 4px;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, box-shadow .15s ease-in-out;
    text-decoration: none !important;
    box-shadow: inset 0 3px 0 transparent;
    position: relative;
}

/* L1 Hover: yellow top indicator — inset box-shadow avoids layout shift */
.main-navigation .wp-block-navigation-item:hover > a,
.main-navigation .wp-block-navigation-item:hover > .wp-block-navigation-item__content {
    background-color: transparent !important;
    color: #ffffff !important;
    box-shadow: inset 0 3px 0 #FEDB00 !important;
    text-decoration: none !important;
}

/* L2 Dropdown hover: no top indicator, subtle bg highlight */
html body .wp-block-navigation__submenu-container .wp-block-navigation-item:hover > a,
html body .wp-block-navigation__submenu-container .wp-block-navigation-item:hover > .wp-block-navigation-item__content {
    box-shadow: none !important;
    background-color: rgba(255,255,255,0.07) !important;
    text-decoration: underline !important;
    color: #ffffff !important;
}

/* Active/current page: yellow top indicator */
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-item > .wp-block-navigation-item__content {
    box-shadow: inset 0 3px 0 #FEDB00 !important;
    color: #ffffff !important;
}

/* L1 :active (click) — light grey bg, no yellow outline */
.main-navigation .wp-block-navigation-item > a:active,
.main-navigation .wp-block-navigation-item__content:active {
    background-color: rgba(255,255,255,0.12) !important;
    outline: none !important;
}

/* L2 :active (click) — slightly lighter grey row */
html body .wp-block-navigation__submenu-container .wp-block-navigation-item > a:active,
html body .wp-block-navigation__submenu-container .wp-block-navigation-item__content:active {
    background-color: rgba(255,255,255,0.18) !important;
    outline: none !important;
}

/* WCAG focus (keyboard Tab): yellow outline — keyboard nav only */
.main-navigation .wp-block-navigation-item > a:focus-visible,
.main-navigation .wp-block-navigation-item__content:focus-visible {
    outline: 2px solid #FEDB00 !important;
    outline-offset: 2px !important;
    border-radius: 0 !important;
}

/* Submenu toggle chevron — white, matches nav text */
.main-navigation .wp-block-navigation__submenu-icon {
    color: #ffffff !important;
    opacity: 0.7;
    transition: opacity 0.15s, transform 0.2s;
}
.main-navigation .wp-block-navigation-item:hover .wp-block-navigation__submenu-icon {
    opacity: 1;
}
/* Rotate chevron when submenu open */
.main-navigation .wp-block-navigation-item.is-menu-open > .wp-block-navigation-item__content .wp-block-navigation__submenu-icon,
.main-navigation .open-on-hover-click.is-menu-open .wp-block-navigation__submenu-icon {
    transform: rotate(180deg);
}

/* Top-level nav items: explicit white text, dark bg — kills any inherited white bg */
.header-nav-bar .wp-block-navigation-item,
.header-nav-bar .wp-block-navigation-item:not(.wp-block-navigation__submenu-container .wp-block-navigation-item) {
    background-color: transparent !important;
    color: #ffffff !important;
}

/* Dropdown — dark bg like chesterton.com, white text, wider panel
   html body prefix = highest specificity without JS, beats WP block CSS */
html body .wp-block-navigation__submenu-container {
    background-color: #53565A !important;
    background: #53565A !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35) !important;
    min-width: 300px !important;
    /* override WP CSS custom properties */
    --wp--preset--color--base: #53565A;
    --wp--preset--color--contrast: #ffffff;
}

html body .wp-block-navigation__submenu-container .wp-block-navigation-item,
html body .wp-block-navigation__submenu-container .wp-block-navigation-item:hover,
html body .wp-block-navigation__submenu-container .wp-block-navigation-item:focus,
html body .wp-block-navigation__submenu-container .wp-block-navigation-item.is-highlighted,
html body .wp-block-navigation__submenu-container .wp-block-navigation-item.has-child,
html body .wp-block-navigation__submenu-container li {
    background-color: #53565A !important;
    background: #53565A !important;
}

html body .wp-block-navigation__submenu-container .wp-block-navigation-item__content,
html body .wp-block-navigation__submenu-container a,
html body .wp-block-navigation__submenu-container a:visited {
    color: #ffffff !important;
    background-color: transparent !important;
    background: transparent !important;
    padding: 10px 24px !important;
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.375;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    display: block !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

html body .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
html body .wp-block-navigation__submenu-container a:hover {
    background-color: rgba(255,255,255,0.07) !important;
    background: rgba(255,255,255,0.07) !important;
    color: #ffffff !important;
    text-decoration: underline !important;
}

html body .wp-block-navigation__submenu-container .current-menu-item .wp-block-navigation-item__content,
html body .wp-block-navigation__submenu-container .current-menu-item a {
    text-decoration: underline !important;
    text-decoration-color: #FEDB00 !important;
}

html body .wp-block-navigation__submenu-container a:focus,
html body .wp-block-navigation__submenu-container a:focus-visible {
    outline: 2px solid #FEDB00 !important;
    outline-offset: -2px;
    background-color: transparent !important;
}

/* Arrows: kill ALL ::after on ALL dropdown items unconditionally */
html body .wp-block-navigation__submenu-container .wp-block-navigation-item__content::after,
html body .wp-block-navigation__submenu-container a::after,
html body .wp-block-navigation__submenu-container li::after {
    content: none !important;
    display: none !important;
}

/* Sub-menu toggle icon (›): yellow for has-child, hide the SVG default */
html body .wp-block-navigation__submenu-container .wp-block-navigation-item.has-child .wp-block-navigation__submenu-icon {
    color: #FEDB00 !important;
}
html body .wp-block-navigation__submenu-container .wp-block-navigation-item.has-child .wp-block-navigation__submenu-icon svg {
    stroke: #FEDB00 !important;
    fill: none !important;
}

/* ============================================
   2b. MOBILE NAVIGATION — Bottom FAB + Slide-up Sheet
   ============================================ */

@media (max-width: 768px) {

    /* ── Collapse nav bar to 0 height — display:none would also hide the fixed FAB ── */
    .header-nav-bar {
        height: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
    }

    .utility-navigation {
        display: none !important;
    }

    /* ── FAB: fixed bottom center ── */
    .main-navigation .wp-block-navigation__responsive-container-open {
        position: fixed !important;
        bottom: 24px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        z-index: 9990 !important;
        background-color: #FEDB00 !important;
        color: #333333 !important;
        border: none !important;
        border-radius: 50px !important;
        width: 56px !important;
        height: 56px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 4px 16px rgba(0,0,0,0.35) !important;
        cursor: pointer;
        animation: fabIn 0.3s ease-out;
    }

    /* translateX(-50%) must be in keyframes too or centering breaks during animation */
    @keyframes fabIn {
        from { transform: translateX(-50%) scale(0.7) translateY(20px); opacity: 0; }
        to   { transform: translateX(-50%) scale(1)   translateY(0);    opacity: 1; }
    }

    /* ── Scrim: dark overlay behind sheet ── */
    .main-navigation .wp-block-navigation__responsive-container.is-menu-open {
        background-color: rgba(0, 0, 0, 0.55) !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        z-index: 9995 !important;
    }

    /* ── Sheet: slides up from bottom ── */
    .main-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
        background-color: #53565A !important;
        border-radius: 20px 20px 0 0 !important;
        padding: 0 24px 48px !important;
        max-height: 75vh !important;
        overflow-y: auto !important;
        width: 100% !important;
        animation: sheetUp 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    }

    @keyframes sheetUp {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }

    /* ── Drag handle ── */
    .main-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background-color: rgba(255,255,255,0.25);
        border-radius: 2px;
        margin: 14px auto 18px;
    }

    /* ── Close button — hidden by default, only show when menu is open ── */
    .main-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-container-close {
        display: none !important;
    }
    .main-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
        position: fixed !important;
        bottom: 24px !important;
        left: 50% !important;
        right: auto !important;
        top: auto !important;
        transform: translateX(-50%) !important;
        z-index: 9999 !important;
        background-color: #FEDB00 !important;
        color: #333333 !important;
        border: none !important;
        border-radius: 50px !important;
        width: 56px !important;
        height: 56px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 4px 16px rgba(0,0,0,0.35) !important;
        cursor: pointer;
        font-size: 0 !important;
    }
    .main-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close svg {
        width: 22px !important;
        height: 22px !important;
        fill: #333333 !important;
        color: #333333 !important;
        flex-shrink: 0;
    }

    /* ── Mobile focus: bottom line only, no box ── */
    .main-navigation .wp-block-navigation-item__content:focus,
    .main-navigation .wp-block-navigation-item__content:focus-visible {
        outline: none !important;
        box-shadow: none !important;
        border-bottom: 2px solid #FEDB00 !important;
    }

    /* ── Top-level nav items ── */
    .main-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
        color: #ffffff !important;
        font-size: 1.05rem !important;
        padding: 15px 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        text-decoration: none !important;
    }

    /* → arrow only on leaf items (no children — parent items have their own dropdown icon) */
    .main-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:not(.has-child) > .wp-block-navigation-item__content::after {
        content: '→';
        color: #FEDB00;
        flex-shrink: 0;
    }

    /* ── Dropdown icon: yellow in sheet ── */
    .main-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon svg {
        fill: #FEDB00 !important;
        width: 18px;
        height: 18px;
    }

    /* ── Submenus: static/inline inside sheet, indented ── */
    .main-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        min-width: 0 !important;
        padding: 0 0 4px 1rem !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
    }

    .main-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
        font-size: 0.925rem !important;
        padding: 11px 0 !important;
        color: rgba(255,255,255,0.72) !important;
        border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    }

    .main-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content::after {
        display: none !important;
    }

    /* ── Active item ── */
    .main-navigation .wp-block-navigation__responsive-container.is-menu-open .current-menu-item > .wp-block-navigation-item__content {
        color: #FEDB00 !important;
    }

    /* ── Body scroll lock when sheet open ── */
    body:has(.main-navigation .wp-block-navigation__responsive-container.is-menu-open) {
        overflow: hidden;
    }

} /* end @media mobile */

/* ── Mobile utility bar (injected into slide-up sheet) ── */
.chesterton-mobile-utils {
    display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
    .chesterton-mobile-utils {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0 0 4px;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        margin-bottom: 8px;
    }

    /* Search form */
    .chesterton-mobile-utils .wp-block-search__inside-wrapper,
    .chesterton-mobile-utils form {
        display: flex;
        align-items: stretch;
        gap: 0;
        margin: 10px 0;
        height: 40px;
    }
    .chesterton-mobile-utils input[type="search"] {
        flex: 1;
        height: 100%;
        background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.25);
        border-right: none;
        color: #fff;
        padding: 0 12px;
        font-size: 0.875rem;
        border-radius: 20px 0 0 20px;
        outline: none;
        box-sizing: border-box;
    }
    .chesterton-mobile-utils input[type="search"]::placeholder { color: rgba(255,255,255,0.5); }
    .chesterton-mobile-utils button[type="submit"],
    .chesterton-mobile-utils input[type="submit"] {
        height: 100%;
        background: #FEDB00;
        color: #1E1E1E;
        border: none;
        padding: 0 16px;
        font-size: 0.875rem;
        font-weight: 600;
        border-radius: 0 20px 20px 0;
        cursor: pointer;
        white-space: nowrap;
        box-sizing: border-box;
    }

    /* Ask an Expert link */
    .chesterton-mobile-utils__links {
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .chesterton-mobile-utils__link {
        color: #FEDB00 !important;
        font-size: 0.9rem;
        font-weight: 600;
        text-decoration: none;
    }

    /* Language flags */
    .chesterton-mobile-utils__langs {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 0 6px;
    }
    .chesterton-mobile-utils__lang {
        display: flex;
        align-items: center;
        gap: 5px;
        color: rgba(255,255,255,0.65) !important;
        font-size: 0.8rem;
        text-decoration: none;
        opacity: 0.7;
    }
    .chesterton-mobile-utils__lang.is-active {
        color: #fff !important;
        opacity: 1;
    }
    .chesterton-mobile-utils__lang img {
        border: 1px solid rgba(255,255,255,0.2);
    }
}

/* ============================================
   2c. SEARCH BAR (header-top)
   ============================================ */

/* Search hidden until server-side search is working */
.header-top .wp-block-search {
    display: none !important;
}

/* Search — pill shape */
.header-top .wp-block-search__input,
.header-top input[type="search"],
.header-top input[type="text"] {
    border-radius: 50px 0 0 50px !important;
    border: 1px solid #cccccc !important;
    border-right: none !important;
    padding: 8px 14px !important;
    font-size: 0.875rem;
    outline: none;
}

.header-top .wp-block-search__input:focus {
    border-color: #FEDB00 !important;
    box-shadow: none !important;
}

/* Search button: Chesterton Yellow, pill right side */
.header-top .wp-block-search__button,
.header-top button[type="submit"] {
    background-color: #FEDB00 !important;
    color: #333333 !important;
    border: none !important;
    border-radius: 0 50px 50px 0 !important;
    padding: 8px 20px !important;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.header-top .wp-block-search__button:hover {
    background-color: #e5c500 !important;
}

/* ============================================
   2d. GLOBAL — kill any blue link/focus colours from parent theme
   ============================================ */

/* Override Twenty Twenty-Five blue link colour inside nav */
.wp-block-navigation a,
.wp-block-navigation a:visited {
    color: inherit !important;
}

.wp-block-navigation *::selection {
    background-color: #FEDB00;
    color: #333333;
}

/* ============================================
   3. HERO SECTION
   ============================================ */

.hero-section {
    position: relative;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-section-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: var(--spacing-lg);
}

.hero-section h1 {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--spacing-lg);
    color: white;
}

.hero-section p {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-lg);
    color: white;
    line-height: 1.8;
}

/* ============================================
   4. FEATURES GRID
   ============================================ */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    padding: var(--spacing-xl) 0;
}

.feature-item {
    padding: var(--spacing-lg);
    background-color: var(--color-bg-light);
    border-radius: var(--border-radius);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 0 var(--spacing-md) 0;
    background-color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.feature-item h3 {
    margin-bottom: var(--spacing-md);
}

.feature-item p {
    color: var(--color-text-light);
    margin-bottom: 0;
}

/* ============================================
   5. PRODUCTS SECTION
   ============================================ */

.products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    padding: var(--spacing-xl) 0;
}

.product-card {
    background-color: var(--color-bg);
    border: 1px solid var(--color-bg-lighter);
    overflow: hidden;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--color-bg-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-content {
    padding: var(--spacing-md);
}

.product-category {
    font-size: var(--font-size-sm);
    color: var(--color-accent-red);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.product-card h3 {
    margin-bottom: var(--spacing-sm);
}

.product-description {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

/* ============================================
   6. CTA BUTTON
   ============================================ */

.cta-section {
    background-color: var(--color-accent-red);
    color: white;
    padding: var(--spacing-xxl) var(--spacing-lg);
    text-align: center;
    border-radius: var(--border-radius);
}

.cta-section h2 {
    color: white;
    margin-bottom: var(--spacing-md);
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-lg);
}

/* ============================================
   7. PRODUCT SPOTLIGHT CAROUSEL
   ============================================ */

.chesterton-carousel {
    position: relative;
}

.chesterton-carousel__slide {
    display: none;
}

.chesterton-carousel__slide--active {
    display: block;
}

.chesterton-carousel__slide-inner {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.chesterton-carousel__image-wrap {
    flex: 0 0 45%;
    max-width: 45%;
}

.chesterton-carousel__image-wrap img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.chesterton-carousel__image-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: #f0f0f0;
}

.chesterton-carousel__content {
    flex: 1;
    padding: 1rem 0;
}

.chesterton-carousel__title {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 700;
    margin: 0 0 1rem;
}

.chesterton-carousel__title a {
    color: #1E1E1E;
    text-decoration: none;
}

.chesterton-carousel__title a:hover {
    color: #FEDB00;
}

.chesterton-carousel__excerpt {
    color: #555555;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.chesterton-carousel__cta {
    display: inline-block;
    background-color: #FEDB00;
    color: #1E1E1E !important;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.chesterton-carousel__cta:hover {
    background-color: #e5c500;
}

.chesterton-carousel__arrow {
    background: #1E1E1E;
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
}

.chesterton-carousel__arrow:hover {
    background: #53565A;
}

.chesterton-carousel__dots {
    display: flex;
    gap: 8px;
    margin-top: 1.5rem;
}

.chesterton-carousel__dot {
    width: 10px;
    height: 10px;
    background: #cccccc;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.chesterton-carousel__dot--active {
    background: #FEDB00;
}

@media (max-width: 768px) {
    .chesterton-carousel__slide-inner {
        flex-direction: column;
        gap: 1.5rem;
    }

    .chesterton-carousel__image-wrap {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ============================================
   8. TESTIMONIALS
   ============================================ */

.testimonials-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    padding: var(--spacing-xl) 0;
}

.testimonial-item {
    padding: var(--spacing-lg);
    background-color: var(--color-bg-light);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--color-accent-red);
}

.testimonial-text {
    font-size: var(--font-size-base);
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
    font-style: italic;
}

.testimonial-quote-mark {
    font-size: 2rem;
    color: var(--color-accent-red);
    margin-bottom: var(--spacing-sm);
}

.testimonial-author {
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.testimonial-position {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
}

/* ============================================
   8. SITE FOOTER — dark brand background (#53565A)
   ============================================ */

.site-footer {
    background-color: #53565A !important;
    color: #ffffff !important;
    padding: var(--spacing-xxl) clamp(1rem, 4vw, 2rem);
    border-top: 1px solid #3d3f42;
    margin-top: 0;
}

.site-footer h4,
.site-footer h3 {
    color: #ffffff !important;
}

.site-footer p,
.site-footer li {
    color: rgba(255,255,255,0.75);
}

.site-footer a,
.site-footer a:visited {
    color: rgba(255,255,255,0.85) !important;
    text-decoration: none;
}

.site-footer a:hover {
    color: #FEDB00 !important;
    text-decoration: underline;
}

.footer-navigation .wp-block-navigation-item__content,
.footer-navigation a {
    color: rgba(255,255,255,0.8) !important;
    font-size: 0.875rem;
    padding: 3px 0 !important;
}

.footer-navigation .wp-block-navigation-item__content:hover,
.footer-navigation a:hover {
    color: #FEDB00 !important;
    text-decoration: underline;
}

/* Remove grey box backgrounds from footer nav — wildcard covers wp-elements-{hash}
   classes generated by the block editor when a background-color is set per-block */
.site-footer .wp-block-navigation *,
.site-footer .wp-block-navigation {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}
.site-footer .wp-block-navigation li,
.site-footer .wp-block-navigation .wp-block-navigation-item__content,
.site-footer .wp-block-navigation a {
    padding-inline: 0 !important;
}

/* If the first content block has a background color or is full-bleed,
   collapse the post-content top padding so it doesn't create a white gap.
   :has() is supported in all modern browsers since 2023. */
.wp-block-post-content:has(> .has-background:first-child),
.wp-block-post-content:has(> .alignfull:first-child),
.wp-block-post-content:has(> .wp-block-cover:first-child) {
    padding-top: 0 !important;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.footer-column h4 {
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: var(--spacing-sm);
}

.footer-column a {
    color: var(--color-text);
    transition: color var(--transition-base);
}

.footer-column a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid var(--color-bg-lighter);
    padding-top: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.footer-copyright {
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
}

/* ============================================
   9. LANGUAGE SWITCHER
   ============================================ */

.wpml-language-switcher {
    display: flex;
    align-items: center;
}

/* WPML language switcher in nav — no forced min-width, full-width clickable items */
html body .wpml-ls-dropdown .wp-block-navigation__submenu-container {
    min-width: auto !important;
    width: max-content !important;
}
html body .wpml-ls-dropdown [data-wpml="language-item"] a,
html body .wpml-ls-dropdown [data-wpml="language-item"] .wp-block-navigation-item__content {
    width: 100% !important;
    display: block !important;
}

.language-list {
    list-style: none;
    display: flex;
    gap: var(--spacing-md);
}

.language-item {
    position: relative;
}

.language-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-base);
}

.language-link:hover {
    background-color: var(--color-bg-light);
}

.language-link.active {
    color: var(--color-primary);
    font-weight: 700;
}

.language-link .flag {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

/* ============================================
   10. BREADCRUMBS
   ============================================ */

.breadcrumbs {
    padding: var(--spacing-md) 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
}

.breadcrumbs a {
    color: var(--color-primary);
}

.breadcrumbs span {
    margin: 0 var(--spacing-xs);
    color: var(--color-text-lighter);
}

/* ============================================
   11. RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .site-header-inner {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .main-navigation ul {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .main-navigation ul ul {
        position: static;
        display: none;
        border: none;
        box-shadow: none;
        margin-left: var(--spacing-md);
        background-color: transparent;
    }

    .main-navigation li:hover > ul {
        display: none;
    }

    .main-navigation li.toggled > ul {
        display: flex;
    }

    .hero-section {
        min-height: 300px;
    }

    .hero-section h1 {
        font-size: var(--font-size-2xl);
    }

    .hero-section p {
        font-size: var(--font-size-base);
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   13. PRODUCT DETAIL — single product page
   ============================================ */

/* Shared button styles */
.chesterton-btn {
    display: inline-block;
    padding: 11px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color 0.18s, color 0.18s, border-color 0.18s;
}

.chesterton-btn--primary {
    background-color: #FEDB00;
    color: #1E1E1E !important;
    border-color: #FEDB00;
}

.chesterton-btn--primary:hover {
    background-color: #e5c500;
    border-color: #e5c500;
}

.chesterton-btn--secondary {
    background-color: transparent;
    color: #53565A !important;
    border-color: #53565A;
}

.chesterton-btn--secondary:hover {
    background-color: #53565A;
    color: #ffffff !important;
}

/* Breadcrumb */
.chesterton-breadcrumb {
    font-size: 0.8125rem;
    color: #888;
    background: transparent;
    padding: 6px 0;
    margin: 0;
}

@media (max-width: 768px) {
    .chesterton-breadcrumb {
        font-size: 0.65rem;
        line-height: 1.3;
        padding: 4px 0;
    }

    /* Collapse middle items when breadcrumb is 4+ levels deep */
    .chesterton-breadcrumb ol:has(li:nth-child(4)) li:not(:first-child):not(:nth-last-child(2)):not(:last-child) {
        display: none;
    }

    /* Replace separator before parent with "… ›" to signal hidden items */
    .chesterton-breadcrumb ol:has(li:nth-child(4)) li:nth-last-child(2)::before {
        content: '\2026 \203A' !important;
        color: #bbb;
        margin: 0 6px;
    }
}

.chesterton-breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: center;
}

.chesterton-breadcrumb li {
    display: flex;
    align-items: center;
}

.chesterton-breadcrumb li + li::before {
    content: '\203A';
    margin: 0 8px;
    color: #bbb;
}

.chesterton-breadcrumb a {
    color: #53565A;
    text-decoration: none;
}

.chesterton-breadcrumb a:hover {
    color: #C8102E;
    text-decoration: underline;
}

/* Product Hero — text left, image right (sticky) */
.chesterton-product-hero {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

.chesterton-product-hero__image {
    position: sticky;
    top: 2rem;
}

@media (max-width: 768px) {
    .chesterton-product-hero {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    /* Image appears above content on mobile */
    .chesterton-product-hero__image {
        order: -1;
        position: static;
    }
}

.chesterton-product-hero__image img,
.chesterton-product-hero__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 520px;
}

.chesterton-product-hero__img-placeholder {
    width: 100%;
    padding-top: 66.66%;
    background-color: #E8E8E8;
}

.chesterton-product-hero__category {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.chesterton-product-hero__category a {
    color: #C8102E;
    text-decoration: none;
}

.chesterton-product-hero__category a:hover {
    text-decoration: underline;
}

.chesterton-product-hero__title {
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    color: #1E1E1E;
    margin: 0 0 1rem;
}

.chesterton-product-hero__sku {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
}

.chesterton-product-hero__sku-label {
    font-weight: 600;
    color: #53565A;
}

.chesterton-product-hero__short-desc {
    font-size: 1rem;
    line-height: 1.65;
    color: #444;
    margin-bottom: 1.75rem;
}

.chesterton-product-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 2rem 0 2.5rem;
}

/* Editor content — constrained by the 1100px FSE template layout */
.chesterton-product-content {
    max-width: none;
    margin: 0 0 3rem;
    line-height: 1.7;
    color: #333;
}

/* Tables fill full available width */
.chesterton-product-content .chesterton-product-data__table {
    max-width: none;
    width: 100%;
}

/* Ensure list bullets stay inside the content area */
.chesterton-product-content ul,
.chesterton-product-content ol {
    padding-left: 1.5rem !important;
    padding-inline-start: 1.5rem !important;
    margin-left: 0;
    overflow: visible;
}

/* Specs Table */
.chesterton-product-specs {
    margin-bottom: 3rem;
}

.chesterton-product-specs__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1E1E1E;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #FEDB00;
}

.chesterton-product-specs__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.chesterton-product-specs__table tr:nth-child(even) {
    background-color: #f7f7f7;
}

.chesterton-product-specs__table th,
.chesterton-product-specs__table td {
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: top;
}

.chesterton-product-specs__table th {
    font-weight: 600;
    color: #53565A;
    width: 38%;
    white-space: nowrap;
}

/* Product Tabs */
.chesterton-product-tabs {
    margin-bottom: 3rem;
}

.chesterton-product-tabs__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid #e8e8e8;
    margin-bottom: 0;
}

.chesterton-product-tabs__trigger {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 12px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.chesterton-product-tabs__trigger:hover {
    color: #53565A;
}

.chesterton-product-tabs__trigger.is-active {
    color: #1E1E1E;
    border-bottom-color: #FEDB00;
}

.chesterton-product-tabs__panel {
    padding: 2rem 0;
    line-height: 1.7;
    color: #333;
}

.chesterton-product-tabs__panel[hidden] {
    display: none;
}

.chesterton-product-tabs__embed iframe {
    max-width: 100%;
    border: none;
}

/* ============================================
   13b. PRODUCT DATA SECTIONS (migrated static content)
   ============================================ */

/* Section heading produced by migrate-to-static.php */
.chesterton-product-content .chesterton-section-heading {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1E1E1E;
    margin: 2.5rem 0 0;
    padding: 0;
    border: none;
    line-height: 1.3;
}

/* First heading has no top margin */
.chesterton-product-content .chesterton-section-heading:first-child {
    margin-top: 0;
}

/* Two-column data table — zebra striping, no visible borders */
.chesterton-product-data__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    line-height: 1.5;
    margin: 0.75rem 0 0;
    table-layout: auto;
}

/* Force left-align on every cell — Twenty Twenty-Five centers th by default */
.chesterton-product-data__table th,
.chesterton-product-data__table td {
    text-align: left !important;
}

/* Header row: dark Chesterton blue, always overrides zebra */
.chesterton-product-data__table tr.is-header th {
    background-color: #002E5D !important;
    color: #fff !important;
    font-weight: 700;
    padding: 10px 16px;
    vertical-align: top;
}

/* All data cells — remove borders, force text color */
.chesterton-product-data__table td {
    padding: 11px 16px;
    vertical-align: top;
    border: none !important;
    color: #333 !important;
}

.chesterton-product-data__table td a,
.chesterton-product-data__table td * {
    color: #333 !important;
    text-decoration: none;
}

/* Zebra striping */
.chesterton-product-data__table tbody tr:nth-child(odd) td {
    background-color: #EBEBEB !important;
}

.chesterton-product-data__table tbody tr:nth-child(even) td {
    background-color: #fff !important;
}

/* Label column: bold — no fixed width, let browser size columns by content */
.chesterton-product-data__table tr:not(.is-header) td:first-child,
.chesterton-product-data__table tr:not(.is-header) td:nth-child(3) {
    font-weight: 700;
    color: #1E1E1E;
}

/* Full-width colspan cells (single-column rows inside a table) */
.chesterton-product-data__table td[colspan] {
    font-weight: 400;
    width: 100%;
}

/* Product Advantages list */
.chesterton-product-content ul.chesterton-product-advantages {
    margin: 0.75rem 0 0;
    padding-left: 1.75rem !important;
    padding-inline-start: 1.75rem !important;
    list-style-position: outside;
    line-height: 1.8;
    color: #333 !important;
    overflow: visible;
}

.chesterton-product-advantages li,
.chesterton-product-advantages li * {
    color: #333 !important;
    margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
    .chesterton-product-data__table tr,
    .chesterton-product-data__table td,
    .chesterton-product-data__table th {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Hide "Applications" header — redundant when stacked */
    .chesterton-product-data__table tr.is-header th:last-child {
        display: none;
    }

    /* Label row: dark blue, compact bottom padding */
    .chesterton-product-data__table tr:not(.is-header) td:first-child {
        padding-bottom: 2px;
        color: #002E5D;
        background-color: inherit !important;
    }

    /* Value row: tighter top padding */
    .chesterton-product-data__table tr:not(.is-header) td:last-child {
        padding-top: 2px;
        padding-bottom: 10px;
    }

    /* Zebra: apply to whole row on mobile */
    .chesterton-product-data__table tbody tr:nth-child(odd) td {
        background-color: #EBEBEB !important;
    }
    .chesterton-product-data__table tbody tr:nth-child(even) td {
        background-color: #fff !important;
    }
}

/* ============================================
   14. PRODUCT CATEGORY ARCHIVE — taxonomy grid
   ============================================ */

/* Explicit max-width + gutters — WordPress is-layout-constrained does not
   reliably constrain PHP render_callback blocks on custom taxonomy templates */
.chesterton-category-main,
.chesterton-product-main,
.chesterton-search-main {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: clamp(1rem, 4vw, 2rem) !important;
    padding-right: clamp(1rem, 4vw, 2rem) !important;
    box-sizing: border-box !important;
}

.chesterton-product-archive {
    max-width: 100%;
    box-sizing: border-box;
}

.chesterton-product-archive__header {
    margin-bottom: 2.5rem;
}

.chesterton-product-archive__title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: #1E1E1E;
    margin-bottom: 0.75rem;
}

.chesterton-product-archive__desc {
    font-size: 1rem;
    line-height: 1.65;
    color: #555;
    max-width: 680px;
    margin-bottom: 1.25rem;
}

/* Subcategory links */
.chesterton-product-archive__subcats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.chesterton-product-archive__subcat {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid #53565A;
    color: #53565A !important;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}

.chesterton-product-archive__subcat:hover {
    background-color: #53565A;
    color: #ffffff !important;
}

/* Product Grid */
.chesterton-product-archive__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.75rem;
}

.chesterton-product-archive__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.chesterton-product-archive__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.chesterton-product-archive__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .chesterton-product-archive__grid--cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .chesterton-product-archive__grid--cols-3,
    .chesterton-product-archive__grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .chesterton-product-archive__grid--cols-2,
    .chesterton-product-archive__grid--cols-3,
    .chesterton-product-archive__grid--cols-4 { grid-template-columns: 1fr; }
}

/* Product Card */
.chesterton-product-card {
    background-color: #ffffff;
    border: 1px solid #e8e8e8;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.chesterton-product-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-color: #cccccc;
}

.chesterton-product-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
    color: inherit;
}

.chesterton-product-card__image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background-color: #f5f5f5;
}

.chesterton-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.chesterton-product-card:hover .chesterton-product-card__image img {
    transform: scale(1.03);
}

.chesterton-product-card__image--placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: #E8E8E8;
}

.chesterton-product-card__body {
    padding: 1rem 1.125rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.chesterton-product-card__title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    color: #1E1E1E;
    margin: 0 0 0.375rem;
}

.chesterton-product-card__sku {
    font-size: 0.75rem;
    color: #888;
    margin: 0 0 0.5rem;
}

.chesterton-product-card__desc {
    font-size: 0.875rem;
    color: #555;
    line-height: 1.55;
    flex: 1;
    margin-bottom: 0.75rem;
}

.chesterton-product-card__cta {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #C8102E;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: auto;
}

.chesterton-product-archive__empty {
    font-size: 1rem;
    color: #666;
    padding: 3rem 0;
    text-align: center;
}

/* ============================================
   EXTERNAL LINKS — auto-marked via inc/external-links.php
   ============================================ */

a.external-link::after {
    content: '';
    display: inline-block;
    width: 0.7em;
    height: 0.7em;
    margin-left: 0.25em;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%23666666' d='M10 7v3H2V2h3V0H0v12h12V7h-2zM7 0v2h1.59L3.7 6.88l1.42 1.42L10 3.41V5h2V0H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

/* Don't show icon on nav links, buttons, or image-only links */
nav a.external-link::after,
a.external-link.chesterton-btn::after,
a.external-link img:only-child + *,
a.external-link:has(img):after {
    display: none;
}

/* ============================================
   12. MOBILE BOTTOM NAVIGATION
   ============================================ */

.chesterton-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    /* Make room for bottom nav */
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }

    .chesterton-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 2000;
        background: #fff;
        border-top: 1px solid #e0e0e0;
        box-shadow: 0 -2px 12px rgba(0,0,0,0.10);
        padding-bottom: env(safe-area-inset-bottom);
        align-items: stretch;
    }

    .chesterton-bottom-nav__item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 8px 4px;
        color: #53565A;
        text-decoration: none;
        font-size: 0.65rem;
        font-weight: 500;
        gap: 3px;
        border: none;
        background: none;
        cursor: pointer;
        position: relative;
        transition: color 0.15s;
    }

    .chesterton-bottom-nav__item:hover,
    .chesterton-bottom-nav__item[aria-current] {
        color: #002E5D;
    }

    .chesterton-bottom-nav__item svg {
        width: 24px;
        height: 24px;
    }

    /* Language sub-menu */
    .chesterton-bottom-nav__item--lang {
        position: static;
    }

    .chesterton-bottom-nav__lang {
        display: none;
        position: fixed;
        bottom: calc(64px + env(safe-area-inset-bottom));
        left: 50%;
        transform: translateX(-50%);
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        box-shadow: 0 -4px 16px rgba(0,0,0,0.12);
        padding: 8px;
        white-space: nowrap;
        gap: 4px;
        flex-direction: column;
        z-index: 2001;
    }

    .chesterton-bottom-nav__item--lang:hover .chesterton-bottom-nav__lang,
    .chesterton-bottom-nav__item--lang:focus-within .chesterton-bottom-nav__lang {
        display: flex;
    }

    .chesterton-bottom-nav__lang a {
        padding: 6px 12px;
        color: #333;
        text-decoration: none;
        font-size: 0.8rem;
        border-radius: 4px;
    }

    .chesterton-bottom-nav__lang a[aria-current] {
        background: #FEDB00;
        font-weight: 700;
    }

    .chesterton-bottom-nav__lang a:hover {
        background: #f5f5f5;
    }
}

/* ============================================
   13. AI ENGINE CHATBOT (mwai) — z-index fix
   ============================================ */

/* Ensure chatbot floats above bottom nav on all viewports */
[id^="mwai-chatbot"],
.mwai-chat,
.mwai-bubble,
.mwai-open-button,
.mwai-window {
    z-index: 2100 !important;
}

@media (max-width: 768px) {
    /* Push bubble above fixed bottom nav (64px) */
    .mwai-bubble,
    .mwai-open-button,
    [id^="mwai-chatbot"] {
        bottom: calc(72px + env(safe-area-inset-bottom)) !important;
    }
}

/* ============================================
   14. LITERATURE BUTTON
   ============================================ */

.chesterton-btn--secondary {
    display: inline-block;
    background: #FEDB00;
    color: #002E5D !important;
    font-weight: 700;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 0;
    transition: background 0.2s;
}

.chesterton-btn--secondary:hover {
    background: #e5c400;
}

.chesterton-product-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1.5rem;
}

/* ============================================
   14. RELATED BLOG POSTS
   ============================================ */

.chesterton-related-posts {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #FEDB00;
}

.chesterton-related-posts__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #002E5D;
    margin-bottom: 1.5rem;
}

.chesterton-related-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .chesterton-related-posts__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .chesterton-related-posts__grid {
        grid-template-columns: 1fr;
    }
}

.chesterton-related-posts__item {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.chesterton-related-posts__link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.chesterton-related-posts__link:hover .chesterton-related-posts__name {
    color: #002E5D;
    text-decoration: underline;
}

.chesterton-related-posts__thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.chesterton-related-posts__meta {
    padding: 1rem;
}

.chesterton-related-posts__date {
    font-size: 0.75rem;
    color: #666;
    display: block;
    margin-bottom: 0.5rem;
}

.chesterton-related-posts__name {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

/* ============================================
   15. HERO VIDEO BLOCK
   ============================================ */

.chesterton-hero-video {
    position: relative;
    width: 100%;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #001A3A;
}

.chesterton-hero-video__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.chesterton-hero-video__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 26, 58, 0.55) 0%,
        rgba(0, 26, 58, 0.45) 60%,
        rgba(0, 26, 58, 0.70) 100%
    );
    z-index: 1;
}

.chesterton-hero-video__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
    text-align: center;
}

.chesterton-hero-video__headline {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin: 0 0 1.25rem;
}

.chesterton-hero-video__accent {
    display: block;
    color: #FEDB00;
}

.chesterton-hero-video__subheadline {
    font-size: clamp(1rem, 2vw, 1.35rem);
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 2.5rem;
    font-weight: 400;
    line-height: 1.6;
}

.chesterton-hero-video__cta-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.chesterton-hero-video__btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    letter-spacing: 0.01em;
}

.chesterton-hero-video__btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.chesterton-hero-video__btn--primary {
    background: #FEDB00;
    color: #002E5D !important;
}

.chesterton-hero-video__btn--secondary {
    background: transparent;
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.chesterton-hero-video__btn--secondary:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 600px) {
    .chesterton-hero-video__cta-row {
        flex-direction: column;
        align-items: center;
    }

    .chesterton-hero-video__btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
}

/* ============================================
   16. BUTTON STYLES
   ============================================ */

/* Button 1 (default): hover → keep text white */
.wp-block-button:not(.is-style-cta) .wp-block-button__link:hover,
.wp-block-button:not(.is-style-cta) .wp-element-button:hover {
    color: #ffffff !important;
}

/* Button 2 (CTA): white text on Chesterton Red */
.wp-block-button.is-style-cta .wp-block-button__link,
.wp-block-button.is-style-cta .wp-element-button {
    background-color: #C41E3A !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
}

/* Button 2 (CTA) hover: black text on Chesterton Yellow */
.wp-block-button.is-style-cta .wp-block-button__link:hover,
.wp-block-button.is-style-cta .wp-element-button:hover {
    background-color: #FEDB00 !important;
    color: #1E1E1E !important;
}

/* ============================================
   17. POST TITLE LINKS — dark Chesterton grey instead of theme red
   ============================================ */

.wp-block-post-title a,
h2.wp-block-post-title a,
h2 .wp-block-post-title a {
    color: #53565A;
    text-decoration: none;
}

.wp-block-post-title a:hover,
h2.wp-block-post-title a:hover,
h2 .wp-block-post-title a:hover {
    color: #1E1E1E;
    text-decoration: underline;
}

/* ============================================
   18. PRINT STYLES
   ============================================ */

@media print {
    .site-header,
    .site-footer,
    .navigation,
    .no-print {
        display: none;
    }

    body {
        font-size: 12pt;
    }

    a {
        text-decoration: underline;
    }
}

/* ============================================
   RELATED BLOG POSTS
   ============================================ */
.chesterton-blog-related {
    background: #001a3a;
    padding: 4rem 0;
}
.chesterton-blog-related__inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.chesterton-blog-related__heading {
    color: #FEDB00;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 800;
    margin: 0 0 2rem;
}
.chesterton-blog-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 768px) {
    .chesterton-blog-related__grid {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .chesterton-blog-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.chesterton-blog-related__card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    transition: border-color 0.2s;
}
.chesterton-blog-related__card:hover {
    border-color: #FEDB00;
}
.chesterton-blog-related__link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.chesterton-blog-related__thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
}
.chesterton-blog-related__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.chesterton-blog-related__card:hover .chesterton-blog-related__thumb img {
    transform: scale(1.04);
}
.chesterton-blog-related__thumb--placeholder {
    background: rgba(255,255,255,0.08);
}
.chesterton-blog-related__body {
    padding: 1rem 1.25rem 1.25rem;
}
.chesterton-blog-related__date {
    display: block;
    font-size: 0.75rem;
    color: #FEDB00;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}
.chesterton-blog-related__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: #ffffff;
    margin: 0;
}

/* ============================================
   RELATED PRODUCTS
   ============================================ */
.chesterton-related-products {
    padding: 4rem 0;
}
.chesterton-related-products__inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.chesterton-related-products__heading {
    color: #FEDB00;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 800;
    margin: 0 0 2rem;
}
.chesterton-related-products__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 768px) {
    .chesterton-related-products__grid { grid-template-columns: 1fr; }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .chesterton-related-products__grid { grid-template-columns: repeat(2, 1fr); }
}
.chesterton-related-products__card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    transition: border-color 0.2s;
}
.chesterton-related-products__card:hover { border-color: #FEDB00; }
.chesterton-related-products__link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.chesterton-related-products__thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
}
.chesterton-related-products__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 1rem;
    transition: transform 0.3s ease;
}
.chesterton-related-products__card:hover .chesterton-related-products__thumb img {
    transform: scale(1.04);
}
.chesterton-related-products__thumb--placeholder {
    background: rgba(255,255,255,0.06);
}
.chesterton-related-products__body {
    padding: 1rem 1.25rem 1.25rem;
}
.chesterton-related-products__sku {
    display: block;
    font-size: 0.75rem;
    color: #FEDB00;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
}
.chesterton-related-products__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: #ffffff;
    margin: 0;
}

/* ============================================
   LATEST BLOG POSTS (industry pages etc.)
   ============================================ */
.chesterton-latest-posts {
    padding: 4rem 0;
}
.chesterton-latest-posts__inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.chesterton-latest-posts__heading {
    color: #FEDB00;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 800;
    margin: 0 0 2rem;
}
.chesterton-latest-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 768px) {
    .chesterton-latest-posts__grid { grid-template-columns: 1fr; }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .chesterton-latest-posts__grid { grid-template-columns: repeat(2, 1fr); }
}
.chesterton-latest-posts__card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    transition: border-color 0.2s;
}
.chesterton-latest-posts__card:hover { border-color: #FEDB00; }
.chesterton-latest-posts__link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.chesterton-latest-posts__thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
}
.chesterton-latest-posts__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.chesterton-latest-posts__card:hover .chesterton-latest-posts__thumb img {
    transform: scale(1.04);
}
.chesterton-latest-posts__thumb--placeholder {
    background: rgba(255,255,255,0.08);
}
.chesterton-latest-posts__body {
    padding: 1rem 1.25rem 1.25rem;
}
.chesterton-latest-posts__date {
    display: block;
    font-size: 0.75rem;
    color: #FEDB00;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}
.chesterton-latest-posts__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: #ffffff;
    margin: 0;
}

/* Accordion — normalize borders: item gets border-top, heading border removed (Core sets both) */
.wp-block-accordion {
    border-top: 1px solid #000;
}
.wp-block-accordion-item {
    border-top: 1px solid #000 !important;
}
.wp-block-accordion-item:first-child {
    border-top: none !important;
}
.wp-block-accordion-heading {
    border-top: none !important;
}

/* Social media icons — black background for LinkedIn, YouTube, Instagram */
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-linkedin,
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-youtube,
:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-instagram {
    background-color: #000;
    color: #fff;
}

/* Fix centered button in front-page global section — core sets width:100% on the link/button */
.chesterton-global-section .wp-block-buttons.is-content-justification-center .wp-block-button {
    flex: 0 0 auto;
}
.chesterton-global-section .wp-block-buttons.is-content-justification-center .wp-block-button__link {
    width: auto;
}

/* ============================================
   19. ADDITIONAL CSS (migrated from DB)
   ============================================ */

.chesterton-stat-item {
    font-size: 138%;
    color: #c41e3a;
}

:root :where(.wp-block-list li) {
    margin-top: 0rem !important;
    margin-left: 1rem;
}

.lwptoc-light .lwptoc_i {
    color: #333;
    background: transparent;
}
.lwptoc_i {
    padding: 0px;
    border-bottom: 1px #000 solid;
}

hr {
    padding-bottom: 3rem;
}

/* ============================================
   19b. PAGE ANIMATIONS — H1 fadeInUp + Image fadeIn
   ============================================ */

:root {
    --anim-h1-duration: 0.55s;
    --anim-h1-distance: 22px;
    --anim-h1-delay: 0s;
    --anim-img-duration: 0.55s;
    --anim-img-delay: 0.05s;
}

@keyframes chesterton-fadeInUp {
    from { opacity: 0; transform: translateY(var(--anim-h1-distance)); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes chesterton-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

h1,
h2.wp-block-post-title,
h2 {
    animation-name: chesterton-fadeInUp;
    animation-duration: var(--anim-h1-duration);
    animation-delay: var(--anim-h1-delay);
    animation-timing-function: ease;
    animation-fill-mode: both;
}

.wp-block-image img,
.wp-block-post-featured-image img,
.chesterton-product-card__image img,
.chesterton-product-hero__image img {
    animation-name: chesterton-fadeIn;
    animation-duration: var(--anim-img-duration);
    animation-delay: var(--anim-img-delay);
    animation-timing-function: ease;
    animation-fill-mode: both;
}

@media (prefers-reduced-motion: reduce) {
    h1,
    h2.wp-block-post-title,
    h2,
    .wp-block-image img,
    .wp-block-post-featured-image img,
    .chesterton-product-card__image img,
    .chesterton-product-hero__image img { animation: none !important; }
}

