/* ==========================================================================
   QUOTE BASKET — slide-out cart + header count badge + quote page
   Brand motif: square with a rounded corner; easing cubic-bezier(0.33,0.24,0.31,0.98)
   ========================================================================== */

.quote-drawer {
    position: fixed;
    inset: 0;
    z-index: 100000;
    visibility: hidden;
}
.quote-drawer.is-open {
    visibility: visible;
}

.quote-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.33, 0.24, 0.31, 0.98);
}
.quote-drawer.is-open .quote-drawer__backdrop {
    opacity: 1;
}

.quote-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(440px, 94vw);
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 0 0 0 1.5em; /* brand corner (bottom-left, panel is right-anchored) */
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.33, 0.24, 0.31, 0.98);
}
.quote-drawer.is-open .quote-drawer__panel {
    transform: translateX(0);
}

.quote-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 2px solid #ed1d23;
}
.quote-drawer__title {
    margin: 0;
    font-family: "finalsix", sans-serif;
    font-size: 1.25rem;
    text-transform: uppercase;
    color: #313231;
}
.quote-drawer__close {
    background: 0;
    border: 0;
    padding: 0;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #313231;
}

/* Scrollable body holds the cart table */
.quote-drawer__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* ---- Cart table (shared by drawer + quote page) -------------------------- */

.quote-cart {
    width: 100%;
    border-collapse: collapse;
}
.quote-cart thead th {
    padding: 10px 8px;
    font-family: "finalsix", sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    color: #777;
    border-bottom: 2px solid #ed1d23;
}
.quote-cart thead th:first-child {
    padding-left: 16px;
}
.quote-cart thead th:last-child {
    padding-right: 16px;
}
.quote-cart__th-amount {
    text-align: center;
}
.quote-cart__row:hover {
    background: #fafafa;
}
.quote-cart__row td {
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.quote-cart__row td:first-child {
    padding-left: 16px;
}
.quote-cart__row td:last-child {
    padding-right: 16px;
}
.quote-cart__img {
    width: 60px;
}
.quote-cart__img img {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0 0 0.4em 0;
}
.quote-cart__name {
    display: block;
    font-weight: 700;
    line-height: 1.2;
    color: #313231;
}
.quote-cart__sku {
    display: block;
    margin-top: 2px;
    font-size: 0.8rem;
    color: #777;
}
.quote-cart__qty {
    width: 84px;
    text-align: center;
}
.quote-cart__qty input {
    width: 56px;
    padding: 6px;
    font: inherit;
    text-align: center;
    color: #313231;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 0 0 0.4em 0;
}
.quote-cart__qty input:focus {
    outline: 2px solid #ed1d23;
    border-color: #ed1d23;
}
.quote-cart__remove {
    width: 34px;
    text-align: center;
}
.quote-cart__remove button {
    background: 0;
    border: 0;
    padding: 0;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    transition: color 0.2s cubic-bezier(0.33, 0.24, 0.31, 0.98);
}
.quote-cart__remove button:hover {
    color: #ed1d23;
}
.quote-cart__empty td {
    padding: 28px 16px;
    color: #555;
    line-height: 1.5;
    text-align: center;
}
.quote-cart__empty-text {
    margin: 0 0 14px;
}
.quote-cart__shop-btn {
    display: inline-block;
    text-decoration: none;
    background: #ed1d23;
    color: #fff;
    text-transform: uppercase;
    font-weight: 800;
    font-family: "roboto", sans-serif;
    padding: 0.7em 1.4em;
    border-radius: 0 0 0.8em 0;
    transition: filter 0.2s cubic-bezier(0.33, 0.24, 0.31, 0.98);
}
.quote-cart__shop-btn:hover {
    filter: brightness(0.94);
}

/* Keep the slide-out cart on white (the quote page may sit on grey; the drawer shouldn't) */
.quote-drawer__panel,
.quote-drawer__body,
.quote-drawer .quote-cart,
.quote-drawer .quote-cart thead th,
.quote-drawer .quote-cart td {
    background: #fff;
}
.quote-drawer .quote-cart__row:hover {
    background: #fff;
}

/* Hide the "Request a quote" footer button when the basket is empty */
.quote-drawer__panel:has(.quote-cart__empty) .quote-drawer__foot {
    display: none;
}

/* ---- Drawer footer + full-width CTA -------------------------------------- */

.quote-drawer__foot {
    flex: 0 0 auto;
    padding: 0px;
    border-top: 1px solid #eee;
}
.quote-drawer__submit {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    background: #ed1d23;
    color: #fff;
    text-transform: uppercase;
    font-weight: 800;
    font-family: "roboto", sans-serif;
    padding: 0.9em 1.2em;
    border-radius: 0;
    box-shadow: 2px 2px 7px 0 rgba(0, 0, 0, 0.1);
    transition: transform 0.2s cubic-bezier(0.33, 0.24, 0.31, 0.98),
                box-shadow 0.2s cubic-bezier(0.33, 0.24, 0.31, 0.98),
                filter 0.2s cubic-bezier(0.33, 0.24, 0.31, 0.98);
}
.quote-drawer__submit:hover {
    box-shadow: 2px 6px 14px 0 rgba(0, 0, 0, 0.18);
    filter: brightness(0.94);
}

body.quote-drawer-open {
    overflow: hidden;
}

/* ---- Header trigger + count badge ---------------------------------------- */

.quote-trigger {
    cursor: pointer;
}
.quote-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4em;
    height: 1.4em;
    padding: 0 0.35em;
    margin-left: 6px;
    background: #ed1d23;
    color: #fff;
    border-radius: 0 0 0.5em 0;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
}
.quote-count[hidden] {
    display: none;
}

