/* Goods open view (Ilumaailm products, both looks), Martin 19.11: loaded by campaign/details.blade.php for shop products only */

/* Plus banner last in the buy box (phone sheet and desktop card order their children) */
body.offer-hero-page .offer-hero-row .offer-buy > .plus-deal-detail-banner--below { order: 99; }

@media (max-width: 767.98px) {
  /* rail: every block a full screen page, no next photo peeking (and no dark gap line in dark mode) */
  body.offer-goods .offer-rail { scroll-snap-type: x mandatory; gap: 0; }
  body.offer-goods .offer-rail__blk { scroll-snap-align: start; scroll-snap-stop: always; }
  body.offer-goods .offer-rail__blk--full { width: 100%; }
  body.offer-goods .offer-rail__blk--half { width: 50%; }

  /* heart and share beside the photo count at the bottom right, as on desktop */
  body.offer-goods .offer-rail__acts {
    position: absolute; right: 14px; bottom: 40px; z-index: 4;
    display: flex; align-items: center; gap: 8px;
  }
  body.offer-goods .offer-rail__acts .offer-rail__count { position: static; min-height: 38px; }
  body.offer-hero-page.offer-goods .offer-hero-row .listing-gallery .offer-rail__acts .favourite-heart--hero {
    position: static; top: auto !important; right: auto !important; flex: none;
    width: 38px; height: 38px; border-radius: 50%;
    background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
    display: grid; place-items: center;
  }
  body.offer-hero-page.offer-goods .offer-rail__acts .favourite-heart--hero i { font-size: 1.1rem; color: #111; filter: none; }
  body.offer-hero-page.offer-goods .offer-rail__acts .favourite-heart--hero i.bi-heart-fill { color: #FF385C; }
  body.offer-goods .offer-rail__acts .offer-share {
    position: static; width: 38px; height: 38px; border-radius: 50%; flex: none;
    background: #fff; color: #111; box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  }
  body.offer-goods .offer-rail__acts .offer-share svg { width: 18px; height: 18px; }

  /* Osta bar above the bottom menu (offer-sticky-buy.js adds --low and --osb-bottom) */
  .offer-sticky-buy.offer-sticky-buy--low {
    top: auto; bottom: var(--osb-bottom, 0px);
    padding: 10px 14px;
    border-radius: 18px 18px 0 0; box-shadow: 0 -6px 18px rgba(0, 0, 0, .12);
    transform: translateY(calc(100% + var(--osb-bottom, 0px) + 10px));
    transition: transform .2s ease, bottom .2s ease;
  }
  .offer-sticky-buy.offer-sticky-buy--low.is-on { transform: none; }
  .offer-sticky-buy--low .offer-sticky-buy__in { display: flex; align-items: center; gap: 12px; }
  .offer-sticky-buy--low .offer-sticky-buy__tx { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
  .offer-sticky-buy--low .offer-sticky-buy__tx b { font-size: 14px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .offer-sticky-buy--low .offer-sticky-buy__sub { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .offer-sticky-buy--low .offer-sticky-buy__sub strong { color: var(--bs-body-color); font-size: 16px; }
  .offer-sticky-buy--low .offer-sticky-buy__pct { background: #DC251E; color: #fff; font-weight: 800; font-size: 12px; border-radius: 7px; padding: 1px 6px; }
  .offer-sticky-buy--low .offer-sticky-buy__btn { flex: 0 0 46%; width: auto; min-height: 46px; border-radius: 15px; }
}

/* desktop: the title block sits closer to the Lisainfo text (no TOP description) */
@media (min-width: 992px) {
  body.offer-goods .offer-hero-row { margin-bottom: 1.5rem !important; }
  body.offer-goods .offer-hero-row .shop-head { margin-bottom: 0 !important; }
  body.offer-hero-page.offer-goods .offer-layout--card .offer-info { margin-bottom: 20px; }
}

/* unit price under Osta, centred (Martin 19.11): it and everything after the Osta button move one step down in the buy box order */
body.offer-hero-page.offer-goods .offer-hero-row .offer-buy > .shop-unit-price,
body.offer-hero-page.offer-goods .offer-hero-row .offer-buy > .js-listing-cta-anchor ~ * { order: 11; }
body.offer-hero-page.offer-goods .offer-hero-row .offer-buy > .plus-deal-detail-banner--below { order: 99; }
body.offer-hero-page.offer-goods .offer-hero-row .offer-buy > .shop-unit-price { text-align: center !important; margin-top: 0 !important; }
