/* TrendyPicker New Arrivals
   /goods/new_arrivals → goods/new_arrivals.html
   Prototype: listing/new.html

   1. Page chrome / tokens
   2. Hero / shell / breadcrumbs
   3. Brand banners + product grids (card/wish in trendypicker-listing-cards.css)
   4. Empty / paging
   6. Scroll reveal
   7. Responsive — last
*/

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

body.is-new-arrivals-page .subpage_wrap,
body.is-new-arrivals-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-new-main {
  --bo-purple: #7b3fe4;
  --bo-new-hero-height: clamp(260px, 27vw, 520px);
  --bo-new-shell-pull: -23px;
  /* Brand block width (desktop) */
  --bo-new-card-width: 260px;
  --bo-new-grid-width: calc(var(--bo-new-card-width) * 4 + 42px);
  /* Match listing/new scroll-reveal tokens */
  --scroll-reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --scroll-reveal-distance: 32px;
  --scroll-reveal-duration: 0.82s;
  --scroll-reveal-stagger: 0.08s;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: #262626;
  font-family: Pretendard, "Noto Sans KR", sans-serif;
}

/* ——— Hero / shell ——— */
.bo-new-hero {
  position: relative;
  min-height: var(--bo-new-hero-height);
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.82) 0 5%, transparent 18%),
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.45) 0 4%, transparent 17%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, #a98cff 0%, #c6ecff 46%, #ffe0f1 100%);
}

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

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

.bo-new-hero-title {
  margin: 0;
  color: #fff;
  font-size: clamp(46px, 8vw, 118px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 8px 28px rgba(76, 62, 170, 0.2);
}

.bo-new-shell {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: 100%;
  max-width: 1600px;
  margin: var(--bo-new-shell-pull) auto 0;
  padding: 20px 16px 88px;
  border-radius: 24px 24px 0 0;
  background: #fff;
}

.bo-new-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  color: #8f86a0;
  font-size: 16px;
}

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

.bo-new-breadcrumbs a:hover,
.bo-new-breadcrumbs a:focus-visible {
  color: var(--bo-purple);
}

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

.bo-new-results {
  padding: 0;
}

/* ——— Brand banners + product grids ——— */
.bo-new-brand-sections {
  display: grid;
  gap: 56px;
  width: 100%;
  margin: 34px auto 0;
}

.bo-new-brand-section {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.bo-new-brand-banner {
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  min-height: clamp(220px, 32vw, 360px);
  padding: clamp(22px, 3vw, 36px);
  overflow: hidden;
  border-radius: 16px;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
}

.bo-new-brand-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: #2f5d4a;
  background-image:
    linear-gradient(105deg, rgba(12, 10, 16, 0.72) 0%, rgba(12, 10, 16, 0.28) 48%, rgba(12, 10, 16, 0.12) 100%),
    linear-gradient(145deg, #e9f7ce 0%, #7db89a 52%, #2f5d4a 100%);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Match brand detail hero media when banner image is available */
.bo-new-brand-banner.has-banner {
  min-height: clamp(200px, 24vw, 280px);
  width: 100%;
}

.bo-new-brand-banner.has-banner::before {
  background-image:
    linear-gradient(105deg, rgba(12, 10, 16, 0.7) 0%, rgba(12, 10, 16, 0.32) 42%, rgba(12, 10, 16, 0.14) 100%),
    var(--bo-new-banner-image);
}

.bo-new-brand-banner.has-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(246, 243, 255, 0.12) 0%,
    rgba(38, 38, 38, 0.28) 100%
  );
  pointer-events: none;
}

.bo-new-brand-banner--green {
  min-height: clamp(160px, 20vw, 240px);
}