/* ---- Quote page ([quote_form]) ------------------------------------------- */

.hsfc-CheckboxField{
    display: none;
}

.quote-page{
    width: 100%;
}

.quote-page__title {
    margin: 0 0 12px;
    font-family: "finalsix", sans-serif;
    text-transform: uppercase;
    color: #313231;
}
/* Stacked: quote table on top, form underneath. */
.quote-page__items {
    margin-bottom: 40px;
}
.quote-page__form {
    width: 100%;
}
.quote-page__intro {
    margin: 0 0 24px;
    color: #555;
    line-height: 1.5;
    max-width: 60ch;
}

/* ---- Quote-page form ----------------------------------------------------- */

.quote-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.quote-form__intro {
    margin: 0;
    color: #555;
    line-height: 1.4;
}
.quote-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 560px) {
    .quote-form__row {
        grid-template-columns: 1fr;
    }
}
.quote-form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #313231;
}
.quote-form__field input,
.quote-form__field select {
    font: inherit;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    padding: 10px 12px;
    color: #313231;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 0 0 0.6em 0;
}
.quote-form__field input:focus,
.quote-form__field select:focus {
    outline: 2px solid #ed1d23;
    border-color: #ed1d23;
}
/* Honeypot — hidden from humans, catches bots */
.quote-form__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.quote-form__status {
    margin: 0;
    min-height: 1.2em;
    font-weight: 700;
    color: #ed1d23;
}
.quote-page__success p {
    color: #313231;
    line-height: 1.5;
}

/* ---- HubSpot developer embed (quote page) -------------------------------- */

/* Hide the product fields — they're prefilled from the cart and shown in our table above.
   Prefix selectors cover every slot (product_code, product_code_2..7, quantity, quantity_2..7,
   add_product_1..6) so this keeps working if HubSpot adds/removes slots. */
.hs-form-html .hsfc-Row:has(input[name^="0-1/product_code"]),
.hs-form-html .hsfc-Row:has(input[name^="0-1/quantity"]),
.hs-form-html .hsfc-Row:has(input[name^="0-1/add_product"]),
.hs-form-html .hsfc-Row:has(input[name="0-1/product_name"]) {
    display: none !important;
}

