/**
 * Frontend Styles for WooCommerce Multi-Tier B2B & Weight Calculator
 * Custom Wholesale UI Cards directly inspired by Stitch Wholesale design.
 */

/* 1. Base Typography & Card Layout */
.wc-b2b-card-container {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    margin-top: 6px;
    font-family: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", "Inter", "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    text-align: left;
    -webkit-font-smoothing: antialiased;
}

.wc-b2b-card-container:empty,
.wc-b2b-card-container:not(:has(.wc-b2b-tier-table-wrapper)):not(:has(.wc-b2b-variation-selectors)):not(:has(.wc-b2b-top-meta-bar)):not(:has(.wc-b2b-action-bar)) {
    display: none !important;
}

/* Full Stitch Wholesale Card Mode (For Loop Grids & Shortcodes) */
.wc-b2b-card-container.wc-b2b-full-card-mode {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 6px 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wc-b2b-card-container.wc-b2b-full-card-mode:hover {
    box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.08);
}

/* 2. Media Wrapper (Image, Badges, Wishlist) */
.wc-b2b-card-media-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 8px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.wc-b2b-card-img-link {
    display: block;
    width: 100%;
    text-decoration: none;
}

.wc-b2b-card-img-link img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
}

/* Badges on Image (Top-Left) */
.wc-b2b-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.2;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.wc-b2b-badge-bestseller {
    background: #991b1b;
    color: #ffffff;
}

.wc-b2b-badge-boxset {
    background: #0b1528;
    color: #ffffff;
}

.wc-b2b-badge-variable {
    background: #854d0e;
    color: #ffffff;
}

.wc-b2b-badge-multisize {
    background: #0f172a;
    color: #ffffff;
}

.wc-b2b-badge-default {
    background: #1e293b;
    color: #ffffff;
}

/* Wishlist Heart Button (Top-Right) */
.wc-b2b-wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    width: 28px;
    height: 28px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    transition: transform 0.15s ease, color 0.15s ease;
}

.wc-b2b-wishlist-btn:hover {
    transform: scale(1.08);
    color: #ef4444;
}

/* Bottom Tags over Image */
.wc-b2b-variant-count-tag {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 5;
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2.5px 7px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    letter-spacing: 0.2px;
}

.wc-b2b-in-cart-floating-badge {
    display: none !important;
}

/* 3. Top Meta Bar (SKU • MOQ: X • Pk: Y) */
.wc-b2b-top-meta-bar {
    font-size: 10px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    line-height: 1.2;
}

.wc-b2b-meta-sku,
.wc-b2b-meta-moq,
.wc-b2b-meta-step {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.wc-b2b-meta-sku {
    text-transform: uppercase;
}

.wc-b2b-meta-sku .sku-label,
.wc-b2b-meta-moq .moq-label,
.wc-b2b-meta-step .step-label {
    color: #b45309 !important;
    font-weight: 700 !important;
}

.wc-b2b-meta-sku .sku-val,
.wc-b2b-meta-moq .moq-val,
.wc-b2b-meta-step .step-val {
    color: #1e293b !important;
    font-weight: 700 !important;
}

.wc-b2b-meta-bullet {
    color: #cbd5e1;
    font-size: 8px;
}

/* Product Title */
.wc-b2b-product-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin: 0 0 5px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wc-b2b-product-title a {
    color: inherit;
    text-decoration: none;
}

.wc-b2b-product-title a:hover {
    color: #b45309;
}

/* 4. Interactive Attribute Swatches (Ultra-Compact Inline, Font Size Matched to Attribute Head) */
.wc-b2b-variation-selectors {
    margin-bottom: 4px;
}

.wc-b2b-attr-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 4px !important;
    flex-wrap: wrap !important;
}

.wc-b2b-attr-label-header {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 11px !important;
    line-height: 1 !important;
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
}

.wc-b2b-attr-title {
    color: #475569 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
}

.wc-b2b-attr-current-val {
    display: none !important;
}

.wc-b2b-variation-selectors {
    margin-bottom: 4px;
    max-width: 100% !important;
    overflow: hidden !important;
}

.wc-b2b-attr-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 4px !important;
    flex-wrap: wrap !important;
    max-width: 100% !important;
}