.bo-new-brand-banner--green::before {
  background-image:
    linear-gradient(105deg, rgba(12, 10, 16, 0.72) 0%, rgba(12, 10, 16, 0.28) 48%, rgba(12, 10, 16, 0.12) 100%),
    linear-gradient(145deg, #e9f7ce 0%, #7db89a 52%, #2f5d4a 100%);
}

.bo-new-brand-banner--pink::before {
  background-image:
    linear-gradient(105deg, rgba(12, 10, 16, 0.72) 0%, rgba(12, 10, 16, 0.28) 48%, rgba(12, 10, 16, 0.12) 100%),
    linear-gradient(145deg, #fff0f8 0%, #e48bb8 52%, #6d2f55 100%);
}

.bo-new-brand-banner--blue::before {
  background-image:
    linear-gradient(105deg, rgba(12, 10, 16, 0.72) 0%, rgba(12, 10, 16, 0.28) 48%, rgba(12, 10, 16, 0.12) 100%),
    linear-gradient(145deg, #edf9ff 0%, #6eb8dc 48%, #234e6d 100%);
}

.bo-new-brand-banner--skin::before {
  background-image:
    linear-gradient(105deg, rgba(12, 10, 16, 0.72) 0%, rgba(12, 10, 16, 0.28) 48%, rgba(12, 10, 16, 0.12) 100%),
    linear-gradient(145deg, #ffe8e6 0%, #d98aa8 52%, #6a3344 100%);
}

.bo-new-brand-banner--mint::before {
  background-image:
    linear-gradient(105deg, rgba(12, 10, 16, 0.72) 0%, rgba(12, 10, 16, 0.28) 48%, rgba(12, 10, 16, 0.12) 100%),
    linear-gradient(145deg, #edfff7 0%, #78c0a0 48%, #2b5d49 100%);
}

.bo-new-brand-banner--lavender::before {
  background-image:
    linear-gradient(105deg, rgba(12, 10, 16, 0.72) 0%, rgba(12, 10, 16, 0.28) 48%, rgba(12, 10, 16, 0.12) 100%),
    linear-gradient(145deg, #f4efff 0%, #a88cf0 48%, #3d2a6d 100%);
}

.bo-new-brand-banner--aqua::before {
  background-image:
    linear-gradient(105deg, rgba(12, 10, 16, 0.72) 0%, rgba(12, 10, 16, 0.28) 48%, rgba(12, 10, 16, 0.12) 100%),
    linear-gradient(145deg, #e7fbff 0%, #5eb6d4 52%, #21556c 100%);
}

.bo-new-brand-banner--cream::before {
  background-image:
    linear-gradient(105deg, rgba(12, 10, 16, 0.72) 0%, rgba(12, 10, 16, 0.28) 48%, rgba(12, 10, 16, 0.12) 100%),
    linear-gradient(145deg, #fff8df 0%, #d4b06a 52%, #6a4f28 100%);
}

.bo-new-brand-banner.has-banner.bo-new-brand-banner--green::before,
.bo-new-brand-banner.has-banner.bo-new-brand-banner--pink::before,
.bo-new-brand-banner.has-banner.bo-new-brand-banner--blue::before,
.bo-new-brand-banner.has-banner.bo-new-brand-banner--skin::before,
.bo-new-brand-banner.has-banner.bo-new-brand-banner--mint::before,
.bo-new-brand-banner.has-banner.bo-new-brand-banner--lavender::before,
.bo-new-brand-banner.has-banner.bo-new-brand-banner--aqua::before,
.bo-new-brand-banner.has-banner.bo-new-brand-banner--cream::before {
  background-image:
    linear-gradient(105deg, rgba(12, 10, 16, 0.7) 0%, rgba(12, 10, 16, 0.32) 42%, rgba(12, 10, 16, 0.14) 100%),
    var(--bo-new-banner-image);
}

.bo-new-brand-banner-copy {
  display: grid;
  gap: 10px;
  max-width: 420px;
}

.bo-new-brand-banner-label {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.bo-new-brand-banner-name {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
}

.bo-new-brand-banner-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
}

.bo-new-brand-banner-cta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  margin-left: auto;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  color: var(--bo-purple);
  background: #fff;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color 0.22s ease, background-color 0.22s ease;
}

.bo-new-brand-banner:hover .bo-new-brand-banner-cta,
.bo-new-brand-banner:focus-visible .bo-new-brand-banner-cta {
  color: #fff;
  background: var(--bo-purple);
}

.bo-new-brand-products {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.bo-new-brand-products-label {
  margin: 0;
  color: #8a8491;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.bo-new-brand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bo-new-brand-grid > li {
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  width: 100% !important;
}

/* Hide Firstmall source list after items are moved into brand sections */
.bo-new-source-grid {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* NEW badge */
.bo-new-brand-grid .listing-card-badge,
.bo-new-brand-grid .icon_new,
.bo-new-brand-grid .new_icon {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #9b6bff 0%, #7b3fe4 100%);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

/* ——— Empty / paging ——— */
.bo-new-empty {
  margin: 48px 0 0;
  padding: 40px 20px;
  border: 1px solid #ece7f4;
  border-radius: 16px;
  color: #8f86a0;
  text-align: center;
  font-size: 15px;
}

.bo-new-paging,
.bo-new-shell .paging_navigation {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 36px auto 0;
  width: min(100%, var(--bo-new-grid-width, 100%));
}

.bo-new-paging .paging_navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  width: 100%;
}

.bo-new-paging .paging_navigation a,
.bo-new-paging .paging_navigation input {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  margin: 0;
  border: 1px solid #e6ddf4;
  border-radius: 10px;
  color: #6d657c;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.bo-new-paging .paging_navigation a:hover {
  border-color: var(--bo-purple, #7b3fe4);
  color: var(--bo-purple, #7b3fe4);
}

.bo-new-paging .paging_navigation a.on {
  border-color: var(--bo-purple, #7b3fe4);
  background: var(--bo-purple, #7b3fe4);
  color: #fff;
  cursor: default;
}

.bo-new-paging .paging_navigation a.prev,
.bo-new-paging .paging_navigation a.next,
.bo-new-paging .paging_navigation a[rel="prev"],
.bo-new-paging .paging_navigation a[rel="next"] {
  overflow: visible;
  text-indent: 0;
  background-image: none;
  font-size: 0;
}

.bo-new-paging .paging_navigation a.prev::before,
.bo-new-paging .paging_navigation a[rel="prev"]::before {
  content: "\2039";
  font-size: 16px;
}

.bo-new-paging .paging_navigation a.next::before,
.bo-new-paging .paging_navigation a[rel="next"]::before {
  content: "\203a";
  font-size: 16px;
}

.bo-new-paging .paging_navigation a.first,
.bo-new-paging .paging_navigation a.last,
.bo-new-paging .paging_navigation a.end,
.bo-new-paging .paging_navigation a[rel="first"],
.bo-new-paging .paging_navigation a[rel="last"],
.bo-new-paging .paging_navigation a[rel="end"] {
  display: none;
}

/* ——— Scroll reveal ——— */
html.new-scroll-reveal-pending .bo-new-hero-inner,
html.new-scroll-reveal-pending .bo-new-brand-banner,
html.new-scroll-reveal-pending .bo-new-brand-products-label,
html.new-scroll-reveal-pending .bo-new-brand-grid .new-reveal-card {
  opacity: 0;
  transform: translateY(28px);
  transition: none !important;
}

.bo-new-main .scroll-reveal-soft {
  --scroll-reveal-scale: 1;
  --scroll-reveal-blur: 0px;
  opacity: 0;
  transform: translateY(var(--scroll-reveal-distance)) scale(var(--scroll-reveal-scale));
  filter: blur(var(--scroll-reveal-blur));
  transition:
    opacity var(--scroll-reveal-duration) var(--scroll-reveal-ease),
    transform var(--scroll-reveal-duration) var(--scroll-reveal-ease),
    filter var(--scroll-reveal-duration) var(--scroll-reveal-ease);
}

.bo-new-main .scroll-reveal-soft.is-inview,
.bo-new-main .is-inview > .scroll-reveal-soft,
.bo-new-main .is-inview .scroll-reveal-soft {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.bo-new-main .scroll-reveal-line {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.72s var(--scroll-reveal-ease),
    transform 0.72s var(--scroll-reveal-ease);
}

.bo-new-main .scroll-reveal-line.is-inview,
.bo-new-main .is-inview .scroll-reveal-line {
  opacity: 1;
  transform: translateY(0);
}

.bo-new-main .scroll-reveal-stagger .scroll-reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.72s var(--scroll-reveal-ease),
    transform 0.72s var(--scroll-reveal-ease);
  transition-delay: calc(var(--reveal-index, 0) * var(--reveal-stagger, var(--scroll-reveal-stagger)));
}

.bo-new-main .scroll-reveal-stagger.is-inview .scroll-reveal-item,
.bo-new-main .is-inview .scroll-reveal-stagger .scroll-reveal-item {
  opacity: 1;
  transform: translateY(0);
}

.bo-new-main .new-reveal-hero .bo-new-hero-inner {
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  transition:
    opacity 0.9s var(--scroll-reveal-ease),
    transform 0.9s var(--scroll-reveal-ease);
}

.bo-new-main .new-reveal-hero.is-inview .bo-new-hero-inner {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.bo-new-main .new-reveal-banner.scroll-reveal-soft {
  --scroll-reveal-distance: 30px;
  --scroll-reveal-duration: 0.86s;
  --scroll-reveal-scale: 0.99;
  --scroll-reveal-blur: 4px;
}

.bo-new-main .new-reveal-grid .new-reveal-card {
  transform: translateY(24px) scale(0.985);
}

.bo-new-main .new-reveal-grid.is-inview .new-reveal-card,
.bo-new-main .is-inview .new-reveal-grid .new-reveal-card {
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  html.new-scroll-reveal-pending .bo-new-hero-inner,
  html.new-scroll-reveal-pending .bo-new-brand-banner,
  html.new-scroll-reveal-pending .bo-new-brand-products-label,
  html.new-scroll-reveal-pending .bo-new-brand-grid .new-reveal-card,
  .bo-new-main .scroll-reveal-soft,
  .bo-new-main .scroll-reveal-line,
  .bo-new-main .scroll-reveal-stagger .scroll-reveal-item,
  .bo-new-main .new-reveal-hero .bo-new-hero-inner {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

/* ——— Responsive ——— */
@media (min-width: 761px) {
  .bo-new-main {
    --bo-new-shell-pull: calc(-1 * clamp(23px, 5.208vw, 100px));
  }

  .bo-new-shell {
    margin-top: var(--bo-new-shell-pull);
    padding: 28px 40px 100px;
  }

  .bo-new-brand-sections {
    gap: 48px;
    margin-top: 40px;
  }

  .bo-new-brand-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .bo-new-brand-banner-cta {
    position: absolute;
    right: clamp(22px, 3vw, 36px);
    bottom: clamp(22px, 3vw, 36px);
  }
}

@media (min-width: 761px) and (max-width: 1120px) {
  .bo-new-shell {
    padding-inline: 24px;
  }

  .bo-new-breadcrumbs {
    font-size: 15px;
  }
}

@media (min-width: 1121px) {
  .bo-new-shell {
    padding: 28px 32px 56px;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -10px 30px rgba(23, 16, 38, 0.08);
  }

  .bo-new-brand-sections {
    width: min(100%, var(--bo-new-grid-width));
    gap: 64px;
    margin-top: 46px;
  }

  .bo-new-brand-section {
    gap: 24px;
  }

  .bo-new-brand-banner {
    min-height: 340px;
    padding: 36px 40px;
  }

  .bo-new-brand-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }

}

@media (max-width: 760px) {
  .bo-new-breadcrumbs {
    margin-bottom: 24px;
    font-size: 13px;
  }

  .bo-new-brand-sections {
    gap: 36px;
    margin-top: 22px;
  }

  .bo-new-brand-section {
    gap: 16px;
  }

  .bo-new-brand-banner {
    min-height: 180px;
    padding: 20px 18px;
    border-radius: 12px;
  }

  .bo-new-brand-banner-name {
    font-size: 28px;
  }

  .bo-new-brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .bo-new-shell {
    padding: 20px 16px 48px;
  }
}
