:root {
    --wec-red: #D32F2F;
    --wec-red-dark: #B71C1C;
    --wec-white: #ffffff;
    --wec-ink: #1f1f1f;
    --wec-light: #f7f7f7;
    --wec-border: #e9e9e9;
}

.wec-v2-header {
    position: relative;
    z-index: 1000;
    width: 100%;
    margin: 0 !important;
    padding: 0 28px !important;
    background: var(--wec-white) !important;
    border-top: 2px solid var(--wec-red);
    border-bottom: 1px solid var(--wec-border);
}

.wec-v2-header__inner {
    min-height: 86px;
    max-width: 1440px !important;
    margin: 0 auto !important;
    gap: 28px;
    align-items: center !important;
}

.wec-v2-logo,
.wec-v2-logo a,
.wec-v2-logo img {
    margin: 0 !important;
}

.wec-v2-logo img {
    display: block;
    max-height: 44px;
    width: auto;
}

.wec-v2-nav {
    flex: 1 1 auto;
    margin: 0 !important;
}

.wec-v2-nav .wp-block-navigation__container {
    gap: 30px;
    align-items: center !important;
}

.wec-v2-nav .wp-block-navigation-item__content {
    color: var(--wec-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
}

.wec-v2-nav .wp-block-navigation-item__content:hover,
.wec-v2-nav .wp-block-navigation-item__content:focus {
    color: var(--wec-red);
}

/* Keep the language control and quote button on exactly the same baseline. */
.wec-v2-actions {
    flex: 0 0 auto;
    gap: 14px !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.wec-v2-actions > *,
.wec-v2-actions .wp-block-shortcode,
.wec-v2-actions .wp-block-buttons,
.wec-v2-actions .wp-block-button {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.wec-v2-quote .wp-block-button__link {
    box-sizing: border-box;
    width: auto;
    min-width: 132px;
    height: 52px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 25px !important;
    border: 1px solid var(--wec-red);
    border-radius: 999px;
    background: var(--wec-red);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1 !important;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .2s ease, background .2s ease;
}

.wec-v2-quote .wp-block-button__link:hover {
    background: var(--wec-red-dark);
    border-color: var(--wec-red-dark);
    transform: translateY(-1px);
}

.wec-v2-lang {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.wec-v2-lang__current {
    appearance: none;
    box-sizing: border-box;
    height: 52px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 0 !important;
    padding: 0 20px !important;
    border: 1px solid var(--wec-border);
    border-radius: 999px;
    background: var(--wec-white);
    color: var(--wec-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1 !important;
    white-space: nowrap;
    cursor: pointer;
}

.wec-v2-lang__current:hover,
.wec-v2-lang__current:focus-visible {
    border-color: #d5d5d5;
}

.wec-v2-lang__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1 !important;
}

/* Compact dropdown: no inherited theme line-height, margins or huge gaps. */
.wec-v2-lang__dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 1001;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4px !important;
    width: 150px;
    min-width: 150px;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 8px !important;
    border: 1px solid var(--wec-border);
    border-radius: 16px;
    background: var(--wec-white);
    box-shadow: 0 16px 38px rgba(0,0,0,.13);
    line-height: 1.2 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
}

.wec-v2-lang.is-open .wec-v2-lang__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wec-v2-lang__dropdown > a {
    box-sizing: border-box;
    display: flex !important;
    align-items: center !important;
    width: 100%;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-radius: 10px;
    background: transparent;
    color: var(--wec-ink);
    font-size: 15px !important;
    font-weight: 500;
    line-height: 1.2 !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.wec-v2-lang__dropdown > a:hover,
.wec-v2-lang__dropdown > a.is-current {
    background: var(--wec-light);
    color: var(--wec-red);
}

.wec-v2-lang__fallback {
    display: inline-flex;
    align-items: center;
    height: 52px;
    margin: 0 !important;
    color: var(--wec-ink);
    font-size: 15px;
    line-height: 1 !important;
    text-decoration: none;
}

@media (max-width: 960px) {
    .wec-v2-header {
        padding: 0 18px !important;
    }

    .wec-v2-header__inner {
        min-height: 72px;
        gap: 14px;
    }

    .wec-v2-logo img {
        max-height: 38px;
    }

    .wec-v2-actions {
        gap: 8px !important;
    }

    .wec-v2-quote {
        display: none !important;
    }

    .wec-v2-lang__current {
        height: 42px;
        min-height: 42px;
        padding: 0 13px !important;
    }

    .wec-v2-lang__dropdown {
        top: calc(100% + 8px);
    }

    .wec-v2-nav {
        order: 3;
        flex: 0 0 auto;
    }
}


/* WEC Brand System V1.0 - global accent normalization. */
:root,
body,
.editor-styles-wrapper {
    --wec-red: #D32F2F;
    --wec-red-dark: #B71C1C;
    --wec-white: #FFFFFF;
    --wp--preset--color--wec-red: #D32F2F;
}

/* Official logo assets have transparent backgrounds, so no white rectangle is shown. */
.wec-adaptive-logo,
.wec-adaptive-logo__link {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.wec-adaptive-logo__red,
.wec-adaptive-logo__white {
    display: block;
    width: auto;
    height: 46px;
    max-width: 150px;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    object-fit: contain;
}

.wec-adaptive-logo__white {
    display: none;
}

/* White logo on explicitly dark WordPress sections. */
.has-black-background-color .wec-adaptive-logo__red,
.has-contrast-background-color .wec-adaptive-logo__red,
.has-base-contrast-background-color .wec-adaptive-logo__red,
.wec-dark-background .wec-adaptive-logo__red,
.wec-footer-dark .wec-adaptive-logo__red {
    display: none;
}

.has-black-background-color .wec-adaptive-logo__white,
.has-contrast-background-color .wec-adaptive-logo__white,
.has-base-contrast-background-color .wec-adaptive-logo__white,
.wec-dark-background .wec-adaptive-logo__white,
.wec-footer-dark .wec-adaptive-logo__white {
    display: block;
}

/* Make all WEC modules use the approved brand red. */
.wec-v2-header,
.wec-home,
.wec-products-catalog,
.wec-product-detail,
.wec-product-page-intro,
.wec-product-page-grid,
.wec-cta,
.wec-stats,
.wec-products,
.wec-industries,
.wec-split {
    --wec-red: #D32F2F !important;
    --wec-red-dark: #B71C1C !important;
}

.wec-v2-header {
    border-top-color: #D32F2F !important;
}

.wec-v2-quote .wp-block-button__link,
.wec-btn-primary .wp-block-button__link,
.wec-button--primary,
.wec-products-filter button.is-active,
.wec-cta .wp-block-button__link {
    background: #D32F2F !important;
    border-color: #D32F2F !important;
}

.wec-v2-quote .wp-block-button__link:hover,
.wec-btn-primary .wp-block-button__link:hover,
.wec-button--primary:hover {
    background: #B71C1C !important;
    border-color: #B71C1C !important;
}

.wec-v2-nav .wp-block-navigation-item__content:hover,
.wec-v2-nav .wp-block-navigation-item__content:focus,
.wec-v2-lang__dropdown > a:hover,
.wec-v2-lang__dropdown > a.is-current,
.wec-product-card__category,
.wec-product-card__link,
.wec-product-card__link:visited,
.wec-product-detail__model,
.wec-product-detail__text-link,
.wec-product-page-eyebrow,
.wec-eyebrow,
.wec-stats h3 {
    color: #D32F2F !important;
}

.wec-button--secondary,
.wec-products-filter button:hover {
    border-color: #D32F2F !important;
    color: #D32F2F !important;
}

@media (max-width: 960px) {
    .wec-adaptive-logo__red,
    .wec-adaptive-logo__white {
        height: 38px;
        max-width: 126px;
    }
}
