/**
 * BW Product Card
 *
 * Everything is scoped under .elementor-widget-bw-product-card so the rules
 * outrank the Elementor global kit (which targets headings as
 * `.elementor-kit-N h3` and would otherwise win against a single class).
 */

.elementor-widget-bw-product-card {
    --bw-pc-blue: #005eb8;
    --bw-pc-blue-dk: #00427f;
    --bw-pc-orange: #f28120;
    --bw-pc-ink: #101720;
    --bw-pc-body: #5b6570;
    --bw-pc-mute: #8a95a1;
    --bw-pc-line: #e2e6ea;
    --bw-pc-soft: #f7f9fb;
    --bw-pc-media-a: #ffffff;
    --bw-pc-media-b: #e9eff5;
}

.elementor-widget-bw-product-card * {
    box-sizing: border-box;
}

/* ---------------------------------------------------------------- card ---- */
.elementor-widget-bw-product-card .bw-pc {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--bw-pc-line);
    border-radius: 22px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.elementor-widget-bw-product-card .bw-pc.has-hover:hover {
    transform: translateY(-5px);
    border-color: #cfd9e3;
    box-shadow: 0 26px 56px rgba(16, 23, 32, .14);
}

/* --------------------------------------------------------------- media ---- */
.elementor-widget-bw-product-card .bw-pc-media {
    position: relative;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;
    background: radial-gradient(circle at 50% 42%, var(--bw-pc-media-a), var(--bw-pc-media-b) 78%);
    border-bottom: 1px solid var(--bw-pc-line);
}

.elementor-widget-bw-product-card .bw-pc-media img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    mix-blend-mode: multiply;
    transition: transform .35s ease;
}

.elementor-widget-bw-product-card .bw-pc.has-hover:hover .bw-pc-media img {
    transform: scale(1.06);
}

.elementor-widget-bw-product-card .bw-pc-media-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 0;
    border: none;
    text-decoration: none;
}

.elementor-widget-bw-product-card .bw-pc-media-link.is-zoom {
    cursor: zoom-in;
}

