/**
 * WBIM Public Styles
 *
 * @package WBIM
 * @since 1.0.0
 */

/* ==========================================================================
   Branch Stock Display - Product Page
   ========================================================================== */

.wbim-branch-stock-container {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.wbim-stock-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.wbim-select-variation {
    color: #666;
    font-style: italic;
    margin: 0;
}

.wbim-branch-stock-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wbim-branch-stock-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #fff;
    border-radius: 6px;
    border-left: 4px solid #ddd;
    transition: all 0.2s ease;
}

.wbim-branch-stock-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wbim-branch-stock-item.wbim-stock-in {
    border-left-color: #4caf50;
}

.wbim-branch-stock-item.wbim-stock-low {
    border-left-color: #ff9800;
}

.wbim-branch-stock-item.wbim-stock-out {
    border-left-color: #f44336;
    opacity: 0.7;
}

.wbim-branch-stock-item.wbim-stock-preorder {
    border-left-color: #17a2b8;
}

.wbim-branch-name {
    font-weight: 500;
    color: #333;
}

.wbim-stock-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.wbim-stock-in .wbim-stock-status {
    color: #4caf50;
}

.wbim-stock-low .wbim-stock-status {
    color: #ff9800;
}

.wbim-stock-out .wbim-stock-status {
    color: #f44336;
}

.wbim-stock-preorder .wbim-stock-status {
    color: #17a2b8;
}

.wbim-stock-quantity {
    font-weight: 600;
    font-size: 16px;
}

.wbim-stock-unit {
    font-size: 12px;
    color: #666;
}

.wbim-stock-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
}

.wbim-stock-in .wbim-stock-indicator {
    background: #4caf50;
}

.wbim-stock-low .wbim-stock-indicator {
    background: #ff9800;
}

.wbim-stock-out .wbim-stock-indicator {
    background: #f44336;
}

.wbim-stock-preorder .wbim-stock-indicator {
    background: #17a2b8;
}

/* Branch Contact Toggle */
.wbim-branch-contact-toggle {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.wbim-toggle-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    padding: 5px 0;
    font-size: 14px;
}

.wbim-toggle-btn:hover {
    color: #005177;
}

.wbim-toggle-icon {
    transition: transform 0.2s ease;
}

.wbim-toggle-icon.wbim-rotated {
    transform: rotate(180deg);
}

.wbim-branch-contacts {
    margin-top: 10px;
}

.wbim-branch-contact-item {
    padding: 10px;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 4px;
}

.wbim-branch-contact-item strong {
    display: block;
    margin-bottom: 5px;
}

