/* Dana bundle, design 1 - the framed box beside a picture with a sticker
 * (home-baby.html:2007, .s-banner-bundle.s2-banner-bundle; styles.css
 * 18052-18084, 20215-20224, 21418, 22679). Every rule is scoped to
 * .dana-bundle--d1.
 *
 * Measured at 1440 / 1024 / 768 / 390 (2026-09-29): spacing 145 / 120 above
 * and below, 125 / 100 up to 1024, 60 / 60 on phones (.flat-spacing-27);
 * columns half and half from 768, 5/12 and 7/12 from 1200; the picture as
 * tall as the box beside it (879 x 939, its own shape, when stacked); the
 * box a 1px frame (the frame colour setting: #f3a24b on the baby page, the
 * buttons colour when left empty, so no other identity gets orange) with 16px corners,
 * 0 30px 30px inside (0 49px 41px from 1200, 806px at most, against the
 * column's end), 60px under the picture on phones; the title's block sits
 * on the frame's top line (margin -25px auto 8px), the line stopping at its
 * words (the same 385.7px gap at 1440, drawn, not painted over); the
 * title 39/49 (38/48 up to 1024, 28/38 on phones); the cards' text with no
 * space under it (.card-product-info.pb-0); a 219 x 237 sticker hanging
 * 77px under the picture's start corner from 1200 (66px out of it from
 * 1600), swinging (swing2, 10s).
 */
/* The head rises above the box by --dana-bundle-lift (below), so the space
   above never goes under it: with 00 above, the title stayed 24px over the
   section before (review 2026-09-29). On phones the picture comes first, so
   only a box with no picture needs it there. */
.dana-bundle--d1 { --dana-bundle-lift: 24px; }
.dana-bundle--d1.dana-bundle--no-title { --dana-bundle-lift: 12px; }
.dana-bundle--d1.dana-bundle--no-head { --dana-bundle-lift: 0px; }
.mt-section.dana-bundle--d1 { padding-block: max(var(--dana-bundle-lift), var(--mt-space-top, 145px)) var(--mt-space-bottom, 120px); }
@media (max-width: 1024px) {
  .mt-section.dana-bundle--d1 { padding-block: max(var(--dana-bundle-lift), var(--mt-space-top, 125px)) var(--mt-space-bottom, 100px); }
}
@media (max-width: 767px) {
  .mt-section.dana-bundle--d1 {
    padding-block: var(--mt-space-top-mobile, var(--mt-space-top, 60px)) var(--mt-space-bottom-mobile, var(--mt-space-bottom, 60px));
  }
  .mt-section.dana-bundle--d1.dana-bundle--solo { padding-block-start: max(var(--dana-bundle-lift), var(--mt-space-top-mobile, var(--mt-space-top, 60px))); }
}
@media (min-width: 1200px) {
  .dana-bundle--d1 { --dana-bundle-media: calc((100% + 24px) * 5 / 12 - 24px); }
}

/* The picture: the box's height beside it, its own shape when stacked. */
.dana-bundle--d1 .dana-bundle__picture { aspect-ratio: 879 / 939; }
@media (min-width: 768px) {
  .dana-bundle--d1 .dana-bundle__media { display: flex; flex-direction: column; }
  .dana-bundle--d1 .dana-bundle__picture { flex: 1 1 auto; aspect-ratio: auto; min-block-size: 320px; }
  .dana-bundle--d1 .dana-bundle__img { position: absolute; inset: 0; }
}

