.pxab-food-bundle[hidden] {
    display: none !important;
}

.pxab-food-bundle {
    display: grid;
    gap: 16px;
    margin: 16px 0;
}

.pxab-food-bundle__section,
.pxab-food-bundle__group {
    min-width: 0;
    margin: 0;
    padding: 16px;
    border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
    border-radius: 12px;
}

.pxab-food-bundle__section > legend,
.pxab-food-bundle__group > legend,
.pxab-food-bundle__heading {
    margin: 0 0 8px;
    padding: 0;
    font: inherit;
    font-weight: 700;
}

.pxab-food-bundle__builder {
    display: grid;
    gap: 12px;
}

.pxab-food-bundle__group {
    display: grid;
    gap: 8px;
}

.pxab-food-bundle__help,
.pxab-food-bundle__note,
.pxab-food-bundle__schedule,
.pxab-food-bundle__saving {
    margin: 0 0 8px;
}

.pxab-food-bundle__schedule,
.pxab-food-bundle__saving {
    font-weight: 700;
}

.pxab-food-bundle__choice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
}

.pxab-food-bundle__choice + .pxab-food-bundle__choice {
    border-top: 1px dashed color-mix(in srgb, currentColor 14%, transparent);
}

.pxab-food-bundle__choice.is-unavailable {
    opacity: .55;
    cursor: not-allowed;
}

.pxab-food-bundle__choice input {
    margin: 0;
}

.pxab-food-bundle__contents-list {
    display: grid;
    gap: 8px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.pxab-food-bundle__contents-list > li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    align-items: baseline;
}

.pxab-food-bundle__contents-list small {
    grid-column: 1 / -1;
}

.pxab-food-bundle__component-detail {
    font-weight: 700;
    text-align: right;
}

.pxab-food-order-item__bundle {
    display: grid;
    gap: 4px;
    margin-top: 6px;
    padding-left: 12px;
    border-left: 2px solid color-mix(in srgb, currentColor 18%, transparent);
}

.pxab-food-order-item__bundle-title,
.pxab-food-order-item__bundle-line {
    display: block;
    margin: 0;
}

.pxab-food-order-item__bundle-title {
    font-weight: 700;
}

@media (max-width: 640px) {
    .pxab-food-bundle__section,
    .pxab-food-bundle__group {
        padding: 13px;
    }

    .pxab-food-bundle__choice {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .pxab-food-bundle__choice > strong {
        grid-column: 2;
        justify-self: start;
    }
}

/* Optional image-card presentation for Build Your Own groups. */
.pxab-food-bundle__image-choices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.pxab-food-bundle__choice--image {
    position: relative;
    grid-template-columns: 72px minmax(0, 1fr);
    align-content: start;
    min-height: 100%;
    padding: 10px;
    border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
    border-radius: 10px;
    overflow: hidden;
    background: color-mix(in srgb, currentColor 3%, transparent);
}

.pxab-food-bundle__choice--image + .pxab-food-bundle__choice--image {
    border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}

.pxab-food-bundle__choice--image:has(input:checked) {
    border-color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 0 0 2px #bbf7d0;
}

.pxab-food-bundle__choice--image:has(input:checked) .pxab-food-bundle__choice-image {
    box-shadow: inset 0 0 0 2px #86efac;
}

.pxab-food-bundle__choice--image:has(input:checked) .pxab-food-bundle__choice-title {
    color: #166534;
}

.pxab-food-bundle__choice--image:has(input:focus-visible) {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.pxab-food-bundle__choice--image > input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.pxab-food-bundle__choice-image {
    display: grid;
    place-items: center;
    inline-size: 72px;
    block-size: 72px;
    overflow: hidden;
    border-radius: 8px;
    background: color-mix(in srgb, currentColor 8%, transparent);
}

.pxab-food-bundle__choice-image img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
}

.pxab-food-bundle__choice-image-placeholder {
    font-size: 1.35rem;
    font-weight: 700;
}

.pxab-food-bundle__choice-content {
    display: grid;
    align-content: center;
    gap: 3px;
    min-width: 0;
}

.pxab-food-bundle__choice-title {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.pxab-food-bundle__choice--image > strong {
    grid-column: 1 / -1;
    justify-self: start;
}

@media (max-width: 480px) {
    .pxab-food-bundle__image-choices {
        grid-template-columns: 1fr;
    }
}

/* Box-size option cards with inline contents access. */
.pxab-food-bundle__sizes {
    display: grid;
    gap: 10px;
}

.pxab-food-bundle__sizes > legend {
    margin-bottom: 2px;
}

.pxab-food-bundle__size-option {
    position: relative;
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--pxab-food-border);
    border-radius: 13px;
    background: var(--pxab-food-bg);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.pxab-food-bundle__size-option:has(input:checked) {
    border-color: var(--pxab-food-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--pxab-food-accent) 18%, transparent);
}

.pxab-food-bundle__size-option:has(input:focus-visible) {
    outline: 2px solid var(--pxab-food-accent);
    outline-offset: 2px;
}

.pxab-food-bundle__size-option.is-unavailable {
    background: color-mix(in srgb, var(--pxab-food-surface) 76%, var(--pxab-food-bg));
}

.pxab-food-bundle__size-option .pxab-food-bundle__choice--size {
    grid-column: 1 / -1;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 0;
    min-height: 92px;
    padding: 0;
}

.pxab-food-bundle__size-option .pxab-food-bundle__choice--size > input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.pxab-food-bundle__size-image {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    display: grid;
    place-items: center;
    inline-size: 80px;
    block-size: 100%;
    min-block-size: 0;
    overflow: hidden;
    background: var(--pxab-food-surface);
}

.pxab-food-bundle__size-image img {
    inline-size: 100%;
    block-size: 100%;
    min-block-size: 0;
    object-fit: cover;
}

.pxab-food-bundle__size-image-placeholder {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--pxab-food-muted);
}

