/*
 * Mitra Bisnis (/b2b). Loaded after store.css, which still styles the shared
 * pieces (toast, loading, checkout address and services, payment upload,
 * size chart). Everything here is scoped to .b2b-page (or .b2b-invoice), so
 * the store is untouched. Mobile first; the figures sit on white plates.
 *
 * Sizes follow the store's own scale (store.css): 32px buttons with 10px
 * type, 34px fields with 11px type, 9-11px labels and meta, 4px control
 * corners, 6px card corners, a 54px header and 22px page gutters (14px on a
 * phone). The tokens below hold that scale; the rules use them.
 */
.b2b-page {
    --b2b-black: #0b0b0b;
    --b2b-text: #141413;
    --b2b-muted: #5f5f5c;
    --b2b-faint: #8a8a86;
    --b2b-line: #e3e3e3;
    --b2b-soft-line: #ecebe7;
    --b2b-input: #c9c9c6;
    --b2b-surface: #ffffff;
    --b2b-soft: #f1f0ec;
    --b2b-bg: #f6f6f6;
    --b2b-green: #1f6b3a;
    --b2b-red: #b42318;
    --b2b-amber: #8a5a00;

    /* Store scale. */
    --b2b-gutter: 14px;
    --b2b-button-h: 32px;
    --b2b-button-lg-h: 34px;
    --b2b-field-h: 34px;
    --b2b-radius: 4px;
    --b2b-card-radius: 6px;
    --b2b-text-base: 11px;
    --b2b-text-meta: 10px;
    --b2b-text-label: 9px;
    --b2b-focus: 0 0 0 2px rgba(11, 11, 11, 0.12);

    background: var(--b2b-bg);
    color: var(--b2b-text);
    font-size: var(--b2b-text-base);
    line-height: 1.45;
}

@media (min-width: 761px) {
    .b2b-page {
        --b2b-gutter: 22px;
    }
}

.b2b-page a:hover {
    color: inherit;
}

/* ---- Header ------------------------------------------------------------- */
.b2b-header {
    background: var(--b2b-black);
    padding: 0 var(--b2b-gutter);
}

.b2b-header__inner {
    max-width: 1236px;
    min-height: 54px;
    margin: 0 auto;
    padding: 8px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
}

.b2b-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
    color: #fff;
}

.b2b-brand img {
    height: 26px;
    width: auto;
    display: block;
}

.b2b-brand__badge {
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 99px;
    color: #fff;
    font-size: 8px;
    font-weight: 650;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.b2b-nav {
    display: flex;
    gap: 2px 16px;
    order: 3;
    width: 100%;
}

.b2b-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    color: #d8d8d4;
    font-size: var(--b2b-text-base);
}

.b2b-page .b2b-nav a:hover,
.b2b-nav a[aria-current="page"] {
    color: #fff;
}

.b2b-nav a[aria-current="page"] {
    font-weight: 650;
    box-shadow: inset 0 -2px 0 #fff;
}

.b2b-cart-pill,
.b2b-header__solid,
.b2b-header__ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: var(--b2b-button-h);
    padding: 0 11px;
    border-radius: var(--b2b-radius);
    font-size: var(--b2b-text-meta);
    font-weight: 650;
    white-space: nowrap;
}

.b2b-cart-pill svg {
    width: 14px;
    height: 14px;
}

.b2b-page .b2b-cart-pill,
.b2b-page .b2b-header__solid {
    background: #fff;
    color: var(--b2b-black);
}

.b2b-page .b2b-header__ghost {
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
}

.b2b-header__actions {
    display: flex;
    gap: 6px;
}

/* Signed out there is no nav row: the bar keeps the store's height. */
.b2b-header__inner:not(:has(.b2b-nav)) {
    padding: 0;
}

@media (min-width: 720px) {
    .b2b-header__inner {
        padding: 0;
    }

    .b2b-brand {
        margin-right: 0;
    }

    .b2b-brand img {
        height: 30px;
    }

    .b2b-nav {
        order: 0;
        width: auto;
        flex: 1 1 auto;
    }

    .b2b-nav a {
        min-height: 54px;
    }

    .b2b-header__actions {
        margin-left: auto;
    }
}

/* ---- Page frame --------------------------------------------------------- */
.b2b-main {
    flex: 1 0 auto;
    width: 100%;
    max-width: calc(1236px + 2 * var(--b2b-gutter));
    margin: 0 auto;
    padding: 18px var(--b2b-gutter) 32px;
}

@media (min-width: 720px) {
    .b2b-main {
        padding-top: 22px;
        padding-bottom: 40px;
    }
}

