/**
 * INFINITY E-commerce - Frequently Bought Together
 * Cross-sell section with checkboxes on single product
 *
 * @package Infinity_Ecommerce
 * @version 3.4.0
 */

/* ==========================================================================
   BOUGHT TOGETHER SECTION
   ========================================================================== */
.bought-together {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bought-together__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1.25rem;
}

/* ==========================================================================
   PRODUCT ITEMS
   ========================================================================== */
.fbt-products {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.fbt-product {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 200px;
    flex-shrink: 0;
}

.fbt-product__separator {
    font-size: 1.25rem;
    font-weight: 700;
    color: #94a3b8;
    flex-shrink: 0;
    line-height: 1;
}

.fbt-product__check-wrap {
    flex-shrink: 0;
}

.fbt-product__check {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
    cursor: pointer;
}

.fbt-product__check:disabled {
    opacity: 0.5;
    cursor: default;
}

.fbt-product__image {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.fbt-product__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fbt-product__info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.fbt-product__name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

a.fbt-product__name:hover {
    color: #6366f1;
}

.fbt-product__price {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #64748b;
}

.fbt-product__price del {
    font-weight: 400;
    font-size: 0.75rem;
}

.fbt-product__price ins {
    text-decoration: none;
    color: #6366f1;
}

/* ==========================================================================
   FOOTER — Total & Button
   ========================================================================== */
.fbt-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.fbt-total {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.fbt-total__label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.fbt-total__price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
}

.fbt-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    background: #6366f1;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    white-space: nowrap;
}

.fbt-add-btn:hover {
    background: #4f46e5;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.fbt-add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fbt-add-btn.loading {
    position: relative;
    color: transparent;
}

.fbt-add-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fbt-spin 0.6s linear infinite;
}

@keyframes fbt-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   MOBILE
   ========================================================================== */
@media (max-width: 767px) {
    .fbt-products {
        flex-direction: column;
        align-items: stretch;
    }

    .fbt-product {
        min-width: 0;
    }

    .fbt-product__separator {
        text-align: center;
        padding: 0.25rem 0;
    }

    .fbt-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .fbt-total {
        justify-content: center;
    }

    .fbt-add-btn {
        justify-content: center;
    }
}