/* Brand the HubSpot form via its own CSS variables */
.hs-form-html .hsfc-Renderer {
    --hsf-button__background-color: #ed1d23;
    --hsf-button--hover__background-color: #c91a1f;
    --hsf-button__border-radius: 0 0 1em 0;
    --hsf-button__font-family: "roboto", sans-serif;
    --hsf-button__font-weight: 800;
    --hsf-field-input__border-radius: 0 0 0.6em 0;
}
.hsfc-Step__Content {
    padding: 0 !important;
}

/* Full-width form + two-column field layout (like the previous custom form) */
.hs-form-html,
.hs-form-html .hsfc-FormWrapper,
.hs-form-html .hsfc-Form,
.hs-form-html .hsfc-Step,
.hs-form-html .hsfc-Step__Content {
    width: 100%;
}
.hs-form-html .hsfc-Row {
    margin-bottom: 16px;
}
@media (min-width: 700px) {
    .hs-form-html .hsfc-Step__Content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 30px;
        align-items: start;
    }
    /* Alerts + the submit button span the full width */
    .hs-form-html .hsfc-Step__Content > .hsfc-NavigationRow {
        grid-column: 1 / -1;
    }
}

/* ---- Interim quote modal (Part No. + Quantity) --------------------------- */

.quote-modal {
    position: fixed;
    inset: 0;
    z-index: 100001; /* above the slide-out drawer */
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
}
.quote-modal.is-open {
    visibility: visible;
}

.quote-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.33, 0.24, 0.31, 0.98);
}
.quote-modal.is-open .quote-modal__backdrop {
    opacity: 1;
}

.quote-modal__dialog {
    position: relative;
    width: min(420px, 92vw);
    background: #fff;
    padding: 28px 28px 26px;
    border-radius: 0 0 1.5em 0; /* brand corner */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    transform: scale(0.94);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.33, 0.24, 0.31, 0.98),
                opacity 0.25s cubic-bezier(0.33, 0.24, 0.31, 0.98);
}
.quote-modal.is-open .quote-modal__dialog {
    transform: scale(1);
    opacity: 1;
}

.quote-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: 0;
    border: 0;
    padding: 0;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    transition: color 0.2s cubic-bezier(0.33, 0.24, 0.31, 0.98);
}
.quote-modal__close:hover {
    color: #ed1d23;
}

.quote-modal__title {
    margin: 0 0 4px;
    font-family: "finalsix", sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    color: #313231;
}
.quote-modal__product {
    margin: 0 0 18px;
    font-weight: 700;
    color: #ed1d23;
    line-height: 1.25;
}

.quote-modal__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #313231;
}
.quote-modal__field[hidden] {
    display: none;
}
.quote-modal__model,
.quote-modal__qty {
    font: inherit;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    padding: 0.7em 0.9em;
    color: #313231;
    background: #fff;
    border: 1px solid #ccc;
    border-bottom: 2px solid #ed1d23;
    border-radius: 0 0 0.6em 0;
}
.quote-modal__model {
    cursor: pointer;
}
.quote-modal__qty {
    width: 110px;
    text-align: center;
}
.quote-modal__model:focus,
.quote-modal__qty:focus {
    outline: 2px solid #ed1d23;
    border-color: #ed1d23;
}

.quote-modal__add {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
    text-align: center;
    border: 0;
    cursor: pointer;
    background: #ed1d23;
    color: #fff;
    text-transform: uppercase;
    font-weight: 800;
    font-family: "roboto", sans-serif;
    padding: 0.9em 1.2em;
    border-radius: 0 0 1em 0;
    box-shadow: 2px 2px 7px 0 rgba(0, 0, 0, 0.1);
    transition: transform 0.2s cubic-bezier(0.33, 0.24, 0.31, 0.98),
                box-shadow 0.2s cubic-bezier(0.33, 0.24, 0.31, 0.98),
                filter 0.2s cubic-bezier(0.33, 0.24, 0.31, 0.98);
}
.quote-modal__add:hover {
    transform: translateY(-2px);
    box-shadow: 2px 6px 14px 0 rgba(0, 0, 0, 0.18);
    filter: brightness(0.94);
}
.quote-modal__add.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

body.quote-modal-open {
    overflow: hidden;
}