.b2b-wrap {
    width: 100%;
    min-width: 0;
}

.b2b-stack {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.b2b-h1,
.b2b-page-head h1,
.b2b-order-head h1,
.b2b-product__head h1 {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.b2b-h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.b2b-h3 {
    margin: 0;
    font-size: 13px;
}

.b2b-muted {
    color: var(--b2b-muted);
}

.b2b-small {
    font-size: var(--b2b-text-meta);
}

.b2b-eyebrow {
    color: var(--b2b-muted);
    font-size: var(--b2b-text-label);
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.b2b-back,
.b2b-text-link {
    justify-self: start;
    color: #3d3d3b;
    font-size: var(--b2b-text-meta);
}

.b2b-text-link {
    font-weight: 650;
}

.b2b-back:hover,
.b2b-text-link:hover {
    text-decoration: underline;
}

/* ---- Buttons ------------------------------------------------------------ */
.b2b-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: var(--b2b-button-h);
    padding: 6px 11px;
    border: 1px solid var(--b2b-black);
    border-radius: var(--b2b-radius);
    background: var(--b2b-black);
    color: #fff;
    font: inherit;
    font-size: var(--b2b-text-meta);
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
}

.b2b-page .b2b-button:hover {
    background: #2a2a28;
    color: #fff;
}

.b2b-button:disabled {
    border-color: var(--b2b-input);
    background: #b9b9b5;
    cursor: not-allowed;
}

.b2b-button--lg {
    min-height: var(--b2b-button-lg-h);
    padding: 7px 16px;
    font-size: var(--b2b-text-base);
}

.b2b-button--block {
    width: 100%;
}

.b2b-page .b2b-button--outline {
    background: transparent;
    color: var(--b2b-black);
}

.b2b-page .b2b-button--outline:hover {
    background: var(--b2b-black);
    color: #fff;
}

.b2b-page .b2b-button--light {
    border-color: #fff;
    background: #fff;
    color: var(--b2b-black);
}

.b2b-page .b2b-button--light:hover {
    background: #e9e9e6;
    color: var(--b2b-black);
}

.b2b-button[hidden] {
    display: none;
}

.b2b-link-button {
    justify-self: start;
    padding: 2px 0;
    border: 0;
    background: none;
    color: var(--b2b-muted);
    font: inherit;
    font-size: var(--b2b-text-meta);
    text-decoration: underline;
    cursor: pointer;
}

.b2b-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---- Landing ------------------------------------------------------------ */
.b2b-hero {
    max-width: 1236px;
    margin: 0 auto;
    padding: 4px 0 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 32px;
}

.b2b-hero__text {
    flex: 1 1 320px;
    min-width: 0;
    display: grid;
    gap: 10px;
}

.b2b-hero h1 {
    margin: 0;
    font-size: clamp(22px, 5.6vw, 28px);
    line-height: 1.12;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.b2b-hero p {
    margin: 0;
    color: #3d3d3b;
    font-size: 12px;
}

.b2b-hero__figure {
    flex: 1 1 360px;
    max-width: 480px;
    min-width: 0;
    /* Room around the rack so its rail and feet stay clear of the card's edge. */
    padding: 28px 32px;
}

.b2b-plate,
.b2b-tile,
.b2b-apply__figure {
    border-radius: var(--b2b-card-radius);
    background: #fff;
    overflow: hidden;
}

.b2b-plate img,
.b2b-tile img,
.b2b-apply__figure img,
.b2b-empty img,
.b2b-stage img,
.b2b-summary__figure {
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 4;
    object-fit: contain;
    display: block;
}

.b2b-section {
    max-width: 1236px;
    margin: 0 auto;
    padding-bottom: 28px;
    display: grid;
    gap: 12px;
}

.b2b-grid {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
    gap: 9px;
}

/* Six order steps: two a row on a phone, three on desktop. */
.b2b-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 900px) {
    .b2b-grid--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    /* Wide step tiles keep their drawing at a product card's size. */
    .b2b-grid--3 .b2b-tile > img,
    .b2b-grid--3 .b2b-tile > .b2b-figure {
        max-width: 300px;
        justify-self: center;
    }
}

/* Five benefits sit in one row on desktop instead of four plus one alone. */
.b2b-grid--5 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

.b2b-tile {
    display: grid;
    align-content: start;
    gap: 4px;
    padding-bottom: 12px;
}

.b2b-tile > strong {
    padding: 0 10px;
    font-size: var(--b2b-text-base);
    font-weight: 650;
    text-align: center;
}

.b2b-step {
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: var(--b2b-text-base);
}

.b2b-step__no {
    flex: none;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--b2b-black);
    color: #fff;
    font-size: var(--b2b-text-label);
    font-weight: 700;
}

.b2b-cta {
    padding: 18px 16px;
    border-radius: var(--b2b-card-radius);
    background: var(--b2b-black);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.b2b-cta h2 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    letter-spacing: -0.02em;
}

@media (min-width: 720px) {
    .b2b-hero {
        padding: 10px 0 32px;
    }

    .b2b-section {
        padding-bottom: 36px;
    }

    .b2b-cta {
        padding: 22px 28px;
    }

    .b2b-cta h2 {
        font-size: 18px;
    }
}

.b2b-closed {
    padding: 10px 12px;
    border-radius: var(--b2b-card-radius);
    background: #fff;
    color: var(--b2b-text);
}

/* ---- Application ---------------------------------------------------------- */
/* On desktop the apply card sits in the middle, between header and footer. */
@media (min-width: 720px) {
    .b2b-main:has(> .b2b-apply) {
        display: flex;
        flex-direction: column;
    }

    .b2b-main > .b2b-apply {
        width: 100%;
        margin-block: auto;
    }
}

.b2b-apply {
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    border-radius: var(--b2b-card-radius);
    background: #fff;
    overflow: hidden;
}

.b2b-apply__figure {
    flex: 1 1 300px;
    display: grid;
    place-items: center;
    border-radius: 0;
    border-bottom: 1px solid var(--b2b-soft-line);
}

.b2b-apply__figure img {
    max-width: 400px;
}

.b2b-apply__body {
    flex: 1 1 360px;
    min-width: 0;
    padding: 16px 14px 18px;
    display: grid;
    align-content: start;
    gap: 12px;
}

.b2b-apply__body h1 {
    margin: 0;
    font-size: 19px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

@media (min-width: 760px) {
    .b2b-apply__figure {
        border-bottom: 0;
        border-right: 1px solid var(--b2b-soft-line);
    }

    .b2b-apply__body {
        padding: 26px 28px;
        align-content: center;
    }

    .b2b-apply__body h1 {
        font-size: 22px;
    }
}

.b2b-lead {
    margin: 0;
    color: #3d3d3b;
}

.b2b-note,
.b2b-signed-in {
    margin: 0;
    color: var(--b2b-muted);
    font-size: var(--b2b-text-meta);
}

.b2b-form {
    display: grid;
    gap: 10px;
}

.b2b-form__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
    gap: 10px;
}

/* Labels as the store draws them: small, muted, semibold. */
.b2b-field {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--b2b-muted);
    font-size: var(--b2b-text-label);
    font-weight: 650;
}

