/* Составной товар использует настоящие иконки общего каталога. */
/* Минимум 0 позволяет сетке сжаться до области картинки, независимо от размеров PNG. */
.bundle-collage { display: grid; grid-template-columns: repeat(var(--bundle-columns, 2), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: .25rem; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 17rem; margin: auto; padding: .8rem 1.4rem; }
.bundle-collage > span { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; }
.bundle-collage img, .shop-product .product-card__visual .bundle-collage img { width: 100%; height: 100%; max-height: 8rem; object-fit: contain; }
.bundle-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); gap: 1rem; margin-top: 1.4rem; }
.bundle-admin-card { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; align-items: center; }
.bundle-admin-card h2 { margin: 0; overflow-wrap: anywhere; }
.bundle-admin-card__visual { height: 9rem; background: var(--surface-inset); border-radius: .8rem; }
.bundle-admin-prices { display: grid; gap: .35rem; font-size: .85rem; }
.bundle-admin-prices del { color: var(--muted); }
.bundle-editor-identity { display: grid; grid-template-columns: 1fr 2fr; gap: 1rem; }
.bundle-editor-identity label { display: grid; align-content: start; gap: .4rem; }
.bundle-editor-prices { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 1.2rem; }
.bundle-editor-prices .shop-admin-price { max-width: none; min-width: 0; align-content: start; }
.bundle-reference { padding: .8rem; border: 1px solid var(--line-strong); border-radius: .7rem; background: var(--surface-inset); }
.bundle-reference h3 { margin: 0 0 .5rem; font-size: 1rem; }
.bundle-reference small { display: block; margin-top: .6rem; }
.bundle-reference p { margin: .5rem 0 0; font-size: .78rem; }
.bundle-reference-unit { display: block; color: var(--muted); white-space: normal; }
.bundle-confirm-contents ul { max-height: 12rem; overflow: auto; padding-left: 1.4rem; }
.bundle-confirm-contents summary { cursor: pointer; }
.bundle-selected { display: flex; flex-wrap: wrap; gap: .6rem; }
.bundle-selected__item { display: flex; align-items: center; gap: .5rem; max-width: 100%; border: 1px solid var(--line-strong); border-radius: .7rem; padding: .35rem .4rem; background: var(--surface-inset); font-size: .85rem; }
.bundle-selected__item span { overflow-wrap: anywhere; min-width: 0; }
.bundle-selected__item img { width: 36px; height: 36px; object-fit: contain; }
.bundle-selected__item button { flex-shrink: 0; }
.bundle-catalog-table th, .bundle-catalog-table td { padding: .7rem .5rem; }
.bundle-catalog-table th:first-child, .bundle-catalog-table td:first-child { width: auto; text-align: left; }
.bundle-catalog-table th:nth-child(3) { width: 7rem; white-space: normal; }
.bundle-catalog-table td:nth-child(3) input { min-width: 4rem; }
.bundle-catalog-table th:last-child, .bundle-catalog-table td:last-child { width: auto; }
.bundle-dialog { width: min(52rem, calc(100vw - 1.5rem)); max-width: none; padding: 0; }
.bundle-dialog__panel { padding: 0; }
.bundle-dialog__content { padding: 1.3rem; }
.bundle-dialog__heading { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; align-items: center; }
.bundle-dialog__heading .bundle-collage { height: 8rem; border-radius: .8rem; background: var(--surface-inset); padding: .5rem; }
.bundle-dialog__heading h2 { margin: .4rem 0; overflow-wrap: anywhere; }
.bundle-dialog__heading p { white-space: normal; overflow-wrap: anywhere; }
.bundle-item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.bundle-item { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .65rem; text-align: left; color: var(--text); border: 1px solid var(--line-strong); border-radius: .75rem; background: var(--surface-inset); cursor: pointer; }
.bundle-item:hover, .bundle-item[aria-expanded="true"] { border-color: var(--accent); background: var(--surface); }
.bundle-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bundle-item img { width: 3.5rem; height: 3.5rem; object-fit: contain; }
.bundle-item strong { display: block; font-size: .9rem; overflow-wrap: anywhere; }
.bundle-item small { display: block; color: var(--muted); font-size: .72rem; margin-top: .25rem; }
.bundle-item b { font-size: .85rem; white-space: nowrap; }
.bundle-item-tip { position: fixed; inset: auto; margin: 0; width: min(26rem, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 1rem; padding: 0; box-shadow: 0 14px 45px #0006; }
.bundle-item-tip .bundle-item-tip__close { position: sticky; top: .4rem; display: flex; margin: .4rem .4rem -.4rem auto; z-index: 1; }
.bundle-item-tip .item-card { padding: .8rem; border: 0; }
.bundle-item-tip .item-card__header { gap: .75rem; }
.bundle-item-tip .item-card__hero { width: 4rem; height: 4rem; }
.bundle-item-tip .item-card__identity h3 { font-size: 1.05rem; }
.bundle-item-tip .item-card__characteristics { font-size: .8rem; }
@media (max-width: 760px) {
  .bundle-editor-prices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bundle-reference { grid-column: 1 / -1; }
  .bundle-editor-identity { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .bundle-dialog__content { padding: .8rem; }
  .bundle-item-grid { grid-template-columns: 1fr; }
  .bundle-dialog__heading { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .bundle-dialog__heading .bundle-collage { height: 5rem; }
  .bundle-admin-card { grid-template-columns: 5rem minmax(0, 1fr); }
  .bundle-admin-card__visual { height: 6rem; }
  .bundle-collage { padding: .3rem; }
}
