/* ============================================================
   VIE JEWELS — Collections, Editorial/Luxury Redesign
   Scoped entirely under body.vj-collections so no other page
   on the site is affected. Loaded AFTER styles.css, so rules
   here win on plain-specificity ties without needing !important.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;1,9..144,400&family=Inter:wght@300;400;500;600&display=swap');

body.vj-collections {
  --vj-bg:        #fafafa;
  --vj-surface:   #ffffff;
  --vj-ink:       #171717;
  --vj-ink-soft:  #5c5c5c;
  --vj-ink-faint: #9c9c9c;
  --vj-hair:      #e4e4e4;
  --vj-hair-soft: #ececec;
  --vj-hair-strong: #cfcfcf;
  --vj-accent:    #3a3a3a;
  --vj-accent-deep: #171717;
  --vj-accent-line: #a3a3a3;
  --vj-serif: 'Fraunces', 'Times New Roman', serif;
  --vj-sans:  'Inter', system-ui, sans-serif;

  background: var(--vj-bg);
  color: var(--vj-ink);
  font-family: var(--vj-sans);
}

body.vj-collections * { border-radius: 0 !important; }

body.vj-collections ::selection { background: var(--vj-accent-line); color: #fff; }

/* ---------------------------------------------------------------
   HEADER / NAV
--------------------------------------------------------------- */
body.vj-collections .site-header {
  background: var(--vj-surface);
  border-bottom: 1px solid var(--vj-hair);
}

body.vj-collections .main-nav {
  padding: 30px 48px 22px;
  gap: 20px;
}

body.vj-collections .main-nav .brand img { height: 108px; }

body.vj-collections .nav-links {
  gap: 40px;
}
body.vj-collections .nav-links a {
  font-family: var(--vj-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--vj-ink-soft);
  position: relative;
  padding-bottom: 6px;
  border-bottom: none;
}
body.vj-collections .nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0;
  height: 1px;
  background: var(--vj-accent);
  transition: left 0.45s cubic-bezier(0.22, 1, 0.36, 1), right 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
body.vj-collections .nav-links a:hover,
body.vj-collections .nav-links a[aria-current="page"] {
  color: var(--vj-ink);
}
body.vj-collections .nav-links a:hover::after,
body.vj-collections .nav-links a[aria-current="page"]::after {
  left: 0; right: 0;
}

body.vj-collections .nav-icons { gap: 26px; font-size: 0; right: 48px; }
body.vj-collections .nav-icons a {
  display: inline-flex;
  color: var(--vj-ink-soft);
}
body.vj-collections .nav-icons svg {
  width: 19px; height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.3;
  transition: stroke var(--transition);
}
body.vj-collections .nav-icons a:hover { color: var(--vj-accent); }
body.vj-collections .nav-badge {
  background: var(--vj-accent);
  border-radius: 50% !important;
  font-family: var(--vj-sans);
}

/* ---------------------------------------------------------------
   EDITORIAL HERO — asymmetric split
--------------------------------------------------------------- */
body.vj-collections .page-hero {
  padding: 0;
  text-align: left;
  border-bottom: none;
  background: var(--vj-surface);
}

.vj-hero {
  border-bottom: 1px solid var(--vj-hair);
  background: var(--vj-surface);
}
.vj-hero-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 40px 48px 32px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
}
.vj-hero-left {
  padding-right: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  animation: vjFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.vj-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--vj-accent);
  margin-bottom: 22px;
  font-family: var(--vj-sans);
}
.vj-hero-title {
  font-family: var(--vj-serif);
  font-weight: 300;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--vj-ink);
}
.vj-hero-title em {
  font-style: normal;
  font-weight: 400;
  color: var(--vj-accent-deep);
}
.vj-hero-right {
  padding-left: 56px;
  border-left: 1px solid var(--vj-hair);
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: vjFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}
.vj-hero-copy {
  font-size: 15px;
  line-height: 1.9;
  color: var(--vj-ink-soft);
  max-width: 440px;
}