.b2b-field em {
    color: var(--b2b-faint);
    font-style: normal;
    font-weight: 400;
}

.b2b-field input {
    width: 100%;
    height: var(--b2b-field-h);
    padding: 0 9px;
    border: 1px solid var(--b2b-input);
    border-radius: var(--b2b-radius);
    background: #fff;
    color: var(--b2b-text);
    font: inherit;
    font-size: var(--b2b-text-base);
    font-weight: 400;
}

.b2b-field input:focus {
    border-color: var(--b2b-black);
    outline: 0;
    box-shadow: var(--b2b-focus);
}

/*
 * The store's phone field (country code + number) drawn as one input: the
 * code sits in a soft cell on the left, the number fills the rest, and the
 * whole control takes the focus ring. Used by the apply form and the
 * recipient on the order form.
 */
.b2b-page .phone-field {
    display: grid;
    gap: 5px;
}

.b2b-page .phone-field > span:first-child {
    margin-bottom: 0;
    color: var(--b2b-muted);
    font-size: var(--b2b-text-label);
    font-weight: 650;
}

.b2b-page .phone-field > .phone-field__control {
    height: var(--b2b-field-h);
    display: flex;
    align-items: stretch;
    margin: 0;
    padding: 0;
    border: 1px solid var(--b2b-input);
    border-radius: var(--b2b-radius);
    background: #fff;
    overflow: hidden;
}

.b2b-page .phone-field > .phone-field__control:focus-within {
    border-color: var(--b2b-black);
    box-shadow: var(--b2b-focus);
}

.b2b-page .phone-field__prefix {
    height: auto;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 2px 0 9px;
    border: 0;
    border-right: 1px solid var(--b2b-input);
    border-radius: 0;
    background: var(--b2b-soft);
    color: var(--b2b-text);
    font-size: var(--b2b-text-meta);
    font-weight: 650;
}

