/* Listing pages on tablets and computers: Women, Men, Sale, Shop, search
   (views/page/shopDesktop.ejs; phones get views/page/shop.ejs).
   Same idiom as the home page: one serif title, quiet tracked labels, cards
   with captions under the photo, ink pills for the main action.
   The Filters sheet and Sort menu are styled in listingControls.css; here
   computers turn the sheet into a sticky column. Older phone stylesheets
   still style .product-card and friends, so card rules here are scoped under
   .plp and win on purpose. */

.plp {
  --plp-ink: var(--brand-ink, #1f1f23);
  --plp-ink-2: var(--brand-ink-2, #3b3b42);
  --plp-muted: var(--brand-muted, #6f6f78);
  --plp-line: var(--brand-line, #f0efed);
  --plp-line-2: var(--brand-line-strong, #e5e2e0);
  --plp-blush: var(--brand-quiet, #faf7f1);
  --plp-accent: var(--brand-accent, #ff3f6c);
  --plp-accent-text: var(--brand-accent-text, #e6355f);
  --plp-serif: 'Cormorant Garamond', Georgia, serif;
  --plp-sans: 'General Sans', 'Inter', system-ui, sans-serif;
  --plp-nav: var(--navbar-height, 72px);
  --plp-side: 232px;
  --plp-gap: 48px;
  --plp-ease: cubic-bezier(.2, .7, .2, 1);
  display: block;
  /* The navbar is fixed; the page starts under it. */
  padding-top: var(--plp-nav);
  background: #fff;
  color: var(--plp-ink);
  font-family: var(--plp-sans);
  -webkit-font-smoothing: antialiased;
}

/* <body> hides sideways overflow, which makes it a scroll box and stops
   the filter column (and the phone toolbar) from sticking. */
html:has(.plp),
body:has(.plp) { overflow-x: clip !important; }
body:has(.plp) { overflow-y: visible !important; }

.plp *, .plp *::before, .plp *::after { box-sizing: border-box; }
.plp [hidden] { display: none !important; }
:where(.plp) a { color: inherit; text-decoration: none; }
:where(.plp) button { margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
:where(.plp) :is(h1, h2, h3, p, ol, ul) { margin: 0; padding: 0; }
:where(.plp) :is(ol, ul) { list-style: none; }
.plp svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.plp .sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.plp :is(a, button, input):focus-visible {
  outline: 2px solid var(--plp-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.plp-shell { width: min(calc(100% - 64px), 1360px); margin-inline: auto; }

.plp-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--plp-ink);
}

.plp-link {
  font-size: 13px;
  color: var(--plp-ink-2);
  text-decoration: underline;
  text-decoration-color: var(--plp-line-2);
  text-underline-offset: 3px;
  transition: text-decoration-color .2s;
}
.plp-link:hover { text-decoration-color: currentColor; }

.plp-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 34px;
  border-radius: 999px;
  background: var(--plp-ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: background-color .2s;
}
.plp-pill:hover { background: #000; }
.plp-pill:disabled { opacity: .6; cursor: progress; }
.plp-pill--quiet { background: transparent; color: var(--plp-ink); box-shadow: inset 0 0 0 1px var(--plp-line-2); }
.plp-pill--quiet:hover { background: var(--plp-blush); }

/* --------------------------------------------------------- page name -- */

/* No title block: the navbar underlines the section. Search says what was
   searched in the toolbar. */
.plp-query {
  font-family: var(--plp-serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--plp-ink);
  overflow-wrap: anywhere;
}
.plp-count { font-size: 13px; color: var(--plp-muted); white-space: nowrap; }
.plp-note { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--plp-ink-2); }

/* ----------------------------------------------------------- toolbar -- */

.plp-bar {
  display: grid;
  grid-template-columns: var(--plp-side) minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--plp-gap);
  min-height: 60px;
  margin-top: 8px;
  border-bottom: 1px solid var(--plp-line);
}
.plp-bar-btn { display: none; }
.plp-meta { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-width: 0; padding: 10px 0; }
.plp-applied { display: flex; align-items: center; gap: 8px 12px; min-width: 0; }
.plp-chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.plp .filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px 0 14px;
  border: 1px solid var(--plp-line-2);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  color: var(--plp-ink-2);
  white-space: nowrap;
  transition: border-color .2s;
}
.plp .filter-chip:hover { border-color: var(--plp-ink-2); }
.plp .filter-chip .chip-x { font-size: 15px; line-height: 1; color: var(--plp-muted); }

.plp-sort { position: relative; grid-column: 3; justify-self: end; }
.plp-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  color: var(--plp-ink);
  white-space: nowrap;
}
.plp-sort-label { font-weight: 400; color: var(--plp-muted); }
.plp-sort-btn svg { width: 16px; height: 16px; transition: transform .2s; }
.plp-sort-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ------------------------------------------------------------ layout -- */

.plp-layout {
  display: grid;
  grid-template-columns: var(--plp-side) minmax(0, 1fr);
  gap: var(--plp-gap);
  align-items: start;
  padding-bottom: 96px;
}

/* ----------------------------------------------------------- filters -- */

/* Computers: the Filters sheet (listingControls.css) becomes a sticky column
   beside the grid, always open, with no header or footer. */
@media (min-width: 1024px) {
  .plp .plp-filters {
    position: sticky;
    z-index: auto;
    top: calc(var(--plp-nav) + 16px);
    right: auto;
    bottom: auto;
    left: auto;
    display: block;
    max-height: calc(100vh - var(--plp-nav) - 32px);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--plp-line-2) transparent;
    padding: 4px 6px 0 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    transform: none;
    visibility: visible;
    transition: none;
  }
  .plp .plp-filters-head,
  .plp .plp-filters-foot,
  .plp .plp-scrim { display: none; }
  .plp .plp-filters-body { overflow: visible; padding: 0; }
  .plp .plp-check,
  .plp .plp-filters .plp-color { min-height: 36px; }
  .plp .plp-filters .size-option { min-height: 38px; }
  .plp .plp-filters .price-input { height: 40px; font-size: 14px; }
}

/* -------------------------------------------------------------- grid -- */

.plp-results { min-width: 0; padding-top: 24px; }
.plp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 44px 20px;
  transition: opacity .2s;
}
.plp-grid.loading { opacity: .45; pointer-events: none; }

.plp .plp-card {
  position: static;
  min-width: 0;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.plp .plp-card-frame {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: var(--plp-blush);
  box-shadow: none;
}
.plp .plp-card-media,
.plp .plp-card-media picture { position: absolute; inset: 0; display: block; }
.plp .plp-card-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  /* A dead image shows the blush frame, not alt text across the photo. */
  color: transparent;
  transition: transform .6s var(--plp-ease);
}
.plp .plp-card-media img::after { content: ''; position: absolute; inset: 0; background: var(--plp-blush); }
.plp .plp-card:hover .plp-card-media img { transform: scale(1.03); }
.plp .plp-card.is-soldout .plp-card-media img { opacity: .6; }

.plp .plp-heart {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  left: auto;
  bottom: auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 3px rgba(31, 31, 35, .08);
  color: var(--plp-ink-2);
  opacity: 1;
  transform: none;
  transition: color .2s;
}
.plp .plp-heart::before { content: none; }
.plp .plp-heart svg { width: 17px; height: 17px; }
.plp .plp-heart:hover { color: var(--plp-accent-text); }
.plp .plp-heart.active { color: var(--plp-accent-text); }
.plp .plp-heart.active svg { fill: currentColor; }

.plp .plp-dashes {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 12px;
  display: flex;
  gap: 4px;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.plp .plp-dashes i { width: 14px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .55); }
.plp .plp-dashes i.is-on { background: #fff; }
@media (hover: hover) {
  .plp .plp-card:hover .plp-dashes { opacity: 1; }
}

.plp .plp-card-text { display: block; padding: 12px 0 0; background: none; }
.plp .plp-card-text > * { margin: 0; }
.plp .plp-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 14px; }
.plp .plp-card-meta .product-brand {
  overflow: hidden;
  font-family: var(--plp-sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--plp-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.plp .plp-card-meta .product-rating { flex: none; font-size: 11.5px; color: var(--plp-ink-2); }
.plp .plp-card-text > .plp-card-name { margin-top: 5px; }
.plp .plp-card-name,
.plp .plp-card-name .product-name-link {
  display: -webkit-box;
  overflow: hidden;
  min-height: 0;
  font-family: var(--plp-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--plp-ink-2);
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.plp .plp-card-name .product-name-link:hover { color: var(--plp-ink); }
.plp .plp-card-text > .plp-card-price { margin-top: 6px; }
.plp .plp-card-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 14px; }
.plp .plp-card-price .product-price-current { order: 0; font-family: var(--plp-sans); font-size: 14px; font-weight: 600; color: var(--plp-ink); white-space: nowrap; }
.plp .plp-card-price .product-price-original { order: 0; font-size: 12.5px; color: var(--plp-muted); white-space: nowrap; }
.plp .plp-card .plp-card-price .sale-badge {
  position: static;
  display: inline !important;
  order: 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--plp-sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--plp-accent-text);
  white-space: nowrap;
}
.plp .product-voucher-price { display: none; }
.plp .plp-card-text > .plp-card-swatches { margin-top: 10px; }
.plp .plp-card-swatches { display: flex; align-items: center; gap: 6px; height: 12px; }
.plp .plp-card-swatches[hidden] { display: flex !important; }
.plp .plp-card-swatches .color-option,
.plp .plp-card-swatches .group-swatch {
  position: relative;
  flex: none;
  width: 11px;
  height: 11px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--c, #ddd);
  box-shadow: inset 0 0 0 1px rgba(31, 31, 35, .18);
  pointer-events: none;
}
.plp .plp-card-swatches .group-swatch.is-current { margin: 0 2px; box-shadow: inset 0 0 0 1px rgba(31, 31, 35, .18), 0 0 0 1.5px #fff, 0 0 0 2.6px var(--plp-ink); }
.plp .plp-card-swatches .group-swatch.is-sibling { pointer-events: auto; cursor: pointer; }
.plp .plp-card-swatches .group-swatch.is-sibling::after { content: ''; position: absolute; inset: -8px -4px; }
.plp .plp-card-swatches .group-swatch.is-soldout { opacity: .45; }
.plp .plp-card-swatches :is(.color-more, .group-swatch-more) { font-size: 11px; font-weight: 500; line-height: 1; color: var(--plp-muted); }
.plp .plp-card-text > .plp-card-stock { margin-top: 9px; }
.plp .plp-card-stock { padding: 0; border: 0; background: none; font-size: 12.5px; color: var(--plp-muted); }

/* ------------------------------------------------------------- empty -- */

.plp-empty {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 72px 16px 40px;
  text-align: center;
}
.plp-empty-title { font-family: var(--plp-serif); font-size: 34px; font-weight: 500; line-height: 1.1; color: var(--plp-ink); }
.plp-empty-text { max-width: 420px; font-size: 14px; line-height: 1.55; color: var(--plp-ink-2); }
.plp-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }

/* -------------------------------------------------------- show more -- */

.plp-more { display: grid; justify-items: center; gap: 14px; margin-top: 72px; text-align: center; }
.plp-more-info { font-size: 13px; color: var(--plp-muted); }
.plp-progress { width: 180px; height: 2px; overflow: hidden; border-radius: 2px; background: var(--plp-line-2); }
.plp-progress i { display: block; height: 100%; background: var(--plp-ink); transition: width .3s var(--plp-ease); }
.plp-more .plp-pill { margin-top: 6px; }


/* ------------------------------------------------- laptops (3 across) -- */

@media (max-width: 1279px) {
  .plp { --plp-side: 216px; --plp-gap: 36px; }
  .plp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --------------------------------------- tablets and phones: a sheet -- */

@media (max-width: 1023px) {
  .plp-shell { width: calc(100% - 32px); }

  .plp-bar {
    position: sticky;
    z-index: 30;
    top: var(--plp-nav);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 0;
    margin: 0 -16px;
    padding: 10px 16px;
    /* Solid, so cards never show through while scrolling. */
    background: #fff;
  }
  .plp-bar-side { display: none; }
  .plp-bar-btn,
  .plp-sort-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--plp-line-2);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--plp-ink);
  }
  .plp-bar-btn svg { width: 17px; height: 17px; }
  .plp-badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--plp-ink);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
  }
  .plp-sort { flex: 1; min-width: 0; }
  .plp-sort-btn { overflow: hidden; }
  .plp-sort-value { overflow: hidden; text-overflow: ellipsis; }
  .plp-meta { order: 3; flex: 1 0 100%; flex-wrap: nowrap; gap: 10px; padding: 0; overflow-x: auto; scrollbar-width: none; }
  .plp-meta::-webkit-scrollbar { display: none; }
  .plp-query { flex: none; max-width: 70%; overflow: hidden; font-size: 20px; white-space: nowrap; text-overflow: ellipsis; }
  .plp-applied { flex: none; }
  .plp-chips { flex-wrap: nowrap; }
  .plp-chips::-webkit-scrollbar { display: none; }
  .plp .filter-chip { flex: none; }

  .plp-layout { display: block; padding-bottom: 72px; }
  .plp-results { padding-top: 16px; }
  .plp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 14px; }

}

