/* B2B product action split and site-wide procurement rail. */
.single-product .hksm-pdp-summary .hksm-variation-cards {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 0;
    margin: 0 0 0.75rem;
    padding: 0.35rem;
    border: 1px solid var(--hksm-border);
    border-radius: 0.75rem;
    background: #fff;
}

.single-product .hksm-pdp-summary .hksm-variation-card {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    min-width: 0;
    min-height: 3.35rem;
    padding: 0.35rem 0.55rem;
    border: 0 !important;
    border-bottom: 1px solid #eef0f4 !important;
    border-radius: 0.45rem !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--hksm-text) !important;
    transform: none !important;
    transition: background 0.15s ease, color 0.15s ease;
}

.single-product .hksm-pdp-summary .hksm-variation-card:last-child {
    border-bottom: 0 !important;
}

.single-product .hksm-pdp-summary .hksm-variation-card:hover,
.single-product .hksm-pdp-summary .hksm-variation-card:focus-visible {
    background: #faf8ff !important;
    box-shadow: none !important;
    transform: none !important;
}

.single-product .hksm-pdp-summary .hksm-variation-card--active {
    border-left: 3px solid var(--hksm-primary) !important;
    background: #f8f6ff !important;
}

.single-product .hksm-pdp-summary .hksm-variation-card__image {
    display: flex;
    width: 3rem;
    height: 2.6rem;
    align-items: center;
    justify-content: center;
}

.single-product .hksm-pdp-summary .hksm-variation-card__image img {
    width: 2.6rem;
    height: 2.6rem;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
}

.single-product .hksm-pdp-summary .hksm-variation-card__info {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.single-product .hksm-pdp-summary .hksm-variation-card__name,
.single-product .hksm-pdp-summary .hksm-variation-card__price {
    min-width: 0;
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.25;
}

.single-product .hksm-pdp-summary .hksm-variation-card__name {
    color: var(--hksm-text);
    font-weight: 750;
}

.single-product .hksm-pdp-summary .hksm-variation-card__price {
    color: var(--hksm-danger);
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

/* Consumer and institutional purchase paths share the product details card. */
@media (min-width: 992px) {
    .single-product .hksm-pdp-layout--purchase-split {
        grid-template-columns: minmax(0, 34fr) minmax(0, 66fr);
        gap: 1.75rem;
    }
}

.single-product .hksm-purchase-tabs {
    display: none;
}

.single-product .hksm-purchase-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
}

.single-product .hksm-purchase-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1rem;
    border: 1px solid #e2def8;
    border-radius: 0.85rem;
    background: #fbfaff;
}

.single-product .hksm-purchase-panel--institution {
    border-color: #c5e7e9;
    background: #f6fcfc;
}

.single-product .hksm-purchase-panel__header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 3.3rem;
    margin-bottom: 0.75rem;
}

.single-product .hksm-purchase-panel__icon {
    display: inline-flex;
    flex: 0 0 2.8rem;
    width: 2.8rem;
    height: 2.8rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ede8ff;
    color: #623ad1;
    font-size: 1.45rem;
}

.single-product .hksm-purchase-panel--institution .hksm-purchase-panel__icon {
    background: #dcf4f4;
    color: #0b8d94;
}

.single-product .hksm-purchase-panel__header strong,
.single-product .hksm-purchase-panel__header small {
    display: block;
    line-height: 1.3;
}

.single-product .hksm-purchase-panel__header strong {
    color: var(--hksm-text);
    font-size: 1rem;
    font-weight: 800;
}

.single-product .hksm-purchase-panel__header small {
    margin-top: 0.1rem;
    color: var(--hksm-text-muted);
    font-size: 0.75rem;
}

.single-product .hksm-purchase-panel__note {
    margin: 0 0 0.2rem;
    color: var(--hksm-text-muted);
    font-size: 0.72rem;
}

.single-product .hksm-pdp-summary .hksm-purchase-panel--consumer form.cart {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    width: 100%;
    min-width: 0;
    margin: 0;
}

.single-product .hksm-purchase-panel--consumer form.cart .single_variation_wrap {
    margin-top: auto;
}

.single-product .hksm-pdp-summary .hksm-purchase-panel--consumer form.cart > .hksm-pack-price-table,
.single-product .hksm-pdp-summary .hksm-purchase-panel--consumer form.cart > .hksm-variation-cards,
.single-product .hksm-pdp-summary .hksm-purchase-panel--consumer form.cart > .single_variation_wrap {
    flex: 0 0 auto;
    width: 100%;
}

