/* Bundles: a compact photo feed; quantities and totals follow the event. */
#collectionsPanel,#bundleScreen {
  --bundle-accent:#b9efcf; --bundle-on-accent:#173525; --bundle-tint:#b9efcf12; --bundle-border:var(--line);
}
#collectionsPanel[data-category="gta"],#bundleScreen[data-category="gta"] {
  --bundle-accent:#efbce4; --bundle-on-accent:#392335; --bundle-tint:#efbce410;
}
#collectionsPanel[data-category="new-year-gta"],#bundleScreen[data-category="new-year-gta"] {
  --bundle-accent:#a9e5e2; --bundle-on-accent:#173a38; --bundle-tint:#a9e5e212;
}
[data-theme="light"] #collectionsPanel,[data-theme="light"] #bundleScreen { --bundle-tint:#c8eadb38; }

/* Navigation, event controls and the segmented switch use the shared catalog header. */

#collectionsPanel { min-width:0; }
.bundles-intro { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:5px 12px; margin:16px 0 14px; }
.bundles-intro h2 { min-width:0; margin:0; font-size:clamp(24px,6.1vw,34px); line-height:1.16; letter-spacing:-.035em; }
.bundles-intro h2:focus { outline:none; }
.bundle-results {
  flex:0 0 auto; margin:0 0 0 auto; color:var(--muted); font-size:13px; line-height:1.4; white-space:nowrap; font-variant-numeric:tabular-nums;
}
.bundle-category-tabs { display:flex; align-items:stretch; gap:7px; min-width:0; margin-bottom:12px; overflow-x:auto; scrollbar-width:none; }
.bundle-category-tabs::-webkit-scrollbar { display:none; }
.bundle-category-tab {
  display:inline-flex; flex:0 0 auto; align-items:center; justify-content:center; min-height:44px; min-width:0;
  padding:8px 12px; border:1px solid var(--line-soft); border-radius:12px; background:var(--surface); color:var(--muted);
  font-size:14px; font-weight:550; line-height:1.2; text-align:center; white-space:nowrap;
}
.bundle-category-tab[aria-current="page"] { border-color:transparent; background:var(--bundle-accent); color:var(--bundle-on-accent); font-weight:700; }
.bundle-category-tab:not([aria-current="page"]):hover { color:var(--ink); background:var(--surface-soft); }
.bundle-pricing-help { margin:20px 0 0; color:var(--muted); font-size:13px; line-height:1.5; overflow-wrap:anywhere; }

