/* Bartnik — compact bottom section v1.2.0. Homepage only. */

/* Real TikTok players are interactive embeds, NOT thumbnails. Never shrink
   or zoom them: TikTok enforces inline dimensions differently per video. */
#nb-main.nb-main--homepage .nbkds-tiktok :is(iframe[src*="tiktok"],blockquote.tiktok-embed,blockquote[cite*="tiktok"],.tiktok-embed),
#nb-main.nb-main--homepage .nbkds-tiktok .nbkds-embedded-player {
  zoom: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

/* In rare templates a legacy max-width is applied to the player's wrapper,
   not the iframe itself. JS marks only undersized intermediate wrappers. */
#nb-main.nb-main--homepage .nbkds-tiktok .nbkds-embed-shell {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  zoom: 1 !important;
}

#nb-main.nb-main--homepage .nbkds-tiktok .nbkds-embedded-player iframe[src*="tiktok"] {
  zoom: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: block;
}

/* Image-only previews can be 20% shorter; video players remain uncropped. */
@media (min-width: 769px) {
  #nb-main.nb-main--homepage .nbkds-tiktok .nbkds-poster-frame:not(iframe):not(blockquote) {
    height: var(--nbkds-poster-height,auto) !important;
    max-height: var(--nbkds-poster-height,none) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    position: relative;
  }
  #nb-main.nb-main--homepage .nbkds-tiktok .nbkds-poster-frame img,
  #nb-main.nb-main--homepage .nbkds-tiktok img.nbkds-poster-frame {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
  }
}

/* Shorten spaces below the featured products. Keep it conditional: only
   when the script could not identify sections / was blocked. */
@media (min-width: 769px) {
  #nb-main.nb-main--homepage:not(.nbkds-js-ready) > section.bhb-featured ~ section.nb-section {
    padding-top: var(--nbkds-fallback-padding,29px) !important;
    padding-bottom: var(--nbkds-fallback-padding,29px) !important;
  }
}
@media (max-width: 768px) {
  #nb-main.nb-main--homepage .nbkds-tiktok .nbkds-poster-frame {
    height: auto !important;
    max-height: none !important;
  }
}