.b2b-page .phone-field__flag {
    width: 16px;
    flex: 0 0 16px;
    font-size: 13px;
}

.b2b-page .phone-field__control input,
.b2b-page .b2b-field .phone-field__control input,
.b2b-page .checkout-form .phone-field__control input {
    min-height: 0;
    height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    outline: 0;
    font: inherit;
    font-size: var(--b2b-text-base);
    color: var(--b2b-text);
}

.b2b-page .phone-field__prefix input,
.b2b-page .b2b-field .phone-field__prefix input,
.b2b-page .checkout-form .phone-field__prefix input {
    width: 3.4em;
    padding: 0;
    font-size: var(--b2b-text-meta);
    font-weight: 650;
}

.b2b-page .phone-field__control > input,
.b2b-page .b2b-field .phone-field__control > input,
.b2b-page .checkout-form .phone-field__control > input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding: 0 9px;
    font-weight: 400;
}

.b2b-page .phone-field__control input:focus {
    border: 0;
    outline: 0;
    box-shadow: none;
}

.b2b-field.has-error input,
.b2b-page .b2b-field--phone.has-error .phone-field > .phone-field__control {
    border-color: var(--b2b-red);
}

.b2b-field__error {
    color: var(--b2b-red);
    font-size: var(--b2b-text-label);
    font-weight: 500;
}

.b2b-facts {
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--b2b-radius);
    background: var(--b2b-soft);
    display: grid;
    gap: 6px;
    font-size: var(--b2b-text-meta);
}

.b2b-facts div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px 10px;
}

.b2b-facts dt {
    color: var(--b2b-muted);
}

.b2b-facts dd {
    margin: 0;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.b2b-disclosure {
    border-top: 1px solid var(--b2b-soft-line);
    padding-top: 10px;
}

.b2b-disclosure summary {
    cursor: pointer;
    font-weight: 650;
}

.b2b-disclosure[open] summary {
    margin-bottom: 10px;
}

/* ---- Status chips and alerts ------------------------------------------------ */
.b2b-status {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 99px;
    background: var(--b2b-soft);
    color: var(--b2b-text);
    font-size: var(--b2b-text-label);
    font-weight: 650;
    white-space: nowrap;
}

.b2b-status--pending,
.b2b-status--ready {
    background: #fff4dc;
    color: var(--b2b-amber);
}

.b2b-status--dp_paid,
.b2b-status--processing,
.b2b-status--shipped {
    background: #e6efff;
    color: #1d4fb8;
}

.b2b-status--paid,
.b2b-status--completed {
    background: #e3f3e8;
    color: var(--b2b-green);
}

.b2b-status--cancelled,
.b2b-status--rejected,
.b2b-status--suspended {
    background: #fbe9e7;
    color: var(--b2b-red);
}

.b2b-alert {
    margin: 0;
    padding: 9px 11px;
    border-radius: var(--b2b-radius);
    background: #fff;
    border: 1px solid var(--b2b-line);
    font-size: var(--b2b-text-meta);
}

.b2b-alert p {
    margin: 0;
}

.b2b-alert--error {
    border-color: #f2c4bf;
    background: #fdf2f1;
    color: var(--b2b-red);
}

.b2b-alert--warning {
    border-color: #f0dca8;
    background: #fff8e6;
    color: var(--b2b-amber);
}

.b2b-chip {
    padding: 3px 8px;
    border: 1px solid var(--b2b-line);
    border-radius: 99px;
    background: #fff;
    font-size: var(--b2b-text-label);
    font-weight: 650;
}

/* ---- Collection ------------------------------------------------------------ */
.b2b-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.b2b-page-head__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.b2b-search {
    flex: 1 1 240px;
    max-width: 300px;
    height: var(--b2b-field-h);
    padding: 0 9px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--b2b-input);
    border-radius: var(--b2b-radius);
    background: #fff;
    color: var(--b2b-muted);
}

.b2b-search svg {
    flex: none;
    width: 13px;
    height: 13px;
}

.b2b-search:focus-within {
    border-color: var(--b2b-black);
    box-shadow: var(--b2b-focus);
}

.b2b-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: var(--b2b-text-base);
    color: var(--b2b-text);
}

@media (max-width: 559px) {
    .b2b-search {
        max-width: none;
    }
}

.b2b-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.b2b-chips a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--b2b-input);
    border-radius: 99px;
    background: #fff;
    font-size: var(--b2b-text-meta);
}

.b2b-page .b2b-chips a:hover {
    border-color: var(--b2b-black);
}

