/* Versioned collection-page styles: keep the filename in sync with the template. */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.gender-collection-page {
  margin: 0;
  background: var(--cv-page);
  color: var(--cv-ink);
  font-family: var(--cv-font-family);
}

.gender-collection-page a {
  color: inherit;
  text-decoration: none;
}

.gender-mobile-header { display: none; }

.collection-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(33, 28, 25, .08);
  background: var(--cv-header-bg);
  backdrop-filter: blur(18px);
}

.header-shell {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  width: min(100% - 40px, 1320px);
  min-height: 70px;
  margin: 0 auto;
}

.gender-collection-page .brand,
.footer-brand {
  width: max-content;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .16em !important;
  text-transform: uppercase !important;
}

.collection-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 12px;
}

.collection-nav a {
  position: relative;
  padding: 26px 0 23px;
}

.collection-nav a::after {
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  height: 1px;
  background: var(--cv-primary);
  content: "";
  opacity: 0;
  transform: scaleX(.2);
  transition: .2s ease;
}

.collection-nav a:hover::after,
.collection-nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.header-actions a {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--cv-paper);
  font-size: 13px;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.header-actions a:hover {
  background: var(--cv-primary);
  color: var(--cv-paper);
  transform: translateY(-2px);
}

.collection-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  width: min(100% - 40px, 1320px);
  min-height: 570px;
  margin: 24px auto 0;
  overflow: hidden;
  background: var(--cv-paper);
}

.hero-copy {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: clamp(40px, 7vw, 100px);
}

.eyebrow {
  color: var(--cv-primary) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .16em !important;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 800px;
  margin: 20px 0 22px;
  color: var(--cv-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(52px, 7vw, 104px);
  font-weight: 400 !important;
  line-height: .92;
  letter-spacing: -.055em !important;
}

.hero-copy p {
  max-width: 580px;
  margin: 0;
  color: var(--cv-muted) !important;
  font-size: 15px;
  line-height: 1.75;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  border-bottom: 1px solid var(--cv-primary);
  padding-bottom: 8px;
  color: var(--cv-primary) !important;
  font-size: 12px;
  font-weight: 700;
}

.hero-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
  min-height: 570px;
  padding: 36px;
  background: var(--cv-primary);
  color: var(--cv-paper);
  overflow: hidden;
}

.hero-panel span,
.hero-panel em {
  align-self: flex-start;
  font-size: 10px;
  font-style: normal;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero-panel strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(150px, 18vw, 270px);
  font-weight: 400;
  line-height: 1;
  opacity: .95;
}

.hero-panel em {
  align-self: flex-end;
}

.category-rail {
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: start;
  gap: 28px;
  width: min(100% - 40px, 1320px);
  margin: 0 auto;
  border-bottom: 1px solid var(--cv-line);
  padding: 30px 0;
}

.category-rail > span {
  color: var(--cv-muted);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.category-rail > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-rail a {
  border: 1px solid var(--cv-line);
  border-radius: 999px;
  padding: 9px 14px;
  background: var(--cv-paper);
  font-size: 12px;
  transition: .2s ease;
}

.category-rail a:hover {
  border-color: var(--cv-primary);
  background: var(--cv-warm-translucent);
  color: var(--cv-primary);
}

.catalog {
  width: min(100% - 40px, 1320px);
  margin: 0 auto;
  padding: 74px 0 96px;
}

.catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
}

.catalog-head h2,
.empty-state h2 {
  margin: 10px 0 0;
  color: var(--cv-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 56px) !important;
  font-weight: 400 !important;
  letter-spacing: -.035em !important;
}