/* The sticker (.banner-bundle .item): only from 1200. */
.dana-bundle--d1 .dana-bundle__sticker { display: none; }
@media (min-width: 1200px) {
  .dana-bundle--d1 .dana-bundle__sticker {
    position: absolute;
    z-index: 2;
    /* 77px under the picture, never further than the space under the
       section: with 00 under it, it hung 77px over the next section. */
    inset-block-end: max(-77px, calc(-1 * var(--mt-space-bottom, 120px)));
    inset-inline-start: 0;
    display: block;
    inline-size: 219px;
    block-size: auto;
    pointer-events: none;
    animation: dana-bundle-swing 10s infinite ease-in-out;
  }
  /* With the picture at the end it hangs from the picture's outer corner. */
  .dana-bundle--d1.dana-bundle--end .dana-bundle__sticker { inset-inline-start: auto; inset-inline-end: 0; }
}
@media (min-width: 1600px) {
  .dana-bundle--d1 .dana-bundle__sticker { inset-inline-start: -66px; }
  .dana-bundle--d1.dana-bundle--end .dana-bundle__sticker { inset-inline-start: auto; inset-inline-end: -66px; }
  /* Edge to edge there is no room outside the picture: it stays on it. */
  .dana-bundle--d1.mt-section--full .dana-bundle__sticker { inset-inline-start: 0; }
  .dana-bundle--d1.mt-section--full.dana-bundle--end .dana-bundle__sticker { inset-inline-start: auto; inset-inline-end: 0; }
}
@keyframes dana-bundle-swing {
  20% { transform: rotate(5deg); }
  40% { transform: rotate(-4deg); }
  60% { transform: rotate(3deg); }
  80% { transform: rotate(-2deg); }
  100% { transform: rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
  .dana-bundle--d1 .dana-bundle__sticker { animation: none; }
}

/* The framed box. The frame is drawn in two parts so its top line can stop
   at the title's words with nothing painted behind them (the template lays a
   white block over the line, which would sit on a merchant's background
   picture as a pale patch): the box's ::before draws the sides and the foot
   from 16px down, and the head's ::before / ::after draw the top line and its
   rounded corners on each side of the words. The box keeps the template's
   inner size: 1px of frame + 30px (49px from 1200) = 31px (50px) of padding. */
.dana-bundle--d1 .dana-bundle__panel { padding: 0 31px 31px; }
.dana-bundle--d1 .dana-bundle__panel::before {
  content: "";
  position: absolute;
  inset: 16px 0 0;
  border: 1px solid var(--dana-bundle-frame, var(--dana-primary));
  border-block-start: 0;
  border-radius: 0 0 16px 16px;
  pointer-events: none;
}
/* No title or text: a whole frame, and space inside its top. */
.dana-bundle--d1.dana-bundle--no-head .dana-bundle__panel { padding-block-start: 31px; }
.dana-bundle--d1.dana-bundle--no-head .dana-bundle__panel::before { inset-block-start: 0; border-block-start: 1px solid var(--dana-bundle-frame, var(--dana-primary)); border-radius: 16px; }
@media (max-width: 767px) {
  .dana-bundle--d1:not(.dana-bundle--solo) .dana-bundle__panel { margin-block-start: 60px; }
}
@media (min-width: 1200px) {
  .dana-bundle--d1 .dana-bundle__panel {
    inline-size: 100%;
    max-inline-size: 806px;
    margin-inline-start: auto;
    margin-inline-end: 0;
    padding: 0 50px 42px;
  }
  .dana-bundle--d1.dana-bundle--no-head .dana-bundle__panel { padding-block-start: 42px; }
  .dana-bundle--d1.dana-bundle--end .dana-bundle__panel { margin-inline-start: 0; margin-inline-end: auto; }
  .dana-bundle--d1.dana-bundle--solo .dana-bundle__panel { margin-inline: auto; }
  /* Edge to edge the box takes its whole column, so no hole opens between
     it and the picture at 1920. */
  .dana-bundle--d1.mt-section--full:not(.dana-bundle--solo) .dana-bundle__panel { max-inline-size: none; }
}

/* The head on the frame's top line (.s2-banner-bundle .flat-title, margin
   -25px auto 8px on a 1px frame): its words in the middle, as wide as they
   are, 24px above the line; the line and the corners at each side, from the
   box's outer edge to the words. At least the padding's width each side, so
   long words wrap inside the box's content. */
.dana-bundle--d1 .dana-bundle__head {
  display: grid;
  grid-template-columns: minmax(31px, 1fr) minmax(0, max-content) minmax(31px, 1fr);
  gap: 0;
  margin: calc(-1 * var(--dana-bundle-lift)) -31px 8px;
}
.dana-bundle--d1 .dana-bundle__head::before,
.dana-bundle--d1 .dana-bundle__head::after {
  content: "";
  grid-row: 1;
  align-self: start;
  block-size: 17px;
  margin-block-start: var(--dana-bundle-lift);
  border-block-start: 1px solid var(--dana-bundle-frame, var(--dana-primary));
  pointer-events: none;
}
.dana-bundle--d1 .dana-bundle__head::before { grid-column: 1; border-inline-start: 1px solid var(--dana-bundle-frame, var(--dana-primary)); border-start-start-radius: 16px; }
.dana-bundle--d1 .dana-bundle__head::after { grid-column: 3; border-inline-end: 1px solid var(--dana-bundle-frame, var(--dana-primary)); border-start-end-radius: 16px; }
.dana-bundle--d1 .dana-bundle__head-main { grid-row: 1; grid-column: 2; }
@media (min-width: 1200px) {
  .dana-bundle--d1 .dana-bundle__head { grid-template-columns: minmax(50px, 1fr) minmax(0, max-content) minmax(50px, 1fr); margin-inline: -50px; }
}
.dana-bundle--d1 .dana-bundle__title { font-size: 39px; line-height: 49px; letter-spacing: 0; }
@media (max-width: 1024px) { .dana-bundle--d1 .dana-bundle__title { font-size: 38px; line-height: 48px; } }
@media (max-width: 767px) { .dana-bundle--d1 .dana-bundle__title { font-size: 28px; line-height: 38px; } }

/* A Standard card's text with no space under it (.card-product-info.pb-0). */
.dana-bundle--d1 :is(html.dana-cards--d1 .dana-card:not(.dana-card--own), .dana-card.dana-card--d1) .dana-card__body { padding-block-end: 0; }
