/* B2B Bundle Frontend Styles */

.b2b-bundle-wrapper {
    margin-top: 20px;
}

/* Price Display */
.b2b-bundle-price-display {
    margin-bottom: 20px;
}

.b2b-bundle-price-display .price {
    font-size: 24px;
    color: #e67e22;
    font-weight: 700;
}

/* Bundled Items */
.b2b-bundle-items {
    margin-bottom: 30px;
}

.b2b-bundled-item-block {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.b2b-bundled-item-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.b2b-bundled-item-image {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    flex-shrink: 0;
}

.b2b-bundled-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.b2b-bundled-item-info {
    flex: 1;
}

.b2b-bundled-item-name {
    margin: 0 0 5px 0;
    font-weight: 600;
    color: #333;
}

.b2b-bundled-item-required {
    margin: 0;
    font-size: 18px;
    color: #e67e22;
}

/* Bundle Form - Colours */
.b2b-bundle-colours {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
}

.b2b-bundle-colours label {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.b2b-bundle-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.b2b-bundle-swatch {
    position: relative;
    cursor: pointer;
}

.b2b-bundle-swatch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.b2b-bundle-swatch .swatch-color {
    display: inline-block;
    width: 0;
    height: 0;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.b2b-bundle-swatch .swatch-color:hover {
    transform: scale(1.05);
}

.b2b-bundle-swatch input:checked+.swatch-color {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.5);
}

.b2b-bundle-swatch .swatch-text {
    display: block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    transition: all 0.2s;
}

.b2b-bundle-swatch input:checked+.swatch-text {
    border-color: #0066cc;
    background: #e6f0ff;
    color: #0066cc;
}


/* Bundle colour swatch tooltip */
.b2b-bundle-swatch .colour-swatch-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    margin-bottom: 6px;
    z-index: 10;
}

.b2b-bundle-swatch:hover .colour-swatch-tooltip {
    display: block;
}

/* Bundle Form - Sizes */
.b2b-bundle-sizes {
    margin-top: 20px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
}

.b2b-bundle-sizes>label {
    display: block;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.b2b-bundle-size-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.b2b-size-headers {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.b2b-size-header {
    font-weight: 700;
    margin-bottom: 8px;
    color: #444;
    font-size: 0.9em;
    text-transform: uppercase;
    text-align: center;
}

.b2b-size-inputs {
    display: flex;
    gap: 10px;
}

.b2b-size-input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45px;
    margin: 0 auto;
    border: 1px solid #333;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.b2b-bundle-qty-btn {
    width: 100% !important;
    height: 25px !important;
    background: #f1f1f1 !important;
    border: none !important;
    cursor: pointer !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    color: #333 !important;
}

.b2b-bundle-qty-btn:hover {
    background: #e67e22;
    border-color: #e67e22;
    color: #fff;
}

.b2b-bundle-qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.b2b-bundle-qty-btn:disabled:hover {
    background: #fff;
    color: #666;
    border-color: #ddd;
}

.b2b-bundle-qty-input {
    text-align: center !important;
    width: 100% !important;
    margin: 0 !important;
    -moz-appearance: textfield !important;
    appearance: none !important;
    border: none !important;
    border-top: 1px solid #ccc !important;
    border-bottom: 1px solid #ccc !important;
    height: 35px !important;
    font-size: 14px !important;
    outline: none !important;
    background: #fff !important;
}

.b2b-bundle-qty-input::-webkit-outer-spin-button,
.b2b-bundle-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.b2b-size-stock {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.b2b-stock-level {
    margin-top: 5px;
    background: #ff9a00;
    color: #fff;
    font-size: 11px;
    padding: 2px 0;
    border-radius: 2px;
    min-height: 18px;
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.b2b-size-item.b2b-out-of-stock {
    opacity: 0.6;
}

.b2b-size-item.b2b-out-of-stock .b2b-stock-level {
    background: #999;
}

.b2b-stock-note {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    text-align: left;
}

.b2b-size-guide-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    color: #e67e22;
    text-decoration: none;
    font-weight: 500;
}

.b2b-size-guide-link:hover {
    text-decoration: underline;
}

/* Logo Customisation */
.b2b-bundle-customisation {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.b2b-bundle-customisation h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.b2b-customisation-note {
    color: #666;
    margin-bottom: 15px;
}

.b2b-bundle-logo-options label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
}

.b2b-bundle-logo-options input {
    margin-right: 8px;
}

.b2b-bundle-logo-upload {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border: 1px dashed #ddd;
    border-radius: 4px;
}

/* Bundle Summary */
.b2b-bundle-summary {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
}

.b2b-bundle-summary h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}

.b2b-bundle-summary-table {
    width: 100%;
    border-collapse: collapse;
}

.b2b-bundle-summary-table th {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 13px;
    color: #666;
}

.b2b-bundle-summary-table td {
    padding: 8px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
}

.b2b-bundle-summary-table .b2b-empty-message td {
    color: #999;
    font-style: italic;
}

.b2b-bundle-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #eee;
}

.b2b-bundle-total .total-label {
    font-weight: 600;
    font-size: 16px;
}

.b2b-bundle-total .total-amount {
    font-weight: 700;
    font-size: 24px;
    color: #e67e22;
}

/* Add to Cart Button */
.b2b-bundle-add-to-cart {
    margin-top: 20px;
}

.b2b-bundle-add-btn {
    width: 100%;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    background: #e67e22;
    border: none;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.b2b-bundle-add-btn:hover {
    background: #d35400;
}

.b2b-bundle-add-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.b2b-bundle-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.b2b-bundle-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
}

.b2b-bundle-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
}