.elementor-widget-bw-product-card .bw-pc-tag {
    position: absolute;
    left: 18px;
    top: 18px;
    z-index: 2;
    padding: 8px 15px;
    border-radius: 999px;
    background: var(--bw-pc-ink);
    color: #fff;
    font: 800 10px/1 'Open Sans', Arial, sans-serif;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ---------------------------------------------------------------- body ---- */
.elementor-widget-bw-product-card .bw-pc-body {
    padding: 26px 28px 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.elementor-widget-bw-product-card .bw-pc-sku {
    font: 800 38px/1 'Open Sans', Arial, sans-serif;
    letter-spacing: -.035em;
    color: var(--bw-pc-ink);
    margin: 0;
    padding: 0;
    text-transform: uppercase;
}

.elementor-widget-bw-product-card .bw-pc-sku sup {
    font-size: 14px;
    font-weight: 700;
    color: var(--bw-pc-blue);
    letter-spacing: .06em;
    margin-left: 8px;
    vertical-align: super;
    text-transform: none;
}

.elementor-widget-bw-product-card .bw-pc-family {
    font: 600 12px/1.4 'Open Sans', Arial, sans-serif;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--bw-pc-blue);
    margin: 9px 0 20px;
    display: inline-block;
    align-self: flex-start;
}

/* optional accent rule beneath the family line */
.elementor-widget-bw-product-card .bw-pc-family.has-rule {
    padding-bottom: 14px;
    border-bottom: 2px solid var(--bw-pc-orange);
}

/* --------------------------------------------------------- paired stats ---- */
.elementor-widget-bw-product-card .bw-pc-stats {
    display: grid;
    gap: 0;
    background: var(--bw-pc-soft);
    border: 1px solid var(--bw-pc-line);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.elementor-widget-bw-product-card .bw-pc-stat {
    padding: 15px 12px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-right: 1px solid var(--bw-pc-line);
}

.elementor-widget-bw-product-card .bw-pc-stat:last-child {
    border-right: none;
}

/**
 * Two-column grid: values right-aligned, units left-aligned. The column
 * boundary is shared by every row, so GPH/LPH (and PSI/Bar) start at the
 * same x position regardless of how wide the numbers are.
 */
.elementor-widget-bw-product-card .bw-pc-stat-grid {
    display: inline-grid;
    grid-template-columns: auto auto;
    column-gap: 6px;
    row-gap: 4px;
    align-items: baseline;
}

.elementor-widget-bw-product-card .bw-pc-stat-v {
    justify-self: end;
    text-align: right;
    font: 800 19px/1.2 'Open Sans', Arial, sans-serif;
    color: var(--bw-pc-blue);
    letter-spacing: -.02em;
}

.elementor-widget-bw-product-card .bw-pc-stat-u {
    justify-self: start;
    text-align: left;
    font: 800 10.5px/1 'Open Sans', Arial, sans-serif;
    color: var(--bw-pc-mute);
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* secondary pair: same size, distinguished by weight and colour only */
.elementor-widget-bw-product-card .bw-pc-stat-v.is-alt {
    font-weight: 700;
    color: var(--bw-pc-body);
}

.elementor-widget-bw-product-card .bw-pc-stat-k {
    font: 600 9.5px/1 'Open Sans', Arial, sans-serif;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: var(--bw-pc-mute);
    margin-top: 10px;
}

/* ------------------------------------------------- specification toggle ---- */
.elementor-widget-bw-product-card .bw-pc-more {
    margin: 0 0 20px;
    border: 1px solid var(--bw-pc-line);
    border-radius: 12px;
    overflow: hidden;
}

.elementor-widget-bw-product-card .bw-pc-more > summary {
    cursor: pointer;
    list-style: none;
    padding: 13px 17px;
    font: 800 11px/1 'Open Sans', Arial, sans-serif;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--bw-pc-body);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.elementor-widget-bw-product-card .bw-pc-more > summary::-webkit-details-marker {
    display: none;
}

.elementor-widget-bw-product-card .bw-pc-more > summary::after {
    content: "+";
    font-size: 16px;
    font-weight: 800;
    color: var(--bw-pc-orange);
}

.elementor-widget-bw-product-card .bw-pc-more[open] > summary {
    border-bottom: 1px solid var(--bw-pc-line);
}

.elementor-widget-bw-product-card .bw-pc-more[open] > summary::after {
    content: "\2212";
}

.elementor-widget-bw-product-card .bw-pc-more > summary:hover {
    background: var(--bw-pc-soft);
    color: var(--bw-pc-ink);
}

.elementor-widget-bw-product-card .bw-pc-more-body {
    padding: 6px 17px 14px;
}

.elementor-widget-bw-product-card .bw-pc-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid #f2f5f7;
    font: 400 12.5px/1.45 'Open Sans', Arial, sans-serif;
}

.elementor-widget-bw-product-card .bw-pc-row:last-child {
    border-bottom: none;
}

.elementor-widget-bw-product-card .bw-pc-row b {
    color: var(--bw-pc-ink);
    font-weight: 700;
    flex: 0 0 auto;
}

.elementor-widget-bw-product-card .bw-pc-row span {
    color: var(--bw-pc-body);
    text-align: right;
}

/* ------------------------------------------------------------- buttons ---- */
.elementor-widget-bw-product-card .bw-pc-cta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.elementor-widget-bw-product-card .bw-pc-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 22px;
    border-radius: 999px;
    font: 800 11.5px/1 'Open Sans', Arial, sans-serif;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all .16s ease;
}

.elementor-widget-bw-product-card .bw-pc-btn-fill {
    background: var(--bw-pc-blue);
    color: #fff;
    border: 2px solid var(--bw-pc-blue);
}

.elementor-widget-bw-product-card .bw-pc-btn-fill:hover {
    background: var(--bw-pc-blue-dk);
    border-color: var(--bw-pc-blue-dk);
    color: #fff;
}

.elementor-widget-bw-product-card .bw-pc-btn-line {
    border: 2px solid var(--bw-pc-line);
    color: var(--bw-pc-body);
    background: transparent;
}

.elementor-widget-bw-product-card .bw-pc-btn-line:hover {
    border-color: var(--bw-pc-blue);
    color: var(--bw-pc-blue);
}

/* ---------------------------------------------- horizontal orientation ---- */
.elementor-widget-bw-product-card .bw-pc.is-horizontal {
    flex-direction: row;
    align-items: stretch;
}

.elementor-widget-bw-product-card .bw-pc.is-horizontal .bw-pc-media {
    height: auto;
    min-height: 260px;
    flex: 0 0 auto;
    width: 38%;
    max-width: 38%;
    border-bottom: none;
    border-right: 1px solid var(--bw-pc-line);
}

.elementor-widget-bw-product-card .bw-pc.is-horizontal .bw-pc-body {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
}

/* image on the right */
.elementor-widget-bw-product-card .bw-pc.is-horizontal.is-media-right {
    flex-direction: row-reverse;
}

.elementor-widget-bw-product-card .bw-pc.is-horizontal.is-media-right .bw-pc-media {
    border-right: none;
    border-left: 1px solid var(--bw-pc-line);
}

/* ----------------------------------------------------- literature modal ---- */
body.bw-pc-modal-open {
    overflow: hidden;
}

.bw-pc-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
    background: rgba(16, 23, 32, .62);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.bw-pc-modal.is-open {
    display: flex;
}

.bw-pc-modal-panel {
    position: relative;
    width: 100%;
    max-width: 620px;
    margin: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(16, 23, 32, .35);
    overflow: hidden;
    animation: bw-pc-modal-in .18s ease-out;
}

@keyframes bw-pc-modal-in {
    from { transform: translateY(12px); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .bw-pc-modal-panel { animation: none; }
}

.bw-pc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px;
    border-bottom: 1px solid #e2e6ea;
}

.bw-pc-modal .bw-pc-modal-head .bw-pc-modal-title {
    margin: 0;
    padding: 0;
    font: 800 15px/1.3 'Open Sans', Arial, sans-serif;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: #101720;
}

/**
 * The modal is relocated to <body> at runtime, so it sits outside
 * .elementor-widget-bw-product-card and loses that scoping. Theme/kit
 * `button` rules would otherwise win on specificity - stretching the padding
 * and turning the 50% radius into an ellipse. Hence the explicit resets and
 * the narrowly targeted !important flags on the shape/colour properties.
 */
.bw-pc-modal .bw-pc-modal-head button.bw-pc-modal-close {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    flex: 0 0 34px !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none;
    padding: 0 !important;
    margin: 0;
    border: 1px solid #e2e6ea !important;
    border-radius: 50% !important;
    background: #fff !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #5b6570 !important;
    font: 400 18px/1 'Open Sans', Arial, sans-serif !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-shadow: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.bw-pc-modal .bw-pc-modal-head button.bw-pc-modal-close:hover,
.bw-pc-modal .bw-pc-modal-head button.bw-pc-modal-close:focus {
    background: #101720 !important;
    border-color: #101720 !important;
    color: #fff !important;
}

.bw-pc-modal .bw-pc-modal-head button.bw-pc-modal-close:focus-visible {
    outline: 2px solid #005eb8;
    outline-offset: 2px;
}

.bw-pc-modal-body {
    padding: 24px 26px 28px;
    font: 400 14px/1.7 'Open Sans', Arial, sans-serif;
    color: #5b6570;
}

/**
 * Pasted literature markup.
 * Prefixed with .bw-pc-modal so these beat the Elementor kit, whose
 * `.elementor-kit-N h5` would otherwise tie on specificity and win or lose
 * purely on stylesheet order.
 */
.bw-pc-modal .bw-pc-modal-body h5 {
    margin: 0 0 10px;
    padding: 0;
    font: 800 12px/1.3 'Open Sans', Arial, sans-serif;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #101720;
}

.bw-pc-modal .bw-pc-modal-body h5 strong {
    font-weight: 800;
}

.bw-pc-modal .bw-pc-modal-body a {
    color: #005eb8;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 94, 184, .3);
    transition: border-color .15s ease, color .15s ease;
}

.bw-pc-modal .bw-pc-modal-body a:hover {
    color: #00427f;
    border-bottom-color: #00427f;
}

/* the source markup wraps each document in a bare <span> - make them rows */
.bw-pc-modal .bw-pc-modal-body > span,
.bw-pc-modal .bw-pc-modal-body > span > a {
    display: block;
}

.bw-pc-modal .bw-pc-modal-body > span {
    padding: 7px 0;
    text-decoration: none !important;
}

.bw-pc-modal .bw-pc-modal-body hr {
    margin: 20px 0;
    padding: 0;
    height: 0;
    border: none;
    border-top: 1px solid #e2e6ea;
    background: none;
}

.bw-pc-modal .bw-pc-modal-body p {
    margin: 0 0 12px;
}

/* shortcode output (forms) - keep it inside the panel, otherwise defer to the theme */
.bw-pc-modal .bw-pc-modal-body form {
    margin: 0;
}

.bw-pc-modal .bw-pc-modal-body input,
.bw-pc-modal .bw-pc-modal-body select,
.bw-pc-modal .bw-pc-modal-body textarea {
    max-width: 100%;
}

.bw-pc-modal .bw-pc-modal-body textarea {
    min-height: 110px;
}

/* ---------------------------------------------------------- responsive ---- */
@media (max-width: 767px) {
    .elementor-widget-bw-product-card .bw-pc-media {
        height: 210px;
    }

    .elementor-widget-bw-product-card .bw-pc-body {
        padding: 22px 20px 24px;
    }

    .elementor-widget-bw-product-card .bw-pc-sku {
        font-size: 31px;
    }

    .elementor-widget-bw-product-card .bw-pc-stat-v {
        font-size: 17px;
    }

    /* horizontal cards stack on phones regardless of the chosen orientation */
    .elementor-widget-bw-product-card .bw-pc.is-horizontal,
    .elementor-widget-bw-product-card .bw-pc.is-horizontal.is-media-right {
        flex-direction: column;
    }

    .elementor-widget-bw-product-card .bw-pc.is-horizontal .bw-pc-media {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        min-height: 0;
        height: 210px;
        border-right: none;
        border-left: none;
        border-bottom: 1px solid var(--bw-pc-line);
    }

    .bw-pc-modal {
        padding: 20px 14px;
    }

    .bw-pc-modal-head {
        padding: 18px 20px;
    }

    .bw-pc-modal-body {
        padding: 20px 20px 24px;
    }
}
