/* TrendyPicker Best Sellers
   /goods/best → goods/best.html

   1. Page chrome (hide Firstmall title/LNB, unlock subpage width)
   2. Hero
   3. Shell / breadcrumbs / category tabs
   4. Product grid (card/wish in trendypicker-listing-cards.css)
   5. Rank badge
   6. Infinite-scroll sentinel
   7. Responsive (761 / 1121 / 760) — last
*/

/* ——— Page chrome ——— */
body.is-best-page,
body.is-best-page #layout_wrap,
body.is-best-page #layout_body {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
  background: #262626;
}

body.is-best-page .title_container,
body.is-best-page .structure_nav,
body.is-best-page #subpageLNB,
body.is-best-page #subAllButton {
  display: none !important;
}

body.is-best-page .subpage_wrap,
body.is-best-page .subpage_wrap .subpage_container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  background: transparent !important;
}

.bo-best-main {
  width: 100%;
  background: #262626;
}

/* ——— Hero ——— */
.bo-best-hero {
  position: relative;
  min-height: clamp(220px, 27vw, 420px);
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 22%, rgba(255, 255, 255, 0.88) 0 5%, transparent 18%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.58) 0 4%, transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, #ff8fbe 0%, #ffc2d7 45%, #ffd8e8 100%);
}

.bo-best-hero-inner {
  display: grid;
  place-content: center;
  min-height: inherit;
  padding: 28px 20px;
  text-align: center;
  box-sizing: border-box;
}

.bo-best-hero-kicker {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(14px, 1.6vw, 20px);
  font-weight: 600;
}

.bo-best-hero-title {
  margin: 0;
  color: #fff;
  font-size: clamp(54px, 11vw, 120px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 8px 28px rgba(199, 66, 122, 0.22);
}

/* ——— Shell / breadcrumbs / tabs ——— */
.bo-best-shell {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: 100%;
  max-width: 1600px;
  margin: -23px auto 0;
  padding: 20px 16px 88px;
  border-radius: 24px 24px 0 0;
  background: #fff;
}

.bo-best-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: #8f86a0;
  font-size: 14px;
}

.bo-best-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.bo-best-breadcrumbs a:hover,
.bo-best-breadcrumbs a:focus-visible {
  color: var(--bo-purple, #7b3fe4);
}

.bo-best-breadcrumbs span:last-child {
  color: #171320;
  font-weight: 600;
}

.bo-best-category-tabs {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  overflow-x: auto;
  max-width: 1080px;
  gap: 16px;
  margin: 0 auto 24px;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.bo-best-category-tabs::-webkit-scrollbar {
  display: none;
}

.bo-best-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 35px;
  padding: 0 18px;
  border: 1px solid #e6ddf4;
  border-radius: 999px;
  color: #4f4760;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.bo-best-tab:hover,
.bo-best-tab:focus-visible {
  border-color: #e7e0f3;
  color: #111;
  background: #d0b5ff9d;
}

.bo-best-tab.is-active {
  border-color: var(--bo-purple, #7b3fe4);
  background: var(--bo-purple, #7b3fe4);
  color: #fff;
}

/* ——— Product grid + card ——— */
.bo-best-grid {
  display: block;
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
}

.bo-best-grid[data-displaytype="lattice"] > ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bo-best-grid[data-displaytype="lattice"] > ul > li {
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

.bo-best-rank {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--bo-purple, #7b3fe4);
  font-size: 14px;
  font-weight: 800;
}

.bo-best-rank--top {
  background: linear-gradient(135deg, var(--bo-purple, #7b3fe4) 0%, #ff5aa7 100%);
}

/* ——— Infinite scroll ——— */
.bo-best-shell .paging_navigation {
  display: none !important;
}

.bo-best-sentinel {
  width: 100%;
  height: 1px;
}

/* ——— Responsive ——— */
@media (min-width: 761px) {
  .bo-best-shell {
    margin-top: -36px;
    padding: 28px 32px 100px;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -10px 30px rgba(23, 16, 38, 0.08);
  }

  .bo-best-grid[data-displaytype="lattice"] > ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 1121px) {
  .bo-best-shell {
    margin-top: -48px;
    padding: 32px 40px 80px;
  }

  .bo-best-grid[data-displaytype="lattice"] > ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }

}

@media (max-width: 760px) {
  /*
    justify-content: center clips the leading edge of overflowing content in
    a horizontally scrollable flex row — align left instead so every tab
    (including the first ones) stays reachable by scrolling.
  */
  .bo-best-category-tabs {
    justify-content: flex-start;
  }
}
