/*
 * BrakeQuip Products — parts-catalogue styling.
 *
 * The design premise: this shop sells 254 small metal fittings that look
 * nearly identical in a photograph, and several have no photograph at
 * all. The buyer arrives already knowing "M10 x 1.0, 3/16 tube,
 * stainless" and needs to find that one part. So specification is the
 * primary content and the photograph is supporting evidence — the
 * reverse of a normal storefront.
 *
 * IBM Plex throughout: IBM drew it for technical documentation. Mono
 * carries every specification and price, because a parts book sets its
 * data in mono and because tabular figures are genuinely easier to
 * compare down a column.
 *
 * Styling only. No URLs, page titles, template files or markup
 * structure change here; everything is a visual property or an additive
 * element, so nothing already indexed moves.
 *
 * Divi ships a lot of high-specificity CSS, so some rules need
 * !important to land. That is the parent theme's doing, not enthusiasm.
 */

:root {
    --bq-ink: #14181b;
    --bq-graphite: #232a30;
    --bq-graphite-soft: #2d353d;
    --bq-steel: #78838d;
    --bq-steel-light: #a9b3bb;
    --bq-rule: #d8dde1;
    --bq-rule-soft: #e8ecee;
    --bq-paper: #fff;
    --bq-paper-2: #f4f6f7;
    --bq-signal: #ffc300;
    --bq-signal-dark: #e0ab00;
    --bq-stock: #17703f;
    --bq-nostock: #a33a2b;

    --bq-display: "IBM Plex Sans Condensed", "Arial Narrow", Arial, sans-serif;
    --bq-body: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --bq-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* ---------------------------------------------------------------
   Foundations
   --------------------------------------------------------------- */

body,
.et_pb_text,
p {
    font-family: var(--bq-body);
    color: var(--bq-ink);
}

body {
    background: var(--bq-paper);
    font-size: 15px;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.et_pb_module_header,
.woocommerce-loop-product__title,
.product_title,
.woocommerce ul.products li.product h2 {
    font-family: var(--bq-display) !important;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--bq-ink);
    text-transform: none;
}

h1, .product_title {
    font-size: 2.1rem;
    line-height: 1.12;
}

a {
    color: var(--bq-ink);
    text-decoration-color: var(--bq-rule);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--bq-ink);
    text-decoration-color: var(--bq-signal);
}

/* ---------------------------------------------------------------
   The spec line — the signature element.
   A monospace, pipe-delimited data strip reading like a line in a
   parts book. It is the thing the customer is actually scanning for,
   so it appears everywhere a product does.
   --------------------------------------------------------------- */

.bq-spec {
    font-family: var(--bq-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: var(--bq-steel);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 10px;
    margin: 4px 0 0;
}

.bq-spec__item {
    white-space: nowrap;
}

.bq-spec__item + .bq-spec__item::before {
    content: "│";
    color: var(--bq-rule);
    margin-right: 10px;
}

.bq-spec__item--part {
    color: var(--bq-ink);
    font-weight: 500;
}

/* ---------------------------------------------------------------
   Header

   The logo is a PNG on a solid white ground, so on a dark bar it can
   only ever read as a white patch. Rather than fight that, the header
   is light and the logo sits on its own background. The industrial
   weight moves to the find-a-part bar directly beneath it and to the
   footer, which keeps the two dark bands the design is built on.
   --------------------------------------------------------------- */

#main-header,
#main-header.et-fixed-header {
    background-color: var(--bq-paper) !important;
    box-shadow: none;
    border-bottom: 1px solid var(--bq-rule);
}

#logo {
    max-height: 56px !important;
}

#top-menu li a,
#et-top-navigation .et-cart-info span {
    color: var(--bq-ink) !important;
    font-family: var(--bq-display);
    font-size: 16px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
    padding-bottom: 6px;
}

/* Yellow is unreadable as text on white, so the accent moves to a rule
   under the active item instead. */
#top-menu li a::after {
    content: "";
    display: block;
    height: 3px;
    margin-top: 4px;
    background: transparent;
    transition: background 0.12s ease;
}

#top-menu li a:hover::after {
    background: var(--bq-rule);
}

#top-menu li.current-menu-item > a::after {
    background: var(--bq-signal);
}

#top-menu li a:hover,
#top-menu li.current-menu-item > a {
    color: var(--bq-ink) !important;
    opacity: 1;
}

#et_top_search .et-cart-info,
#et_search_icon::before,
.et-cart-info span::before {
    color: var(--bq-ink) !important;
}

.et_mobile_menu {
    background: var(--bq-paper);
    border-top-color: var(--bq-signal);
}

