/* yal-clr1 (2026-11-05) - CLEARANCE (category 62) top: cream crumb band, hero, type/size chips.
   Linked from product/category.tpl only when category_id = 62. */

/* CSS sticky needs a body that is not a scroll container. The theme has body{overflow-x:hidden;overflow-y:auto}
   and html{overflow-x:clip}, so body never propagates to the viewport and position:sticky never engages.
   clip keeps the horizontal clipping without creating a scroll container. Scroll-lock classes keep theirs. */
body.product-category-62:not(.modal-open):not(.yal-hs-lock):not(.uosp-cm-noscroll) {
  overflow-x: clip;
  overflow-y: visible;
}

/* Breadcrumb band: same surface as the live cart header (.yal-cart-header) */
body.product-category-62 .breadcrumbs {
  background-color: #f6f3ee;
  background-color: oklch(96.5% 0.007 72);
  border-bottom: 1px solid #efece6;
}
/* Crumb text: theme sets #838383 !important (3.4:1 on the band); #5a5249 passes AA */
body.product-category-62 .breadcrumbs .breadcrumb *,
body.product-category-62 .breadcrumbs .breadcrumb > li + li:before {
  color: #5a5249 !important;
}
@media (max-width: 767px) {
  /* The hero text repeats "Clearance." under the photo: keep H1 + item count for SEO / screen readers, hide them visually */
  body.product-category-62 .breadcrumbs .category__title {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
}

/* Hero */
.clr-hero {
  position: relative;
  overflow: hidden;
  background: #e9e4dc;
  font-family: 'Montserrat', sans-serif;
}
.clr-hero picture { display: block; }
.clr-hero img {
  display: block;
  width: 100%;
  max-width: none;
}
.clr-hero__tx {
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}
.clr-hero .clr-hero__h {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 46px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -.02em;
  text-transform: none;
  color: #2c2620;
}
.clr-hero .clr-hero__p {
  margin: 0;
  max-width: 420px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: #5a5249;
}
.clr-hero .clr-hero__p b {
  font-weight: 600;
  color: #2c2620;
}
.clr-hero .clr-hero__fs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0; /* 10px gap + 4px = 14px above the line */
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7a3c30;
}
.clr-hero .clr-hero__fs i {
  flex: 0 0 26px;
  width: 26px;
  height: 2px;
  background: #7a3c30;
}

@media (min-width: 768px) {
  .clr-hero { height: clamp(280px, 29vw, 420px); }
  .clr-hero img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
  }
  .clr-hero__tx {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    justify-content: center;
    padding: 32px 64px;
    max-width: 620px;
  }
}

@media (max-width: 767px) {
  .clr-hero { background: #f6f3ee; background: oklch(96.5% 0.007 72); } /* text block under the photo = crumb band surface */
  .clr-hero img {
    height: 230px;
    object-fit: cover;
    object-position: 50% 0;
  }
  .clr-hero__tx {
    gap: 8px;
    padding: 18px 16px 20px;
  }
  .clr-hero .clr-hero__h { font-size: 30px; }
  .clr-hero .clr-hero__p { max-width: none; font-size: 14px; }
  .clr-hero .clr-hero__fs { margin-top: 6px; font-size: 13px; }
}

/* Chip rows sit on the page white. The opaque white (full bleed via box-shadow spread, clipped to the row's height)
   is what the sticky type row needs so cards do not show through. */
.clr-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  background: #fff;
  box-shadow: 0 0 0 100vmax #fff;
  clip-path: inset(0 -100vmax);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  line-height: 1;
}
.clr-row--type {
  padding: 14px 0 5px; /* 5 + 5 = 10px between the rows */
  position: sticky;
  top: 0;
  z-index: 998;
}
.clr-row--size {
  padding: 5px 0 14px;
  box-shadow: 0 0 0 100vmax #fff, 0 1px 0 100vmax #efece6; /* bottom hairline */
  clip-path: inset(0 -100vmax -1px);
  margin-bottom: 1px;
}
@media (min-width: 992px) {
  /* Under the shrunk 46px header (sticky-header.js). The row reaches the top only after scrollY > 110, so the header is already shrunk.
     The shrunk logo box hangs to y=70 (46px header + 24px overhang): 24px top padding keeps the stuck chips below it. */
  .clr-row--type { top: 46px; z-index: 999; padding-top: 24px; }
}

.clr-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(44, 38, 32, .14);
  border-radius: 2px;
  background: #fbfaf7;
  color: #2c2620;
  font: 500 11px/1 'Montserrat', sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .16s cubic-bezier(.23, 1, .32, 1), background-color .16s cubic-bezier(.23, 1, .32, 1), color .16s cubic-bezier(.23, 1, .32, 1);
}
.clr-chip em {
  font-style: normal;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .02em;
  color: #6f6860;
}
a.clr-chip:hover,
a.clr-chip:focus {
  border-color: rgba(44, 38, 32, .4);
  color: #2c2620;
  text-decoration: none;
  outline: none;
}
a.clr-chip:focus-visible {
  outline: 2px solid #7a3c30;
  outline-offset: 2px;
}
.clr-chip.is-on,
a.clr-chip.is-on:hover,
a.clr-chip.is-on:focus {
  background: #2c2620;
  border-color: #2c2620;
  color: #fbfaf7;
}
.clr-chip.is-on em { color: #b6afa5; }
.clr-chip.is-off {
  color: #b6afa5;
  border-color: rgba(44, 38, 32, .08);
  cursor: default;
  pointer-events: none;
}
.clr-chip.is-off em { color: #b6afa5; }

.clr-clear {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 6px;
  font: 500 11px/1 'Montserrat', sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #5a5249;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.clr-clear:hover,
.clr-clear:focus { color: #2c2620; }
.clr-clear:focus-visible { outline: 2px solid #7a3c30; outline-offset: 2px; }

/* The kept .filter-row (sticky-header.js needs it) now only holds the theme's hidden sort select. */
body.product-category-62 #content > .row.filter-row {
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 0;
}

@media (max-width: 767px) {
  .clr-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: -15px;
    margin-right: -15px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .clr-row::-webkit-scrollbar { display: none; }
  .clr-chip,
  .clr-clear { height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .clr-chip { transition: none; }
}

/* yal-clr1rev (2026-11-05 review): hero text sits on the photo from 768px up.
   Measured on the live photo: #5a5249 body copy fell to 4.0:1 and the terracotta line to 4.4:1 on the wall (AA needs 4.5:1),
   and between 768 and 899px the copy ran into the model's hand and sleeve (down to 1.0:1). */
@media (min-width: 768px) {
  .clr-hero .clr-hero__p { color: #4d463e; }
  .clr-hero .clr-hero__fs { color: #6e352a; }
  .clr-hero .clr-hero__fs i { background: #6e352a; }
}
@media (min-width: 768px) and (max-width: 899px) {
  .clr-hero__tx { padding-left: 32px; padding-right: 32px; }
  .clr-hero .clr-hero__p { max-width: 330px; font-size: 14px; }
  .clr-hero .clr-hero__fs { font-size: 13px; }
}
