/* Dana bundle: what both designs share (the template's .s-banner-bundle,
 * design/css/styles.css 18039-18121, 20202-20222, 20607-20618, 21302, 21418,
 * 22676-22681). A picture column and a column holding the title, a slider of
 * product cards (components/product-card.jinja) and one button; bundle-1.css
 * and bundle-2.css draw each design, every rule there scoped to its class.
 *
 * Columns, measured at 1440 / 1024 / 768 / 390 against home-baby.html:2007
 * and home-vegetable.html:3843 (2026-09-29): the template's .row of two
 * Bootstrap columns 24px apart, stacked under 768. Its columns are 5/12 and
 * 7/12 of the row plus the gutter, so the picture column is
 * (row + 24px) * 5 / 12 - 24px: 566px of the 1392px container at 1440 (a
 * plain 5fr / 7fr grid made it 570). Sizes are px: the starter's root is
 * 12px (runbook 5.0). One sheet for both directions: logical properties.
 */
.dana-bundle__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}
@media (min-width: 768px) {
  .dana-bundle__row {
    column-gap: 24px;
    grid-template-columns: minmax(0, var(--dana-bundle-media, 1fr)) minmax(0, 1fr);
  }
  .dana-bundle--end .dana-bundle__row { grid-template-columns: minmax(0, 1fr) minmax(0, var(--dana-bundle-media, 1fr)); }
  .dana-bundle--end .dana-bundle__media { order: 2; }
  /* No picture and no details bar: the box alone, in the middle. */
  .dana-bundle--solo .dana-bundle__row { grid-template-columns: minmax(0, 1fr); }
}
:where(.dana-bundle--solo) .dana-bundle__panel { inline-size: 100%; margin-inline: auto; }

/* ---- The picture (.image-banner / .image-wrap .image) ----------------------
   The identity's picture corners (16px on the baby and grocery designs);
   on hover it grows to 1.06 over 2s (.hover-img .img-style, styles.css
   3615-3627), only where there is a real pointer. */
.dana-bundle__media { position: relative; min-inline-size: 0; }
.dana-bundle__picture {
  position: relative;
  overflow: hidden;
  border-radius: var(--dana-radius-image);
  background-color: var(--dana-surface);
}
.dana-bundle__img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transition: opacity .5s ease, transform 2s cubic-bezier(0, 0, .44, 1.18);
}
@media (hover: hover) {
  .dana-bundle__media:hover .dana-bundle__img { transform: scale(1.06); }
}

/* ---- The column with the slider (.bundle-wrap) -------------------------------
   A column 20px apart (40px from 1200), the head centred over the slider. */
.dana-bundle__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-inline-size: 0;
}
@media (min-width: 1200px) { .dana-bundle__panel { gap: 40px; } }
/* The section's sheet is linked again by every instance, so on a page with
   both designs this sheet also comes AFTER an earlier instance's design
   sheet: a rule a design sheet overrides stays lighter here (:where), and
   the design wins by weight, never by order (states preview, 2026-09-29:
   the head's -24px lift was lost on every design 1 after a design 2). */
:where(.dana-bundle) .dana-bundle__head { margin: 0; }
.dana-bundle .dana-bundle__title { color: var(--dana-bundle-title, var(--dana-heading)); overflow-wrap: anywhere; }
.dana-bundle__text { overflow-wrap: anywhere; }

/* ---- The slider ----------------------------------------------------------------
   Two cards 12px apart, three 24px apart from 1200 (the section's JSON).
   Arrows (.nav-swiper, 34px in a bundle, styles.css 18075-18084) sit 40px
   outside the slider and only from 1400 (the template's d-xxl-flex); under
   1400, or with the arrows off, the dots show instead (d-xxl-none). Up and
   down, the template's main.js (posNavSwiper, 1336-1350) puts them at
   calc(50% - half the first card's text), 3px down (.wrap-pos-nav,
   5236-5244): bundle.js measures that text into --dana-bundle-info-h. */
.dana-bundle__slider { position: relative; min-inline-size: 0; }
.dana-bundle__nav { display: none; }
@media (min-width: 1400px) {
  .dana-bundle__nav {
    position: absolute;
    z-index: 3;
    inset-block-start: calc(50% - var(--dana-bundle-info-h, 0px) / 2);
    display: inline-flex;
    inline-size: 34px;
    block-size: 34px;
    margin-block-start: 3px;
    transform: translateY(-50%);
  }
  .dana-bundle__nav.dana-sw-nav--prev { inset-inline-start: -40px; }
  .dana-bundle__nav.dana-sw-nav--next { inset-inline-end: -40px; }
  .dana-bundle__nav.swiper-button-lock { display: none; }
  .dana-bundle--arrows .dana-bundle__dots { display: none; }
}
/* Few products (bundle.jinja works them out): before the script the row
   already stands where Swiper's centerInsufficientSlides and its lock put
   it, so nothing moves when it runs. One product stands in the middle at
   every width; fewer than a row from 1200 stand in the middle there; a row
   that fits from 1200 has no arrows and no dots there. */