.et_mobile_menu li a {
    color: var(--bq-ink) !important;
    font-family: var(--bq-display);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.mobile_menu_bar::before {
    color: var(--bq-ink) !important;
}

/* ---------------------------------------------------------------
   Find-a-part bar
   --------------------------------------------------------------- */

.bq-specbar {
    background: var(--bq-graphite-soft);
    padding: 9px 0;
}

.bq-specbar__inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.bq-specbar__label {
    font-family: var(--bq-mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 11px;
    color: var(--bq-steel-light);
    white-space: nowrap;
}

.bq-specbar form {
    display: flex;
    flex: 1 1 340px;
    min-width: 260px;
}

.bq-specbar input[type="search"] {
    flex: 1;
    border: 1px solid rgb(255 255 255 / 16%);
    border-right: 0;
    background: rgb(0 0 0 / 18%);
    color: #fff;
    padding: 9px 13px;
    font-family: var(--bq-mono);
    font-size: 13px;
    border-radius: 0;
}

.bq-specbar input[type="search"]::placeholder {
    color: #7d8892;
}

.bq-specbar input[type="search"]:focus {
    outline: 0;
    border-color: var(--bq-signal);
}

.bq-specbar button {
    background: var(--bq-signal);
    color: var(--bq-ink);
    border: 0;
    padding: 9px 20px;
    font-family: var(--bq-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 14px;
    cursor: pointer;
    border-radius: 0;
}

.bq-specbar button:hover {
    background: var(--bq-signal-dark);
}

/* ---------------------------------------------------------------
   Product listing as a parts book
   Rows, not cards. Fifty-five near-identical fittings are compared
   down a column, and a photograph of each one tells you nothing.
   --------------------------------------------------------------- */

.woocommerce ul.products,
.woocommerce-page ul.products {
    display: block !important;
    margin: 0 !important;
    border-top: 1px solid var(--bq-rule);
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: both;
    display: block;
    border-bottom: 1px solid var(--bq-rule-soft);
    background: transparent;
    box-sizing: border-box;
    transition: background 0.12s ease;
}

.woocommerce ul.products li.product:hover {
    background: var(--bq-paper-2);
}

/* Divi wraps the whole row — image, title, spec and price — in one
   anchor, so the row grid belongs on the anchor, not the list item.
   The thumbnail spans both rows; title sits above its spec line. */
.woocommerce ul.products li.product > a.woocommerce-LoopProduct-link,
.woocommerce-page ul.products li.product > a.woocommerce-LoopProduct-link {
    display: grid !important;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    grid-template-areas:
        "thumb title price"
        "thumb spec  price";
    align-items: center;
    column-gap: 18px;
    row-gap: 2px;
    padding: 12px 6px;
    text-decoration: none;
}

.woocommerce ul.products li.product .et_shop_image {
    grid-area: thumb !important;
    display: block;
    margin: 0;
}

.woocommerce ul.products li.product .et_shop_image .et_overlay {
    display: none;
}

.woocommerce ul.products li.product a img {
    width: 64px !important;
    height: 64px;
    object-fit: contain;
    margin: 0 !important;
    background: var(--bq-paper-2);
    border: 1px solid var(--bq-rule-soft);
    box-shadow: none;
}

.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    grid-area: title !important;
    font-size: 0.98rem !important;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0;
    align-self: end;
}

.woocommerce ul.products li.product .bq-spec {
    grid-area: spec !important;
    align-self: start;
    margin: 0;
}

.woocommerce ul.products li.product .price {
    grid-area: price !important;
    font-family: var(--bq-mono) !important;
    font-size: 1.05rem !important;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--bq-ink) !important;
    text-align: right;
    white-space: nowrap;
    margin: 0 !important;
    align-self: center;
}

.woocommerce ul.products li.product .price del {
    color: var(--bq-steel) !important;
    font-size: 0.85rem;
}

/* Add-to-cart sits outside the anchor when Divi renders one. */
.woocommerce ul.products li.product > .button,
.woocommerce ul.products li.product > .added_to_cart {
    display: inline-block;
    margin: 0 6px 12px !important;
}

/* Buttons: square, quiet, and the only place the signal colour is
   allowed to shout. */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    background: var(--bq-ink) !important;
    color: #fff !important;
    font-family: var(--bq-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 13px;
    border-radius: 0;
    border: 0;
    padding: 8px 16px;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background: var(--bq-signal) !important;
    color: var(--bq-ink) !important;
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce div.product form.cart .button {
    background: var(--bq-signal) !important;
    color: var(--bq-ink) !important;
    padding: 12px 26px;
    font-size: 15px;
}

.woocommerce a.button.alt:hover,
.woocommerce div.product form.cart .button:hover {
    background: var(--bq-signal-dark) !important;
}

/* ---------------------------------------------------------------
   Single product — laid out like a drawing's title block
   --------------------------------------------------------------- */

.woocommerce div.product .product_title {
    margin-bottom: 10px;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
    font-family: var(--bq-mono);
    font-weight: 500;
    font-size: 1.9rem;
    font-variant-numeric: tabular-nums;
    color: var(--bq-ink);
}

/* The title block: labelled fields in mono, ruled like a drawing
   sheet rather than styled like a badge row. */
.bq-titleblock {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    border: 1px solid var(--bq-rule);
    margin: 0 0 22px;
}

.bq-titleblock__cell {
    padding: 9px 12px;
    border-right: 1px solid var(--bq-rule);
}

.bq-titleblock__cell:last-child {
    border-right: 0;
}

.bq-titleblock__label {
    display: block;
    font-family: var(--bq-mono);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 10px;
    color: var(--bq-steel);
    margin-bottom: 3px;
}

.bq-titleblock__value {
    font-family: var(--bq-mono);
    font-size: 14px;
    font-weight: 500;
    color: var(--bq-ink);
}

/* WooCommerce's own stock line, beside the add-to-cart button. It is
   the single source of availability on the page — the title block
   deliberately does not repeat it. */
.woocommerce div.product .stock {
    font-family: var(--bq-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.woocommerce div.product .stock.in-stock {
    color: var(--bq-stock);
}

.woocommerce div.product .stock.out-of-stock {
    color: var(--bq-nostock);
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
    padding: 0;
    border-bottom: 1px solid var(--bq-rule);
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before {
    border-bottom: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    margin: 0 22px 0 0;
    padding: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
    display: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
    border-bottom-color: var(--bq-ink);
    background: transparent;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    font-family: var(--bq-display);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    font-size: 14px;
    color: var(--bq-steel);
    padding: 10px 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: var(--bq-ink);
}

/* Specification tables already present in many descriptions. Divi
   rendered these almost invisibly; here they are set as data. */
.woocommerce div.product .woocommerce-Tabs-panel table,
.woocommerce div.product #tab-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-family: var(--bq-mono);
    font-size: 13px;
}

.woocommerce div.product .woocommerce-Tabs-panel table th,
.woocommerce div.product #tab-description table th {
    background: transparent;
    color: var(--bq-steel);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 10px;
    text-align: left;
    padding: 6px 12px 6px 0;
    border-bottom: 1px solid var(--bq-ink);
}

.woocommerce div.product .woocommerce-Tabs-panel table td,
.woocommerce div.product #tab-description table td {
    border-bottom: 1px solid var(--bq-rule-soft);
    padding: 8px 12px 8px 0;
    color: var(--bq-ink);
}

.woocommerce div.product table th p,
.woocommerce div.product table td p {
    color: inherit;
    font-family: inherit;
    margin: 0;
    padding: 0;
    line-height: 1.45;
}

/* ---------------------------------------------------------------
   Shop furniture
   --------------------------------------------------------------- */

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering select {
    font-family: var(--bq-mono);
    font-size: 12px;
    color: var(--bq-steel);
}

.woocommerce nav.woocommerce-pagination ul {
    border: 0;
}

.woocommerce nav.woocommerce-pagination ul li {
    border: 0;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span.current {
    font-family: var(--bq-mono);
    font-size: 13px;
    border-radius: 0;
}

.woocommerce nav.woocommerce-pagination ul li span.current {
    background: var(--bq-ink);
    color: #fff;
}

.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info {
    border-top-color: var(--bq-ink);
    background: var(--bq-paper-2);
    font-family: var(--bq-body);
}

.woocommerce .woocommerce-message::before,
.woocommerce .woocommerce-info::before {
    color: var(--bq-ink);
}

/* Divi draws a vertical rule where a sidebar would be; there is none
   on these pages, so it reads as a stray line. */
.woocommerce-page #main-content .container::before,
.single-product #main-content .container::before {
    display: none;
}

.woocommerce-page #left-area,
.single-product #left-area {
    width: 100%;
    padding-right: 0;
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */

#main-footer {
    background: var(--bq-graphite);
    border-top: 1px solid var(--bq-graphite-soft);
}

#footer-widgets .footer-widget,
#footer-widgets .footer-widget li,
#footer-widgets .footer-widget li a,
#footer-bottom,
#footer-info,
#footer-info a {
    color: var(--bq-steel-light) !important;
    font-family: var(--bq-body);
}

#main-footer .footer-widget h4 {
    font-family: var(--bq-display);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff !important;
}

#footer-widgets .footer-widget li a:hover,
#footer-info a:hover {
    color: var(--bq-signal) !important;
}

#footer-bottom {
    background: rgb(0 0 0 / 20%);
}

#footer-info {
    font-family: var(--bq-mono);
    font-size: 12px;
}

/* ---------------------------------------------------------------
   Small screens: the row collapses, specs stay
   --------------------------------------------------------------- */

@media (width <= 640px) {
    .woocommerce ul.products li.product > a {
        grid-template-columns: 52px minmax(0, 1fr);
        grid-template-areas:
            "thumb title"
            "thumb spec"
            "price price";
        row-gap: 4px;
    }

    .woocommerce ul.products li.product a img {
        width: 52px !important;
        height: 52px;
    }

    .woocommerce ul.products li.product .price {
        text-align: left;
        margin-top: 6px !important;
    }
}

/* ---------------------------------------------------------------
   Quality floor
   --------------------------------------------------------------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--bq-ink);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--bq-signal);
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
