/* Scoped to Breakdance / Jebra product cart — does not alter theme layout elsewhere. */
.breakdance-woocommerce div.product form.cart .bakery-tier-grid {
    flex: 1 1 100%;
    width: 100%;
    margin: 0 0 20px;
    font-family: inherit;
    color: inherit;
}

.breakdance-woocommerce div.product form.cart .bakery-tier-grid__heading {
    margin: 0 0 10px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.3;
    text-transform: uppercase;
    color: #555555;
}

.breakdance-woocommerce div.product form.cart .bakery-tier-grid__cards {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
}

.breakdance-woocommerce div.product form.cart .bakery-tier-grid--1 .bakery-tier-grid__cards {
    grid-template-columns: minmax(0, 16rem);
}

.breakdance-woocommerce div.product form.cart .bakery-tier-grid--2 .bakery-tier-grid__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.breakdance-woocommerce div.product form.cart .bakery-tier-grid--3 .bakery-tier-grid__cards,
.breakdance-woocommerce div.product form.cart .bakery-tier-grid--4 .bakery-tier-grid__cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 767px) {
    .breakdance-woocommerce div.product form.cart .bakery-tier-grid--2 .bakery-tier-grid__cards,
    .breakdance-woocommerce div.product form.cart .bakery-tier-grid--3 .bakery-tier-grid__cards,
    .breakdance-woocommerce div.product form.cart .bakery-tier-grid--4 .bakery-tier-grid__cards {
        grid-template-columns: 1fr;
    }

    .breakdance-woocommerce div.product form.cart .bakery-tier-grid--1 .bakery-tier-grid__cards {
        grid-template-columns: 1fr;
    }
}

.breakdance-woocommerce div.product form.cart .bakery-tier-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex: 0 1 auto;
    min-width: 130px;
    max-width: 160px;
    padding: 12px 14px;
    border: 1.5px solid #d6e0d6;
    border-radius: 6px;
    background: #ffffff;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease, background 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.breakdance-woocommerce div.product form.cart .bakery-tier-card:hover {
    border-color: #002805;
    background: #f4f7f4;
}

.breakdance-woocommerce div.product form.cart .bakery-tier-card.is-selected {
    border: 2px solid #002805;
    background: #f4f7f4;
}

.breakdance-woocommerce div.product form.cart .bakery-tier-card:focus-visible {
    outline: 2px solid #002805;
    outline-offset: 2px;
}

.breakdance-woocommerce div.product form.cart .bakery-tier-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #002805;
    color: #ffffff;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.6;
    text-transform: uppercase;
}

.breakdance-woocommerce div.product form.cart .bakery-tier-card__pieces {
    display: block;
    margin: 2px 0 0;
    padding-right: 2.5rem;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.3;
    text-transform: uppercase;
    color: #111111;
    white-space: nowrap;
}

.breakdance-woocommerce div.product form.cart .bakery-tier-card__line {
    display: block;
    font-family: inherit;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.45;
    color: #555555;
    white-space: nowrap;
}

.breakdance-woocommerce div.product form.cart .bakery-tier-card__total {
    display: block;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    color: #002805;
    white-space: nowrap;
}

/* Fallback for non-Breakdance themes */
.bakery-tier-grid {
    width: 100%;
    margin: 0 0 20px;
}

.bakery-tier-grid__heading {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #555555;
}

.bakery-tier-grid__cards {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
}

.bakery-tier-grid--2 .bakery-tier-grid__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bakery-tier-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex: 0 1 auto;
    min-width: 130px;
    max-width: 160px;
    padding: 12px 14px;
    border: 1.5px solid #d6e0d6;
    border-radius: 6px;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease, background 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.bakery-tier-card:hover {
    border-color: #002805;
    background: #f4f7f4;
}

.bakery-tier-card.is-selected {
    border: 2px solid #002805;
    background: #f4f7f4;
}

.bakery-tier-card:focus-visible {
    outline: 2px solid #002805;
    outline-offset: 2px;
}

.bakery-tier-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #002805;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.6;
    text-transform: uppercase;
}

.bakery-tier-card__pieces {
    display: block;
    margin: 2px 0 0;
    padding-right: 2.5rem;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #111111;
    white-space: nowrap;
}

.bakery-tier-card__line {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #555555;
    white-space: nowrap;
}

.bakery-tier-card__total {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #002805;
    white-space: nowrap;
}