@keyframes vjFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------
   CATALOG LAYOUT
--------------------------------------------------------------- */
body.vj-collections .catalog-layout {
  /* Left padding trimmed to almost nothing (was 48px, then 16px) so the
     sidebar hugs the left edge. Sidebar column also narrowed (220px ->
     180px) and the gap to the grid tightened (28px -> 20px). All three
     changes together give the product grid noticeably more width to
     spread across, which is what actually makes each of the 3 tiles
     bigger — the grid itself has no max-width of its own, so any width
     reclaimed here goes straight into tile size. */
  max-width: 1900px;
  padding: 28px 32px 96px 8px;
  gap: 20px;
  grid-template-columns: 180px 1fr;
}

/* Sidebar */
body.vj-collections .catalog-sidebar {
  border-right: 1px solid var(--vj-hair);
  padding-right: 16px;
  padding-left: 0;
  top: 40px;
}

/* PREMIUM SIDEBAR TITLE — "Refine" */
body.vj-collections .catalog-sidebar h3 {
  font-family: var(--vj-serif);
  font-style: normal;
  font-weight: 500;
  font-size: 24px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vj-ink);
  position: relative;
  border-bottom: 1px solid var(--vj-hair);
  padding-bottom: 16px;
  margin-bottom: 28px;
}
/* short dark accent bar sitting on the divider */
body.vj-collections .catalog-sidebar h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 48px;
  height: 2px;
  background: var(--vj-ink);
}

/* PREMIUM SIDEBAR TITLES — filter groups */
body.vj-collections .filter-group h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--vj-sans);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vj-ink);
  background: linear-gradient(90deg, rgba(23, 23, 23, 0.08), rgba(23, 23, 23, 0) 100%);
  border-bottom: none;
  border-left: 3px solid var(--vj-ink);
  padding: 10px 10px;
  margin-bottom: 14px;
}
/* small diamond marker before each title */
body.vj-collections .filter-group h4::before {
  content: "";
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  background: var(--vj-ink);
  transform: rotate(45deg);
}
body.vj-collections .filter-group { margin-bottom: 28px; }

