/* Container for the entire Frequently Bought Together section */
.frequently-bought-together {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin: 20px;
    border: 1px solid rgba(204, 212, 219, 1);
}

/* Wrapper for the products */
.fbt-products-wrapper {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    gap: 10px; /* Space between products */
}

/* Individual product container */
.fbt-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    max-width: 200px;
    min-height: 220px; 
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    position: relative; /* Enables positioning of child elements */
}

/* Product image styling */
.fbt-product img {
    max-width: 100px; /* Restrict the image size */
    height: auto;
    object-fit: contain;
    margin-bottom: 10px; /* Space between image and title */
}

/* Product details container (title and price) */
.fbt-product-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Ensures price stays at the bottom */
    flex-grow: 1; /* Allows the details container to stretch */
    width: 100%;
    align-items: center; /* Center-align title and price */
}

/* Product title styling */
.fbt-product-title {
    font-size: 0.75rem;
    font-weight: bold;
    color: #000000;
    margin-bottom: 5px; /* Reduce the space between title and price */
    line-height: 1.2;
}

/* Price styling */
.fbt-product-price {
    font-size: 16px;
    color: #333;
    margin-top: 0; /* Remove additional margin above the price */
    text-align: center;
}

/* The plus symbol between products */
.fbt-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #555;
    margin: 0 10px;
}

/* "Add All to Cart" button styling */
.fbt-add-to-cart-button {
    background-color: #ff9933;
    color: white;
    height: 40px;
    font-size: 16px;
    padding: 0 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease-in-out;
    white-space: nowrap;
    width: 100%;
    margin-top: 20px;
    text-align: center;
}

.fbt-add-to-cart-button:hover {
    background-color: #000000;
}

/* Restore original layout for under 768px (tablets and smaller) */
@media (max-width: 768px) {
    .fbt-products-wrapper {
        flex-direction: column; /* Stack products vertically */
        align-items: stretch; /* Ensure full-width products */
        gap: 15px; /* Add space between products */
    }

    .fbt-product {
        max-width: 100%; /* Full width for each product */
        flex-direction: column; /* Stack image, title, and price vertically */
        align-items: center; /* Center content */
        text-align: center;
        height: auto; /* Remove fixed height */
        min-height: 150px;
    }

    .fbt-product img {
        max-width: 80px; /* Smaller image size for tablet */
    }

    .fbt-product-title {
        font-size: 14px;
    }

    .fbt-product-price {
        font-size: 14px;
    }

    .fbt-plus {
        font-size: 20px;
        margin: 10px 0; /* Add space above and below plus sign */
    }
}

/* For very small screens (mobile) */
@media (max-width: 480px) {
    .fbt-products-wrapper {
        flex-direction: column; /* Stack products vertically */
        align-items: stretch; /* Ensure full-width products */
        gap: 15px; /* Add space between products */
    }

    .fbt-product {
        max-width: 100%; /* Full width for each product */
        flex-direction: column; /* Stack image, title, and price vertically */
        align-items: center; /* Center content */
        text-align: center;
        max-height: 150px; /* Remove fixed height */
    }

    .fbt-product img {
        max-width: 80px; /* Smaller image size for mobile */
    }

    .fbt-product-title {
        font-size: 14px;
    }

    .fbt-product-price {
        font-size: 14px;
    }

    .fbt-plus {
        font-size: 20px;
        margin: 10px 0; /* Add space above and below plus sign */
    }

    .fbt-add-to-cart-button {
        font-size: 14px;
        padding: 10px;
    }
}
