.buytogether-block {
    margin: 2rem 0;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #dfe5dc;
    border-radius: 6px;
    box-shadow: 0 10px 28px rgba(23, 27, 24, 0.08);
}

.buytogether-block .bt-title {
    margin: 0 0 1rem;
    color: #171b18;
    font-size: 1.35rem;
    font-weight: 700;
}

.buytogether-block .bt-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.buytogether-block .bt-item {
    position: relative;
    display: grid;
    grid-template-columns: 40px 86px minmax(0, 1fr) minmax(130px, max-content);
    gap: 0.55rem 1rem;
    align-items: center;
    width: 100%;
    min-height: 104px;
    padding: 0.85rem 1rem;
    background: #fbfcfa;
    border: 1px solid #e2e8df;
    border-radius: 6px;
    text-align: left;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.buytogether-block .bt-item:hover {
    border-color: #b8c7b2;
    box-shadow: 0 8px 20px rgba(23, 27, 24, 0.08);
}

.buytogether-block .bt-item-main {
    grid-template-columns: 86px minmax(0, 1fr) minmax(130px, max-content);
    background: #f4f7f1;
    border-color: #ccd9c7;
}

.buytogether-block .bt-item label {
    display: contents;
    cursor: pointer;
    margin: 0;
}

.buytogether-block .bt-item img {
    display: block;
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 76px;
    height: 76px;
    margin: 0;
    object-fit: contain;
    background: #fff;
    border: 1px solid #edf0eb;
    border-radius: 6px;
}

.buytogether-block .bt-item-main img {
    grid-column: 1;
}

.buytogether-block .bt-name {
    display: block;
    grid-column: 3;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    margin: 0;
    color: #171b18;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.buytogether-block .bt-name a {
    color: #171b18;
    text-decoration: none;
}

.buytogether-block .bt-name a:hover {
    color: #4d5d4b;
    text-decoration: underline;
}

.buytogether-block .bt-item-main .bt-name {
    grid-column: 2;
}

.buytogether-block .bt-main-combination {
    display: block;
    color: #667162;
    font-size: 0.8rem;
    font-weight: 400;
    margin-top: 0.2rem;
}

.buytogether-block .bt-variant {
    display: block;
    grid-column: 3 / 5;
    grid-row: 2;
    width: 100%;
    max-width: 560px;
    margin-top: 0.1rem;
    padding: 0.45rem 0.6rem;
    font-size: 0.8125rem;
    border: 1px solid #d8dfd5;
    border-radius: 4px;
    background: #fff;
    color: #2f352f;
}

.buytogether-block .bt-price {
    display: flex;
    grid-column: 4;
    grid-row: 1 / span 2;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.2rem 0.45rem;
    min-width: 118px;
    font-size: 0.95rem;
    text-align: right;
}

.buytogether-block .bt-item-main .bt-price {
    grid-column: 3;
}

.buytogether-block .bt-price del {
    color: #8a9187;
    margin: 0;
    font-size: 0.8125rem;
}

.buytogether-block .bt-price strong {
    color: #171b18;
    font-size: 1.08rem;
    font-weight: 800;
}

/* Blur mentre es carrega el preu nou */
.buytogether-block .bt-final,
.buytogether-block .bt-regular,
.buytogether-block .bt-main-combination,
.buytogether-block .bt-total-amount,
.buytogether-block .bt-savings-amount {
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.buytogether-block.bt-refreshing .bt-item-main .bt-final,
.buytogether-block.bt-refreshing .bt-item-main .bt-main-combination,
.buytogether-block.bt-refreshing .bt-item-main .bt-qty,
.buytogether-block.bt-refreshing .bt-total-amount,
.buytogether-block.bt-refreshing .bt-savings-amount {
    filter: blur(4px);
    opacity: 0.55;
    pointer-events: none;
}

.buytogether-block .bt-qty {
    display: inline-block;
    padding: 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    background: #171b18;
    color: #fff;
    border-radius: 3px;
}

.buytogether-block .bt-item input[type="checkbox"] {
    position: static;
    grid-column: 1;
    grid-row: 1 / span 2;
    justify-self: center;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #4d5d4b;
}

.buytogether-block .bt-tag {
    display: inline-block;
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    margin-top: 0.15rem;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    background: #fff;
    border: 1px solid #dce5d8;
    border-radius: 999px;
    color: #4d5d4b;
}

.buytogether-block .bt-item.bt-unchecked {
    opacity: 0.52;
    box-shadow: none;
}

.buytogether-block .bt-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    background: #f4f7f1;
    border: 1px solid #dbe5d8;
    border-radius: 6px;
}

.buytogether-block .bt-total {
    font-size: 1.05rem;
    color: #2f352f;
}

.buytogether-block .bt-total-amount {
    display: inline-block;
    font-size: 1.45rem;
    margin-left: 0.35rem;
    color: #171b18;
}

.buytogether-block .bt-savings {
    margin-top: 0.25rem;
    font-size: 0.9375rem;
    color: #2f7a35;
    font-weight: 700;
}

.buytogether-block .bt-bundle-note {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: #b3541e;
    font-weight: 600;
}

.buytogether-block .bt-submit .material-icons {
    vertical-align: middle;
    margin-right: 0.35rem;
}

@media (max-width: 767px) {
    .buytogether-block {
        padding: 1rem;
    }

    .buytogether-block .bt-item {
        grid-template-columns: 34px 74px minmax(0, 1fr);
        gap: 0.45rem 0.7rem;
        min-height: 94px;
        padding: 0.75rem;
    }

    .buytogether-block .bt-item-main {
        grid-template-columns: 74px minmax(0, 1fr);
    }

    .buytogether-block .bt-item img {
        grid-column: 2;
        grid-row: 1 / span 2;
        width: 66px;
        height: 66px;
    }

    .buytogether-block .bt-item-main img {
        grid-column: 1;
    }

    .buytogether-block .bt-name {
        grid-column: 3;
        grid-row: 1;
        font-size: 0.9rem;
    }

    .buytogether-block .bt-item-main .bt-name {
        grid-column: 2;
    }

    .buytogether-block .bt-price {
        grid-column: 3;
        grid-row: 2;
        justify-content: flex-start;
        min-width: 0;
        text-align: left;
    }

    .buytogether-block .bt-item-main .bt-price {
        grid-column: 2;
    }

    .buytogether-block .bt-variant {
        grid-column: 1 / 4;
        grid-row: 3;
        max-width: none;
    }

    .buytogether-block .bt-item input[type="checkbox"] {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .buytogether-block .bt-tag {
        grid-column: 1 / 3;
        grid-row: 3;
    }

    .buytogether-block .bt-footer {
        align-items: stretch;
    }

    .buytogether-block .bt-submit {
        width: 100%;
    }
}