.pxab-food-bundle__size-content {
    grid-column: 2;
    display: grid;
    align-content: center;
    gap: 4px;
    min-width: 0;
    padding: 13px 16px 8px;
}

.pxab-food-bundle__size-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: baseline;
}

.pxab-food-bundle__size-name,
.pxab-food-bundle__size-price {
    font-weight: 700;
}

.pxab-food-bundle__size-price {
    white-space: nowrap;
}

.pxab-food-bundle__size-description {
    color: var(--pxab-food-muted);
    line-height: 1.4;
}

.pxab-food-bundle__view-contents {
    position: relative;
    z-index: 2;
    grid-column: 2;
    justify-self: start;
    margin: 0 16px 12px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border: 1px solid var(--pxab-food-bundle-view-border, var(--pxab-food-border));
    border-radius: var(--pxab-food-bundle-view-radius, 999px);
    background: var(--pxab-food-bundle-view-bg, #fff);
    color: var(--pxab-food-bundle-view-text, var(--pxab-food-accent));
    padding: var(--pxab-food-bundle-view-padding-y, 8px) var(--pxab-food-bundle-view-padding-x, 14px);
    cursor: pointer;
    font: inherit;
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.pxab-food-bundle__view-contents:hover {
    border-color: var(--pxab-food-bundle-view-hover-border, var(--pxab-food-accent));
    background: var(--pxab-food-bundle-view-hover-bg, #f8fafc);
    color: var(--pxab-food-bundle-view-hover-text, var(--pxab-food-accent));
    text-decoration: none;
}

.pxab-food-bundle__view-contents:focus-visible {
    border-color: var(--pxab-food-bundle-view-hover-border, var(--pxab-food-accent));
    background: var(--pxab-food-bundle-view-hover-bg, #f8fafc);
    color: var(--pxab-food-bundle-view-hover-text, var(--pxab-food-accent));
    outline: 2px solid var(--pxab-food-focus, var(--pxab-food-accent));
    outline-offset: 2px;
    text-decoration: none;
}

@media (max-width: 520px) {
    .pxab-food-bundle__size-option .pxab-food-bundle__choice--size {
        grid-template-columns: 68px minmax(0, 1fr);
        min-height: 82px;
    }

    .pxab-food-bundle__size-image {
        inline-size: 68px;
    }

    .pxab-food-bundle__size-content {
        padding: 11px 12px 7px;
    }

    .pxab-food-bundle__size-heading {
        gap: 10px;
    }

    .pxab-food-bundle__size-option {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .pxab-food-bundle__view-contents {
        grid-column: 2;
        margin: 0 12px 11px;
    }
}

/* Optional per-size stock. */
.pxab-food-bundle__size-stock {
    color: var(--pxab-food-muted);
    font-weight: 600;
}
.pxab-food-bundle__choice--size.is-unavailable .pxab-food-bundle__size-stock {
    color: #b45309;
}
.pxab-food-bundle__choice--size.is-unavailable strong {
    text-decoration: line-through;
}