body.vj-collections .filter-checkboxes label,
body.vj-collections .filter-tree-label,
body.vj-collections .filter-tree-sub-label {
  color: var(--vj-ink-soft);
}
body.vj-collections .filter-checkboxes label:hover,
body.vj-collections .filter-tree-label:hover,
body.vj-collections .filter-tree-sub-label:hover {
  color: var(--vj-ink);
}
body.vj-collections .filter-tree-children {
  border-left: 1px solid var(--vj-hair);
  margin-left: 12px !important;
  padding-left: 8px !important;
}
body.vj-collections .filter-tree-label,
body.vj-collections .filter-tree-sub-label {
  flex-wrap: nowrap;
}
body.vj-collections .filter-tree-name,
body.vj-collections .filter-tree-sub-label span:not(.filter-count) {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.vj-collections .filter-count { flex-shrink: 0; }

body.vj-collections .filter-range input,
body.vj-collections .catalog-toolbar input {
  border: none;
  border-bottom: 1px solid var(--vj-hair-strong);
  background: transparent;
  padding-left: 0;
  border-radius: 0 !important;
}
body.vj-collections .filter-range input:focus,
body.vj-collections .catalog-toolbar input:focus { border-bottom-color: var(--vj-ink); }

body.vj-collections .filter-tag-chip {
  border: 1px solid var(--vj-hair-strong);
  color: var(--vj-ink-soft);
  background: transparent;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
body.vj-collections .filter-tag-chip:hover { border-color: var(--vj-ink-soft); color: var(--vj-ink); }
body.vj-collections .filter-tag-chip.active {
  background: rgba(0, 0, 0, 0.06);
  border-color: var(--vj-accent);
  color: var(--vj-accent-deep);
}

body.vj-collections .filter-clear-btn {
  border: 1px solid var(--vj-hair-strong);
  color: var(--vj-ink-soft);
  font-family: var(--vj-sans);
}
body.vj-collections .filter-clear-btn:hover { border-color: var(--vj-ink); color: var(--vj-ink); }

/* Controls row — filters left, search/sort pushed to the right */
body.vj-collections .vj-controls-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  border: 1px solid var(--vj-hair) !important;
  border-radius: 14px !important;
  overflow: hidden;
  margin-bottom: 32px;
}
body.vj-collections .top-filter-bar {
  border: none;
  margin-bottom: 0;
  flex: 1 1 480px;
  min-width: 0;
}
body.vj-collections .top-filter-group {
  border-right: 1px solid var(--vj-hair);
  padding: 18px 24px;
}
body.vj-collections .top-filter-label {
  color: var(--vj-ink-faint);
  letter-spacing: 0.2em;
}
body.vj-collections .top-filter-row select {
  border: none;
  border-bottom: 1px solid var(--vj-hair-strong);
  background-color: transparent;
  padding-left: 0;
  border-radius: 0 !important;
  font-family: var(--vj-sans);
  color: var(--vj-ink-soft);
}
body.vj-collections .top-filter-row select:focus,
body.vj-collections .top-filter-row select:hover { border-bottom-color: var(--vj-ink); color: var(--vj-ink); }

body.vj-collections .catalog-toolbar {
  padding: 18px 0 18px 28px;
  border-bottom: none;
  border-left: 1px solid var(--vj-hair);
  margin-bottom: 0;
  margin-left: auto;
  flex: 0 1 auto;
  justify-content: flex-end;
  flex-wrap: nowrap;
}
body.vj-collections .catalog-toolbar input {
  max-width: 220px;
  font-family: var(--vj-serif);
  font-style: normal;
  font-size: 15px;
  color: var(--vj-ink);
}
body.vj-collections .catalog-toolbar input::placeholder { color: var(--vj-ink-faint); font-style: normal; }

body.vj-collections .catalog-count {
  color: var(--vj-ink-faint);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
body.vj-collections .sort-label {
  color: var(--vj-ink-faint);
  font-weight: 500;
}
body.vj-collections .sort-group { gap: 0; }
body.vj-collections .sort-btn {
  background: transparent;
  border: none;
  color: var(--vj-ink-faint);
  padding: 4px 12px;
  border-right: 1px solid var(--vj-hair-strong);
  letter-spacing: 0.06em;
}
body.vj-collections .sort-btn:last-child { border-right: none; }
body.vj-collections .sort-btn:hover { color: var(--vj-ink); background: transparent; }
body.vj-collections .sort-btn.active {
  background: transparent;
  color: var(--vj-accent-deep);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--vj-accent-line);
}

body.vj-collections .section-heading {
  border-bottom-color: var(--vj-hair) !important;
  padding-top: 6px !important;
  margin-bottom: 2px !important;
}
body.vj-collections .section-heading .eyebrow { color: var(--vj-accent); }
body.vj-collections .section-heading h2 {
  font-family: var(--vj-serif);
  font-weight: 400;
  font-style: normal;
  font-size: 22px !important;
  color: var(--vj-ink);
}

/* ---------------------------------------------------------------
   PRODUCT GRID — editorial portrait cards
--------------------------------------------------------------- */
body.vj-collections .product-grid {
  background: transparent;
  border: none;
  gap: 20px 22px;
  margin-top: 10px !important;
  grid-template-columns: repeat(3, 1fr);
}
body.vj-collections .product-card {
  background: var(--vj-surface);
  border: 1px solid var(--vj-hair);
  border-radius: 6px !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: vjCardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
body.vj-collections .product-card:hover { background: var(--vj-surface); }
body.vj-collections .product-card:nth-child(1) { animation-delay: 0.02s; }
body.vj-collections .product-card:nth-child(2) { animation-delay: 0.06s; }
body.vj-collections .product-card:nth-child(3) { animation-delay: 0.10s; }
body.vj-collections .product-card:nth-child(4) { animation-delay: 0.14s; }
body.vj-collections .product-card:nth-child(5) { animation-delay: 0.18s; }
body.vj-collections .product-card:nth-child(6) { animation-delay: 0.22s; }

@keyframes vjCardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

body.vj-collections .product-card-media {
  /* Box height comes from the image itself (no fixed aspect ratio), so the
     photo fills edge-to-edge with nothing cropped.
     styles.css sets an unscoped `.product-card-media { aspect-ratio: 1 / 1; }`,
     so aspect-ratio must be explicitly reset here.

     FIX (images missing in gallery): styles.css most likely also positions
     the <img> absolutely inside that square box. An absolutely-positioned
     image adds NO height to its parent, so once the 1:1 ratio is removed the
     box collapses to 0px and overflow:hidden clips the image completely.
     The img rule below now forces position:static so it sizes the box.
     min-height is a safety net: even if something else still collapses the
     box (or the lazy image hasn't loaded yet), the tile keeps a visible area. */
  aspect-ratio: auto;
  min-height: 240px;
  height: auto;
  background: #ffffff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
body.vj-collections .product-card-media img {
  /* Undo any absolute/fixed positioning inherited from styles.css */
  position: static !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none;
  max-width: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
body.vj-collections .product-card:hover .product-card-media img { transform: scale(1.045); }

body.vj-collections .product-card-body {
  /* Slightly darker than the image zone's pure white so the two zones
     read as one tile with two parts, not two separate floating pieces.
     No divider line needed — the tone shift alone does the job.
     Padding and type sizes below are intentionally tight so this panel
     stays as small as it can while remaining readable. min-height keeps
     every panel the same floor height across the row, so tiles line up
     even when a product is missing an optional field (sku, description). */
  background: var(--vj-hair-soft);
  border-top: none;
  padding: 12px 14px 14px;
  min-height: 96px;
}
body.vj-collections .product-card-name {
  font-family: var(--vj-serif);
  font-weight: 400;
  font-size: 15px;
  color: var(--vj-ink);
  display: block;
  width: 100%;
  line-height: 1.25;
  margin-bottom: 1px;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.3s ease;
  /* Truncate to one line — a long product name is the single biggest
     cause of uneven card heights across a row. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.vj-collections .product-card:hover .product-card-name {
  text-decoration-color: var(--vj-accent-line);
}

body.vj-collections .product-card-sku {
  color: var(--vj-ink-faint);
  font-size: 9px;
  letter-spacing: 0.14em;
  margin-top: 2px;
  margin-bottom: 4px;
}
body.vj-collections .product-card-desc {
  color: var(--vj-ink-soft);
  font-size: 12px;
  line-height: 1.45;
  /* Compact tiles read better with one line of description, not two. */
  -webkit-line-clamp: 1;
  /* The base stylesheet makes this flex:1 so it grows to fill leftover
     card height — killing the grow keeps the text block tight. */
  flex: none;
  margin-bottom: 6px;
}
body.vj-collections .product-card-price {
  /* No border-top / padding-top / margin-top:auto: zeroing them sits the
     price directly under the description. */
  border-top: none;
  padding-top: 0;
  margin-top: 0;
  color: var(--vj-ink);
  font-family: var(--vj-sans);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ---------------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------------- */
@media (max-width: 1080px) {
  body.vj-collections .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  body.vj-collections .main-nav { padding: 20px 24px 16px; }
  body.vj-collections .main-nav .brand img { height: 80px; }
  body.vj-collections .nav-icons { right: 24px; }
  .vj-hero-inner { grid-template-columns: 1fr; padding: 32px 24px 28px; gap: 20px; }
  .vj-hero-left { padding-right: 0; align-items: flex-start; text-align: left; }
  .vj-hero-title { font-size: 28px; }
  .vj-hero-right { padding-left: 0; border-left: none; padding-top: 20px; border-top: 1px solid var(--vj-hair); }
  body.vj-collections .catalog-layout { padding: 40px 24px 64px; gap: 32px; grid-template-columns: 1fr; }
  body.vj-collections .catalog-sidebar { border-right: none; padding-right: 0; border-bottom: 1px solid var(--vj-hair); padding-bottom: 24px; }
  body.vj-collections .top-filter-group { border-right: none; border-bottom: 1px solid var(--vj-hair); }
  body.vj-collections .top-filter-group:last-child { border-bottom: none; }
}

@media (max-width: 560px) {
  body.vj-collections .product-grid { grid-template-columns: 1fr; }
  body.vj-collections .sort-group { flex-wrap: wrap; }
}

/* ---------------------------------------------------------------
   ROUNDED BUTTONS + PRODUCT IMAGES
   (overrides the flat-edge reset above; class selectors win over
   the universal `*` selector regardless of !important, since
   specificity is compared before rule order.)
--------------------------------------------------------------- */
body.vj-collections .filter-clear-btn,
body.vj-collections .sort-btn,
body.vj-collections .filter-tag-chip {
  border-radius: 999px !important;
}

body.vj-collections .sort-btn {
  border-right: none !important;
  margin-right: 4px;
}
body.vj-collections .sort-btn.active,
body.vj-collections .sort-btn:hover {
  background: var(--vj-hair-soft) !important;
}

/* .product-card itself owns border-radius + overflow:hidden (see
   PRODUCT GRID section above) since the image and text zones are one
   bordered tile — no separate rounding needed on the media box. */


/* ---------------------------------------------------------------
   PAGINATION — page size, page numbers, Load more
--------------------------------------------------------------- */
body.vj-collections .page-size-group {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}
body.vj-collections .page-size-select {
  border: none;
  border-bottom: 1px solid var(--vj-hair-strong);
  background-color: transparent;
  font-family: var(--vj-sans);
  font-size: 12px;
  color: var(--vj-ink);
  padding: 4px 4px 4px 2px;
  cursor: pointer;
  outline: none;
}
body.vj-collections .page-size-select:focus { border-bottom-color: var(--vj-ink); }

body.vj-collections .catalog-pager {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 44px;
}
body.vj-collections .catalog-pager:empty { display: none; }
body.vj-collections .pager-status {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vj-ink-faint);
}
body.vj-collections .pager-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
body.vj-collections .pager-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vj-ink-faint);
  margin: 0 6px;
}
body.vj-collections .pager-gap { color: var(--vj-ink-faint); padding: 0 2px; }
body.vj-collections .pager-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--vj-hair-strong);
  background: transparent;
  color: var(--vj-ink-soft);
  font-family: var(--vj-sans);
  font-size: 12px;
  cursor: pointer;
  border-radius: 999px !important;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
body.vj-collections .pager-btn:hover { border-color: var(--vj-ink); color: var(--vj-ink); }
body.vj-collections .pager-btn.active {
  background: var(--vj-ink);
  border-color: var(--vj-ink);
  color: #fff;
}
body.vj-collections .load-more-btn {
  padding: 14px 40px;
  border: 1px solid var(--vj-ink);
  background: transparent;
  color: var(--vj-ink);
  font-family: var(--vj-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px !important;
  transition: background 0.25s, color 0.25s;
}
body.vj-collections .load-more-btn span {
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: none;
  opacity: 0.7;
}
body.vj-collections .load-more-btn:hover { background: var(--vj-ink); color: #fff; }


/* ---------------------------------------------------------------
   BACK TO TOP ARROW
--------------------------------------------------------------- */
body.vj-collections .back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 90;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--vj-surface);
  color: var(--vj-ink);
  border: 1px solid var(--vj-hair-strong);
  border-radius: 50% !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, background 0.2s, color 0.2s;
}
body.vj-collections .back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
body.vj-collections .back-to-top:hover {
  background: var(--vj-ink);
  color: #fff;
  border-color: var(--vj-ink);
}
body.vj-collections .back-to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
@media (max-width: 560px) {
  body.vj-collections .back-to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}