/* ---------------------------------------------------------- phones -- */

@media (max-width: 767px) {
  .plp-shell { width: calc(100% - 24px); }
  .plp-bar { margin: 0 -12px; padding: 10px 12px; }
  .plp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 10px; }
  .plp .plp-card-frame { border-radius: 10px; }
  /* Save sits in the photo's bottom corner, out of the face's way. */
  .plp .plp-heart { top: auto; bottom: 8px; right: 8px; width: 34px; height: 34px; }
  .plp .plp-card-text { padding-top: 9px; }
  /* mobileRefine.css sets card type with !important on phones. */
  .plp .plp-card .plp-card-name,
  .plp .plp-card .plp-card-name .product-name-link {
    font-family: var(--plp-sans) !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    color: var(--plp-ink-2) !important;
  }
  .plp .plp-card-price { gap: 2px 6px; font-size: 13.5px; }
  .plp .plp-card .plp-card-price .product-price-current {
    font-family: var(--plp-sans) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--plp-ink) !important;
  }
  .plp .plp-card .plp-card-price .product-price-original {
    font-family: var(--plp-sans) !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    color: var(--plp-muted) !important;
  }
  .plp .plp-card .plp-card-price .sale-badge { font-size: 11.5px; }
  .plp .plp-card-text > .product-voucher-price {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--plp-accent-text);
  }
  .plp .plp-card-text > .plp-card-swatches { margin-top: 8px; }
  .plp-more { margin-top: 48px; }
  .plp-empty { padding-top: 48px; }
  .plp-empty-title { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .plp *,
  .plp *::before,
  .plp *::after { transition: none !important; animation: none !important; }
}

/* Style pages (/women/<style>) and the women listings on wider screens: a
   one-line intro, "Shop by style" links and a few lines under the grid
   (the phone listing styles the same blocks in shop.css). */
.plp-lead { display: flex; flex-direction: column; gap: 12px; margin: 0 0 20px; min-width: 0; }
.plp-lead-intro { margin: 0; max-width: 62ch; font-size: 14px; line-height: 1.55; color: var(--plp-muted); }
.plp-styles { display: flex; flex-wrap: wrap; gap: 8px; }
.plp-style-link {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--plp-line-2); border-radius: 999px; background: #fff;
  color: var(--plp-ink); font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none;
}
.plp-style-link:hover, .plp-style-link:focus-visible { border-color: var(--plp-ink); }
.plp-style-link:focus-visible { outline: 2px solid var(--plp-ink); outline-offset: 2px; }
.plp-about { display: flex; flex-direction: column; gap: 10px; max-width: 64ch; margin: 40px 0 8px; font-size: 14px; line-height: 1.6; color: var(--plp-muted); }
.plp-about p { margin: 0; }
.plp-about-title { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--plp-ink); }