.b2b-page .b2b-chips a[aria-current="page"] {
    border-color: var(--b2b-black);
    background: var(--b2b-black);
    color: #fff;
    font-weight: 650;
}

.b2b-products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

@media (min-width: 720px) {
    .b2b-products {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 10px;
    }
}

.b2b-product-card {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 1fr;
    border-radius: var(--b2b-card-radius);
    background: #fff;
    overflow: hidden;
}

.b2b-product-card__media {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 5;
    background: #e7e6e2;
    overflow: hidden;
}

.b2b-product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.b2b-product-card:hover .b2b-product-card__media img {
    transform: scale(1.03);
}

.b2b-product-card__media .b2b-product-card__placeholder,
.b2b-product__main .b2b-product-card__placeholder,
.b2b-page .media-broken > img {
    width: 26px;
    height: 26px;
    opacity: 0.34;
}

.b2b-product-card__body {
    padding: 8px 9px 10px;
    display: grid;
    align-content: start;
    gap: 3px;
}

.b2b-product-card__body strong {
    font-size: var(--b2b-text-base);
    font-weight: 650;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.b2b-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 6px;
    font-variant-numeric: tabular-nums;
}

.b2b-price b {
    font-size: var(--b2b-text-base);
}

.b2b-price s {
    color: var(--b2b-faint);
    font-size: var(--b2b-text-label);
}

.b2b-price small,
.b2b-price span {
    color: var(--b2b-muted);
    font-size: var(--b2b-text-label);
}

.b2b-price--lg b {
    font-size: 17px;
    letter-spacing: -0.01em;
}

.b2b-price--lg s {
    font-size: var(--b2b-text-base);
}

.b2b-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 14px;
    font-size: var(--b2b-text-meta);
}

.b2b-pager a {
    font-weight: 650;
}

.b2b-more {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--b2b-text-meta);
}

.b2b-more a {
    font-weight: 650;
}

.b2b-empty {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 0 16px 18px;
    border-radius: var(--b2b-card-radius);
    background: #fff;
    text-align: center;
}

.b2b-empty img {
    max-width: 260px;
}

.b2b-empty strong {
    font-size: 13px;
}

.b2b-empty span {
    color: var(--b2b-muted);
}

.b2b-empty--row {
    grid-template-columns: minmax(0, 1fr);
}

.b2b-empty--row > div {
    display: grid;
    justify-items: center;
    gap: 6px;
}

@media (min-width: 720px) {
    .b2b-empty--row {
        grid-template-columns: 220px minmax(0, 1fr);
        align-items: center;
        justify-items: start;
        text-align: left;
        padding: 10px 22px 10px 10px;
    }

    .b2b-empty--row > div {
        justify-items: start;
    }
}

/* ---- Product ---------------------------------------------------------------- */
.b2b-product {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 18px 24px;
}

.b2b-product__gallery {
    flex: 1 1 320px;
    max-width: 460px;
    min-width: 0;
    display: grid;
    gap: 6px;
}

.b2b-product__main {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 5;
    border-radius: var(--b2b-card-radius);
    background: #e7e6e2;
    overflow: hidden;
}

.b2b-product__main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.b2b-product__thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 6px;
}

.b2b-product__thumbs button {
    padding: 0;
    aspect-ratio: 4 / 5;
    border: 1.5px solid transparent;
    border-radius: var(--b2b-radius);
    background: #e7e6e2;
    overflow: hidden;
    cursor: pointer;
}

.b2b-product__thumbs button.is-active {
    border-color: var(--b2b-black);
}

.b2b-product__thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.b2b-product__info {
    flex: 999 1 420px;
    min-width: 0;
    display: grid;
    gap: 14px;
}

.b2b-product__head {
    display: grid;
    gap: 5px;
}

.b2b-product__head h1 {
    font-size: 19px;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

@media (min-width: 720px) {
    .b2b-product__head h1 {
        font-size: 22px;
    }
}

.b2b-matrix {
    display: grid;
    gap: 7px;
}

.b2b-matrix__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 10px;
}

.b2b-matrix__head h2 {
    margin: 0;
    font-size: var(--b2b-text-base);
    font-weight: 650;
}

.b2b-matrix__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
    gap: 6px;
    padding: 10px;
    border-radius: var(--b2b-card-radius);
    background: #fff;
}

.b2b-matrix__cell {
    display: grid;
    justify-items: center;
    gap: 4px;
    min-width: 0;
}

.b2b-matrix__cell label {
    font-size: var(--b2b-text-meta);
    font-weight: 650;
    text-align: center;
}