.single-product .hksm-purchase-panel--consumer form.cart .single_add_to_cart_button {
    flex: 0 0 100%;
    width: 100%;
}

.single-product .hksm-purchase-panel--consumer .hksm-pack-price-table {
    margin-bottom: 0.5rem !important;
}

.single-product .hksm-purchase-panel--consumer form.cart .woocommerce-variation.single_variation {
    display: none !important;
}

.single-product .hksm-purchase-panel__enquiry {
    padding: 1rem;
    border: 1px solid #dceff0;
    border-radius: 0.65rem;
    background: #fff;
}

.single-product .hksm-purchase-panel__enquiry strong {
    display: block;
    color: #0b8d94;
    font-size: 1.2rem;
    font-weight: 800;
}

.single-product .hksm-purchase-panel__enquiry p {
    margin: 0.35rem 0 0;
    color: var(--hksm-text-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.single-product .hksm-purchase-panel__enquiry .hksm-purchase-panel__response {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5f0f1;
    color: #08767b;
    font-size: 0.76rem;
    font-weight: 700;
}

.single-product .hksm-purchase-panel__response i {
    flex: 0 0 auto;
    font-size: 1rem;
    line-height: 1.15;
}

.single-product .hksm-purchase-panel__institution-action {
    display: grid;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
}

.single-product .hksm-purchase-panel__institution-action label {
    color: var(--hksm-text);
    font-size: 0.8rem;
    font-weight: 700;
}

.single-product .hksm-purchase-panel__institution-action input {
    width: 6.5rem;
    min-height: 2.7rem;
    padding: 0.4rem 0.65rem;
    border: 1px solid #d8dfe9;
    border-radius: 0.55rem;
    background: #fff;
    color: var(--hksm-text);
}

.single-product .hksm-purchase-panel--institution .hksm-product-quote-btn {
    display: inline-flex;
    width: 100%;
    min-height: 3.25rem;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    padding: 0.7rem 1rem;
    border: 1px solid #0e969d;
    border-radius: 0.65rem;
    background: #0e969d;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.25;
    cursor: pointer;
}

.single-product .hksm-purchase-panel--institution .hksm-product-quote-btn:hover,
.single-product .hksm-purchase-panel--institution .hksm-product-quote-btn:focus-visible {
    border-color: #08767b;
    background: #08767b;
    color: #fff;
}

@media (max-width: 991.98px) {
    .hksm-b2b-rail {
        display: none !important;
    }

    .single-product .hksm-purchase-split--ready .hksm-purchase-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem;
        margin-bottom: 0.75rem;
        padding: 0.25rem;
        border: 1px solid #e3e8ef;
        border-radius: 0.7rem;
        background: #f7f9fc;
    }

    .single-product .hksm-purchase-tabs button {
        min-height: 2.6rem;
        padding: 0.5rem;
        border: 0;
        border-radius: 0.5rem;
        background: transparent;
        color: var(--hksm-text-muted);
        font-size: 0.84rem;
        font-weight: 750;
    }

    .single-product .hksm-purchase-tabs button.is-active {
        background: #fff;
        color: #5530c7;
        box-shadow: 0 1px 4px rgba(31, 49, 71, 0.08);
    }

    .single-product .hksm-purchase-tabs button[data-hksm-purchase-tab="institution"].is-active {
        color: #0b8d94;
    }

    .single-product .hksm-purchase-panels {
        grid-template-columns: minmax(0, 1fr);
    }

    .single-product .hksm-purchase-split--ready .hksm-purchase-panel:not(.is-active) {
        display: none;
    }
}

/* Pack prices are a reference table; quantity drives the chosen price tier. */
.single-product .hksm-pdp-summary form.cart > .hksm-pack-price-table {
    display: table;
    flex: 0 0 100%;
    width: 100% !important;
    max-width: none;
    margin: 0 0 0.65rem;
    border: 0;
    border-collapse: collapse;
    table-layout: fixed;
    background: transparent;
}

.single-product .hksm-pack-price-table tr {
    height: 2.2rem;
    background: transparent;
}

.single-product .hksm-pack-price-table tr:not(:last-child) {
    border-bottom: 1px solid #e9edf3;
}

.single-product .hksm-pack-price-table th,
.single-product .hksm-pack-price-table td {
    width: 50%;
    padding: 0.35rem 0.5rem;
    border: 0;
    background: transparent;
    vertical-align: middle;
    font-size: 0.82rem;
    line-height: 1.25;
}

.single-product .hksm-pack-price-table th {
    color: var(--hksm-text);
    font-weight: 700;
    text-align: left;
}

.single-product .hksm-pack-price-table td {
    color: var(--hksm-danger);
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.single-product .hksm-pdp-summary .hksm-pack-price-table .price,
.single-product .hksm-pdp-summary .hksm-pack-price-table .amount {
    display: inline;
    margin: 0;
    color: inherit;
    font: inherit;
    text-decoration: none;
}

.single-product .hksm-pack-price-table__unavailable {
    opacity: 0.45;
}

.single-product .hksm-pdp-summary form.cart {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}

.single-product .hksm-pdp-summary form.cart .single_add_to_cart_button,
.single-product .hksm-pdp-summary form.cart .hksm-product-quote-btn {
    min-height: 3.25rem;
    margin: 0 !important;
}

.single-product .hksm-pdp-summary form.cart .hksm-product-quote-btn {
    display: inline-flex;
    flex: 1 1 calc(50% - 0.375rem);
    width: auto;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1rem;
    border: 1px solid #0e969d;
    border-radius: 0.65rem;
    background: #0e969d;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(14, 150, 157, 0.16);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.single-product .hksm-pdp-summary form.cart .hksm-product-quote-btn:hover,
.single-product .hksm-pdp-summary form.cart .hksm-product-quote-btn:focus-visible {
    border-color: #08767b;
    background: #08767b;
    color: #fff;
    transform: translateY(-1px);
}

.single-product .hksm-pdp-summary form.cart .hksm-product-quote-btn i {
    font-size: 1.2rem;
}

.single-product .hksm-pdp-summary form.cart > .hksm-variation-cards,
.single-product .hksm-pdp-summary form.cart > .single_variation_wrap,
.single-product .hksm-pdp-summary form.cart > .variations {
    flex: 0 0 100%;
    width: 100%;
}

.single-product .hksm-pdp-summary form.cart .single_variation_wrap,
.single-product .hksm-pdp-summary form.cart .woocommerce-variation-add-to-cart,
.single-product .hksm-pdp-summary form.cart .variations_button {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    align-items: center;
    gap: 0.75rem;
}

.single-product .hksm-pdp-summary form.cart .quantity {
    flex: 0 0 100%;
    width: 100%;
    max-width: none;
}

.single-product .hksm-pdp-summary form.cart .single_add_to_cart_button {
    flex: 1 1 calc(50% - 0.375rem);
    width: auto;
}

/* Fixed desktop procurement rail. */
.hksm-b2b-rail {
    position: fixed;
    z-index: 10020;
    top: 50%;
    right: 1rem;
    display: flex;
    width: min(14rem, calc(100vw - 2rem));
    flex-direction: column;
    gap: 0.45rem;
    transform: translateY(-50%);
}

.hksm-b2b-rail__action {
    position: relative;
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    align-items: center;
    gap: 0.65rem;
    min-height: 4.15rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid #e1e7ee;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.97);
    color: #223247;
    text-align: left;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(31, 49, 71, 0.12);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hksm-b2b-rail__action:hover,
.hksm-b2b-rail__action:focus-visible {
    border-color: #b8c7d9;
    color: #142238;
    box-shadow: 0 14px 30px rgba(31, 49, 71, 0.18);
    transform: translateX(-3px);
}

.hksm-b2b-rail__action > i {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.55rem;
    background: #f1ecff;
    color: #6c37d3;
    font-size: 1.35rem;
}

.hksm-b2b-rail__action--upload > i {
    background: #e8fbfb;
    color: #0e969d;
}

.hksm-b2b-rail__action--source > i {
    background: #eef5ff;
    color: #3478c9;
}

.hksm-b2b-rail__action--whatsapp > i {
    background: #e6f8ee;
    color: #16a05d;
}

.hksm-b2b-rail__action span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.12rem;
}

.hksm-b2b-rail__short {
    display: none;
    font-style: normal;
}

.hksm-b2b-rail__action strong {
    font-size: 0.82rem;
    line-height: 1.25;
}

.hksm-b2b-rail__action small {
    color: #657286;
    font-size: 0.68rem;
    line-height: 1.3;
}

.hksm-b2b-rail__action--upload {
	border-color: #e1e7ee;
	background: rgba(255, 255, 255, 0.97);
	color: #223247;
}

.hksm-b2b-rail__action--upload:hover,
.hksm-b2b-rail__action--upload:focus-visible {
	border-color: #b8c7d9;
	color: #142238;
}

.hksm-b2b-rail__action--upload small {
	color: #657286;
}

.hksm-b2b-rail__action--upload > i {
	background: #e8fbfb;
	color: #0e969d;
}

.hksm-b2b-rail__count {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    display: inline-flex;
    min-width: 1.35rem;
    height: 1.35rem;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #e3425a;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
}

/* Drawer. */
.hksm-b2b-drawer-backdrop {
    position: fixed;
    z-index: 10030;
    inset: 0;
    display: none;
    background: rgba(14, 24, 38, 0.38);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hksm-b2b-drawer-backdrop.is-open {
    display: block;
    opacity: 1;
}

.hksm-b2b-drawer {
    position: fixed;
    z-index: 10040;
    top: 0;
    right: 0;
    display: flex;
    width: min(31rem, 100vw);
    height: 100dvh;
    flex-direction: column;
    background: #fff;
    box-shadow: -18px 0 48px rgba(14, 24, 38, 0.2);
    opacity: 0;
    pointer-events: none;
    transform: translateX(102%);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.hksm-b2b-drawer.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.hksm-b2b-drawer__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid #e9edf2;
    background: linear-gradient(135deg, #faf8ff, #f1fcfc);
}

.hksm-b2b-drawer__eyebrow {
    display: block;
    margin-bottom: 0.25rem;
    color: #0e969d;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hksm-b2b-drawer__header h2 {
    margin: 0;
    color: #17253a;
    font-size: 1.35rem;
}

.hksm-b2b-drawer__close {
    display: inline-flex;
    width: 2.2rem;
    height: 2.2rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #44536a;
    font-size: 1.35rem;
    cursor: pointer;
}

.hksm-b2b-drawer__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.25rem;
}

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

.hksm-b2b-view h3 {
    margin: 0 0 0.5rem;
    color: #17253a;
    font-size: 1.2rem;
}

.hksm-b2b-drawer__intro {
    margin: 0 0 1rem;
    color: #647287;
    font-size: 0.88rem;
    line-height: 1.55;
}

.hksm-b2b-quote-items {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.hksm-b2b-quote-item {
    display: grid;
    grid-template-columns: 3.2rem minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.7rem;
    padding: 0.65rem;
    border: 1px solid #e6ebf1;
    border-radius: 0.7rem;
    background: #fff;
}

.hksm-b2b-quote-item__image {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 0.45rem;
    background: #f6f8fb;
    object-fit: contain;
}

.hksm-b2b-quote-item__name {
    display: block;
    color: #24334a;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
}

.hksm-b2b-quote-item__details,
.hksm-b2b-quote-item__quantity {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hksm-b2b-quote-item__details {
    align-items: flex-start;
    gap: 0.3rem;
}

.hksm-b2b-quote-item__quantity {
    align-items: center;
    gap: 0.35rem;
}

.hksm-b2b-quote-item__controls {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.hksm-b2b-quote-item__controls button {
    display: inline-flex;
    width: 1.6rem;
    height: 1.6rem;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe3eb;
    border-radius: 0.35rem;
    background: #fff;
    color: #405069;
    cursor: pointer;
}

.hksm-b2b-quote-item__controls button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.hksm-b2b-quote-item__controls input {
    width: 3rem;
    height: 1.6rem;
    padding: 0 0.25rem;
    border: 1px solid #dbe3eb;
    border-radius: 0.35rem;
    background: #fff;
    color: #24334a;
    font-size: 0.75rem;
    font-weight: 800;
    text-align: center;
}

.hksm-b2b-quote-item__controls input:disabled {
    background: #f5f7fa;
    cursor: not-allowed;
    opacity: 0.7;
}

.hksm-b2b-quote-item__controls input:focus {
    outline: 2px solid rgba(14, 150, 157, 0.18);
    border-color: #0e969d;
}

.hksm-b2b-quote-item__qty-toggle {
    padding: 0.25rem 0.45rem;
    border: 1px solid #dbe3eb;
    border-radius: 0.35rem;
    background: #f8fafc;
    color: #526277;
    font-size: 0.68rem;
    cursor: pointer;
}

.hksm-b2b-quote-item__qty-toggle[aria-pressed="true"] {
    border-color: #0e969d;
    background: #e8f8f8;
    color: #08767b;
    font-weight: 800;
}

.hksm-b2b-quote-item__remove {
    padding: 0;
    border: 0;
    background: none;
    color: #a23d4e;
    font-size: 0.7rem;
    cursor: pointer;
}

.hksm-b2b-empty {
    display: flex;
    margin: 0 0 1rem;
    padding: 1.2rem 1rem;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    border: 1px dashed #cbd7e4;
    border-radius: 0.75rem;
    color: #68778b;
    text-align: center;
}

.hksm-b2b-empty i {
    color: #6c37d3;
    font-size: 2rem;
}

.hksm-b2b-empty strong {
    color: #24334a;
    font-size: 0.85rem;
}

.hksm-b2b-empty span {
    font-size: 0.75rem;
}

.hksm-b2b-request-form {
    display: grid;
    gap: 0.7rem;
}

.hksm-b2b-field label {
    display: grid;
    gap: 0.3rem;
    color: #405069;
    font-size: 0.75rem;
    font-weight: 700;
}

.hksm-b2b-field input,
.hksm-b2b-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.75rem;
    border: 1px solid #d9e1e9;
    border-radius: 0.5rem;
    background: #fff;
    color: #24334a;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 400;
}

.hksm-b2b-field textarea {
    min-height: 5rem;
    resize: vertical;
}

.hksm-b2b-field input:focus,
.hksm-b2b-field textarea:focus {
    outline: 2px solid rgba(14, 150, 157, 0.18);
    border-color: #0e969d;
}

.hksm-b2b-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.hksm-b2b-file-field {
    display: grid;
    gap: 0.45rem;
    padding: 1rem;
    border: 1px dashed #0e969d;
    border-radius: 0.65rem;
    background: #f2fbfb;
    color: #08767b;
    font-size: 0.82rem;
    font-weight: 800;
}

.hksm-b2b-file-field input {
    width: 100%;
    color: #405069;
    font-size: 0.75rem;
    font-weight: 400;
}

.hksm-b2b-file-note {
    color: #6a788c;
    font-size: 0.7rem;
}

.hksm-b2b-submit {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.35rem;
    padding: 0.75rem 1rem;
    border: 1px solid #0e969d;
    border-radius: 0.6rem;
    background: #0e969d;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
}

.hksm-b2b-submit:hover,
.hksm-b2b-submit:focus-visible {
    border-color: #08767b;
    background: #08767b;
    color: #fff;
}

.hksm-b2b-submit[disabled] {
    cursor: wait;
    opacity: 0.65;
}

.hksm-b2b-form-message {
    display: none;
    padding: 0.7rem;
    border-radius: 0.5rem;
    font-size: 0.78rem;
    line-height: 1.45;
}

.hksm-b2b-form-message.is-visible {
    display: block;
}

.hksm-b2b-form-message.is-success {
    background: #e9f8ef;
    color: #17653a;
}

.hksm-b2b-form-message.is-error {
    background: #fff0f1;
    color: #a23d4e;
}

body.hksm-b2b-drawer-open {
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .hksm-b2b-rail {
        top: auto;
        right: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;
        width: auto;
        flex-direction: row;
        flex-wrap: wrap;
        transform: none;
    }

    .hksm-b2b-rail__action {
        flex: 1 1 calc(50% - 0.45rem);
        min-width: 0;
        min-height: 3.5rem;
    }

    .hksm-b2b-rail__action:hover,
    .hksm-b2b-rail__action:focus-visible {
        transform: translateY(-2px);
    }
}

@media (min-width: 992px) and (max-width: 1799.98px) {
    .hksm-b2b-rail {
        top: 50%;
        right: 0.5rem;
        bottom: auto;
        left: auto;
        width: 3.25rem;
        flex-direction: column;
        transform: translateY(-50%);
    }

    .hksm-b2b-rail__action {
        display: inline-flex;
        width: 3.25rem;
        min-width: 3.25rem;
        min-height: 3.25rem;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
        grid-template-columns: 1fr;
    }

    .hksm-b2b-rail__action span {
        display: none;
    }

    .hksm-b2b-rail__action > i {
        width: 2rem;
        height: 2rem;
    }

    .hksm-b2b-rail__count {
        top: -0.2rem;
        right: -0.2rem;
    }
}

@media (min-width: 992px) and (max-width: 1599.98px) {
    .hksm-b2b-rail {
        width: 3.25rem;
    }

    .hksm-b2b-rail__action {
        flex-direction: column;
        width: 3.25rem;
        min-width: 3.25rem;
        min-height: 4rem;
        gap: 0.1rem;
        padding: 0.35rem 0.2rem;
    }

    .hksm-b2b-rail__short {
        display: block;
        width: 100%;
        color: inherit;
        font-size: 0.54rem;
        font-weight: 800;
        line-height: 1.15;
        text-align: center;
        white-space: nowrap;
    }

    .hksm-b2b-rail__action span {
        position: absolute;
        top: 50%;
        right: calc(100% + 0.6rem);
        display: flex;
        width: max-content;
        min-width: 11.5rem;
        max-width: 15rem;
        padding: 0.65rem 0.8rem;
        border: 1px solid #e1e7ee;
        border-radius: 0.6rem;
        background: #fff;
        color: #223247;
        text-align: left;
        box-shadow: 0 6px 18px rgba(31, 49, 71, 0.12);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-50%);
        transition: opacity 0.15s ease, visibility 0.15s ease;
    }

    .hksm-b2b-rail__action:hover span,
    .hksm-b2b-rail__action:focus-visible span {
        opacity: 1;
        visibility: visible;
    }

    .hksm-b2b-rail__action--upload span small {
        color: #657286;
    }
}

@media (min-width: 1600px) and (max-width: 1799.98px) {
    .hksm-b2b-rail {
        width: 8.5rem;
    }

    .hksm-b2b-rail__action {
        display: grid;
        grid-template-columns: 2rem minmax(0, 1fr);
        width: 100%;
        min-height: 3.5rem;
        gap: 0.45rem;
        padding: 0.55rem;
    }

    .hksm-b2b-rail__action span {
        display: flex;
    }

    .hksm-b2b-rail__action strong {
        font-size: 0.68rem;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .hksm-b2b-rail__action small {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .single-product .hksm-pdp-summary form.cart .single_add_to_cart_button,
    .single-product .hksm-pdp-summary form.cart .hksm-product-quote-btn {
        flex-basis: 100%;
        width: 100%;
    }

    .hksm-b2b-rail__action {
        grid-template-columns: 1.8rem minmax(0, 1fr);
        padding: 0.6rem;
    }

    .hksm-b2b-rail__action strong {
        font-size: 0.74rem;
    }

    .hksm-b2b-rail__action small {
        font-size: 0.61rem;
    }

    .hksm-b2b-drawer__body {
        padding: 1rem;
        padding-bottom: 6rem;
    }

    .hksm-b2b-form-grid {
        grid-template-columns: 1fr;
    }
}

/* The variation selector is intentionally a quiet, table-like list. */
.single-product .hksm-pdp-summary .hksm-variation-cards {
    display: flex !important;
    width: 100%;
    flex-direction: column;
    gap: 0;
    margin: 0 0 0.75rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.single-product .hksm-pdp-summary .hksm-variation-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    min-height: 2.25rem;
    align-items: center;
    gap: 0;
    padding: 0.4rem 0.5rem;
    border: 0 !important;
    border-bottom: 1px solid #eef0f4 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--hksm-text) !important;
    transform: none !important;
    transition: color 0.15s ease, background 0.15s ease;
}

.single-product .hksm-pdp-summary .hksm-variation-card:last-child {
    border-bottom: 0 !important;
}

.single-product .hksm-pdp-summary .hksm-variation-card:hover,
.single-product .hksm-pdp-summary .hksm-variation-card:focus-visible {
    background: #fafafa !important;
    box-shadow: none !important;
    transform: none !important;
}

.single-product .hksm-pdp-summary .hksm-variation-card--active {
    border-left: 0 !important;
    background: transparent !important;
}

.single-product .hksm-pdp-summary .hksm-variation-card__image {
    display: none !important;
}

.single-product .hksm-pdp-summary .hksm-variation-card__info {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}

.single-product .hksm-pdp-summary .hksm-variation-card__name,
.single-product .hksm-pdp-summary .hksm-variation-card__price {
    min-width: 0;
    margin: 0 !important;
    font-size: 0.78rem !important;
    line-height: 1.3 !important;
}

.single-product .hksm-pdp-summary .hksm-variation-card__name {
    color: var(--hksm-text);
    font-weight: 700;
}

.single-product .hksm-pdp-summary .hksm-variation-card__price {
    color: var(--hksm-danger);
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}