.wbim-contact-address,
.wbim-contact-phone {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

.wbim-contact-phone a {
    color: #0073aa;
    text-decoration: none;
}

.wbim-contact-phone a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Archive Page Stock Display
   ========================================================================== */

/* Archive stock - hidden by default */
.wbim-archive-stock {
    display: none !important;
}

.wbim-archive-available {
    display: none !important;
}

.wbim-archive-unavailable {
    display: none !important;
}

/* ==========================================================================
   Checkout Branch Selector - Common
   ========================================================================== */

.wbim-branch-selector {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.wbim-branch-selector h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.wbim-branch-select {
    width: 100%;
    padding: 10px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wbim-branch-info {
    margin-top: 15px;
    padding: 12px;
    background: #fff;
    border-radius: 4px;
    font-size: 14px;
}

.wbim-branch-info div {
    margin-bottom: 5px;
}

.wbim-branch-info div:last-child {
    margin-bottom: 0;
}

.wbim-branch-warning {
    margin-top: 15px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wbim-warning-icon {
    font-size: 18px;
}

.wbim-warning-text {
    color: #856404;
    font-size: 14px;
}

.wbim-branch-stock-info {
    margin-top: 15px;
    padding: 12px;
    background: #fff;
    border-radius: 4px;
}

.wbim-branch-stock-info h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.wbim-branch-stock-info ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wbim-branch-stock-info li {
    padding: 5px 0;
    font-size: 13px;
    border-bottom: 1px solid #eee;
}

.wbim-branch-stock-info li:last-child {
    border-bottom: none;
}

.wbim-branch-stock-info .wbim-stock-ok {
    color: #4caf50;
}

.wbim-branch-stock-info .wbim-stock-low {
    color: #f44336;
}

/* ==========================================================================
   Checkout Branch Selector - Radio Style
   ========================================================================== */

.wbim-branch-selector--radio .wbim-branch-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wbim-branch-option {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.wbim-branch-option:hover {
    border-color: #0073aa;
}

.wbim-branch-option.wbim-branch-selected {
    border-color: #0073aa;
    background: #f0f7fc;
}

.wbim-branch-option.wbim-branch-unavailable {
    opacity: 0.6;
}

.wbim-branch-label {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    cursor: pointer;
}

.wbim-branch-label input[type="radio"] {
    margin: 3px 12px 0 0;
    flex-shrink: 0;
}

.wbim-branch-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wbim-branch-content .wbim-branch-name {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wbim-unavailable-badge {
    font-size: 11px;
    font-weight: 500;
    background: #f44336;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
}

.wbim-branch-address,
.wbim-branch-phone,
.wbim-branch-distance {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #666;
}

.wbim-icon {
    flex-shrink: 0;
}

.wbim-branch-stock {
    margin-top: 5px;
}

.wbim-stock-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 3px;
}

.wbim-stock-status.wbim-stock-ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.wbim-stock-status.wbim-stock-low {
    background: #ffebee;
    color: #c62828;
}

.wbim-required-note {
    margin-top: 10px;
    color: #666;
}

/* ==========================================================================
   Checkout Branch Selector - Map Style
   ========================================================================== */

.wbim-branch-selector--map .wbim-map-container {
    display: flex;
    gap: 15px;
    min-height: 400px;
}

.wbim-map {
    flex: 2;
    min-height: 400px;
    border-radius: 8px;
    overflow: hidden;
}

.wbim-map-sidebar {
    flex: 1;
    max-height: 400px;
    overflow-y: auto;
}

.wbim-map-branch-item {
    padding: 12px;
    margin-bottom: 8px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wbim-map-branch-item:hover {
    border-color: #0073aa;
}

.wbim-map-branch-item.wbim-branch-selected {
    border-color: #0073aa;
    background: #f0f7fc;
}

.wbim-map-branch-item.wbim-branch-unavailable {
    opacity: 0.6;
}

.wbim-map-branch-item label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.wbim-map-branch-item input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.wbim-map-branch-item .wbim-branch-name {
    font-weight: 600;
}

.wbim-map-branch-item .wbim-branch-distance {
    font-size: 12px;
    color: #666;
}

.wbim-map-info {
    max-width: 200px;
    font-size: 13px;
    line-height: 1.5;
}

.wbim-map-select-btn {
    margin-top: 8px;
    padding: 5px 12px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.wbim-map-select-btn:hover {
    background: #005177;
}

.wbim-map-error {
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* ==========================================================================
   Thank You Page
   ========================================================================== */

.wbim-order-branch {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.wbim-order-branch h2 {
    margin: 0 0 15px 0;
    font-size: 18px;
}

.wbim-branch-details {
    width: 100%;
    border-collapse: collapse;
}

.wbim-branch-details th,
.wbim-branch-details td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.wbim-branch-details th {
    width: 30%;
    font-weight: 600;
    color: #666;
}

.wbim-branch-details tr:last-child th,
.wbim-branch-details tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   Cart & Order Items
   ========================================================================== */

.wbim-order-item-branch {
    margin: 5px 0 0 0;
    font-size: 13px;
    color: #666;
}

/* ==========================================================================
   Product Page Branch Selector (Button Style)
   ========================================================================== */

.wbim-branch-selector-wrapper {
    margin: 20px 0;
}

.wbim-branch-selector-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.wbim-branch-selector-label .required {
    color: #e53935;
    margin-left: 3px;
}

.wbim-branch-selector-wrapper .wbim-variable-notice {
    margin: 0 0 12px 0;
    padding: 10px 14px;
    background: #fff3cd;
    border-radius: 6px;
    font-size: 13px;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Hide branch selector in Rey sticky Add to Cart - Maximum specificity */
.rey-stickyAtc .wbim-branch-selector-wrapper,
.rey-stickyAtc .wbim-branch-buttons,
.rey-stickyAtc .wbim-branch-button,
.rey-stickyAtc .wbim-branch-selector-label,
.rey-stickyAtc .wbim-variable-notice,
.rey-stickyAtc [class*="wbim-"],
.rey-stickyAtc--visible .wbim-branch-selector-wrapper,
.rey-stickyAtc--visible .wbim-branch-buttons,
.rey-stickyAtc--visible .wbim-branch-button,
.rey-stickyAtc--visible [class*="wbim-"],
div.rey-stickyAtc .wbim-branch-selector-wrapper,
div.rey-stickyAtc [class*="wbim-"],
html body .rey-stickyAtc .wbim-branch-selector-wrapper,
html body .rey-stickyAtc [class*="wbim-"],
html body div.rey-stickyAtc .wbim-branch-selector-wrapper,
html body div.rey-stickyAtc [class*="wbim-"],
.rey-stickyAtc form.cart .wbim-branch-selector-wrapper,
.rey-stickyAtc .cart .wbim-branch-selector-wrapper,
.rey-stickyAtc .product .wbim-branch-selector-wrapper,
.rey-stickyAtc-wrapper .wbim-branch-selector-wrapper,
.rey-stickyAtc-wrapper [class*="wbim-"],
[class*="rey-stickyAtc"] .wbim-branch-selector-wrapper,
[class*="rey-stickyAtc"] [class*="wbim-branch"],
[class*="rey-stickyAtc"] [class*="wbim-"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    max-height: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
}

/* Shake animation for validation error */
@keyframes wbim-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.wbim-shake {
    animation: wbim-shake 0.3s ease-in-out 2;
}

/* Branch error message */
.wbim-branch-error {
    color: #e53935;
    margin-bottom: 10px;
    padding: 10px 15px;
    background: #ffebee;
    border-radius: 6px;
    border-left: 4px solid #e53935;
    font-size: 14px;
}

/* Branch Buttons Container */
.wbim-branch-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Individual Branch Button */
.wbim-branch-button {
    position: relative;
    padding: 16px 18px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wbim-branch-button:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.15);
}

.wbim-branch-button.wbim-branch-selected {
    border-color: #0073aa;
    background: #f0f7fc;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.wbim-branch-button.wbim-branch-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f9f9f9;
}

.wbim-branch-button.wbim-branch-disabled:hover {
    border-color: #e0e0e0;
    box-shadow: none;
}

/* Stock status border colors */
.wbim-branch-button.wbim-branch-in-stock {
    border-left: 4px solid #4caf50;
}

.wbim-branch-button.wbim-branch-low-stock {
    border-left: 4px solid #ff9800;
}

.wbim-branch-button.wbim-branch-out-of-stock {
    border-left: 4px solid #f44336;
}

.wbim-branch-button.wbim-branch-preorder {
    border-left: 4px solid #17a2b8;
}

/* Button Content */
.wbim-branch-button-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Button Header (Name + Check) */
.wbim-branch-button-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wbim-branch-button-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.wbim-branch-button-check {
    display: none;
    width: 24px;
    height: 24px;
    background: #0073aa;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.wbim-branch-button.wbim-branch-selected .wbim-branch-button-check {
    display: flex;
}

/* Button Address */
.wbim-branch-button-address {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.wbim-branch-button-address svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #999;
}

/* Button Stock */
.wbim-branch-button-stock {
    margin-top: 4px;
}

.wbim-branch-button-stock .wbim-stock-qty {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 20px;
    font-size: 13px;
}

.wbim-branch-button-stock .wbim-stock-qty strong {
    font-weight: 700;
    font-size: 15px;
}

.wbim-branch-button-stock .wbim-stock-in {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.wbim-branch-button-stock .wbim-stock-out {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #ffebee;
    color: #c62828;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.wbim-branch-button-stock .wbim-stock-variable {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #f5f5f5;
    color: #666;
    border-radius: 20px;
    font-size: 12px;
}

/* Status badges in branch buttons */
.wbim-branch-button-stock .wbim-stock-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.wbim-branch-button-stock .wbim-stock-status.wbim-status-instock {
    background: #e8f5e9;
    color: #2e7d32;
}

.wbim-branch-button-stock .wbim-stock-status.wbim-status-low {
    background: #fff3e0;
    color: #e65100;
}

.wbim-branch-button-stock .wbim-stock-status.wbim-status-outofstock {
    background: #ffebee;
    color: #c62828;
}

.wbim-branch-button-stock .wbim-stock-status.wbim-status-preorder {
    background: #e1f5fe;
    color: #0277bd;
}

.wbim-branch-button-stock .wbim-stock-status .wbim-stock-qty {
    font-size: 12px;
    opacity: 0.85;
    padding: 0;
    background: none;
    border-radius: 0;
}

/* Low stock style */
.wbim-branch-button.wbim-branch-low-stock .wbim-stock-qty {
    background: #fff3e0;
    color: #e65100;
}

/* Branch Contact Toggle in Card */
.wbim-branch-contact-toggle {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.wbim-contact-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #0073aa;
    cursor: pointer;
    transition: color 0.2s ease;
}

.wbim-contact-trigger:hover {
    color: #005177;
}

.wbim-contact-arrow {
    transition: transform 0.2s ease;
}

.wbim-branch-contact-toggle.wbim-contact-open .wbim-contact-arrow {
    transform: rotate(180deg);
}

.wbim-branch-contact-details {
    display: none;
    margin-top: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.wbim-branch-contact-toggle.wbim-contact-open .wbim-branch-contact-details {
    display: block;
}

.wbim-contact-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #555;
    margin-bottom: 6px;
}

.wbim-contact-row:last-child {
    margin-bottom: 0;
}

.wbim-contact-row svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #888;
}

.wbim-contact-row a {
    color: #0073aa;
    text-decoration: none;
}

.wbim-contact-row a:hover {
    text-decoration: underline;
}

/* Cart item branch display */
.woocommerce-cart-form .product-name dl.variation dt,
.woocommerce-cart-form .product-name dl.variation dd {
    display: inline;
    margin: 0;
}

.woocommerce-cart-form .wbim-cart-branch {
    display: block;
    margin-top: 8px;
    padding: 6px 10px;
    background: #e8f5e9;
    border-radius: 4px;
    font-size: 13px;
    color: #2e7d32;
}

.woocommerce-cart-form .wbim-cart-branch strong {
    font-weight: 600;
}

/* Mini cart branch display */
.woocommerce-mini-cart-item .wbim-cart-branch {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: #666;
}

/* Checkout cart items branch */
.woocommerce-checkout-review-order-table .wbim-cart-branch {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #2e7d32;
    font-weight: 500;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .wbim-branch-selector--map .wbim-map-container {
        flex-direction: column;
    }

    .wbim-map {
        min-height: 300px;
    }

    .wbim-map-sidebar {
        max-height: 200px;
    }

    .wbim-branch-label {
        padding: 12px;
    }

    .wbim-branch-content .wbim-branch-name {
        font-size: 14px;
        flex-wrap: wrap;
    }

    .wbim-branch-stock-item {
        padding: 8px 12px;
    }

    /* Branch buttons responsive - keep 2 columns on mobile */
    .wbim-branch-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .wbim-branch-button {
        padding: 12px 10px;
    }

    .wbim-branch-button-name {
        font-size: 15px;
    }

    .wbim-branch-button-address {
        font-size: 12px;
    }

    .wbim-branch-button-check {
        width: 20px;
        height: 20px;
    }

    .wbim-branch-button-check svg {
        width: 12px;
        height: 12px;
    }
}


/* ==========================================================================
   Bulk/Wholesale Pricing - Product Page (Matching Branch Card Style)
   ========================================================================== */

.wbim-bulk-pricing-wrapper {
    margin: 20px 0;
}

.wbim-bulk-pricing-title {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

/* Grid layout matching branch buttons */
.wbim-qty-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Individual Quantity Card - Two Row Layout */
.wbim-qty-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 14px 16px!important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 2px solid #e0e0e0!important;
    border-radius: 10px!important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-align: left;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.wbim-qty-btn:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.15);
}

.wbim-qty-btn:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.wbim-qty-btn.active {
    border-color: #0073aa;
    background: #f0f7fc;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.wbim-qty-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Row 1: Quantity + Savings Badge */
.wbim-qty-btn-qty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 17px;
    font-weight: 700;
    color: #333;
}

.wbim-qty-btn-qty small {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin-left: 4px;
}

/* Row 2: Price Row Container */
.wbim-qty-btn-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.wbim-qty-btn-total {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 700;
}

/* Unit Price */
.wbim-qty-btn-unit {
    font-size: 13px;
    color: #666;
}

/* Savings Badge - Inline with quantity */
.wbim-savings-badge {
    position: static;
    padding: 4px 10px;
    background: #4caf50;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 15px;
    white-space: nowrap;
}

/* Active state checkmark */
.wbim-qty-btn.active::after {
    content: '';
    position: absolute;
    top: 14px;
    right: 14px;
    width: 22px;
    height: 22px;
    background: #0073aa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") center/12px no-repeat;
    border-radius: 50%;
}

/* Hide savings badge when active (show checkmark instead) */
.wbim-qty-btn.active .wbim-savings-badge {
    display: none;
}

/* Variable product notice */
.wbim-bulk-variable {
    display: none;
}

.wbim-bulk-variable .wbim-select-variation-notice {
    padding: 12px 15px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 6px;
    font-size: 13px;
    color: #856404;
    margin-bottom: 15px;
}

/* Price display adjustments */
.wbim-bulk-pricing-wrapper + .wbim-branch-selector-wrapper {
    margin-top: 0;
    padding-top: 0;
}

/* Price with discount style */
p.price del,
.woocommerce-variation-price .price del {
    opacity: 0.6;
    font-size: 0.85em;
}

p.price ins,
.woocommerce-variation-price .price ins {
    text-decoration: none;
    font-weight: 700;
    color: #2271b1;
}

/* ==========================================================================
   Bulk Pricing - Responsive (Horizontal Layout)
   ========================================================================== */

@media (max-width: 768px) {
    /* Keep 2 columns on tablet */
    .wbim-qty-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .wbim-qty-btn {
        padding: 12px 10px;
        gap: 8px;
    }

    .wbim-qty-btn-qty {
        font-size: 16px;
    }

    .wbim-qty-btn-total {
        font-size: 13px;
        padding: 4px 8px;
    }

    .wbim-qty-btn-unit {
        display: none;
    }

    .wbim-savings-badge {
        font-size: 9px;
        padding: 2px 6px;
        top: -6px;
        right: 8px;
    }

    .wbim-qty-btn.active::after {
        width: 18px;
        height: 18px;
        right: 8px;
        background-size: 10px;
    }
}

@media (max-width: 480px) {
    /* Single column on small mobile */
    .wbim-qty-buttons {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .wbim-qty-btn {
        padding: 14px 12px;
    }

    .wbim-qty-btn-qty {
        font-size: 17px;
    }

    .wbim-qty-btn-total {
        font-size: 14px;
        padding: 5px 10px;
    }
}

/* ==========================================================================
   Wholesale Tiers Display
   ========================================================================== */

.wbim-wholesale-tiers {
    margin: 15px 0;
    padding: 12px 15px;
    background: #f0f7ff;
    border: 1px solid #d0e3f7;
    border-radius: 6px;
}

.wbim-wholesale-tiers-title {
    font-weight: 600;
    font-size: 14px;
    color: #1e3a5f;
    margin-bottom: 8px;
}

.wbim-wholesale-tiers-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wbim-wholesale-tiers-list li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: #333;
    border-bottom: 1px dashed #d0e3f7;
}

.wbim-wholesale-tiers-list li:last-child {
    border-bottom: none;
}

.wbim-wholesale-tiers-list li strong {
    color: #0073aa;
}