.b2b-matrix__cell input,
.b2b-line__sizes input {
    width: 100%;
    max-width: 54px;
    height: var(--b2b-button-h);
    padding: 0;
    border: 1px solid var(--b2b-input);
    border-radius: var(--b2b-radius);
    background: #fff;
    font: inherit;
    font-size: var(--b2b-text-base);
    text-align: center;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}

.b2b-matrix__cell input::-webkit-outer-spin-button,
.b2b-matrix__cell input::-webkit-inner-spin-button,
.b2b-line__sizes input::-webkit-outer-spin-button,
.b2b-line__sizes input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.b2b-matrix__cell input:focus,
.b2b-line__sizes input:focus {
    border-color: var(--b2b-black);
    outline: 0;
    box-shadow: var(--b2b-focus);
}

.b2b-matrix__cell small {
    color: var(--b2b-muted);
    font-size: 8px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.b2b-summary-bar {
    padding: 12px 13px;
    border-radius: var(--b2b-card-radius);
    background: #fff;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.b2b-summary-bar__text {
    display: grid;
    gap: 1px;
}

.b2b-summary-bar__text strong {
    font-size: 17px;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.b2b-summary-bar .b2b-button {
    flex: 1 1 180px;
}

@media (min-width: 720px) {
    .b2b-summary-bar .b2b-button {
        flex: 0 0 auto;
    }
}

.b2b-min-hint {
    margin: 0;
    color: var(--b2b-muted);
    font-size: var(--b2b-text-meta);
    font-weight: 650;
}

.b2b-min-hint.is-met {
    color: var(--b2b-green);
}

/* Below the minimum: one piece is a sample, bought in the store. */
.b2b-sample {
    margin: 0;
    color: var(--b2b-muted);
    font-size: var(--b2b-text-meta);
}

.b2b-sample a {
    color: inherit;
    font-weight: 650;
}

.b2b-description p {
    margin: 0;
    color: #3d3d3b;
    font-size: var(--b2b-text-base);
    line-height: 1.65;
}

/* ---- Order page: cart and checkout ------------------------------------------ */
.b2b-checkout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px 14px;
}

.b2b-checkout__main {
    flex: 999 1 480px;
    min-width: 0;
    display: grid;
    gap: 10px;
}

.b2b-cart {
    display: grid;
    gap: 9px;
}

.b2b-line {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: var(--b2b-card-radius);
    background: #fff;
}

.b2b-line__media {
    flex: none;
    width: 54px;
    aspect-ratio: 4 / 5;
    border-radius: var(--b2b-radius);
    background: #e7e6e2;
    overflow: hidden;
}

.b2b-line__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.b2b-line__body {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 4px;
}

.b2b-line__top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px 10px;
}

.b2b-line__top a {
    min-width: 0;
    font-size: var(--b2b-text-base);
    overflow-wrap: anywhere;
}

.b2b-line__top strong {
    font-weight: 650;
}

.b2b-line__total {
    font-size: var(--b2b-text-base);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.b2b-line__sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.b2b-line__sizes label {
    display: grid;
    justify-items: center;
    gap: 3px;
    width: 46px;
    color: var(--b2b-muted);
    font-size: var(--b2b-text-label);
    font-weight: 650;
}

.b2b-line__sizes input {
    color: var(--b2b-text);
}

@media (min-width: 720px) {
    .b2b-line {
        gap: 12px;
        padding: 12px;
    }

    .b2b-line__media {
        width: 64px;
    }
}

.b2b-cart__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
}

.b2b-panel {
    padding: 13px;
    border-radius: var(--b2b-card-radius);
    background: #fff;
}

.b2b-summary {
    flex: 1 1 280px;
    min-width: 0;
    padding: 13px;
    border-radius: var(--b2b-card-radius);
    background: #fff;
    display: grid;
    gap: 10px;
}

@media (min-width: 1000px) {
    .b2b-summary {
        position: sticky;
        top: 14px;
        max-width: 320px;
    }
}

.b2b-summary__figure {
    max-width: 160px;
    justify-self: center;
}

.b2b-summary h2 {
    margin: 0;
    font-size: 13px;
}

.b2b-summary dl {
    margin: 0;
    display: grid;
    gap: 7px;
    font-size: var(--b2b-text-meta);
    font-variant-numeric: tabular-nums;
}

.b2b-summary dl > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.b2b-summary dt {
    color: var(--b2b-muted);
}

.b2b-summary dd {
    margin: 0;
    text-align: right;
    white-space: nowrap;
}

