/* JustDog smart add-ons - product-page set block. The block reuses the theme's .jd-bundle markup and jd-cake-bundle.css (same look as the 生日組合);
   this sheet only sets tokens for the one thing that differs: a set can hold FOUR pictures (main + 3 extras), the bundle at most three. */
@media (max-width: 767.98px) {
  /* four bar thumbnails + three plus signs must fit the summary bar of a 360px phone: smaller thumbnails through the bundle's own token */
  .jd-smart.jd-smart--n4 { --jd-bundle-bar-thumb: 44px; }
}

/* the set's add button: same size rules as the bundle's button (own class so the theme's jd_bundle_add GA event is not sent for it) */
.jd-smart__add { min-height: 48px; }
@media (max-width: 767.98px) {
  .jd-smart__add { width: 100%; height: auto; min-height: 48px; padding-block: 10px; white-space: normal; line-height: 1.4; }
}
@media (min-width: 768px) {
  .jd-smart__add { min-width: 280px; }
}

/* checkout block: the free-shipping nudge under the heading and the small tag on an offer that closes the gap (colours from the shared tokens) */
.jd-addons__nudge {
  margin: -4px 0 12px;
  color: var(--jd-text-muted, #7a6656);
  font-size: 13px;
}
.jd-addons__nudge strong { color: var(--jd-sale, #b3265a); }
.jd-addons__ship {
  justify-self: start;
  padding: 1px 10px;
  border-radius: 999px 14px 999px 14px;
  background: var(--jd-butter-300, #ffe38a);
  color: var(--jd-text-title, #3b2a1f);
  font-size: 12px;
  font-weight: 700;
}

/* D1: the list gets 10px of room on both sides (the panel clips its content: overflow hidden) so the checkbox's 44x44 hit area is not cut off on the left;
   the negative margin keeps every row exactly where it was. The label's ::before adds 10px around the 24px box = 44x44. */
.jd-smart .jd-bundle__panel-in {
  margin-inline: -10px;
  padding-inline: 10px;
}
.jd-smart__check { position: relative; }
.jd-smart__check::before {
  content: "";
  position: absolute;
  inset: -10px;   /* 24px box + 10px each side = 44px */
}
.jd-smart__qty,
.jd-smart__status {
  margin: var(--jd-space-xs) 0 0;
  color: var(--jd-text-muted);
  font-size: 13px;
}
.jd-smart__status { margin-top: 0; }

/* sub-line: the tiers, the one that matches the ticked items is bold */
.jd-smart__tier.is-on { color: var(--jd-sale); font-weight: 700; }
/* collapsed bar: the real saving next to the set price (the bar may wrap here: on a phone the badge drops under the price instead of running into the chevron) */
.jd-smart .jd-bundle__sum { flex-wrap: wrap; row-gap: 4px; }
.jd-smart__save {
  padding: 1px 10px;
  border-radius: 999px 14px 999px 14px;
  background: var(--jd-butter-300);
  color: var(--jd-text-title);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* main row ("current product"): light cream tint (bleeds into the 10px side room, so the picture still starts at the list edge) and the picture spans the
   checkbox + picture columns, left aligned with the list and sitting on the row's bottom edge. Only while the checkbox column exists. */
.jd-smart .jd-bundle__row.is-main {
  margin-inline: -10px;
  padding-inline: 10px;
  background: var(--jd-cream-50);
  border-radius: 14px 14px 0 0;
}
.jd-smart.has-checks .jd-bundle__row.is-main {
  --jd-smart-main-thumb: calc(24px + var(--jd-space-s) + var(--jd-bundle-thumb));
  padding-bottom: 0;
}
.jd-smart.has-checks .jd-bundle__row.is-main .jd-bundle__check--none { display: none; }
.jd-smart.has-checks .jd-bundle__row.is-main > .jd-bundle__thumb {
  grid-column: 1 / 3;
  grid-row: 1 / span 2;
  align-self: end;
  width: var(--jd-smart-main-thumb);
  height: var(--jd-smart-main-thumb);
  border-radius: 12px 12px 0 0;
}
.jd-smart.has-checks .jd-bundle__row.is-main > .jd-bundle__info { grid-column: 3; grid-row: 1; align-self: center; }

/* D2: the stock notice after the add (message area of the block, and the mini-cart drawer) */
.jd-smart__mini-notice {
  margin: 0 0 var(--jd-space-xs);
  padding: var(--jd-space-xs) var(--jd-space-s);
  border-radius: 14px;
  background: var(--jd-butter-100);
  color: var(--jd-text-title);
  font-size: 13px;
}
