/**
 * Frequently Bought Together Block Styles
 * 
 * Styles for frequently bought together products bundle
 * 
 * @package Merch.v3
 */

.merch-v3-frequently-bought-together {
    width: 100%;
    margin-top: 16px;
    border-radius: 8px;
    box-sizing: border-box;
}

/* Header */
.merch-v3-frequently-bought-together__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 16px;
}

.merch-v3-frequently-bought-together__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--merch-v3-footer-text, var(--wp--preset--color--white, #FFFFFF));
    margin: 0;
}

/* Navigation */
.merch-v3-frequently-bought-together__navigation {
    display: flex;
    align-items: center;
    gap: 12px;
}

.merch-v3-frequently-bought-together__bundle-counter {
    font-size: 14px;
    color: var(--wp--preset--color--rgb-143, var(--merch-v3-text-secondary, var(--wp--preset--color--gray-13, #8F8F8F)));
    white-space: nowrap;
}

.merch-v3-frequently-bought-together__nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--wp--preset--color--rgb-50, var(--merch-v3-bg-gray, rgba(50, 50, 50, 0.8)));
    border: none;
    color: var(--merch-v3-footer-text, var(--wp--preset--color--white, #FFFFFF));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.merch-v3-frequently-bought-together__nav-btn:hover:not(:disabled) {
    background-color: var(--wp--preset--color--rgb-70, var(--merch-v3-bg-gray, rgba(70, 70, 70, 0.9)));
    color: var(--merch-v3-footer-text, var(--wp--preset--color--white, #FFFFFF));
}

.merch-v3-frequently-bought-together__nav-btn:disabled {
    background-color: var(--wp--preset--color--rgb-50, var(--merch-v3-bg-gray, rgba(50, 50, 50, 0.8)));
    color: var(--merch-v3-footer-text-muted, var(--wp--preset--color--gray-300, rgba(255, 255, 255, 0.5)));
    cursor: not-allowed;
    opacity: 1;
}

.merch-v3-frequently-bought-together__nav-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Slider Container */
.merch-v3-frequently-bought-together__slider {
    position: relative;
    overflow: hidden;
}

.merch-v3-frequently-bought-together__slides {
    position: relative;
}

.merch-v3-frequently-bought-together__slide {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.merch-v3-frequently-bought-together__slide--active {
    display: block;
    opacity: 1;
}

/* Products Container */
.merch-v3-frequently-bought-together__products {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    justify-content: flex-start;
    position: relative;
}

/* Product Card */
.merch-v3-frequently-bought-together__product {
    flex: 1;
    background-color: var(--wp--preset--color--rgba-white-005, var(--merch-v3-bg-gray, rgba(255, 255, 255, 0.03)));
    border-radius: 12px;
    overflow: visible;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 12px;
    position: relative;
    border: 1px solid var(--wp--preset--color--border-dark-rgb-33, var(--merch-v3-border, var(--wp--preset--color--gray-border, #E5E7EB)));
}

.merch-v3-frequently-bought-together__product:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.merch-v3-frequently-bought-together__product-link {
    display: flex;
    flex-direction: row;
    text-decoration: none;
    color: inherit;
    padding: 0;
    gap: 0;
}

.merch-v3-frequently-bought-together__product-image {
    width: 80px;
    min-width: 80px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--wp--preset--color--rgba-white-005, var(--merch-v3-bg-gray, rgba(255, 255, 255, 0.05)));
    position: relative;
    flex-shrink: 0;
}

.merch-v3-frequently-bought-together__product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.merch-v3-frequently-bought-together__product-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
    flex: 1;
    justify-content: space-between;
}

.merch-v3-frequently-bought-together__product-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--merch-v3-footer-text, var(--wp--preset--color--white, #FFFFFF));
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.merch-v3-frequently-bought-together__product-region {
    font-size: 18px;
    font-weight: 700;
    color: var(--wp--preset--color--rgb-53-157-255, var(--merch-v3-primary-light, var(--wp--preset--color--primary-light, #359DFF)));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    word-break: break-word;
}

.merch-v3-frequently-bought-together__product-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--merch-v3-footer-text, var(--wp--preset--color--white, #FFFFFF));
    margin-top: auto;
}

/* Separator */
.merch-v3-frequently-bought-together__separator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    right: -24px;
    border: 1px solid var(--wp--preset--color--dark-rgb-53, var(--merch-v3-border, var(--wp--preset--color--gray-border, #E5E7EB)));
    background: var(--wp--preset--color--dark-rgb-53, var(--merch-v3-nav-bg, var(--wp--preset--color--dark, #212121)));
    color: var(--merch-v3-footer-text, var(--wp--preset--color--white, #FFFFFF));
    z-index: 3;
}

/* Footer */
.merch-v3-frequently-bought-together__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: var(--wp--preset--color--rgb-30, var(--merch-v3-bg-gray, rgba(30, 30, 30, 0.8)));
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
    border: 1px solid var(--wp--preset--color--border-dark-rgb-33, var(--merch-v3-border, var(--wp--preset--color--gray-border, #E5E7EB)));
}

.merch-v3-frequently-bought-together__total {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-wrap: wrap;
}

.merch-v3-frequently-bought-together__total-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    line-height: 1.4;
}

.merch-v3-frequently-bought-together__total-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--merch-v3-footer-text, var(--wp--preset--color--white, #FFFFFF));
    line-height: 1.2;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.merch-v3-frequently-bought-together__total-original {
    font-size: 18px;
    font-weight: 500;
    color: var(--merch-v3-footer-text-muted, var(--wp--preset--color--gray-300, rgba(255, 255, 255, 0.5)));
    text-decoration: line-through;
}

/* Buy Button */
.merch-v3-frequently-bought-together__buy-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    background-color: var(--wp--preset--color--rgb-53-157-255, var(--merch-v3-primary-light, var(--wp--preset--color--primary-light, #359DFF)));
    color: var(--merch-v3-footer-text, var(--wp--preset--color--white, #FFFFFF));
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.merch-v3-frequently-bought-together__buy-btn:hover {
    background-color: var(--wp--preset--color--rgb-40-140-230, var(--merch-v3-primary-hover, var(--wp--preset--color--primary-600, #1B2E8C)));
    transform: translateY(-1px);
}

.merch-v3-frequently-bought-together__buy-btn:active {
    transform: translateY(0);
}

.merch-v3-frequently-bought-together__buy-btn svg {
    width: 20px;
    height: 20px;
}

/* Empty State */
.merch-v3-frequently-bought-together__empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--merch-v3-footer-text-muted, var(--wp--preset--color--gray-300, rgba(255, 255, 255, 0.6)));
    font-size: 14px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .merch-v3-frequently-bought-together__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .merch-v3-frequently-bought-together__products {
        flex-direction: column;
    }

    .merch-v3-frequently-bought-together__product {
        max-width: 100%;
        min-width: 100%;
    }

    .merch-v3-frequently-bought-together__product-image {
        width: 80px;
        min-width: 80px;
        height: 90px;
    }

    .merch-v3-frequently-bought-together__product-info {
        padding: 12px;
    }

    .merch-v3-frequently-bought-together__product-title {
        font-size: 13px;
        -webkit-line-clamp: 3;
    }

    .merch-v3-frequently-bought-together__product-price {
        font-size: 16px;
    }

    .merch-v3-frequently-bought-together__separator {
        margin-top: 0;
        margin-bottom: 0;
        transform: rotate(90deg);
        font-size: 20px;
    }

    .merch-v3-frequently-bought-together__footer {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .merch-v3-frequently-bought-together__total-price {
        font-size: 28px;
    }

    .merch-v3-frequently-bought-together__buy-btn {
        width: 100%;
        justify-content: center;
    }
}