.dana-bundle--center .swiper:not(.swiper-initialized) > .swiper-wrapper { justify-content: center; }
@media (min-width: 1200px) {
  .dana-bundle--center-wide .swiper:not(.swiper-initialized) > .swiper-wrapper { justify-content: center; }
  .dana-bundle--still-wide :is(.dana-bundle__dots, .dana-bundle__nav) { display: none; }
}

/* ---- The cards in a bundle ----------------------------------------------------
   From 1200 a Standard card's icons are 40px, 12px from the picture's edge
   and 12px apart (.bundle-wrap .card-product:not(.style-2, .style-3),
   styles.css 20607-20615), not the 45px / 20px of a product row. */
@media (min-width: 1200px) {
  .dana-bundle :is(html.dana-cards--d1 .dana-card:not(.dana-card--own), .dana-card.dana-card--d1) { --dana-card-icon: 40px; --dana-card-edge: 12px; }
  html .dana-bundle :is(html.dana-cards--d1 .dana-card:not(.dana-card--own), .dana-card.dana-card--d1) .dana-card__icons { gap: 12px; }
}

/* The section's own card text alignment, over the Product card group's
   (card.css 497-501): the grocery design centres its cards but not the ones
   in its bundle. `html` in front for the weight of card.css's rules. */
html .dana-bundle--card-start .dana-card__body { text-align: start; }
html .dana-bundle--card-start :is(.dana-card__price.dana-price, .dana-card__rating, .dana-card__notes, .dana-card__stock) { justify-content: flex-start; }
html .dana-bundle--card-center .dana-card__body { text-align: center; }
html .dana-bundle--card-center :is(.dana-card__price.dana-price, .dana-card__rating, .dana-card__notes, .dana-card__stock) { justify-content: center; }
html .dana-bundle--card-center .dana-card__features ul { margin-inline: auto; }
/* The Details card centres its list on a centred page (card-4.css, 0,5,1). */
html .dana-bundle.dana-bundle--card-start :is(.dana-card:not(.dana-card--own), .dana-card.dana-card--d4) .dana-card__features ul { margin-inline: 0; }

/* On a dark ground (the section's colour, or a strong dark overlay: worked
   out in the template) the words, the cards' names and prices, the lines and
   the dots turn light. The old price is set again here: core.css mixes it
   from the text colour on :root, where it stays dark. */
.dana-bundle--on-dark {
  --dana-heading: #ffffff;
  --dana-text: #ffffff;
  --dana-muted: rgba(255, 255, 255, .75);
  --dana-line: rgba(255, 255, 255, .3);
  --dana-price-old: rgba(255, 255, 255, .6);
  --dana-dot-idle: rgba(255, 255, 255, .6);
  --dana-dot-active: #ffffff;
  --dana-dot-halo: rgba(255, 255, 255, .4);
}
/* The white discs keep their dark marks: the card's icons and the arrows. */
.dana-bundle--on-dark .dana-card { --dana-card-icon-ink: #000000; --dana-card-icon-hover: #000000; --dana-card-icon-hover-ink: #ffffff; }
.dana-bundle--on-dark .dana-bundle__nav:not(.swiper-button-disabled, :hover, :focus-visible) { color: #000000; }

/* ---- Note, button, hint ------------------------------------------------------- */
.dana-bundle__note {
  margin: 0;
  font-size: var(--dana-fs-md);
  line-height: var(--dana-lh-md);
  color: var(--dana-text);
  text-align: center;
  overflow-wrap: anywhere;
}
.dana-bundle__action { text-align: center; }
/* The button's own pair when the merchant gives one (both together), else
   the theme's buttons. The template's .tf-btn sizes are core.css's. */
.dana-bundle .dana-bundle__add {
  max-inline-size: 100%;
  white-space: normal;
  border-color: var(--dana-bundle-btn, var(--dana-primary));
  background-color: var(--dana-bundle-btn, var(--dana-primary));
  color: var(--dana-bundle-btn-ink, var(--dana-on-primary));
}
.dana-bundle .dana-bundle__add:hover, .dana-bundle .dana-bundle__add:focus-visible { color: var(--dana-bundle-btn-ink, var(--dana-on-primary)); }
.dana-bundle .dana-bundle__add.is-added { opacity: .85; }
.dana-bundle__hint {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--dana-muted);
  text-align: center;
}
.dana-bundle__action > .dana-bundle__hint:first-child { margin-block-start: 0; }