.wc-b2b-attr-swatches {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    align-items: center !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.wc-b2b-swatch-btn,
span.wc-b2b-swatch-btn,
button.wc-b2b-swatch-btn {
    all: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    padding: 0 6px !important;
    font-family: inherit !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    color: #334155 !important;
    cursor: pointer !important;
    margin: 0 !important;
    box-shadow: none !important;
    transition: all 0.15s ease-in-out !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.wc-b2b-swatch-btn:hover,
span.wc-b2b-swatch-btn:hover,
button.wc-b2b-swatch-btn:hover {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

.wc-b2b-swatch-btn.active,
span.wc-b2b-swatch-btn.active,
button.wc-b2b-swatch-btn.active {
    background: #fef08a !important;
    border-color: #f59e0b !important;
    color: #713f12 !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 2px rgba(245, 158, 11, 0.2) !important;
}

/* Color swatches */
.wc-b2b-swatch-btn.wc-b2b-swatch-color,
span.wc-b2b-swatch-btn.wc-b2b-swatch-color {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    padding: 2px !important;
    border-radius: 4px !important;
    position: relative !important;
    box-sizing: border-box !important;
}

.wc-b2b-swatch-color-inner {
    width: 100% !important;
    height: 100% !important;
    border-radius: 2px !important;
    display: block !important;
}

.wc-b2b-swatch-btn.wc-b2b-swatch-color.active,
span.wc-b2b-swatch-btn.wc-b2b-swatch-color.active {
    border-color: #22c55e !important;
    outline: 2px solid #22c55e !important;
    outline-offset: 1px !important;
    box-shadow: 0 1px 3px rgba(34, 197, 94, 0.3) !important;
}

.wc-b2b-swatch-btn.wc-b2b-swatch-color.active::after,
span.wc-b2b-swatch-btn.wc-b2b-swatch-color.active::after {
    content: "✓" !important;
    position: absolute !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    text-shadow: 0 0 2px rgba(0,0,0,0.9), 0 0 4px rgba(0,0,0,0.8) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    inset: 0 !important;
}

/* 5. 2-Column Clean Wholesale Tier Table */
.wc-b2b-tier-table-wrapper {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 4px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.wc-b2b-tier-table {
    display: table !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    font-size: 11px;
    margin: 0;
    box-sizing: border-box !important;
}

.wc-b2b-tier-table thead,
.wc-b2b-col-piece,
.wc-b2b-col-savings {
    display: none;
}

.wc-b2b-tier-table tr {
    display: table-row !important;
    visibility: visible !important;
    opacity: 1 !important;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer !important;
    width: 100% !important;
}

.wc-b2b-tier-table tr:hover:not(.active) {
    background-color: rgba(233, 86, 37, 0.05) !important;
}

.wc-b2b-tier-table tr:last-child {
    border-bottom: none;
}

.wc-b2b-tier-table td {
    padding: 2px 4px !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.wc-b2b-col-qty {
    width: 53% !important;
    max-width: 53% !important;
    color: #475569;
    font-weight: 500;
    text-align: left;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.wc-b2b-col-rate {
    width: 47% !important;
    max-width: 47% !important;
    font-weight: 700;
    text-align: right;
    white-space: nowrap !important;
    overflow: hidden !important;
    padding-right: 4px !important;
}

.wc-b2b-qty-text {
    white-space: nowrap;
    font-weight: 600;
    font-size: 10.5px;
}

.wc-b2b-tier-icon {
    font-size: 9px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    margin-left: 2px !important;
}

.wc-b2b-rate-val {
    display: block;
    font-size: 11.5px !important;
    font-weight: 700;
    line-height: 1.05;
    white-space: nowrap !important;
}

.wc-b2b-subtext-set {
    display: block;
    font-size: 8.5px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.1;
    margin-top: 1px;
}

.wc-b2b-tier-icon {
    display: inline-block;
    color: #b45309;
    margin-left: 2px;
    font-size: 10.5px;
    font-weight: 700;
}

/* Inactive Tier Rows: Muted / Grayed-out price styling */
.wc-b2b-tier-table tr:not(.active) .wc-b2b-col-rate,
.wc-b2b-tier-table tr:not(.active) .wc-b2b-col-rate .wc-b2b-rate-val,
.wc-b2b-tier-table tr:not(.active) .wc-b2b-col-rate .amount,
.wc-b2b-tier-table tr:not(.active) .wc-b2b-col-rate .amount bdi,
.wc-b2b-tier-table tr:not(.active) .wc-b2b-col-rate .woocommerce-Price-currencySymbol {
    color: #64748b !important;
    font-weight: 600 !important;
}

.wc-b2b-tier-table tr:not(.active) .wc-b2b-qty-text {
    color: #64748b !important;
    font-weight: 500 !important;
}

.wc-b2b-tier-table tr:not(.active) .wc-b2b-tier-icon {
    opacity: 0.65 !important;
}

/* Active Row Highlight: Warm Background Tint + Bold Brand Accent Color */
.wc-b2b-tier-table tr.active {
    background-color: rgba(233, 86, 37, 0.08) !important;
}

.wc-b2b-tier-table tr.active td,
.wc-b2b-tier-table tr.active .wc-b2b-col-qty,
.wc-b2b-tier-table tr.active .wc-b2b-qty-text {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.wc-b2b-tier-table tr.active .wc-b2b-col-rate,
.wc-b2b-tier-table tr.active .wc-b2b-col-rate .wc-b2b-rate-val,
.wc-b2b-tier-table tr.active .wc-b2b-col-rate .amount,
.wc-b2b-tier-table tr.active .wc-b2b-col-rate .amount bdi,
.wc-b2b-tier-table tr.active .wc-b2b-col-rate .woocommerce-Price-currencySymbol {
    color: var(--wd-primary-color, var(--btn-accented-bgcolor, rgb(233, 86, 37))) !important;
    font-weight: 800 !important;
    font-size: 12.5px !important;
    line-height: 1.05 !important;
}

.wc-b2b-tier-table tr.active .wc-b2b-tier-icon {
    color: var(--wd-primary-color, var(--btn-accented-bgcolor, rgb(233, 86, 37))) !important;
}

.wc-b2b-tier-table tr.active .wc-b2b-subtext-set {
    color: #64748b !important;
}

.wc-b2b-tier-table tr.wc-b2b-tier-hidden {
    display: none !important;
}

.wc-b2b-tier-table-wrapper.is-expanded .wc-b2b-tier-table tr.wc-b2b-tier-hidden {
    display: table-row !important;
}

/* 6. Weight Formula Subtext */
.wc-b2b-weight-formula-subtext {
    font-size: 9.5px;
    color: #64748b;
    font-weight: 500;
    text-align: center;
    padding: 3px 6px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    line-height: 1.25;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.wc-b2b-weight-formula-subtext .wc-b2b-formula-sep {
    color: #94a3b8;
    font-size: 9px;
}

.wc-b2b-weight-formula-subtext .wc-b2b-approx-unit-text {
    color: #1e293b;
    font-weight: 600;
}

/* 7. Expandable Tiers Toggle */
.wc-b2b-expand-tiers-btn {
    background: #fef3c7;
    border-top: 1px solid #fde68a;
    color: #92400e;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    padding: 3.5px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.wc-b2b-expand-tiers-btn:hover {
    background: #fde68a;
}

/* 8. GST Tax Badge Pills (Suppressed) */
.wc-b2b-tax-pill-container {
    display: none !important;
}

/* 9. Meta Counter: In-Cart Indicator (Only visible when item is in cart) */
.wc-b2b-counter-meta {
    display: none;
    align-items: center;
    font-size: 11px;
    padding: 1px 2px;
    margin-top: 2px;
    margin-bottom: 4px;
}

.wc-b2b-counter-meta.is-active {
    display: flex !important;
}

.wc-b2b-meta-cart {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    background: #fef08a !important;
    color: #713f12 !important;
    border: 1px solid #fde047 !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    padding: 1.5px 7px !important;
    border-radius: 4px !important;
    line-height: 1.3 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.wc-b2b-meta-cart .wc-b2b-meta-cart-icon {
    font-size: 11px !important;
    line-height: 1 !important;
}

.wc-b2b-meta-qty {
    display: none !important;
}

/* 10. Unified Bottom Action Bar (Stepper on Left + Add to Cart on Right in One Bar) */
.wc-b2b-action-bar {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    height: var(--btn-accented-height, 38px) !important;
    min-height: var(--btn-accented-height, 38px) !important;
    max-height: var(--btn-accented-height, 38px) !important;
    background: var(--btn-accented-bgcolor, rgb(233, 86, 37)) !important;
    border-radius: var(--btn-accented-brd-radius, var(--wd-form-brd-radius, 5px)) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin-top: 4px !important;
    margin-bottom: 0 !important;
    transition: background-color 0.25s ease !important;
}

/* Stepper Component on Left */
.wc-b2b-stepper-wrap {
    display: inline-flex !important;
    align-items: center !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.1) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-top-left-radius: var(--btn-accented-brd-radius, var(--wd-form-brd-radius, 5px)) !important;
    border-bottom-left-radius: var(--btn-accented-brd-radius, var(--wd-form-brd-radius, 5px)) !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

.wc-b2b-step-btn {
    all: unset !important;
    box-sizing: border-box !important;
    width: 23px !important;
    min-width: 21px !important;
    max-width: 26px !important;
    height: 100% !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: background 0.15s ease !important;
    line-height: 1 !important;
    user-select: none !important;
    flex-shrink: 0 !important;
}

.wc-b2b-step-btn:hover {
    background: rgba(0, 0, 0, 0.18) !important;
}

.wc-b2b-step-btn:active {
    background: rgba(0, 0, 0, 0.28) !important;
}

.wc-b2b-qty-val-wrap {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1px !important;
    padding: 0 3px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    max-width: 52px !important;
}

.wc-b2b-qty-input {
    all: unset !important;
    box-sizing: border-box !important;
    width: 14px !important;
    min-width: 12px !important;
    max-width: 28px !important;
    text-align: center !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    display: inline-block !important;
}

.wc-b2b-unit-suffix {
    font-size: 9px !important;
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    padding-left: 1px !important;
    user-select: none !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

/* 11. Dynamic Smart Button (Right Side of Unified Bar) */
.wc-b2b-smart-btn {
    all: unset !important;
    box-sizing: border-box !important;
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 100% !important;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: clamp(10px, 2.2vw, 11.5px) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: -0.2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 4px !important;
    margin: 0 !important;
    border-top-right-radius: var(--btn-accented-brd-radius, var(--wd-form-brd-radius, 5px)) !important;
    border-bottom-right-radius: var(--btn-accented-brd-radius, var(--wd-form-brd-radius, 5px)) !important;
    box-shadow: none !important;
    transition: background 0.2s ease !important;
    white-space: nowrap !important;
    text-align: center !important;
    text-decoration: none !important;
    outline: none !important;
    user-select: none !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.wc-b2b-smart-btn:hover {
    background: rgba(0, 0, 0, 0.12) !important;
}

/* State A: Add to Cart (WoodMart Accent Terracotta Orange) */
.wc-b2b-action-bar {
    background: var(--btn-accented-bgcolor, rgb(233, 86, 37)) !important;
}

/* State B: In Cart / Added */
.wc-b2b-action-bar.is-in-cart {
    background: #0f172a !important;
}

/* State C: Quantity Changed -> Amber Update */
.wc-b2b-action-bar.is-update {
    background: #f59e0b !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35) !important;
}

.wc-b2b-smart-btn:disabled,
.wc-b2b-smart-btn.loading {
    opacity: 0.7 !important;
    cursor: wait !important;
}

/* WoodMart Wrapper Integration when Action Bar is Placed in Theme Position */
.wd-add-btn-wrapp:has(.wc-b2b-action-bar),
.wd-add-btn-wrapp:has(.wc-b2b-card-container),
.wd-add-btn-wrapp.wc-b2b-theme-btn-applied,
.wd-add-btn:has(.wc-b2b-action-bar),
.wd-add-btn:has(.wc-b2b-card-container),
.wd-add-btn.wc-b2b-theme-btn-applied {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 38px !important;
    overflow: visible !important;
    --quantity-space: 0px !important;
    padding: 0 !important;
    margin-top: 4px !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.wd-add-btn-wrapp .wc-b2b-action-bar,
.wd-add-btn .wc-b2b-action-bar {
    display: flex !important;
    width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.wd-add-btn-wrapp .wc-b2b-card-container,
.wd-add-btn .wc-b2b-card-container {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Hide theme's native add to cart anchor buttons and quantities while keeping our action bar & container visible */
.wd-add-btn-wrapp:has(.wc-b2b-action-bar) > a.button,
.wd-add-btn-wrapp:has(.wc-b2b-action-bar) > .quantity,
.wd-add-btn-wrapp:has(.wc-b2b-card-container) > a.button,
.wd-add-btn-wrapp:has(.wc-b2b-card-container) > .quantity,
.wd-add-btn:has(.wc-b2b-action-bar) > a.button,
.wd-add-btn:has(.wc-b2b-action-bar) > .quantity,
.wd-add-btn:has(.wc-b2b-card-container) > a.button,
.wd-add-btn:has(.wc-b2b-card-container) > .quantity,
.wc-b2b-active-loop-card .wd-add-btn > a.button,
.wc-b2b-active-loop-card .wd-add-btn > .quantity,
.wc-b2b-theme-btn-applied > a.button,
.wc-b2b-theme-btn-applied > .quantity {
    display: none !important;
}

/* Hide empty or redundant .wd-add-btn only if our action bar or container has been moved to be a direct child of .wd-add-btn-wrapp */
.wd-add-btn-wrapp > .wc-b2b-action-bar ~ .wd-add-btn,
.wd-add-btn-wrapp > .wc-b2b-card-container ~ .wd-add-btn {
    display: none !important;
}

/* 12. Thorough Suppression of Duplicate Theme Elements (Variations, Swatches, Old Buttons) */
/* A. Hide WoodMart's duplicate loop variations form ONLY on products with B2B cards */
.wc-b2b-card-container ~ form.variations_form,
.product:has(.wc-b2b-card-container) form.variations_form,
.wd-product-wrapper:has(.wc-b2b-card-container) form.variations_form,
.wc-b2b-active-loop-card form.variations_form,
.wc-b2b-active-loop-card .variations_form {
    display: none !important;
}

/* B. Display Regular & Active Price cleanly directly after product title in loop cards & cards */
.product:has(.wc-b2b-card-container) .wd-loop-prod-price,
.wd-product-wrapper:has(.wc-b2b-card-container) .wd-loop-prod-price,
.wc-b2b-active-loop-card .wd-loop-prod-price,
.wc-b2b-active-loop-card .wrap-price,
.product:has(.wc-b2b-card-container) .wrap-price,
.product:has(.wc-b2b-tier-table tr.wc-b2b-tier-row) .wd-loop-prod-price,
.wd-product-wrapper:has(.wc-b2b-tier-table tr.wc-b2b-tier-row) .wd-loop-prod-price,
.wc-b2b-active-loop-card:has(.wc-b2b-tier-table tr.wc-b2b-tier-row) .wd-loop-prod-price {
    display: block !important;
    margin-top: 4px !important;
    margin-bottom: 6px !important;
    line-height: 1.3 !important;
}

.product:has(.wc-b2b-card-container) .wd-loop-prod-price .price,
.wd-product-wrapper:has(.wc-b2b-card-container) .wd-loop-prod-price .price,
.wc-b2b-active-loop-card .wd-loop-prod-price .price,
.wc-b2b-active-loop-card .wrap-price .price,
.wc-b2b-card-price-wrapper .price {
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 6px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--wd-primary-color, rgb(233, 86, 37)) !important;
}

.product:has(.wc-b2b-card-container) .wd-loop-prod-price .price del,
.wd-product-wrapper:has(.wc-b2b-card-container) .wd-loop-prod-price .price del,
.wc-b2b-active-loop-card .wd-loop-prod-price .price del,
.wc-b2b-active-loop-card .wrap-price .price del,
.wc-b2b-card-price-wrapper .price del {
    display: inline-block !important;
    color: #94a3b8 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: line-through !important;
}

.product:has(.wc-b2b-card-container) .wd-loop-prod-price .price ins,
.wd-product-wrapper:has(.wc-b2b-card-container) .wd-loop-prod-price .price ins,
.wc-b2b-active-loop-card .wd-loop-prod-price .price ins,
.wc-b2b-active-loop-card .wrap-price .price ins,
.wc-b2b-card-price-wrapper .price ins {
    display: inline-block !important;
    text-decoration: none !important;
    color: var(--wd-primary-color, rgb(233, 86, 37)) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

.wc-b2b-card-price-wrapper {
    margin-top: 4px;
    margin-bottom: 6px;
    line-height: 1.3;
}

/* C. Hide WoodMart theme buttons, select options, and steppers */
.product:has(.wc-b2b-card-container) .wd-add-btn:not(:has(.wc-b2b-smart-btn)),
.product:has(.wc-b2b-card-container) .wd-add-btn > a.button,
.product:has(.wc-b2b-card-container) .wd-add-btn > .quantity,
.product:has(.wc-b2b-card-container) .wd-add-btn-wrapp > .quantity,
.product:has(.wc-b2b-card-container) .wd-add-btn-wrapp > a.button,
.product:has(.wc-b2b-card-container) a.add_to_cart_button:not(.wc-b2b-smart-btn),
.product:has(.wc-b2b-card-container) a.product_type_variable:not(.wc-b2b-smart-btn),
.product:has(.wc-b2b-card-container) .button.product_type_variable:not(.wc-b2b-smart-btn),
.product:has(.wc-b2b-card-container) .button.product_type_simple:not(.wc-b2b-smart-btn),
.product:has(.wc-b2b-card-container) .wd-bottom-actions,
.wd-product-wrapper:has(.wc-b2b-card-container) .wd-add-btn > a.button,
.wd-product-wrapper:has(.wc-b2b-card-container) .wd-add-btn > .quantity,
.wd-product-wrapper:has(.wc-b2b-card-container) a.add_to_cart_button:not(.wc-b2b-smart-btn),
.wd-product-wrapper:has(.wc-b2b-card-container) a.product_type_variable:not(.wc-b2b-smart-btn),
.wd-product-wrapper:has(.wc-b2b-card-container) .button.product_type_variable:not(.wc-b2b-smart-btn),
.wd-product-wrapper:has(.wc-b2b-card-container) .button.product_type_simple:not(.wc-b2b-smart-btn),
.wc-b2b-active-loop-card .wd-add-btn > a.button,
.wc-b2b-active-loop-card .wd-add-btn > .quantity,
.wc-b2b-active-loop-card .wd-add-btn:not(:has(.wc-b2b-smart-btn)),
.wc-b2b-active-loop-card a.add_to_cart_button:not(.wc-b2b-smart-btn),
.wc-b2b-active-loop-card a.product_type_variable:not(.wc-b2b-smart-btn),
.wc-b2b-active-loop-card .button.product_type_variable:not(.wc-b2b-smart-btn),
.wc-b2b-active-loop-card .button.product_type_simple:not(.wc-b2b-smart-btn),
.wc-b2b-active-loop-card .quantity:not(.wc-b2b-qty-display-wrap),
.wc-b2b-active-loop-card .add-to-cart-loop,
.elementor-loop-item:has(.wc-b2b-card-container) .elementor-button {
    display: none !important;
}

/* D. Hide theme swatches grids, loop variations, and forms */
.product:has(.wc-b2b-card-container) .wd-loop-prod-variations,
.product:has(.wc-b2b-card-container) .wd-swatches-grid,
.product:has(.wc-b2b-card-container) .wd-swatches-product,
.product:has(.wc-b2b-card-container) .swatches-select,
.product:has(.wc-b2b-card-container) .swatches-on-grid,
.product:has(.wc-b2b-card-container) .woodmart-swatches-grid,
.product:has(.wc-b2b-card-container) form.variations_form.wd-quick-shop-2,
.wd-product:has(.wc-b2b-card-container) .wd-loop-prod-variations,
.wd-product:has(.wc-b2b-card-container) .wd-swatches-grid,
.wd-product:has(.wc-b2b-card-container) .wd-swatches-product,
.wd-product-wrapper:has(.wc-b2b-card-container) .wd-loop-prod-variations,
.wd-product-wrapper:has(.wc-b2b-card-container) .wd-swatches-grid,
.wd-product-wrapper:has(.wc-b2b-card-container) .wd-swatches-product,
.wc-b2b-active-loop-card .wd-loop-prod-variations,
.wc-b2b-active-loop-card .wd-swatches-grid,
.wc-b2b-active-loop-card .wd-swatches-product,
.wc-b2b-active-loop-card .swatches-select,
.wc-b2b-active-loop-card .swatches-on-grid,
.wc-b2b-active-loop-card .woodmart-swatches-grid,
.wc-b2b-active-loop-card form.variations_form.wd-quick-shop-2 {
    display: none !important;
}

/* E. Single product page: Hide duplicate theme Add to Cart button & native quantity */
.product:has(.wc-b2b-card-container) form.cart .single_add_to_cart_button,
.product:has(.wc-b2b-card-container) form.cart .quantity:not(.wc-b2b-stepper-wrap),
.product:has(.wc-b2b-card-container) .single_add_to_cart_button:not(.wc-b2b-smart-btn),
.entry-summary:has(.wc-b2b-card-container) form.cart .single_add_to_cart_button,
.entry-summary:has(.wc-b2b-card-container) form.cart .quantity:not(.wc-b2b-stepper-wrap),
.entry-summary:has(.wc-b2b-card-container) .single_add_to_cart_button:not(.wc-b2b-smart-btn),
.summary:has(.wc-b2b-card-container) form.cart .single_add_to_cart_button,
.summary:has(.wc-b2b-card-container) form.cart .quantity:not(.wc-b2b-stepper-wrap),
.summary:has(.wc-b2b-card-container) .single_add_to_cart_button:not(.wc-b2b-smart-btn),
.product-image-summary:has(.wc-b2b-card-container) form.cart .single_add_to_cart_button,
.product-image-summary:has(.wc-b2b-card-container) form.cart .quantity:not(.wc-b2b-stepper-wrap),
.product-image-summary:has(.wc-b2b-card-container) .single_add_to_cart_button:not(.wc-b2b-smart-btn),
.single-product.wc-b2b-single-has-pricing form.cart .single_add_to_cart_button,
.single-product.wc-b2b-single-has-pricing form.cart .quantity:not(.wc-b2b-stepper-wrap),
.single-product.wc-b2b-single-has-pricing .single_add_to_cart_button:not(.wc-b2b-smart-btn) {
    display: none !important;
}

/* F. Deduplication Safety: Ensure only ONE B2B container renders per product card */
.product .wc-b2b-card-container ~ .wc-b2b-card-container,
.wd-product .wc-b2b-card-container ~ .wc-b2b-card-container,
.product-grid-item .wc-b2b-card-container ~ .wc-b2b-card-container,
.wd-add-btn-wrapp .wc-b2b-card-container ~ .wc-b2b-card-container,
.product .wc-b2b-card-container + .wc-b2b-card-container,
.wd-product .wc-b2b-card-container + .wc-b2b-card-container,
.product-grid-item .wc-b2b-card-container + .wc-b2b-card-container,
.wd-add-btn-wrapp .wc-b2b-card-container + .wc-b2b-card-container {
    display: none !important;
}

/* =========================================================================
   Single Product Page Rich Responsive Layout (Magic Space Utilization)
   ========================================================================= */

/* Hide duplicate static table.variations from WoodMart when our custom swatches are displayed */
.single-product .summary form.cart table.variations,
.single-product .entry-summary form.cart table.variations {
    display: none !important;
}

/* Card Container on Single Product Page */
.wc-b2b-card-container.wc-b2b-context-single {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 12px 0 18px 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Top Meta Bar: sleek wholesale pill badges */
.wc-b2b-context-single .wc-b2b-top-meta-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-radius: 8px;
    font-size: 11.5px;
}

.wc-b2b-context-single .wc-b2b-top-meta-bar .wc-b2b-meta-sku,
.wc-b2b-context-single .wc-b2b-top-meta-bar .wc-b2b-meta-moq,
.wc-b2b-context-single .wc-b2b-top-meta-bar .wc-b2b-meta-step {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wc-b2b-context-single .wc-b2b-top-meta-bar .wc-b2b-meta-bullet {
    color: #f59e0b;
    opacity: 0.6;
    font-size: 10px;
}

/* Variation Swatches on Single Product Page */
.wc-b2b-context-single .wc-b2b-variation-selectors {
    margin-top: 14px;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wc-b2b-context-single .wc-b2b-attr-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
    width: 100% !important;
}

.wc-b2b-context-single .wc-b2b-attr-label-header {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    margin-bottom: 0 !important;
}

.wc-b2b-context-single .wc-b2b-attr-title {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    min-width: 0 !important;
}

.wc-b2b-context-single .wc-b2b-attr-current-val {
    display: inline-block !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    background: #e2e8f0;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    line-height: 1.2 !important;
}

.wc-b2b-context-single .wc-b2b-attr-swatches {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: center !important;
    width: 100% !important;
}

/* Single Product Swatch Buttons */
.wc-b2b-context-single .wc-b2b-swatch-btn,
.wc-b2b-context-single span.wc-b2b-swatch-btn,
.wc-b2b-context-single button.wc-b2b-swatch-btn {
    all: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 0 14px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    border-radius: 8px !important;
    border: 1.5px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #334155 !important;
    cursor: pointer !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
    white-space: nowrap !important;
    text-align: center !important;
    user-select: none !important;
}

.wc-b2b-context-single .wc-b2b-swatch-btn:hover,
.wc-b2b-context-single span.wc-b2b-swatch-btn:hover,
.wc-b2b-context-single button.wc-b2b-swatch-btn:hover {
    border-color: #94a3b8 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06) !important;
}

/* Active / Selected Swatch State */
.wc-b2b-context-single .wc-b2b-swatch-btn.active,
.wc-b2b-context-single span.wc-b2b-swatch-btn.active,
.wc-b2b-context-single button.wc-b2b-swatch-btn.active {
    background: #fff7ed !important;
    border-color: var(--wd-primary-color, rgb(233, 86, 37)) !important;
    border-width: 2px !important;
    color: #c2410c !important;
    font-weight: 700 !important;
    box-shadow: 0 0 0 3px rgba(233, 86, 37, 0.16), 0 2px 4px rgba(233, 86, 37, 0.08) !important;
    transform: translateY(0) !important;
}

/* Color Swatches on Single Product Page */
.wc-b2b-context-single .wc-b2b-swatch-btn.wc-b2b-swatch-color,
.wc-b2b-context-single span.wc-b2b-swatch-btn.wc-b2b-swatch-color {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 3px !important;
    border-radius: 50% !important;
    border: 2px solid #cbd5e1 !important;
}

.wc-b2b-context-single .wc-b2b-swatch-btn.wc-b2b-swatch-color .wc-b2b-swatch-color-inner {
    border-radius: 50% !important;
}

.wc-b2b-context-single .wc-b2b-swatch-btn.wc-b2b-swatch-color.active,
.wc-b2b-context-single span.wc-b2b-swatch-btn.wc-b2b-swatch-color.active {
    border-color: var(--wd-primary-color, rgb(233, 86, 37)) !important;
    box-shadow: 0 0 0 3px rgba(233, 86, 37, 0.25) !important;
}

/* Single Product Tier Table: Full 4-Column Responsive Layout */
.wc-b2b-context-single .wc-b2b-tier-table-wrapper {
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.wc-b2b-context-single .wc-b2b-tier-table {
    width: 100%;
}

.wc-b2b-context-single .wc-b2b-tier-table thead {
    display: table-header-group !important;
}

.wc-b2b-context-single .wc-b2b-tier-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 8px 12px;
    border-bottom: 1.5px solid #e2e8f0;
}

.wc-b2b-context-single .wc-b2b-tier-table td {
    padding: 9px 12px;
    font-size: 12.5px;
    vertical-align: middle;
}

.wc-b2b-context-single .wc-b2b-col-qty {
    width: 28%;
    text-align: left;
}

.wc-b2b-context-single .wc-b2b-col-rate {
    width: 24%;
    text-align: right;
}

.wc-b2b-context-single .wc-b2b-col-piece {
    display: table-cell !important;
    width: 25%;
    text-align: right;
    font-weight: 600;
    color: #334155;
    font-size: 12px;
    white-space: nowrap;
}

.wc-b2b-context-single .wc-b2b-col-savings {
    display: table-cell !important;
    width: 23%;
    text-align: right;
    white-space: nowrap;
}

.wc-b2b-save-badge {
    display: inline-block;
    padding: 2.5px 7px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    background: #dcfce7;
    color: #15803d;
    letter-spacing: 0.2px;
}

.wc-b2b-save-badge.is-base {
    background: #f1f5f9;
    color: #64748b;
    font-weight: 600;
}

/* Weight Formula Subtext Banner on Single Product Page */
.wc-b2b-context-single .wc-b2b-weight-formula-subtext {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 8px 14px;
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Single Product Action Bar: Standalone Quantity Selector & Prominent Add to Cart Button */
.wc-b2b-context-single .wc-b2b-action-bar,
.wc-b2b-context-single .wc-b2b-action-bar.is-in-cart,
.wc-b2b-context-single .wc-b2b-action-bar.is-update {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-top: 16px !important;
    margin-bottom: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.wc-b2b-context-single .wc-b2b-stepper-wrap {
    display: inline-flex !important;
    align-items: center !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 0 4px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.wc-b2b-context-single .wc-b2b-stepper-wrap:focus-within {
    border-color: var(--btn-accented-bgcolor, #e95625) !important;
    box-shadow: 0 0 0 3px rgba(233, 86, 37, 0.15) !important;
}

.wc-b2b-context-single .wc-b2b-step-btn {
    all: unset !important;
    box-sizing: border-box !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 38px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    background: transparent !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    user-select: none !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.wc-b2b-context-single .wc-b2b-step-btn:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.wc-b2b-context-single .wc-b2b-step-btn:active {
    background: #e2e8f0 !important;
}

.wc-b2b-context-single .wc-b2b-qty-val-wrap {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    padding: 0 6px !important;
    max-width: 90px !important;
    flex-shrink: 0 !important;
}

.wc-b2b-context-single .wc-b2b-qty-input {
    all: unset !important;
    box-sizing: border-box !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    width: 28px !important;
    min-width: 22px !important;
    max-width: 48px !important;
    text-align: center !important;
    color: #0f172a !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wc-b2b-context-single .wc-b2b-unit-suffix {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    user-select: none !important;
    line-height: 1 !important;
}

.wc-b2b-context-single .wc-b2b-smart-btn {
    all: unset !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 auto !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    background: var(--btn-accented-bgcolor, rgb(233, 86, 37)) !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(233, 86, 37, 0.28) !important;
    cursor: pointer !important;
    padding: 0 20px !important;
    margin: 0 !important;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease !important;
    text-align: center !important;
    white-space: nowrap !important;
    user-select: none !important;
}

.wc-b2b-context-single .wc-b2b-smart-btn:hover {
    background: #d84513 !important;
    box-shadow: 0 4px 12px rgba(233, 86, 37, 0.38) !important;
    transform: translateY(-1px);
}

.wc-b2b-context-single .wc-b2b-smart-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(233, 86, 37, 0.3) !important;
}

.wc-b2b-context-single .wc-b2b-action-bar.is-in-cart .wc-b2b-smart-btn,
.wc-b2b-context-single .wc-b2b-smart-btn.wc-b2b-btn-in-cart {
    background: #0f172a !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25) !important;
}

.wc-b2b-context-single .wc-b2b-action-bar.is-in-cart .wc-b2b-smart-btn:hover,
.wc-b2b-context-single .wc-b2b-smart-btn.wc-b2b-btn-in-cart:hover {
    background: #1e293b !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35) !important;
}

.wc-b2b-context-single .wc-b2b-action-bar.is-update .wc-b2b-smart-btn,
.wc-b2b-context-single .wc-b2b-smart-btn.wc-b2b-btn-update {
    background: #f59e0b !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35) !important;
}

.wc-b2b-context-single .wc-b2b-action-bar.is-update .wc-b2b-smart-btn:hover,
.wc-b2b-context-single .wc-b2b-smart-btn.wc-b2b-btn-update:hover {
    background: #d97706 !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45) !important;
}

/* Responsive adjustment for small mobile screens (< 480px) */
@media (max-width: 480px) {
    .wc-b2b-context-single .wc-b2b-variation-selectors {
        padding: 10px 12px;
        margin-top: 10px;
        margin-bottom: 12px;
        gap: 10px;
    }
    .wc-b2b-context-single .wc-b2b-swatch-btn,
    .wc-b2b-context-single span.wc-b2b-swatch-btn,
    .wc-b2b-context-single button.wc-b2b-swatch-btn {
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        padding: 0 10px !important;
        font-size: 13px !important;
    }
    .wc-b2b-context-single .wc-b2b-col-piece {
        display: none !important;
    }
    .wc-b2b-context-single .wc-b2b-col-qty {
        width: 38%;
    }
    .wc-b2b-context-single .wc-b2b-col-rate {
        width: 32%;
    }
    .wc-b2b-context-single .wc-b2b-col-savings {
        width: 30%;
    }
    .wc-b2b-context-single .wc-b2b-tier-table td {
        padding: 7px 8px;
    }
    .wc-b2b-context-single .wc-b2b-action-bar {
        gap: 8px !important;
    }
    .wc-b2b-context-single .wc-b2b-stepper-wrap {
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        padding: 0 2px !important;
    }
    .wc-b2b-context-single .wc-b2b-step-btn {
        width: 30px !important;
        min-width: 30px !important;
        max-width: 30px !important;
        height: 34px !important;
        font-size: 16px !important;
    }
    .wc-b2b-context-single .wc-b2b-qty-val-wrap {
        padding: 0 2px !important;
        max-width: 75px !important;
    }
    .wc-b2b-context-single .wc-b2b-qty-input {
        font-size: 13.5px !important;
        width: 24px !important;
    }
    .wc-b2b-context-single .wc-b2b-smart-btn {
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        font-size: 12px !important;
        padding: 0 10px !important;
    }
}

/* -------------------------------------------------------------
 * 18. Product Image B2B Tier Discount Badges (WoodMart & Standard WC)
 * ------------------------------------------------------------- */
.wd-loop-prod-thumb,
.thumbnail-container,
.product-element-top,
.wd-product-thumb {
    position: relative !important;
}

.wc-b2b-tier-labels {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    z-index: 5 !important;
    pointer-events: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
}

.wc-b2b-tier-sale-badge,
.onsale.wc-b2b-tier-sale-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 24px !important;
    padding: 2px 7px !important;
    background-color: var(--wd-primary-color, rgb(233, 86, 37)) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    border-radius: 9999px !important;
    text-transform: uppercase !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12) !important;
    letter-spacing: -0.2px !important;
}

/* -------------------------------------------------------------
 * 19. Equal Loop Height & Multi-Theme Product Grid Integration
 * ------------------------------------------------------------- */

/* Universal Equal Height Flexbox Grid Container */
ul.products,
ul.products.grid,
.nasa-content-page-products ul.products,
.archive.woocommerce ul.products,
.woocommerce-page ul.products,
.wd-products-element .products,
.products.elements-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
}

/* Slick slider track and slide columns on Homepage & Carousels */
.nasa-slick-slider .slick-track,
.ns-items-gap .slick-track,
.products.nasa-slick-slider .slick-track {
    display: flex !important;
    align-items: stretch !important;
}

.nasa-slick-slider .slick-slide,
.ns-items-gap .slick-slide,
.nasa-wrap-column {
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

/* Ensure loop grid columns stretch equally in every row */
ul.products > li.product,
ul.products > li.product-warp-item,
.products.grid > li.product-warp-item,
.nasa-content-page-products ul.products > li.product-warp-item,
.wd-products-element .products > .product-grid-item,
.products.elements-grid > .product-grid-item {
    display: flex !important;
    flex-direction: column !important;
    float: none !important;
    height: auto !important;
    box-sizing: border-box !important;
    margin-bottom: 25px !important;
}

/* Elessi Double-Row Carousel on Homepage: Each column contains two stacked product cards */
.nasa-slide-double-row .nasa-wrap-column {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    height: 100% !important;
}

.nasa-slide-double-row .nasa-wrap-column > .product-item.grid,
.nasa-slide-double-row .nasa-wrap-column > .product {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 25px !important;
}

.nasa-slide-double-row .nasa-wrap-column > .product-item.grid:last-child,
.nasa-slide-double-row .nasa-wrap-column > .product:last-child {
    margin-bottom: 0 !important;
}

/* Respect responsive column widths while stretching height */
@media (min-width: 1024px) {
    ul.products.large-block-grid-4 > li.product-warp-item,
    ul.products.columns-4 > li.product {
        flex: 0 0 25% !important;
        max-width: 25% !important;
        width: 25% !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    ul.products.medium-block-grid-3 > li.product-warp-item,
    ul.products.columns-3 > li.product {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
        width: 33.333333% !important;
    }
}

@media (max-width: 767px) {
    ul.products.small-block-grid-2 > li.product-warp-item,
    ul.products.columns-2 > li.product {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
}

/* Inner product card stretching to fill 100% of the column height */
.product-item.grid,
.product.product-item,
li.product-warp-item > .product,
.product-grid-item > .product-wrapper,
.nasa-wrap-column > .product-item.grid,
.nasa-wrap-column > .product {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    height: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Top media wrapper stays fixed at top */
.product-item.grid .product-img-wrap,
.product.product-item .product-img-wrap,
.product-grid-item .product-element-top,
.nasa-wrap-column .product-img-wrap {
    flex-shrink: 0 !important;
    width: 100% !important;
}

/* Content wrapper expands to fill remaining space */
.product-item.grid .product-info-wrap,
.product.product-item .product-info-wrap,
.product-grid-item .product-element-bottom,
.nasa-wrap-column .product-info-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    height: 100% !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

/* Standardize category container */
.product-item.grid .product-info-wrap .nasa-list-category,
.product.product-item .product-info-wrap .nasa-list-category {
    min-height: 1.4em !important;
    margin-bottom: 4px !important;
}

/* Standardize product title height so 1-line and 2-line titles don't stagger baselines */
.product-item.grid .product-info-wrap .name,
.product.product-item .product-info-wrap .name,
.product-item.grid .product-info-wrap .woocommerce-loop-product__title,
.product.product-item .product-info-wrap .woocommerce-loop-product__title,
.product-grid-item .wd-entities-title {
    min-height: 2.8em !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin-bottom: 6px !important;
}

/* Standardize price container height and alignment */
.product-item.grid .product-info-wrap .price,
.product.product-item .product-info-wrap .price,
.product-grid-item .price {
    min-height: 1.6em !important;
    display: flex !important;
    align-items: center !important;
    margin-bottom: 6px !important;
}

/* Hide descriptions in grid view for clean, uniform card alignment */
.product-item.grid .product-des-wrap,
.product-item.grid .product-des,
.product-item.grid .info_main.product-des {
    display: none !important;
}

/* Anchor B2B Card Container & Action Bar to bottom of the card */
.product-item.grid .product-info-wrap .wc-b2b-card-container,
.product.product-item .product-info-wrap .wc-b2b-card-container,
.product-item.grid .wc-b2b-card-container,
.product.product-item .wc-b2b-card-container,
.product-grid-item .wc-b2b-card-container,
.nasa-wrap-column .wc-b2b-card-container,
.wc-b2b-context-loop {
    margin-top: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    width: 100% !important;
    clear: both !important;
    position: relative !important;
}

.wc-b2b-card-container .wc-b2b-action-bar,
.product-item.grid .wc-b2b-action-bar,
.product.product-item .wc-b2b-action-bar,
.nasa-wrap-column .wc-b2b-action-bar {
    margin-top: auto !important;
    width: 100% !important;
}

/* Hide stray B2B cards in floating hover toolbar */
.nasa-group-btns .wc-b2b-card-container,
.product-img-wrap > .wc-b2b-card-container {
    display: none !important;
}

/* Ensure Elessi discount badges match theme standards */
.nasa-badges-wrap .wc-b2b-tier-sale-badge {
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 4px !important;
}


