/*
 * Brasseur brand override for the RedParts theme.
 *
 * Loaded LAST in the storefront layout, so it recolours the theme's red accent
 * (#e52727) to the Brasseur palette without touching the vendored theme CSS.
 *
 * Palette sampled from assets/logo.png:
 *   gold   #f0b000   brand accent  (buttons, badges, highlights)
 *   ink    #1a1a1a   text/icons on gold, large filled areas (matches the logo's black)
 *
 * Rule of thumb, chosen for legibility:
 *   - small accent elements  -> gold background + INK text (like the logo)
 *   - accent-coloured text on white -> bronze (#7d5a00, ~5.8:1 on white)
 *   - large filled areas (topbar) -> ink black, so the theme's white text stays legible
 */

:root {
    --br-gold: #f0b000;
    --br-gold-dark: #d18f00;
    --br-bronze: #7d5a00;
    --br-ink: #1a1a1a;
}

/*
 * Theme `.site { overflow: hidden }` creates a scroll containment that stops
 * `position: sticky` working for the checkout summary. `clip` still hides any
 * sideways overflow from the slanted header strips, without trapping sticky.
 */
.site {
    overflow: clip;
}

/* ---- Primary buttons: gold with ink text ---- */
.btn-primary,
.btn-primary.disabled,
.btn-primary:disabled,
.btn-primary.btn-loading:not(:disabled):not(.disabled),
.btn-primary.btn-loading:not(:disabled):not(.disabled):active,
.btn-primary.btn-loading:not(:disabled):not(.disabled).active {
    background: var(--br-gold);
    border-color: var(--br-gold);
    color: var(--br-ink);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active {
    background: var(--br-gold-dark);
    border-color: var(--br-gold-dark);
    color: var(--br-ink);
}

/* ---- Accent as background: gold fill, ink content ---- */
.filters-button__counter,
.page-item.active .page-link,
.footer-newsletter__form-button,
.widget-newsletter__button,
.product-card__addtocart-full,
.product-tabs__item-counter,
.block-slideshow__item-button,
.block-finder__form-control--button,
.button-toggle__input:checked ~ .button-toggle__button {
    background-color: var(--br-gold);
    border-color: var(--br-gold);
    color: var(--br-ink);
}

.page-item.active .page-link {
    color: var(--br-ink);
}

/* Form controls: gold selected state, ink glyph */
.input-check__input:checked ~ .input-check__box {
    background: var(--br-gold);
    border-color: var(--br-gold);
    color: var(--br-ink);
}

.input-radio__input:checked ~ .input-radio__circle {
    background: var(--br-gold);
}

/* Price slider (noUiSlider) */
.noUi-connect {
    background-color: var(--br-gold);
}

.noUi-horizontal .noUi-handle {
    border-color: var(--br-gold);
}

/*
 * Decorative icons / arrows.
 *
 * Split by the property the theme actually sets: `.block-features__item-icon` and
 * `.order-success__icon` are `fill: #e52727` in style.css, and `fill` beats an
 * inherited `color` on an SVG path — so recolouring those two through `color`
 * silently did nothing and they kept rendering theme red.
 */
.shop-features__item-icon {
    color: var(--br-gold);
}

/*
 * Carousel arrows: the theme paints the pill with `background` on the :before and keeps the
 * chevron white via `color` on the button (`fill: currentColor`). Recolouring the :before
 * through `color` did nothing, so the arrows stayed theme red. Gold pill, ink chevron —
 * white on gold is only 1.9:1. The theme's #333 hover state already supplies white itself.
 */
.arrow__button:before {
    background: var(--br-gold);
}

.arrow__button {
    color: var(--br-ink);
}

.block-features__item-icon,
.order-success__icon {
    fill: var(--br-gold);
}

/*
 * An uploaded feature icon. The theme only ever had inline SVGs here, which it colours
 * through `fill` — an <img> is a separate document, so it keeps whatever colours the file
 * was drawn in, and only needs holding to the 48x48 box the inline ones occupy. `contain`
 * rather than `cover` so a non-square upload is letterboxed instead of cropped.
 */
.block-features__item-icon-image {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

/*
 * Feature strip tile links. The <li> stays the theme flex cell; the <a> fills it so the
 * whole icon+title+subtitle is one hit target.
 *
 * Theme `a { color: #cb1818 }` would paint linked titles red and break the strip's look.
 * Force the same colours as an unlinked tile at rest; hover/focus are the only cues.
 */
.block-features__item-link,
.block-features__item-link:link,
.block-features__item-link:visited,
.block-features__item-link:hover,
.block-features__item-link:active,
.block-features__item-link:focus {
    display: flex;
    justify-content: center;
    width: 100%;
    color: inherit;
    text-decoration: none;
    border-radius: 4px;
}

.block-features__item-link .block-features__item-title {
    color: inherit;
}

.block-features__item-link .block-features__item-subtitle {
    color: #6c757d;
}

.block-features__item-link:hover .block-features__item-title {
    color: var(--br-bronze);
}

.block-features__item-link:focus {
    outline: none;
}

/* Bronze, not gold: gold on white is about 1.9:1, below the 3:1 a focus ring needs. */
.block-features__item-link:focus-visible {
    outline: 2px solid var(--br-bronze);
    outline-offset: 4px;
}

/*
 * The same upload in the product page's shop-features strip, where the theme draws its own
 * icons at 38px (`.shop-features__item-icon svg`, style.css:3537) rather than 48px.
 */
.shop-features__item-icon-image {
    display: block;
    width: 38px;
    height: 38px;
    object-fit: contain;
}

/* Carousel dots + theme tag badge */
.block-reviews__list .owl-carousel button.owl-dot.active:before,
.block-sale__carousel .owl-carousel button.owl-dot.active:before,
.block-slideshow__carousel .owl-carousel button.owl-dot.active:before,
.block-teammates__list .owl-carousel button.owl-dot.active:before,
.tag-badge--theme:before {
    background-color: var(--br-gold);
}

/* Product-card add-to-cart hover + gallery active thumb */
.product-card:hover .product-card__addtocart-icon:before,
.product-card:active .product-card__addtocart-icon:before {
    background-color: var(--br-gold);
}

.product-gallery__thumbnails-item--active:before,
.product-gallery__thumbnails-item--active:hover:before {
    border-color: var(--br-gold);
}

/* ---- Accent as text on white: bronze for legibility ---- */
.account-nav__item--active a,
.post-header__categories-link,
.product-tabs__item--active a,
.product-tabs__item--active a:hover,
.product-tabs__item--active a:active,
.block-zone__tabs-button--active,
.layout-switcher__button--active,
.input-radio-label__input:checked ~ .input-radio-label__title {
    color: var(--br-bronze);
}

/* ================= Header ================= */

/* "Shop by category" departments trigger */
.departments__button:hover,
.departments--open .departments__button {
    background-color: var(--br-gold);
    color: var(--br-ink);
}

/*
 * The theme colours the hamburger glyph white for its red trigger with a rule of its
 * own (`.departments__button:hover .departments__button-icon`), which outranks the
 * button-level rule above — so on gold the icon stayed white-on-gold (1.9:1). Match
 * the specificity and take it to ink. The arrow keeps the theme's rgba(0,0,0,.25),
 * which reads fine on gold.
 */
.departments__button:hover .departments__button-icon,
.departments--open .departments__button .departments__button-icon {
    color: var(--br-ink);
}

/*
 * The theme's departments list is sized for its 12 demo departments and has no
 * height cap. This catalogue has ~34 active top-level categories, which is ~1180px
 * of list — it ran off the bottom of the screen with no way to reach the last
 * entries. Cap it to the viewport and scroll instead. Capping the body too keeps
 * `.departments__megamenu { min-height: 100% }` from stretching a one-link submenu
 * to the full height of the list beside it.
 */
.departments__list,
.departments__body,
.departments__menu-container {
    max-height: calc(100vh - 160px);
}

.departments__list {
    overflow-y: auto;
}

.departments__menu-container {
    overflow-y: auto;
}

/*
 * Category links inside any megamenu (the departments submenus and the "Shop" nav
 * megamenu) hover to the theme's red. Bronze, per this file's text-on-white rule.
 */
.megamenu-links__item-link:hover,
.megamenu-links:not(.megamenu-links--root) .megamenu-links__item-link:hover,
.dropcart__item-name a:hover {
    color: var(--br-bronze);
}

/*
 * Log out is a POST, so it is a <button> inside a <form> where the theme's account
 * menu expects a plain <a>. The theme styles `.account-menu__links a` only, so the
 * button rendered as a browser-default grey chip. Give it the row's appearance.
 */
.account-menu__links form {
    margin: 0;
}

.account-menu__links button.account-menu__logout {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    border-radius: 0;
    color: inherit;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: inherit;
    padding: 5px 20px;
    cursor: pointer;
}

.account-menu__links button.account-menu__logout:hover {
    background: #f2f2f2;
}

/*
 * Keep a visible focus ring: this is the one control in the menu a keyboard user can
 * tab to, and it fires a POST. (The theme's own rows are links and keep the UA ring.)
 */
.account-menu__links button.account-menu__logout:focus-visible {
    outline: 2px solid var(--br-bronze);
    outline-offset: -2px;
}

/*
 * The theme reserves 92px at BOTH ends of the search bar, one end per `.search__button`
 * (72px wide + 7px margins = 86px, plus the divider gap). This store has no "Select
 * Vehicle" button in the start slot, so the hover/focus highlight sat 86px to the right
 * of the input it belongs to.
 *
 * Both ends move by the same 80px: the highlight's centre lands on the input's centre
 * ((W - 86) / 2 either way), and the 30deg skew on its :before/:after — which overhangs
 * by 34px / 2 * tan(30) = 9.8px — now clears the left end of the bar by 2.2px instead of
 * poking 3.8px past it.
 */
.search__box {
    left: 12px;
    right: 98px;
}

/*
 * The theme hides Top Rated / Special Offers / Bestsellers below 1200px. They are the
 * same lists as on desktop; on a phone they stack instead of sitting three across.
 */
@media (max-width: 1199.98px) {
    .block-products-columns {
        display: block;
    }

    .block-products-columns .col-12 + .col-12 {
        margin-top: 28px;
    }
}

/*
 * Each line has its own Update button beside the quantity stepper. Below 992px the
 * theme turns every line into a card and sizes the quantity row for the stepper
 * alone, so the button runs out of the card (and, at 768px, out of a three-across
 * row). The label takes its own line, the stepper shrinks, and the button stays
 * beside it. Cards are two-up until the phone breakpoint, then one-up.
 */
[dir=ltr] .cart-table__update {
    margin-left: 0.5rem;
}

[dir=rtl] .cart-table__update {
    margin-right: 0.5rem;
}

@media (max-width: 991.98px) {
    .cart-table__row {
        width: calc(50% - 16px);
        min-width: 0;
    }

    .cart-table__column--quantity {
        flex-wrap: wrap;
        row-gap: 8px;
    }

    [dir=ltr] .cart-table__column--quantity:before,
    [dir=rtl] .cart-table__column--quantity:before {
        width: 100%;
        margin-right: 0;
        margin-left: 0;
    }

    .cart-table__quantity-form {
        flex: 1 1 100%;
        min-width: 0;
        justify-content: flex-end;
    }

    .cart-table__quantity-form .cart-table__quantity {
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
    }

    .cart-table__quantity-form .input-number__input {
        min-width: 0;
    }

    .cart-table__quantity-form .cart-table__update {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /*
     * The theme stacks Continue shopping and Empty basket with no padding once the
     * table becomes cards, so both sit in the top-left corner of the bar. Stretch
     * them to the full width of that bar, one under the other.
     */
    .cart-table__actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 16px;
    }

    .cart-table__actions form {
        margin: 0;
    }

    .cart-table__actions .btn {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .cart-table__row {
        width: 100%;
    }
}

/*
 * Related products follow the product panel with no gap of their own. The heading
 * was sitting on the panel's bottom edge.
 */
.product--layout--full + .block-products-carousel {
    margin-top: 40px;
}

/* Sits in the cart-button slot, so it must not shrink under a long price. */
.product-card__stock {
    flex-shrink: 0;
}

.product-card__stock .status-badge__text {
    white-space: nowrap;
}

/* The theme styles suggestion rows on :hover only; keyboard highlighting needs a class. */
.suggestions__item--active {
    background: #f2f2f2;
}

/*
 * The theme always renders both suggestion groups, so it spaces them with an adjacent
 * sibling rule. Here a group is hidden when it has no matches, and adjacency is DOM
 * based — so a hidden Products group would still push Categories down by 10px.
 */
.suggestions__group[hidden] + .suggestions__group {
    margin-top: 0;
}

/* Cart / account counter badges */
.indicator__counter:before,
.mobile-indicator__counter:before,
.mobile-menu__indicator-counter:before {
    background-color: var(--br-gold);
}

.indicator__counter,
.mobile-indicator__counter,
.mobile-menu__indicator-counter {
    color: var(--br-ink);
}

/* Mobile search active state */
.mobile-search__button--search:hover,
.mobile-search__button:hover {
    color: var(--br-gold-dark);
}

.dropcart__item-quantity:before,
.dropcart__item-quantity:after {
    background-color: var(--br-gold);
}

/*
 * Every remove button in one column at the far edge. The theme's info block does
 * not grow, so the button sat just after the name and a short name ("Solder Paste
 * Flux") pulled it inwards. min-width lets a long name wrap instead of pushing the
 * button out of the dropdown.
 */
.dropcart__item-info {
    flex-grow: 1;
    min-width: 0;
}

.dropcart__item-remove {
    margin-inline-start: auto;
}

/*
 * ---- Header: a larger logo in a shorter band ----
 *
 * The client asked for a bigger logo and a smaller header. Theme defaults (spaceship
 * variant one): logo area padding-bottom 22px, navbar padding 10px / min-height 80px,
 * logo capped at 46px by an inline style; the header was 110px tall on desktop.
 *
 * The theme hangs the search box half into the band (bottom: -24px), so the logo had to
 * stop short of it. The search now starts at the header's bottom edge instead, which
 * frees the whole band height for the logo: 80px tall, centred, 12px clear above and
 * below. The logo column is as wide as the logo plus 2 x 20px, so a wider logo narrows
 * the menu's column; at 80px the menu still has about 19px to spare at 1200-1399px.
 * The same column is the gap in the coloured top strip (its ends slant outwards from
 * there), so the 20px side padding is the logo's clearance from the strip.
 *
 * The PNG is 420x240 (BTH-26, the client's logo of 5 November), so it stays sharp at
 * 80px on screens up to three times denser than standard; at that height it is about
 * 140px wide.
 */
.header__logo .logo__image img {
    height: 80px;
    width: auto;
}

.header__logo {
    padding-bottom: 0;
}

@media (min-width: 1200px) {
    .header__search {
        top: 100%;
        bottom: auto;
    }

    /*
     * The search form has no background of its own. The theme let the band's white show
     * through its top 20px and drew the white tab (.search__decor) for the 24px below the
     * band only, plus a curved shadow (.search__shadow) on the band above it. With the
     * whole form below the band, the tab covers its full 44px (and keeps 10px below for
     * its shadow), and the band shadow goes.
     *
     * The tab's sides slant at 30deg, so 20px taller means 20 x tan(30deg) = 11.5px wider
     * at each top corner. That is the theme's own outline carried up to the band: the
     * bottom edge is unchanged, and the input highlight and the search button's hover
     * shape stay inside the tab as they did.
     */
    .header__search .search__decor {
        left: -21.5px;
        width: calc(100% + 43px);
        height: 54px;
    }

    .header__search .search__decor-start:before,
    .header__search .search__decor-end:before {
        height: 44px;
    }

    .header__search .search__shadow {
        display: none;
    }

    /*
     * The breadcrumb's spacer is a float the size of the search box, so a long trail
     * wraps underneath it instead of running under the box. It is sized for the theme's
     * hanging search; the box now reaches 20px further down, so the spacer does too.
     */
    .breadcrumb__spaceship-safe-area {
        height: 41px;
    }
}

.header__navbar {
    padding: 4px 0;
    min-height: 74px;
}

.header__indicators {
    padding: 4px 0;
}

/*
 * ---- Header menu: dropdowns that a keyboard or a tap can open ----
 *
 * The theme opens a first-level flyout on :hover only. "Community" has no page of its
 * own, so on a keyboard or a touch screen hover alone would leave Clubs & Links and
 * Events unreachable from the header. :focus-within opens the flyout while the trigger
 * or one of its links has focus, and gives Shop's category list the same.
 */
.main-menu__item--submenu--menu:focus-within .main-menu__submenu {
    visibility: visible;
    opacity: 1;
    transform: rotateX(0);
}

/* The Community trigger is a button; make it look like the menu's links. */
.main-menu__link--button {
    background-color: transparent;
    border: 0;
    color: inherit;
    font-family: inherit;
    line-height: inherit;
    cursor: default;
}

.main-menu__link--button:focus-visible {
    outline: 2px solid var(--br-bronze);
    outline-offset: -2px;
}

.mobile-header__logo img {
    height: 42px;
    width: auto;
}

/*
 * ---- Header top bar ----
 *
 * The theme paints its left strip in the accent (red) and its right strip in dark grey.
 * That reads as one bar with an accented end, and the same shape works here: gold on the
 * left, ink on the right. Both were ink while the left strip held nothing but the town
 * name — two black bands, which is what it looked like.
 *
 * Gold is a light field, so everything on it is INK rather than the theme's white, which
 * would be unreadable. The links are the same idea as the theme's `#ffcccc` — the text
 * colour softened towards the background, going full strength on hover.
 */
.topbar--spaceship-start,
.header__topbar-start-bg:before {
    background-color: var(--br-gold);
}

.topbar--spaceship-start .topbar__item-text {
    color: var(--br-ink);
}

.topbar--spaceship-start .topbar__link {
    color: rgba(26, 26, 26, 0.72);
}

.topbar--spaceship-start .topbar__link:hover {
    color: var(--br-ink);
}

/*
 * "Call us:" ahead of the number. The theme's own `.topbar__link-label` carries nothing but a
 * transition, so the label needs its own colour and its gap from the number here. It sits on
 * the gold strip now — it was on the dark one until the phone moved across — so it is ink at
 * a lower opacity than the number it introduces, rather than white.
 */
.topbar--spaceship-start .topbar__link-label {
    color: rgba(26, 26, 26, 0.55);
    margin-right: 4px;
}

/*
 * Two department phones in the 30px top strip. Keep them on one line with a light
 * separator; the address is already xxl-only so at 1200px only the phones show.
 */
.topbar__item-text--phones {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    white-space: nowrap;
}

.topbar__phones-sep {
    margin: 0 0.4rem;
    color: rgba(26, 26, 26, 0.4);
}

.mobile-menu__contacts--split {
    display: block;
    text-decoration: none;
}

.mobile-menu__contacts--split .mobile-menu__contacts-title {
    display: block;
    color: inherit;
    text-decoration: none;
}

.mobile-menu__contacts--split .mobile-menu__contacts-title + .mobile-menu__contacts-title {
    margin-top: 0.35rem;
}

/* The right strip keeps the theme's dark field; only its links need a brand hover. */
.topbar--spaceship-end .topbar__link {
    color: rgba(255, 255, 255, 0.75);
}

.topbar--spaceship-end .topbar__link:hover {
    color: var(--br-gold);
}

/*
 * Quickview badges.
 *
 * The theme styles `.tag-badge` itself but gives the quickview panel no badge row to put
 * them in — its own quickview has none. This is that row: the same stacked-left
 * arrangement the product card uses, in normal flow rather than absolutely positioned,
 * because here there is no image for them to sit on top of.
 */
.quickview__product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

/*
 * Quickview sale price.
 *
 * The panel's own price rule (.quickview__product-price) has no sale variant — the
 * theme's quickview only ever shows one price. This is the struck-through original
 * beside it, matching the weight and grey the product page uses for the same thing.
 */
.quickview__product-prices {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.quickview__product-price--old {
    font-size: 16px;
    font-weight: 400;
    color: #999;
    text-decoration: line-through;
}

/*
 * Hero slide legibility wash.
 *
 * The theme's slideshow has no overlay at all — unlike its promo banners, which carry a
 * `:before` gradient — because the demo slides are pale studio artwork with plenty of
 * empty space on the text side. A real photograph has neither, and the copy disappears
 * into it.
 *
 * The wash is WHITE, not the usual dark scrim: slide text here is dark by design
 * (`.block-slideshow__item` is #262626 and the details line is #6c757d), so darkening the
 * picture would hurt legibility rather than help it. Built the same way the theme builds
 * the banner gradient, so the two behave alike.
 *
 * Stacking: the theme puts the slide images at z-index -1, which leaves no layer between
 * them and the text. They move to -2 so the wash can sit at -1 — still behind the copy,
 * which is in normal flow and paints above every negative layer.
 */
.block-slideshow__item-image {
    z-index: -2;
}

.block-slideshow__item:before {
    content: '';
    display: block;
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 2.5px;
    pointer-events: none;
}

/* Text sits at the start of the row, so the wash is strongest there and clears the art. */
[dir='ltr'] .block-slideshow__item:before {
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.85) 30%,
        rgba(255, 255, 255, 0) 70%
    );
}

[dir='rtl'] .block-slideshow__item:before {
    background: linear-gradient(
        to left,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.85) 30%,
        rgba(255, 255, 255, 0) 70%
    );
}

/*
 * Below 768px the theme centres the slide, hides the details line and swaps in the
 * portrait artwork, so a side-to-side wash would fall in the wrong place. Top-down
 * instead, following the title and button.
 */
@media (max-width: 767.98px) {
    [dir='ltr'] .block-slideshow__item:before,
    [dir='rtl'] .block-slideshow__item:before {
        background: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.92) 0%,
            rgba(255, 255, 255, 0.75) 45%,
            rgba(255, 255, 255, 0.35) 100%
        );
    }
}

