:root {
  --v3-ink: #191b18;
  --v3-muted: #686b65;
  --v3-paper: #f7f4ee;
  --v3-accent: #8e2f4f;
  --v3-accent-dark: #682039;
  --v3-lime: #d8ff48;
}

.collection-library-page .page-hero.compact {
  min-height: 440px;
  padding: 132px 7vw 60px;
}

.collection-library-page .page-hero.compact::after {
  display: inline-flex;
  margin-top: 28px;
  padding: 7px 11px;
  color: rgba(255, 255, 255, .84);
  border: 1px solid rgba(255, 255, 255, .35);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  content: "V3 · BUYER DECISION GALLERY";
}

html[lang^="zh"] .collection-library-page .page-hero.compact::after {
  content: "V3 · 买手决策型产品库";
}

.collection-library-page .gallery-tool {
  padding: 52px 5vw 120px;
}

.collection-library-page .gallery-toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  margin-bottom: 30px;
}

.collection-library-page .gallery-toolbar h2 {
  max-width: 780px;
  font-size: clamp(38px, 4.2vw, 60px);
}

.collection-library-page .gallery-toolbar > div > p:last-child {
  max-width: 760px;
  color: var(--v3-muted);
}

.collection-library-page .tag-filter-panel {
  margin-bottom: 28px;
}

.v3-quick-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 22px;
}

.v3-quick-paths a {
  position: relative;
  display: grid;
  min-height: 104px;
  align-content: center;
  padding: 17px 18px;
  color: var(--v3-ink);
  background: #fff;
  border: 1px solid #d9d3c9;
}

.v3-quick-paths a::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--v3-accent);
  content: "";
  opacity: 0;
}

.v3-quick-paths a:hover::after,
.v3-quick-paths a.active::after {
  opacity: 1;
}

.v3-quick-paths small,
.v3-quick-paths b,
.v3-quick-paths span {
  display: block;
}

.v3-quick-paths small {
  margin-bottom: 5px;
  color: var(--v3-accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.v3-quick-paths b {
  font: 500 20px/1.1 Georgia, "Times New Roman", serif;
}

.v3-quick-paths span {
  margin-top: 8px;
  color: var(--v3-muted);
  font-size: 10px;
  font-weight: 700;
}

.v3-filter-details {
  margin-bottom: 26px;
}

.v3-filter-details > summary {
  display: none;
}

.v3-filter-details .tag-filter-panel {
  margin-bottom: 0;
}

.collection-library-page .product-gallery {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.v3-gallery-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: auto !important;
  min-width: 0;
  overflow: hidden !important;
  color: var(--v3-ink);
  background: #fff;
}

.v3-gallery-card .v3-card-media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  color: inherit;
  background: #eee9df;
  border: 0;
  aspect-ratio: 3 / 4;
  cursor: zoom-in;
}

.v3-gallery-card .v3-card-media img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  transition: transform .45s ease;
}

.v3-gallery-card:hover .v3-card-media img {
  transform: scale(1.025);
}

.v3-card-code,
.v3-card-status {
  position: absolute;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(8px);
}

.v3-image-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #1f211e;
  background: rgba(255,255,255,.94);
  border-radius: 50%;
  box-shadow: 0 5px 16px rgba(0,0,0,.16);
  font: 700 25px/.8 Arial,sans-serif;
  transition: transform .2s ease, background-color .2s ease;
}

.v3-card-media:hover .v3-image-zoom { transform: scale(1.08); background: #fff; }

.v3-card-code {
  left: 12px;
}

.v3-card-status {
  right: 12px;
  color: #fff;
  background: rgba(25, 27, 24, .86);
}

.v3-gallery-card .v3-card-body,
.v3-gallery-card .v3-card-head,
.v3-gallery-card .v3-card-head > div,
.v3-gallery-card .v3-card-facts,
.v3-gallery-card .v3-card-actions,
.v3-gallery-card .variant-options,
.v3-gallery-card .gallery-tags {
  padding: 0 !important;
}

.v3-gallery-card .v3-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 16px 16px !important;
}

