/* JustB2B Billing Styles - Modern Design */

.justb2b-billing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.justb2b-field-item {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #f3f4f6;
}

.justb2b-field-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.justb2b-field-value {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .justb2b-billing-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 16px 0;
    }

    .justb2b-field-item {
        padding: 12px;
    }
}

.justb2b-price-info-compact {
    display: flex;
    flex-direction: column;
}

.justb2b-price-line {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* B2B Price Info Box - Product Page */
.justb2b-price-info {
    margin: 15px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.justb2b-price-info .b2b-price-row strong {
    color: #555;
}

/* B2B Price Display - Cart/Checkout */
.justb2b-gross-price {
    font-size: 0.85em;
    opacity: 0.8;
}

/* B2B Price Display - Mini Cart */
.justb2b-minicart-gross {
    padding-left: 2em;
    font-size: 0.85em;
    opacity: 0.8;
}

.justb2b-notice {
    margin: 10px 0 40px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
}

/* B2B Notice Styles */
.justb2b-notice.pending {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.justb2b-notice.pending strong {
    font-weight: 600;
}

/* Custom WCPT Styles */

.wcpt-filter .wcpt-options {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

.wcpt-navigation.wcpt-header .wcpt-options-row .wcpt-option {
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.wcpt-navigation.wcpt-header .wcpt-options-row .wcpt-option label {
    padding: 0 !important;
}

.wcpt-show-all-option.wcpt-option label span,
.wcpt-navigation.wcpt-header .wcpt-options-row .wcpt-option label>span {
    padding: 4px 16px !important;
    background-color: #ffffff !important;
    border-radius: 25px !important;
    border: 1px solid #9E8867 !important;
    color: #6a5a44 !important;
} 

.wcpt-show-all-option.wcpt-option.wcpt-active label span,
.wcpt-navigation.wcpt-header .wcpt-options-row .wcpt-option .wcpt-active>span {
    background-color: #9E8867 !important;
    color: #ffffff !important;
}

body:not(.wcpt-nav-modal-on) .wcpt-navigation .wcpt-filter input[type="checkbox"],
body:not(.wcpt-nav-modal-on) .wcpt-navigation .wcpt-filter input[type="radio"] {
    display: none !important;
}

body .wcpt-table a.wcpt-button[data-wcpt-link-code*="cart"] {
    background: #383838 !important;
    border-radius: 0 !important;
    padding: 10px 16px !important;
}

/* Custom UWP Styles */

.woocommerce-MyAccount-content .uwp-account-form .mb-3 {
    margin-bottom: 26px;
}

/* .uwp-footer-links {
    display: none !important;
} */

.bsui .card {
    border-radius: 0 !important;
}

.bsui .card-title {
    font-size: 1.15rem !important;
    color: #383838 !important;
    text-transform: uppercase !important;
}

.bsui .form-control {
    border-radius: 0 !important;
    border-color: #e4e4e4 !important;
}

.bsui .input-group-text {
    border-radius: 0 !important;
    border-color: #e4e4e4 !important;
    color: #383838 !important;
}

.bsui .form-check {
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.bsui .form-check .form-check-input {
    margin: 0 !important;
    border-radius: 0 !important;
    border: 2px solid #e4e4e4 !important;
}

.bsui .btn-primary {
    background: #383838 !important;
    border-color: #383838 !important;
    border-radius: 0 !important;
}

.bsui .btn-primary:hover, .bsui .btn-primary:focus, .bsui .btn-primary:active, .bsui .btn-primary.active, .bsui .btn-primary.show {
    box-shadow: none !important;
    background: #6a5a44 !important;
    border-color: #6a5a44 !important;   
}

.bsui .justb2b_form .visually-hidden, .bsui .justb2b_form .visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-bottom: 5px !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    border: none !important;
}

.product-price,
.product-subtotal,
.wd-checkout-prod-total.product-total {
  white-space: nowrap;
}

/* ── Cart Popup Width Override ── */

/* ── Cart Popup Cross-Sell ── */
.justb2b-popup-cross-sell {
    padding-top: 16px;
    border-top: 1px solid #eaeaea;
    text-align: left;
}

.justb2b-cross-sell-title {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.justb2b-cross-sell-products {
    --gap: 4px;
    display: grid;
    grid-template-columns: repeat(3, calc((100% - 2 * var(--gap)) / 3));
    gap: var(--gap);
    margin-bottom: 20px;
}

.justb2b-cross-sell-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 10px;
    padding: 6px 4px;
    border: 1px solid #f0f0f0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.justb2b-cross-sell-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}

.justb2b-cross-sell-image {
    display: block;
    width: 100%;
    min-width: 80px;
    max-width: 120px;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #fafafa;
}

.justb2b-cross-sell-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.justb2b-cross-sell-item:hover .justb2b-cross-sell-image img {
    transform: scale(1.05);
}

.justb2b-cross-sell-name {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12px;
    font-weight: 500;
    color: #111827;
    line-height: 1.35;
    margin-bottom: 4px;
    max-width: 100%;
}

.justb2b-cross-sell-price {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    max-width: 100%;
    word-wrap: break-word;
}

.added-to-cart a.btn {
    width: 100%;
}

/* ── Cart Popup Cross-Sell Skeleton ── */
@keyframes justb2b-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position:  400px 0; }
}

.justb2b-skeleton-block {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 800px 100%;
    animation: justb2b-shimmer 1.4s infinite linear;
    border-radius: 6px;
}

.justb2b-cross-sell-skeleton .justb2b-cross-sell-image {
    pointer-events: none;
}

.justb2b-skeleton-title {
    height: 14px;
    width: 40%;
    margin-bottom: 14px;
}

.justb2b-skeleton-line {
    width: 70%;
    margin: 4px auto 0;
    pointer-events: none;
}

.justb2b-skeleton-name {
    height: 11px;
}

.justb2b-skeleton-price {
    height: 10px;
    width: 40%;
}