/*
 * A slide set to light text (LEAD-45), for a dark picture: the same wash, built the same
 * way, but dark, with white copy over it. Staff choose it per slide under "Text colour";
 * the default stays dark text on the white wash above.
 */
.block-slideshow__item--light-text,
.block-slideshow__item--light-text:hover {
    color: #fff;
}

.block-slideshow__item--light-text .block-slideshow__item-details {
    color: rgba(255, 255, 255, 0.85);
}

[dir='ltr'] .block-slideshow__item--light-text:before {
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.6) 40%,
        rgba(0, 0, 0, 0) 85%
    );
}

[dir='rtl'] .block-slideshow__item--light-text:before {
    background: linear-gradient(
        to left,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.6) 40%,
        rgba(0, 0, 0, 0) 85%
    );
}

@media (max-width: 767.98px) {
    [dir='ltr'] .block-slideshow__item--light-text:before,
    [dir='rtl'] .block-slideshow__item--light-text:before {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.5) 45%,
            rgba(0, 0, 0, 0.2) 100%
        );
    }
}

/*
 * Content page standfirst.
 *
 * The theme's document header holds a title and a subtitle together, with 44px above the
 * pair to clear the header's ledge. Our content pages put the title in the page header
 * with the breadcrumb — the same treatment every other page here uses — which leaves this
 * header carrying the subtitle alone, and that 44px would sit it in the middle of nowhere.
 *
 * `document__subtitle` also carries a -4px bottom margin meant to snug it under a title
 * that is no longer above it; the padding below replaces the spacing it loses.
 */
