/**
 * 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 {
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-flex;
    gap: 2px;
}

.wc-b2b-meta-sku .sku-label {
    color: #64748b;
    font-weight: 600;
}

.wc-b2b-meta-sku .sku-val {
    color: #1e293b;
    font-weight: 700;
}

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

.wc-b2b-meta-moq {
    display: inline-flex;
    gap: 2px;
}

.wc-b2b-meta-moq .moq-label {
    color: #b45309;
    font-weight: 700;
}

.wc-b2b-meta-moq .moq-val {
    color: #1e293b;
    font-weight: 700;
}

.wc-b2b-meta-step {
    color: #475569;
    font-weight: 500;
}

/* 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-attr-swatches {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    align-items: center !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;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    padding: 0 6px !important;
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: 0.2px !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 3px !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;
}

.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%;
    border-collapse: collapse;
    font-size: 11px;
    margin: 0;
}

.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;
}

.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 6px;
    vertical-align: middle;
}

.wc-b2b-col-qty {
    width: 52%;
    color: #475569;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
}

.wc-b2b-col-rate {
    width: 48%;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
    white-space: nowrap;
}

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

.wc-b2b-rate-val {
    display: block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.05;
}

.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;
}

/* Clean Theme Active Row Highlight: Bold Rate with Theme 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-rate-val {
    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-hidden {
    display: none !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 Price cleanly right above the bottom action bar for standard products, but hide duplicate loop price if wholesale tier table exists */
.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,
.product:has(.wc-b2b-tier-table-wrapper:not(:empty)) .wd-loop-prod-price,
.wd-product-wrapper:has(.wc-b2b-tier-table-wrapper:not(:empty)) .wd-loop-prod-price,
.wc-b2b-active-loop-card:has(.wc-b2b-tier-table-wrapper:not(:empty)) .wd-loop-prod-price {
    display: none !important;
}

.product:has(.wc-b2b-card-container:not(:has(.wc-b2b-tier-table tr.wc-b2b-tier-row))) .wd-loop-prod-price,
.wd-product-wrapper:has(.wc-b2b-card-container:not(:has(.wc-b2b-tier-table tr.wc-b2b-tier-row))) .wd-loop-prod-price,
.wc-b2b-active-loop-card:not(:has(.wc-b2b-tier-table tr.wc-b2b-tier-row)) .wd-loop-prod-price {
    display: block !important;
    margin-top: 6px !important;
    margin-bottom: 4px !important;
    line-height: 1.2 !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 {
    display: inline-block !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--wd-primary-color, rgb(233, 86, 37)) !important;
}

/* 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;
}