/* Responsive */
@media (max-width: 768px) {
    .b2b-bundled-item-header {
        flex-direction: column;
    }

    .b2b-bundled-item-image {
        margin-bottom: 10px;
    }

    .b2b-size-headers,
    .b2b-size-inputs,
    .b2b-size-stock {
        grid-template-columns: repeat(4, 1fr);
    }
}


#b2b-bundle-add-to-cart {
    width: 100%;
    padding: 15px !important;
    background: #ff9a00 !important;
    border-radius: 6px !important;
    font-size: 1.2em !important;
    font-weight: 700 !important;
}

#b2b-bundle-add-to-cart.disabled {
    background: #ccc !important;
    cursor: not-allowed;
}

/* Required item message styling */
.b2b-bundled-item-required {
    color: #666;
    font-size: 18px;
    margin: 5px 0 0 0;
}

.b2b-bundled-item-required.complete {
    color: #28a745;
    font-weight: 600;
}

/* Bundle Cart Child Items */
.b2b-bundle-child-items {
    margin-top: 15px;
    padding-left: 10px;
    border-left: 2px solid #f0f0f0;
}

.b2b-cart-child-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.b2b-cart-child-item:last-child {
    border-bottom: none;
}

.b2b-child-image {
    flex-shrink: 0;
}

.b2b-child-image img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.b2b-child-details {
    flex: 1;
}

.b2b-child-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.b2b-child-logo {
    font-size: 0.9em;
    color: #666;
    margin-top: 8px;
    line-height: 1.4;
}

.b2b-logo-position-row {
    color: #333;
}

.b2b-logo-position-row strong {
    color: #333;
}

.b2b-logo-method-row {
    color: #ff9a00;
    margin-top: 2px;
}

.b2b-logo-thumb-row {
    margin-top: 5px;
}

.b2b-logo-position {
    font-weight: 600;
    color: #333;
}

.b2b-logo-method {
    color: #ff9a00;
}

.b2b-logo-price {
    font-size: 0.85em;
    color: #ff9a00;
}

.b2b-cart-logo-thumb {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px;
    background: #fff;
}

.b2b-child-qty {
    flex-shrink: 0;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

/* Cart parent item styling */
.b2b-bundle-parent td.product-name {
    position: relative;
}

div#b2b-setup-status-box {
    display: none;
}

.bundle-item-description {
    margin-top: 15px;
    font-size: 16px;
}
p.b2b-stock-note {
    font-size: 18px;
}