.document__header--subtitle-only {
    padding-top: 0;
    padding-bottom: 28px;
}

/*
 * Account dashboard with no address card.
 *
 * The theme's dashboard is a flex row that pairs the profile card with a default-address
 * card, each `width: calc(50% - 12px)` from 768px up (style.css:20708). Addresses are
 * captured at checkout, which does not exist yet, so the profile card is alone on that row
 * and was rendering at half width with the other half empty. This widens it back out; the
 * rule disappears with the modifier once there is an address card to sit beside it.
 *
 * Below 768px the theme already stacks both cards full width, so there is nothing to undo.
 */
@media (min-width: 768px) {
    .dashboard--no-address .dashboard__profile {
        width: 100%;
    }
}

/*
 * Header dropcart actions.
 *
 * Three controls do not fit the theme's single flex row. Continue Shopping is a
 * quiet full-width dismiss on its own row; View Cart and Checkout share the row
 * below as equal buttons. Gap replaces the theme's sibling margin.
 */
.dropcart__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: stretch;
}

[dir=ltr] .dropcart__actions > * + * {
    margin-left: 0;
}

[dir=rtl] .dropcart__actions > * + * {
    margin-right: 0;
}

.dropcart__actions > .btn {
    white-space: nowrap;
    width: 100%;
    justify-content: center;
}