/* Media reserves geometry before the shared image loader resolves. */
.bundle-mosaic {
  display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); grid-template-rows:repeat(2,minmax(0,1fr)); gap:3px;
  aspect-ratio:2.4; overflow:hidden; background:var(--surface-soft);
}
.bundle-mosaic-frame { position:relative; min-width:0; min-height:0; overflow:hidden; background:var(--surface-soft); }
.bundle-mosaic-frame:first-child { grid-row:1/-1; }
.bundle-mosaic[data-count="2"] { grid-template-columns:repeat(2,minmax(0,1fr)); }
.bundle-mosaic[data-count="2"] .bundle-mosaic-frame:nth-child(2) { grid-row:1/-1; }
.bundle-mosaic[data-count="1"] .bundle-mosaic-frame { grid-column:1/-1; }
.bundle-mosaic img { display:block; width:100%; height:100%; object-fit:cover; object-position:center; }
.bundle-card-media .bundle-mosaic.bundle-authored-cover { aspect-ratio:2; }
.bundle-image-empty { display:grid; grid-area:1/1/-1/-1; place-items:center; padding:16px; color:var(--muted); font-size:14px; }
.collections-grid.bundle-grid { display:grid; grid-template-columns:minmax(0,1fr); align-items:stretch; gap:14px; min-width:0; }
.bundle-card {
  display:flex; flex-direction:column; min-width:0; overflow:hidden; border:1px solid var(--bundle-border); border-radius:16px;
  background:var(--surface); color:var(--ink); transition:border-color .16s ease;
}
.bundle-card-link { display:block; min-width:0; color:inherit; text-decoration:none; outline-offset:-3px; }
.bundle-card:has(.bundle-card-link:focus-visible) { outline:2px solid var(--bundle-accent); outline-offset:3px; }
.bundle-card-link:focus-visible { outline:none; }
.bundle-card-media { display:block; position:relative; min-width:0; overflow:hidden; margin:6px 6px 0; border-radius:11px; }
.bundle-media-caption {
  position:absolute; bottom:7px; left:8px; max-width:calc(100% - 16px); padding:3px 7px; border-radius:6px;
  background:#101318b8; color:#fff; font-size:12px; line-height:1.3; pointer-events:none;
}
.bundle-card-body { min-width:0; padding:12px 14px 6px; }
.bundle-card-heading { display:flex; align-items:baseline; justify-content:space-between; gap:8px 12px; min-width:0; margin-bottom:8px; }
.bundle-card-heading h3 { min-width:0; margin:0; font-size:21px; line-height:1.2; letter-spacing:-.025em; font-weight:720; overflow-wrap:anywhere; }
.bundle-audience { flex:0 0 auto; margin:0; color:var(--muted); font-size:13px; line-height:1.4; white-space:nowrap; }
.bundle-card-items { display:grid; gap:3px; margin:0; padding:0; list-style:none; }
.bundle-card-items li {
  display:flex; justify-content:space-between; align-items:baseline; gap:10px; min-width:0; color:var(--muted); font-size:16px; line-height:1.4;
}
.bundle-card-items li>span { min-width:0; overflow-wrap:anywhere; }
.bundle-card-items li>b {
  flex:0 0 auto; color:var(--muted); font-size:14px; line-height:1.4; font-weight:500; font-variant-numeric:tabular-nums; white-space:nowrap;
}
.bundle-card-variant { display:block; font-size:13px; line-height:1.4; }
.bundle-selection-note { margin:8px 0 0; color:var(--muted); font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
.bundle-selection-note:empty { display:none; }
.bundle-price { min-width:0; }
.bundle-price-label { display:block; color:var(--muted); font-size:13px; line-height:1.4; }
.bundle-price-value {
  display:block; min-width:0; color:var(--ink); font-size:clamp(21px,5.65vw,25px); line-height:1.25; letter-spacing:-.035em;
  font-weight:750; font-variant-numeric:tabular-nums; overflow-wrap:anywhere;
}
.bundle-price-note { margin:0; color:var(--muted); font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
.bundle-price-note:empty { display:none; }
.bundle-card-footer {
  display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:10px; row-gap:0; align-items:center;
  min-width:0; margin-top:auto; padding:8px 14px 14px;
}
/* Partial quote explanations sit below both the price and action. */
.bundle-card-footer>.bundle-price { display:contents; }
.bundle-card-footer .bundle-price-label { grid-column:1; grid-row:1; }
.bundle-card-footer .bundle-price-value { grid-column:1; grid-row:2; }
.bundle-card-footer .bundle-price-note { grid-column:1/-1; grid-row:3; padding-top:7px; }
.bundle-card-footer .bundle-add { grid-column:2; grid-row:1/3; }
.bundle-add.primary {
  min-height:44px; min-width:112px; gap:6px; padding:10px 12px; border:1px solid transparent; border-radius:11px;
  background:var(--bundle-accent); color:var(--bundle-on-accent); font-size:14px; line-height:1.3; font-weight:720; white-space:nowrap;
}
.bundle-add.primary:hover:not(:disabled) { background:var(--bundle-accent); filter:brightness(1.04); }
.bundle-add.primary:active:not(:disabled) { transform:none; filter:brightness(.96); }
.bundle-add.primary:focus-visible { outline-color:var(--bundle-accent); }
.bundle-add.primary svg { width:17px; height:17px; }
.bundle-budget-note {
  margin:0 14px 13px; color:var(--muted); font-size:13px; line-height:1.45; font-variant-numeric:tabular-nums; overflow-wrap:anywhere;
}
.bundle-budget-note[data-state="over"] { color:var(--danger); }
.bundle-budget-note[data-state="within"] { color:var(--muted); }
.bundle-budget-note:empty { display:none; }
.bundle-tail { margin:20px 0 6px; max-width:850px; color:var(--muted); font-size:13px; line-height:1.55; }
.bundle-empty { padding:28px 18px; border:1px solid var(--line-soft); border-radius:16px; background:var(--surface); text-align:center; }
.bundle-empty h3 { font-size:20px; line-height:1.3; }
.bundle-empty p { margin:8px 0 18px; color:var(--muted); font-size:16px; line-height:1.5; }
.bundle-empty .secondary { min-height:44px; }
.bundle-eyebrow { color:var(--muted); font-size:13px; line-height:1.45; }

@media (hover:hover) {
  .bundle-card:hover { border-color:color-mix(in srgb,var(--bundle-accent) 55%,var(--line)); }
}
@media (min-width:768px) {
  .collections-grid.bundle-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
  .bundle-card-media .bundle-mosaic { aspect-ratio:2.6; }
  .bundle-card-body { padding:15px 18px 7px; }
  .bundle-card-heading h3 { font-size:23px; }
  .bundle-card-footer { padding:10px 18px 18px; }
  .bundle-budget-note { margin-inline:18px; }
}
@media (min-width:1000px) {
  .bundles-intro { margin-top:2px; margin-bottom:18px; }
  .bundle-category-tabs { gap:8px; }
  .bundle-category-tab { padding-inline:18px; }
}
@media (max-width:359px) {
  .bundles-intro { gap:8px; }
  .bundles-intro h2 { font-size:24px; }
  .bundle-category-tabs { gap:5px; }
  .bundle-category-tab { padding-inline:6px; }
  .bundle-card-body { padding-inline:12px; }
  .bundle-card-heading { gap:8px; }
  .bundle-card-heading h3 { font-size:20px; }
  .bundle-card-footer { gap:0 8px; padding-inline:12px; }
  .bundle-card-footer .bundle-price-value { font-size:21px; }
  .bundle-card-footer .bundle-add.primary { min-width:108px; padding-inline:10px; }
}
@media (prefers-reduced-motion:reduce) { .bundle-card,.bundle-add.primary { transition:none; } }
@media (forced-colors:active) {
  .bundle-category-tab,.bundle-add.primary,.bundle-card { border-color:CanvasText; }
  .bundle-category-tab[aria-current="page"] { background:Highlight; color:HighlightText; }
  .bundle-card:has(.bundle-card-link:focus-visible) { outline-color:Highlight; }
}

/* Loading uses the existing image state and keeps the photo's reserved size. */
.bundle-composition-image { position:relative; }
:where(.bundle-mosaic-frame,.bundle-composition-image):has(> .loading-image[data-media-state="loading"])::before {
  content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:linear-gradient(110deg,var(--surface-soft),color-mix(in srgb,var(--surface-soft) 80%,#a6b5c8),var(--surface-soft));
}
:where(.bundle-mosaic-frame,.bundle-composition-image):has(> .loading-image[data-loading-visible="true"])::before { animation:loading-breathe 1.7s ease-in-out infinite alternate; }
:where(.bundle-mosaic-frame,.bundle-composition-image):has(> .loading-image[data-media-state="error"])::before {
  content:'Фото не загрузилось'; position:absolute; inset:0; display:grid; place-content:center; padding:8px;
  color:var(--muted); background:var(--surface-soft); font-size:12px; text-align:center;
}
:root[data-app-boot="bundle"] .app-loading > [data-loading-route="bundle"],
:root[data-app-boot="collections"] .app-loading > [data-loading-route="collections"] { display:grid; gap:14px; }
.loading-bundle-photo { aspect-ratio:2.4; border-radius:14px; }
.loading-bundle-card { padding:8px; border:1px solid var(--line); border-radius:16px; }
.loading-bundle-card .loading-copy { padding:6px; gap:12px; }
@media(min-width:768px) { .loading-bundles-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(prefers-reduced-motion:reduce) { :where(.bundle-mosaic-frame,.bundle-composition-image)::before { animation:none!important; } }