.catalog-head p {
  margin: 0;
  color: var(--cv-muted) !important;
  font-size: 12px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.gender-collection-page .product-grid > .app-product-card { min-width: 0; display: flex; overflow: hidden; flex-direction: column; border-radius: 6px; background: #fff; }
.gender-collection-page .app-product-link { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.gender-collection-page .app-product-image { width: 100%; aspect-ratio: .84; overflow: hidden; background: #f2f2f2; }
.gender-collection-page .app-product-image img { width: 100%; height: 100%; object-fit: cover; }
.gender-collection-page .app-product-copy { flex: 1; padding: 9px 9px 5px; }
.gender-collection-page .app-product-type { display: block; overflow: hidden; color: #858585; font-size: 10px; font-weight: 350; white-space: nowrap; text-overflow: ellipsis; }
.gender-collection-page .app-product-copy h3 { min-height: 2.45em; margin: 3px 0 0; display: -webkit-box; overflow: hidden; color: #555; font-size: 14px; font-weight: 350; line-height: 1.22; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.gender-collection-page .app-product-foot { min-height: 42px; padding: 0 7px 8px 9px; display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.gender-collection-page .app-price { min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.gender-collection-page .app-price strong { color: #111; font-size: 14px; font-weight: 600; white-space: nowrap; }
.gender-collection-page .app-price del { color: #999; font-size: 10px; font-weight: 350; white-space: nowrap; }
.gender-collection-page .app-product-actions { display: flex; flex: 0 0 auto; align-items: center; }
.gender-collection-page .app-product-actions .wishlist-btn,
.gender-collection-page .app-product-actions .quick-add { position: static !important; width: 32px !important; min-width: 32px; height: 32px !important; margin: 0 !important; padding: 0 !important; display: grid !important; place-items: center; border: 0 !important; border-radius: 50% !important; background: transparent !important; color: #555 !important; box-shadow: none !important; font-size: 18px !important; }

@media (max-width: 980px) {
  html, body.gender-collection-page { background: #fff; }
  body.gender-collection-page { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .collection-header, .collection-hero, .category-rail, .catalog-head, .collection-footer { display: none !important; }
  .gender-mobile-header { position: sticky; top: 0; z-index: 1000; width: 100%; height: 60px; padding: 0 8px 0 2px; display: grid; grid-template-columns: 44px minmax(0,1fr) 40px 40px; gap: 4px; align-items: center; border-bottom: 1px solid #e8e8e8; background: #fff; color: #111; }
  .gender-mobile-back, .gender-mobile-header > button, .gender-mobile-cart { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #111; font-size: 21px; }
  .gender-mobile-title { overflow: hidden; font-size: 18px; font-weight: 400; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
  .gender-mobile-search-trigger { grid-column: 3; }
  .gender-mobile-cart { position: relative; grid-column: 4; }
  .gender-mobile-cart b { position: absolute; top: -1px; right: -1px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 99px; background: #111; color: #fff; font-size: 9px; }
  .gender-mobile-search { position: absolute; z-index: 3; left: 50px; right: 8px; top: 50%; height: 40px; display: none; grid-template-columns: 20px minmax(0,1fr) 32px 34px; align-items: center; padding-left: 12px; transform: translateY(-50%); border: 1px solid #aaa; border-radius: 999px; background: #fff; color: #555; }
  .gender-mobile-search input { width: 100%; height: 100%; padding: 0 8px; border: 0; outline: 0; background: transparent; font-size: 15px; }
  .gender-mobile-search a, .gender-mobile-search button { width: 32px; height: 34px; padding: 0; display: grid; place-items: center; border: 0; background: transparent; color: #111; }
  .gender-mobile-header.search-open .gender-mobile-search { display: grid; }
  .gender-mobile-header.search-open .gender-mobile-title, .gender-mobile-header.search-open .gender-mobile-search-trigger, .gender-mobile-header.search-open .gender-mobile-cart { visibility: hidden; }
  .gender-collection-page .catalog { display: block; width: 100%; margin: 0; padding: 5px 4px 16px; }
  .gender-collection-page .product-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; width: 100%; }
  .gender-collection-page .product-grid > .app-product-card { width: 100%; box-shadow: none; }
}

@media (min-width: 981px) {
  body.gender-collection-page { padding-bottom: 0 !important; }
  .gender-collection-page .app-dock { display: none !important; }
}

.product-card {
  min-width: 0;
  overflow: hidden;
  background: var(--cv-paper);
}

.product-image {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--cv-soft);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.product-card:hover .product-image img {
  transform: scale(1.035);
}

.view-piece {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .92);
  color: var(--cv-ink);
  font-size: 11px;
  opacity: 0;
  transform: translateY(10px);
  transition: .25s ease;
  backdrop-filter: blur(10px);
}

.product-card:hover .view-piece {
  opacity: 1;
  transform: translateY(0);
}

.product-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 104px;
  padding: 15px 14px 18px !important;
}

.product-category {
  display: block;
  margin-bottom: 6px;
  color: var(--cv-muted);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.product-info h3 {
  margin: 0;
  color: var(--cv-ink) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.4;
}

.product-info strong {
  flex: 0 0 auto;
  color: var(--cv-primary);
  font-size: 12px;
  font-weight: 700;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 90px 24px;
  background: var(--cv-paper);
  text-align: center;
}

.empty-state p {
  color: var(--cv-muted) !important;
}

.empty-state a {
  display: inline-block;
  margin-top: 18px;
  padding: 12px 18px;
  background: var(--cv-primary);
  color: var(--cv-paper);
  font-size: 12px;
}

.collection-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 24px;
  padding: 58px max(20px, calc((100vw - 1320px) / 2));
  background: var(--cv-black);
  color: var(--cv-paper);
}

.collection-footer p {
  margin: 0;
  color: rgba(255, 255, 255, .58) !important;
  font-size: 12px;
  line-height: 1.6;
}

.collection-footer > div {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  font-size: 11px;
}

@media (max-width: 920px) {
  .header-shell {
    grid-template-columns: 1fr auto;
  }

  .collection-nav {
    display: none;
  }

  .collection-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-copy {
    min-height: 500px;
  }

  .hero-panel {
    min-height: 240px;
  }

  .hero-panel strong {
    position: absolute;
    font-size: 180px;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .header-shell,
  .collection-hero,
  .category-rail,
  .catalog {
    width: min(100% - 24px, 1320px);
  }

  .header-shell {
    min-height: 62px;
  }

  .header-actions a {
    width: 32px;
    height: 32px;
  }

  .header-actions a:first-child {
    display: none;
  }

  .hero-copy {
    min-height: 430px;
    padding: 38px 24px;
  }

  .hero-copy h1 {
    font-size: 51px;
  }

  .hero-copy p {
    font-size: 13px;
  }

  .hero-panel {
    display: none;
  }

  .category-rail {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px 0;
  }

  .category-rail > div {
    flex-wrap: nowrap;
    margin-right: -12px;
    overflow-x: auto;
    padding-right: 12px;
    scrollbar-width: none;
  }

  .category-rail a {
    white-space: nowrap;
  }

  .catalog {
    padding: 52px 0 70px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .catalog-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .product-info {
    min-height: 112px;
    flex-direction: column;
    gap: 8px;
    padding: 12px 10px 14px !important;
  }

  .view-piece {
    display: none;
  }

  .collection-footer {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 46px 20px;
  }

  .collection-footer > div {
    justify-content: flex-start;
  }
}