.b2b-summary .is-saving dd,
.b2b-summary .is-paid dd,
.b2b-summary .is-paid dt {
    color: var(--b2b-green);
}

.b2b-summary__total {
    padding-top: 9px;
    border-top: 1px solid var(--b2b-soft-line);
    font-size: 12px;
}

.b2b-summary .b2b-summary__total dt {
    color: var(--b2b-text);
    font-weight: 650;
}

.b2b-summary__total dd {
    font-weight: 700;
}

.b2b-dp-box {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 10px;
    padding: 10px 11px;
    border-radius: var(--b2b-radius);
    background: var(--b2b-soft);
    font-variant-numeric: tabular-nums;
}

.b2b-dp-box span {
    font-size: var(--b2b-text-meta);
    font-weight: 650;
}

.b2b-dp-box strong {
    font-size: 15px;
    letter-spacing: -0.01em;
}

.b2b-summary p {
    margin: 0;
}

.b2b-address {
    display: grid;
    gap: 2px;
    padding-top: 9px;
    border-top: 1px solid var(--b2b-soft-line);
    font-size: var(--b2b-text-meta);
}

.b2b-address p {
    margin: 0;
    color: #3d3d3b;
    overflow-wrap: anywhere;
}

/* ---- Order history --------------------------------------------------------- */
.b2b-history {
    display: grid;
    gap: 10px;
    padding-top: 6px;
}

.b2b-order-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 7px;
}

.b2b-order-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border-radius: var(--b2b-card-radius);
    background: #fff;
}

.b2b-order-row:hover {
    box-shadow: 0 0 0 1px var(--b2b-input);
}

.b2b-order-row__media {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: var(--b2b-radius);
    background: #e7e6e2;
    overflow: hidden;
}

.b2b-order-row__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.b2b-order-row__main {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 1px;
}

.b2b-order-row__main strong {
    font-size: var(--b2b-text-base);
    font-weight: 650;
    overflow-wrap: anywhere;
}

.b2b-order-row__main small {
    color: var(--b2b-muted);
    font-size: var(--b2b-text-meta);
}

.b2b-order-row__main .b2b-order-row__due {
    color: var(--b2b-amber);
    font-weight: 650;
}

.b2b-order-row__side {
    flex: none;
    display: grid;
    justify-items: end;
    gap: 3px;
    font-variant-numeric: tabular-nums;
}

.b2b-order-row__side b {
    font-size: var(--b2b-text-base);
}

@media (max-width: 400px) {
    .b2b-order-row {
        flex-wrap: wrap;
    }

    .b2b-order-row__side {
        width: 100%;
        grid-template-columns: auto auto;
        justify-content: space-between;
        align-items: center;
    }
}

/* ---- One order ---------------------------------------------------------------- */
.b2b-order-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.b2b-order-head h1 {
    overflow-wrap: anywhere;
}

.b2b-order-head > div:first-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.b2b-order-head__side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* The stage drawing beside two lines, as the store's own order page. */
.b2b-stage {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 14px 10px 10px;
    border-radius: var(--b2b-card-radius);
    background: #fff;
}

.b2b-stage > div {
    display: grid;
    gap: 4px;
}

.b2b-stage strong {
    font-size: 14px;
    letter-spacing: -0.01em;
}

.b2b-stage span {
    color: var(--b2b-muted);
    font-size: var(--b2b-text-base);
}

.b2b-stage > div:only-child {
    grid-column: 1 / -1;
    padding: 4px;
}

@media (min-width: 720px) {
    .b2b-stage {
        grid-template-columns: 180px minmax(0, 1fr);
        gap: 18px;
        padding-right: 18px;
    }
}

.b2b-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    counter-reset: none;
}

.b2b-timeline li {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 4px;
    color: var(--b2b-faint);
    font-size: var(--b2b-text-label);
    text-align: center;
}

/* From 4px right of the previous dot to 4px left of this one. */
.b2b-timeline li + li::before {
    content: "";
    position: absolute;
    top: 10px;
    right: calc(50% + 15px);
    width: calc(100% - 24px);
    height: 1.5px;
    background: var(--b2b-line);
}

.b2b-timeline li.is-done + li::before,
.b2b-timeline li.is-done + li.is-current::before {
    background: var(--b2b-black);
}

.b2b-timeline__dot {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--b2b-line);
    border-radius: 50%;
    background: #fff;
    font-size: var(--b2b-text-label);
    font-weight: 700;
}

.b2b-timeline .is-done {
    color: var(--b2b-text);
}