.v3-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.v3-gallery-card .v3-card-kicker {
  margin: 0 0 5px;
  color: var(--v3-accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.v3-gallery-card .v3-card-head h3 {
  min-height: 44px;
  margin: 0;
  font: 500 21px/1.08 Georgia, "Times New Roman", serif !important;
}

.v3-detail-link {
  display: inline-flex;
  gap: 5px;
  padding: 2px 0;
  color: var(--v3-muted);
  background: transparent;
  border: 0;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.v3-card-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 15px 0 13px;
  background: #ded9cf;
  border: 1px solid #ded9cf;
}

.v3-card-facts span {
  min-width: 0;
  padding: 9px 7px;
  color: var(--v3-muted);
  background: var(--v3-paper);
  font-size: 9px;
  line-height: 1.35;
}

.v3-card-facts b {
  display: block;
  margin-bottom: 3px;
  color: var(--v3-ink);
  font-size: 8px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.v3-gallery-card .variant-options {
  margin: 0 0 6px;
}

.v3-gallery-card .variant-note,
.v3-gallery-card .variant-current {
  margin: 3px 0 !important;
}

.v3-gallery-card .gallery-tags {
  min-height: 24px;
  margin: 5px 0 14px;
}

.v3-gallery-card .gallery-tags span {
  padding: 4px 6px;
}

.v3-card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: auto;
}

.v3-view-button,
.v3-gallery-card .conversion-select-button {
  position: static !important;
  right: auto !important;
  bottom: auto !important;
  width: auto;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 0;
  font-size: 10px;
  font-weight: 800;
}

.v3-view-button {
  color: #fff;
  background: var(--v3-ink);
  border: 1px solid var(--v3-ink);
  cursor: pointer;
}

/* Product-library detail hierarchy: keep each fact, tag and action visually separate. */
.v3-gallery-card .v3-card-body{padding:20px 18px 18px!important;gap:0}
.v3-gallery-card .v3-card-head{padding-bottom:4px!important;border-bottom:1px solid #e3ded5}
.v3-gallery-card .v3-card-kicker{margin:0 0 7px!important;font-size:10px!important}
.v3-gallery-card .v3-card-meta{display:flex;gap:7px;align-items:baseline;min-width:0;margin:15px 0 0!important;color:var(--v3-muted);font-size:10px;line-height:1.35;white-space:nowrap;overflow:hidden}
.v3-gallery-card .v3-card-meta span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.v3-gallery-card .v3-card-meta b{margin-right:3px;color:var(--v3-ink);font-size:8px;letter-spacing:.06em;text-transform:uppercase}
.v3-gallery-card .v3-card-meta i{flex:0 0 auto;color:#b4ada3;font-style:normal}
.v3-gallery-card .v3-card-actions{gap:10px!important;margin-top:auto!important;padding-top:18px!important;border-top:1px solid #e3ded5}
.v3-gallery-card .v3-view-button,.v3-gallery-card .conversion-select-button{min-height:44px!important;white-space:nowrap}


.v3-gallery-card .conversion-select-button {
  background: #fff;
}

.v3-gallery-card .conversion-select-button::before {
  font-size: 13px;
}

.v3-product-dialog[hidden] {
  display: none !important;
}

.v3-product-dialog {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(560px, 46vw);
}

.v3-dialog-backdrop {
  grid-column: 1;
  grid-row: 1;
  padding: 0;
  background: rgba(12, 13, 11, .62);
  border: 0;
  cursor: zoom-out;
  backdrop-filter: blur(4px);
}

.v3-dialog-panel {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  height: 100vh;
  overflow-y: auto;
  color: var(--v3-ink);
  background: #fff;
  box-shadow: -24px 0 80px rgba(0, 0, 0, .2);
}

.v3-dialog-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: rgba(25, 27, 24, .88);
  border: 0;
  border-radius: 50%;
  font-size: 23px;
  cursor: pointer;
}

.v3-dialog-image {
  width: 100%;
  max-height: 68vh;
  object-fit: cover;
  object-position: center top;
  background: #ece7de;
}

.v3-dialog-content {
  padding: 34px 38px 48px;
}

.v3-dialog-eyebrow {
  margin-bottom: 9px;
  color: var(--v3-accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.v3-dialog-content h2 {
  margin: 0 0 8px;
  font: 500 clamp(34px, 4vw, 54px)/1 Georgia, "Times New Roman", serif;
}

.v3-dialog-intro {
  max-width: 620px;
  color: var(--v3-muted);
  font-size: 14px;
}

.v3-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 28px 0;
  background: #ddd8ce;
  border: 1px solid #ddd8ce;
}

.v3-spec-grid div {
  min-height: 82px;
  padding: 15px !important;
  background: var(--v3-paper);
}

.v3-spec-grid dt {
  margin-bottom: 7px;
  color: var(--v3-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.v3-spec-grid dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.v3-dialog-note {
  padding: 15px 17px;
  color: var(--v3-muted);
  background: #f3efe7;
  border-left: 3px solid var(--v3-accent);
  font-size: 12px;
  line-height: 1.65;
}

.v3-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.v3-dialog-actions .conversion-select-button,
.v3-dialog-inquiry {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 900;
}

.v3-dialog-actions .conversion-select-button {
  color: var(--v3-ink);
  background: var(--v3-lime);
  border: 1px solid var(--v3-lime);
}

.v3-dialog-inquiry {
  color: #fff;
  background: var(--v3-ink);
  border: 1px solid var(--v3-ink);
}

body.v3-dialog-open {
  overflow: hidden;
}

.v3-image-lightbox[hidden] { display: none !important; }
.v3-image-lightbox { position: fixed; inset: 0; z-index: 12100; display: grid; place-items: center; padding: 28px; }
.v3-lightbox-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; background: rgba(12,13,11,.84); border: 0; cursor: zoom-out; backdrop-filter: blur(5px); }
.v3-lightbox-frame { position: relative; z-index: 1; display: grid; max-width: min(92vw, 1040px); max-height: calc(100vh - 56px); margin: 0; }
.v3-lightbox-image { display: block; max-width: min(92vw, 1040px); max-height: calc(100vh - 112px); object-fit: contain; background: #ece7de; }
.v3-lightbox-frame figcaption { padding-top: 10px; color: rgba(255,255,255,.78); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.v3-lightbox-close { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; width: 38px; height: 38px; place-items: center; color: #1f211e; background: rgba(255,255,255,.94); border: 0; border-radius: 50%; font: 400 27px/1 Arial,sans-serif; cursor: pointer; }
body.v3-lightbox-open { overflow: hidden; }

@media (max-width: 1180px) {
  .collection-library-page .product-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .collection-library-page .page-hero.compact {
    min-height: 0;
    padding: 116px 22px 54px;
  }

  .collection-library-page .gallery-tool {
    padding: 44px 16px 100px;
  }

  .collection-library-page .gallery-toolbar {
    grid-template-columns: 1fr;
  }

  .v3-product-dialog {
    display: block;
    background: rgba(12, 13, 11, .58);
  }

  .v3-dialog-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
  }

  .v3-dialog-panel {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: min(90vh, 900px);
    border-radius: 20px 20px 0 0;
  }

  .v3-dialog-close {
    position: absolute;
  }
}

@media (max-width: 760px) {
  .v3-quick-paths {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 14px;
    overflow-x: auto;
  }

  .v3-quick-paths a {
    min-width: 112px;
    min-height: 88px;
    padding: 12px 10px;
  }

  .v3-quick-paths b {
    font-size: 15px;
  }

  .v3-quick-paths span {
    font-size: 9px;
  }

  .v3-filter-details {
    margin-bottom: 18px;
    border-block: 1px solid #d8d2c8;
  }

  .v3-filter-details > summary {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    min-height: 58px;
    padding: 10px 2px;
    list-style: none;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
  }

  .v3-filter-details > summary::-webkit-details-marker {
    display: none;
  }

  .v3-filter-details > summary::after {
    content: "+";
    font-size: 22px;
    font-weight: 400;
  }

  .v3-filter-details[open] > summary::after {
    content: "−";
  }

  .v3-filter-details > summary small {
    color: var(--v3-muted);
    font-size: 9px;
    font-weight: 600;
  }

  .v3-filter-details .tag-filter-panel {
    padding: 14px 0 18px !important;
    border-top: 1px solid #d8d2c8 !important;
    border-bottom: 0 !important;
  }

  .collection-library-page .product-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .v3-gallery-card .v3-card-body {
    padding: 12px 10px 11px !important;
  }

  .v3-gallery-card .v3-card-head {
    display: block;
  }

  .v3-detail-link {
    display: none;
  }

  .v3-gallery-card .v3-card-head h3 {
    min-height: 36px;
    font-size: 16px !important;
  }

  .v3-card-facts {
    grid-template-columns: 1fr;
    margin: 10px 0;
  }

  .v3-card-facts span:nth-child(n+2) {
    display: none;
  }

  .v3-gallery-card .gallery-tags span:nth-child(n+3) {
    display: none;
  }

  .v3-card-actions {
    grid-template-columns: 1fr;
  }

  .v3-view-button,
  .v3-gallery-card .conversion-select-button {
    width: 100%;
    min-height: 38px;
    padding: 7px 8px;
  }

  .v3-dialog-image {
    max-height: 46vh;
  }

  .v3-dialog-content {
    padding: 24px 18px 38px;
  }

  .v3-dialog-content h2 {
    font-size: 34px;
  }

  .v3-dialog-actions {
    grid-template-columns: 1fr;
  }
}