.dropcart__actions > .dropcart__continue {
    grid-column: 1 / -1;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--br-ink) 12%, transparent);
    color: var(--br-ink);
    font-weight: 500;
}

.dropcart__actions > .dropcart__continue:hover,
.dropcart__actions > .dropcart__continue:focus {
    background: color-mix(in srgb, var(--br-ink) 4%, #fff);
    border-color: color-mix(in srgb, var(--br-ink) 20%, transparent);
    color: var(--br-ink);
}

.dropcart__actions > a:only-of-type {
    grid-column: 1 / -1;
}

/*
 * Shop sidebar category tree (StorefrontController::sidebarCategories()).
 *
 * Every top-level category stays listed; the shopper's branch opens beneath its
 * parent, indented 14px a level from the inline `--depth`. The row they are on gets
 * a gold wash, a gold edge and its count in a gold pill. The negative margin keeps
 * its text in line with its neighbours while the wash reaches past them. The
 * categories above it on the way down are bold, so the trail reads at a glance.
 * Prefixed with `.filter-categories` to outrank the theme's [dir] padding rules.
 */
[dir=ltr] .filter-categories .filter-categories__item {
    padding-left: calc(var(--depth, 0) * 14px);
}

[dir=rtl] .filter-categories .filter-categories__item {
    padding-right: calc(var(--depth, 0) * 14px);
}

.filter-categories .filter-categories__item--ancestor {
    font-weight: 700;
}

.filter-categories .filter-categories__item--current {
    margin: 2px -8px 2px -10px;
    border-radius: 3px;
    background: color-mix(in srgb, var(--br-gold) 16%, #fff);
    font-weight: 700;
}

[dir=ltr] .filter-categories .filter-categories__item--current {
    padding-left: calc(var(--depth, 0) * 14px + 10px);
    padding-right: 8px;
    box-shadow: inset 3px 0 0 var(--br-gold);
}

[dir=rtl] .filter-categories .filter-categories__item--current {
    margin: 2px -10px 2px -8px;
    padding-right: calc(var(--depth, 0) * 14px + 10px);
    padding-left: 8px;
    box-shadow: inset -3px 0 0 var(--br-gold);
}

.filter-categories .filter-categories__item--current > a {
    color: var(--br-ink);
}

.filter-categories .filter-categories__item--current .filter-categories__counter {
    align-self: center;
    padding: 3px 7px;
    border-radius: 9px;
    background: var(--br-gold);
    color: var(--br-ink);
    font-weight: 700;
}

/*
 * "… has been added to your basket", at the top of the dropcart that opens after an
 * add (storefront.js). Gold rule on a light gold wash, ink text, per the
 * text-on-white rule.
 */
.dropcart__notice {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-left: 3px solid var(--br-gold);
    background: color-mix(in srgb, var(--br-gold) 12%, #fff);
    color: var(--br-ink);
    font-size: 0.875rem;
    line-height: 1.35;
}

/*
 * Clubs & Links. A responsive card grid (1 col phone, 2 from 768px) so entries fill
 * the page instead of stretching as long empty rows. Monogram when there is no logo.
 * No sideways scroll at 375px.
 */
.clubs {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 0 8px;
}

.clubs__intro {
    margin: 0 0 28px;
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
    color: #6c757d;
}

.clubs__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .clubs__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

.clubs-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 3px;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.clubs-card:hover,
.clubs-card:focus-visible {
    color: inherit;
    text-decoration: none;
    border-color: var(--br-gold);
    box-shadow: 0 8px 24px rgba(26, 26, 26, 0.08);
    transform: translateY(-2px);
}

/*
 * The gold border alone is about 1.9:1 on white, below the 3:1 a focus indicator needs,
 * so keyboard focus keeps a bronze ring as well (this file's "keep a visible focus ring").
 */
.clubs-card:focus-visible {
    outline: 2px solid var(--br-bronze);
    outline-offset: 2px;
}

.clubs-card--empty {
    display: block;
    padding: 28px 24px;
    cursor: default;
}

.clubs-card--empty:hover,
.clubs-card--empty:focus-visible {
    border-color: #ebebeb;
    box-shadow: none;
    transform: none;
}

.clubs-card__media {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    padding: 20px;
    background: linear-gradient(180deg, #f7f7f7 0%, #f0f0f0 100%);
    border-bottom: 1px solid #ebebeb;
}

.clubs-card__media img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.clubs-card__monogram {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e2e2e2;
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
    color: var(--br-bronze, #7d5a00);
}

.clubs-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 18px 20px 20px;
}

.clubs-card__name {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--br-ink, #1a1a1a);
}

.clubs-card__description {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #6c757d;
}

.clubs-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--br-bronze, #7d5a00);
}

.clubs-card:hover .clubs-card__cta,
.clubs-card:focus-visible .clubs-card__cta {
    color: var(--br-gold-dark, #d18f00);
}

.clubs-card__cta-arrow {
    display: inline-block;
    transition: transform 0.18s ease;
}

.clubs-card:hover .clubs-card__cta-arrow,
.clubs-card:focus-visible .clubs-card__cta-arrow {
    transform: translateX(3px);
}

.clubs-card--empty .clubs-card__cta {
    display: none;
}

/*
 * Events page (BTH-16). Server-rendered month grid + upcoming list.
 * On phones the grid collapses so the page never scrolls sideways at 375px.
 */
.events-page {
    overflow-x: hidden;
}

.events-calendar {
    margin-bottom: 2rem;
}

.events-calendar__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.events-calendar__month {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    flex: 1 1 auto;
}

.events-calendar__nav {
    font-size: 0.875rem;
    white-space: nowrap;
}

.events-calendar__weekdays,
.events-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: #e5e5e5;
    border: 1px solid #e5e5e5;
}

.events-calendar__weekday {
    background: #f7f7f7;
    padding: 0.5rem 0.25rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.events-calendar__day {
    background: #fff;
    min-height: 5.5rem;
    padding: 0.35rem;
    vertical-align: top;
}

.events-calendar__day--outside {
    background: #fafafa;
    color: #999;
}

.events-calendar__day--today {
    box-shadow: inset 0 0 0 2px var(--br-gold);
}

.events-calendar__day--selected {
    background: rgba(240, 176, 0, 0.12);
    border-color: var(--br-gold);
}

.events-calendar__day-link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.events-calendar__day-link:hover {
    color: var(--br-bronze);
}

.events-calendar__day-number {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.events-calendar__day-events {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.6875rem;
    line-height: 1.3;
}

.events-calendar__day-events li {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(240, 176, 0, 0.18);
    border-radius: 2px;
    padding: 0.1rem 0.25rem;
    margin-bottom: 0.15rem;
}

.events-day-picker {
    display: none;
    margin: 0 0 1.25rem;
    padding-top: 0.25rem;
}

.events-day-picker__label {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.events-day-picker__list {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0 0 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.events-day-picker__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    padding: 0.4rem 0.7rem;
    border: 1px solid #e5e5e5;
    border-radius: 999px;
    background: #fff;
    color: var(--br-ink);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
}

.events-day-picker__chip:hover,
.events-day-picker__chip--active {
    border-color: var(--br-gold);
    background: rgba(240, 176, 0, 0.14);
    color: var(--br-ink);
}

.events-day-picker__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--br-gold);
    color: var(--br-ink);
    font-size: 0.6875rem;
    font-weight: 700;
}

.events-upcoming__title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.events-upcoming__selected {
    scroll-margin-top: 5rem;
}

.events-upcoming__selected-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.events-upcoming__selected-header .events-upcoming__title {
    margin: 0;
}

.events-upcoming__clear {
    font-size: 0.875rem;
    white-space: nowrap;
}

.events-upcoming__empty {
    margin: 0;
    color: #666;
}

.events-upcoming__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.events-upcoming__day {
    margin-bottom: 1.5rem;
    scroll-margin-top: 5rem;
}

.events-upcoming__day-label {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 700;
}

.events-upcoming__events {
    list-style: none;
    margin: 0;
    padding: 0;
}

.events-upcoming__event {
    padding: 0.75rem 0;
    border-top: 1px solid #eee;
}

.events-upcoming__event-title {
    font-weight: 600;
}

.events-upcoming__event-meta {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #666;
}

.events-upcoming__event-body {
    margin: 0.5rem 0 0;
    font-size: 0.9375rem;
    /* Staff type descriptions with line breaks; long URLs must wrap, not be clipped. */
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.events-upcoming__event-title,
.events-upcoming__event-meta {
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    /* Only the grid goes: the month toolbar sits outside it and stays on phones. */
    .events-calendar {
        display: none;
    }

    .events-day-picker {
        display: block;
    }
}

/*
 * Checkout: sticky order summary + ZIP-quote skeleton.
 *
 * From lg up the form and summary sit side by side. The summary sticks so scrolling
 * the long address form does not lose the totals. `top` clears the site header (and
 * the hanging search on desktop / the mobile header below 1200px) so the card does
 * not tuck underneath them. `align-self: flex-start` is required because Bootstrap's
 * `.row` is flex and stretched columns leave sticky nowhere to travel.
 */
@media (min-width: 992px) {
    .checkout__summary-col {
        align-self: flex-start;
        position: sticky;
        top: 1.5rem;
        z-index: 2;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .checkout__summary-col {
        /* Mobile header is 50px; keep a gap under it while the column is sticky. */
        top: 4.25rem;
    }
}

@media (min-width: 1200px) {
    .checkout__summary-col {
        /* Desktop header + hanging search clear the viewport top once sticky engages. */
        top: 1.5rem;
    }
}

@keyframes checkout-skeleton-shimmer {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

@keyframes checkout-quoting-spin {
    to {
        transform: rotate(360deg);
    }
}

/*
 * Full-area quoting loader. Fixed to the viewport so the panel stays centred on
 * screen even when the address form has been scrolled (absolute + flex centre
 * was relative to the tall workspace, so the panel sat at the top of the view).
 */
.checkout__workspace {
    position: relative;
}

.checkout__quoting-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(1px);
}

.checkout__quoting-overlay[hidden] {
    display: none !important;
}

.checkout__quoting-panel {
    width: min(100%, 22rem);
    margin: auto;
    padding: 1.5rem 1.25rem;
    text-align: center;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 4px;
    box-shadow: 0 10px 28px rgba(26, 26, 26, 0.1);
}

.checkout__quoting-spinner {
    display: inline-block;
    width: 1.75rem;
    height: 1.75rem;
    border: 2px solid color-mix(in srgb, var(--br-gold) 35%, #fff);
    border-top-color: var(--br-gold);
    border-radius: 50%;
    animation: checkout-quoting-spin 0.75s linear infinite;
}

.checkout__quoting-message {
    margin: 0.85rem 0 0;
    color: var(--br-ink);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.35;
}

.checkout__quoting-skeleton {
    display: grid;
    gap: 0.55rem;
    margin-top: 1.1rem;
}

.checkout__quoting-skeleton span {
    display: block;
    height: 0.7rem;
    border-radius: 3px;
    background: linear-gradient(
        90deg,
        #ececec 0%,
        #f7f7f7 40%,
        #ececec 80%
    );
    background-size: 200% 100%;
    animation: checkout-skeleton-shimmer 1.1s ease-in-out infinite;
}

.checkout__quoting-skeleton span:nth-child(1) {
    width: 100%;
}

.checkout__quoting-skeleton span:nth-child(2) {
    width: 78%;
}

.checkout__quoting-skeleton span:nth-child(3) {
    width: 56%;
}

.checkout.is-quoting .checkout__workspace > form {
    pointer-events: none;
    user-select: none;
}

.checkout.is-quoting [data-shipping-status]:not(:empty) {
    color: var(--br-bronze);
}

/*
 * Category intro (LEAD-11): the paragraph staff can write above a category's listing,
 * used by the Online Train Show. Sits in the content column above the sort bar, so it
 * spaces off the view options the way the theme's cards space off each other.
 */
.category-intro {
    margin-bottom: 20px;
}

.category-intro__text {
    margin: 0;
    color: var(--br-ink);
    font-size: 15px;
    line-height: 1.6;
}

/*
 * A sold-out option (LEAD-33): greyed like the theme's disabled option, and struck
 * through, but still clickable. Picking it shows "Out of Stock" and drops the cart
 * button, which says more than a button that will not press.
 */
.input-radio-label__item--sold-out .input-radio-label__title {
    color: #8a8a8a;
    font-weight: 400;
    text-decoration: line-through;
}

/*
 * The contact form's anchor (LEAD-34): every send comes back scrolled to it. The margin
 * keeps the heading clear of the fixed mobile header, as the events anchors do.
 */
.contact-us__form {
    scroll-margin-top: 5rem;
}

/*
 * The account menu's Logout (LEAD-35). A button, because signing out is a POST, but it
 * reads as the menu item it sits among: the theme styles only `.account-nav__item a`
 * (style.css:20540 and its mobile row at 20591), so the button had the browser's own look.
 */
.account-nav__logout {
    display: block;
    width: 100%;
    margin: 0;
    padding: 7px 1.5rem;
    border: 0;
    background: transparent;
    color: #6c757d;
    font: inherit;
    text-align: start;
    cursor: pointer;
}

.account-nav__item:hover .account-nav__logout {
    background: #f2f2f2;
}

.account-nav__logout:focus {
    outline: none;
}

.account-nav__logout:focus-visible {
    outline: 2px solid var(--br-bronze);
    outline-offset: -2px;
}

@media (max-width: 991.98px) {
    .account-nav__logout {
        padding: 14px 20px;
        white-space: nowrap;
    }
}