.b2b-timeline .is-done .b2b-timeline__dot {
    border-color: var(--b2b-black);
    background: var(--b2b-black);
    color: #fff;
}

.b2b-timeline .is-current {
    color: var(--b2b-text);
    font-weight: 650;
}

.b2b-timeline .is-current .b2b-timeline__dot {
    border-color: var(--b2b-black);
    color: var(--b2b-black);
}

@media (min-width: 720px) {
    .b2b-timeline li {
        font-size: var(--b2b-text-meta);
    }
}

.b2b-page .b2b-pay {
    margin: 0;
    padding: 13px;
    border: 0;
    border-radius: var(--b2b-card-radius);
    background: #fff;
    gap: 10px;
    font-size: var(--b2b-text-base);
}

.b2b-pay__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px 14px;
}

.b2b-pay__head h2 {
    margin: 0;
    font-size: 13px;
}

.b2b-pay__head p {
    margin: 2px 0 0;
    color: var(--b2b-muted);
    font-size: var(--b2b-text-meta);
}

.b2b-pay__head > strong {
    font-size: 17px;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.b2b-pay form .b2b-button {
    width: 100%;
}

@media (min-width: 720px) {
    .b2b-pay form .b2b-button {
        width: auto;
    }
}

.b2b-items {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
}

.b2b-items li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-top: 1px solid var(--b2b-soft-line);
    font-size: var(--b2b-text-base);
}

.b2b-items li:first-child {
    border-top: 0;
}

.b2b-items li > span {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.b2b-items strong {
    font-weight: 650;
}

.b2b-items small {
    color: var(--b2b-muted);
    font-size: var(--b2b-text-meta);
}

.b2b-items b {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.b2b-page .order-tracking {
    margin: 0;
}

/* ---- Footer ------------------------------------------------------------------ */
.b2b-footer {
    margin-top: auto;
    border-top: 1px solid var(--b2b-line);
    padding: 14px var(--b2b-gutter) 18px;
}

.b2b-footer__inner {
    max-width: 1236px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 20px;
    color: var(--b2b-muted);
    font-size: var(--b2b-text-label);
}

.b2b-footer__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
}

.b2b-page .b2b-footer__links a:hover {
    color: var(--b2b-text);
    text-decoration: underline;
}

.b2b-footer__language {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    border-radius: var(--b2b-radius);
    background: #e9e9e6;
}

.b2b-footer__language a {
    padding: 2px 7px;
    border-radius: 3px;
    font-size: var(--b2b-text-label);
    font-weight: 650;
}

.b2b-footer__language a.is-active {
    background: #fff;
    color: var(--b2b-text);
}

/* ---- Printed invoice on a phone ----------------------------------------------- */
@media screen and (max-width: 820px) {
    .b2b-invoice.print-page {
        padding: 12px;
    }

    .b2b-invoice.print-page .print-actions,
    .b2b-invoice.print-page .print-sheet {
        width: 100%;
    }

    .b2b-invoice.print-page .print-sheet {
        min-height: 0;
        padding: 16px;
    }

    .b2b-invoice.print-page .print-heading,
    .b2b-invoice.print-page .print-meta,
    .b2b-invoice.print-page .invoice-bottom {
        grid-template-columns: minmax(0, 1fr);
    }

    .b2b-invoice.print-page .print-heading > div:last-child {
        text-align: left;
    }

    .b2b-invoice__scroll {
        overflow-x: auto;
    }

    .b2b-invoice__scroll .print-table {
        min-width: 560px;
    }
}

/* Live line figures (assets/js/b2b-figures.js) in place of their pictures:
   same 5:4 box, drawn on the white plate around them. */
.b2b-figure {
    width: 100%;
    aspect-ratio: 5 / 4;
    --hairline-plate: #ffffff;
    --hairline-lo: #d2d2d7;
    --hairline-mid: #b4b4bc;
}

.b2b-figure > svg {
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
}

.b2b-apply__figure .b2b-figure {
    max-width: 400px;
}

.b2b-empty .b2b-figure {
    max-width: 260px;
    margin-inline: auto;
}

/*
 * The order form reuses the store's checkout parts (saved addresses,
 * recipient, destination search, JNE services) at the store's own scale.
 * Only two things differ: the delivery fields sit straight on the white
 * panel instead of a grey inset, and the fields take the partner pages'
 * black focus ring.
 */
.b2b-page .checkout-shipping {
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.b2b-page .checkout-form input:focus,
.b2b-page .checkout-form textarea:focus,
.b2b-page .checkout-form select:focus {
    border-color: var(--b2b-black);
    box-shadow: var(--b2b-focus);
}
