﻿:root {
  --theme-primary: #004D40;
  --theme-secondary: #00796B;
  --theme-accent: #4DB6AC;
  --theme-bg: #F8FBFA;
  --theme-border: #D6EAE7;
  --ink: #0b2f2a;
  --navy: var(--theme-primary);
  --teal: var(--theme-secondary);
  --teal-2: var(--theme-accent);
  --gold: var(--theme-accent);
  --bg: var(--theme-bg);
  --surface: #ffffff;
  --line: var(--theme-border);
  --muted: #66738a;
  --soft: #edf7f7;
  --shadow: 0 18px 45px rgba(0, 77, 64, 0.11);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Jost", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  caret-color: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, #ffffff 0%, var(--theme-bg) 48%, #ffffff 100%);
}

body[data-diamond-type="lab"] {
  --type-primary: var(--theme-primary);
  --type-primary-strong: var(--theme-secondary);
  --type-primary-rgb: 0, 77, 64;
  --type-soft: #edf8f6;
  --type-chip: #eff7f5;
  --type-panel: var(--theme-bg);
  --type-accent: var(--theme-accent);
  --type-accent-rgb: 77, 182, 172;
}

body[data-diamond-type="natural"] {
  --theme-primary: #4C4B16;
  --theme-secondary: #898121;
  --theme-accent: #898121;
  --theme-bg: #fbf9ee;
  --theme-border: #ded9aa;
  --navy: #4C4B16;
  --teal: #898121;
  --teal-2: #a39b36;
  --gold: #898121;
  --bg: #fbf9ee;
  --line: #ded9aa;
  --soft: #f7f5e9;
  --type-primary: #4C4B16;
  --type-primary-strong: #898121;
  --type-primary-rgb: 76, 75, 22;
  --type-soft: #f7f5e9;
  --type-chip: #fbf9ee;
  --type-panel: #fffdf4;
  --type-accent: #898121;
  --type-accent-rgb: 137, 129, 33;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

input,
textarea,
[contenteditable="true"] {
  caret-color: auto;
}

button,
a,
label,
.choice-chip,
.shape-chip,
.preset-chip,
.vdb-tab,
.vdb-type-pill,
.vdb-card-tab,
.vdb-reset,
.vdb-apply,
.vdb-toolbar-btn,
.vdb-toolbar-link,
.vdb-bulk-btn,
.vdb-card-heart,
.vdb-card-menu,
.vdb-expand,
.nav-trigger,
.icon-btn {
  -webkit-user-select: none;
  user-select: none;
  caret-color: transparent;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.top-strip {
  background: var(--navy);
  color: #fff;
  font-size: 13px;
}

.top-strip .container {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(255, 255, 255, 0.84);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(223, 230, 239, 0.88);
}

.nav-shell {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  white-space: nowrap;
}

.brand-logo-link {
  flex: 0 0 auto;
  padding: 0;
}

.brand-logo-img {
  display: block;
  width: clamp(240px, 22vw, 340px);
  height: 58px;
  object-fit: contain;
  object-position: left center;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(198, 163, 84, 0.55);
  background: linear-gradient(135deg, #fff, #eef7f8);
  box-shadow: 0 10px 28px rgba(18, 42, 86, 0.1);
  color: var(--teal);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav > a,
.nav-trigger {
  border: 0;
  background: transparent;
  padding: 14px 14px;
  color: #17233b;
  font-weight: 700;
  cursor: pointer;
}

.nav-item {
  position: relative;
}

.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  min-width: 700px;
  padding-top: 14px;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0s linear 0.16s;
  z-index: 30;
}

.mega-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 14px;
}

.nav-item:hover .mega-menu,
.nav-item:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  transition-delay: 0s;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.diamonds-mega-menu {
  min-width: 520px;
}

.diamond-mega-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mega-title {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mega-col a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  color: #0f172a;
  font-weight: 700;
}

.mega-col a:hover {
  color: var(--teal);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
}

.page-hero {
  padding: 58px 0 28px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 32px;
  align-items: center;
  padding: 34px;
  border: 1px solid rgba(223, 230, 239, 0.9);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(18, 42, 86, 0.98), rgba(12, 99, 108, 0.92)),
    url("assets/hero-diamond-marketplace-pro.png") center/cover;
  color: #fff;
  box-shadow: var(--shadow);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 16, 37, 0.08), rgba(255, 255, 255, 0.12));
  pointer-events: none;
}

.hero-panel > * {
  position: relative;
  z-index: 1;
}

.kicker {
  margin: 0 0 10px;
  color: #9fe2e4;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-panel h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-panel p {
  margin: 18px 0 0;
  max-width: 650px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.7;
}

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

.stat-tile {
  min-height: 112px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.stat-tile strong {
  display: block;
  color: #fff;
  font-size: 26px;
  line-height: 1;
}

.stat-tile span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
}

.type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.type-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.type-tab.active {
  background: #fff;
  color: var(--type-primary, var(--navy));
  border-color: rgba(var(--type-primary-rgb, 18, 42, 86), 0.55);
  box-shadow: 0 12px 24px rgba(var(--type-primary-rgb, 18, 42, 86), 0.16);
}

body[data-diamond-type="natural"] .hero-panel {
  background:
    linear-gradient(135deg, rgba(39, 56, 88, 0.98), rgba(154, 111, 37, 0.9)),
    url("assets/hero-diamond-marketplace-pro.png") center/cover;
}

.page-section {
  padding: 28px 0 70px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
}

.section-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.35fr);
  gap: 22px;
  align-items: start;
}

.filters-stack,
.result-stack {
  display: grid;
  gap: 16px;
}

.filter-card,
.data-card,
.tool-card,
.builder-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(16, 36, 71, 0.07);
  animation: riseIn 0.55s ease both;
}

.filter-header,
.data-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #f8fbfc);
}

.filter-header h3,
.data-card-header h3 {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
}

.filter-body,
.data-card-body {
  padding: 16px;
}

.choice-grid,
.shape-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-chip,
.shape-chip,
.preset-chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #24324b;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.choice-chip:hover,
.shape-chip:hover,
.preset-chip:hover {
  border-color: rgba(11, 111, 120, 0.38);
  transform: translateY(-2px);
}

.choice-chip.active,
.shape-chip.active,
.preset-chip.active {
  border-color: rgba(11, 111, 120, 0.44);
  background: var(--soft);
  color: var(--teal);
}

.shape-chip {
  width: 88px;
  min-height: 88px;
  flex-direction: column;
  border-radius: var(--radius);
  padding: 10px;
  font-size: 12px;
}

.shape-chip img,
.shape-chip .diamond-shape-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(18, 42, 86, 0.12));
}

.shape-chip .diamond-shape-icon {
  display: grid;
  place-items: center;
}

.shape-chip .diamond-shape-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.shape-chip .shape-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.input-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: rgba(11, 111, 120, 0.5);
  box-shadow: 0 0 0 4px rgba(11, 111, 120, 0.08);
}

.search-actions {
  position: sticky;
  bottom: 0;
  z-index: 9;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 12px 24px rgba(11, 111, 120, 0.22);
}

.btn-outline {
  border-color: var(--line);
  background: #fff;
  color: var(--navy);
}

.btn-gold {
  background: var(--gold);
  color: #18213a;
}

.quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.switch-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 800;
}

.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: #edf7f7;
  color: var(--teal);
  font-weight: 800;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fbfc;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  color: #24324b;
  font-size: 14px;
}

tbody tr {
  transition: background 0.18s ease;
}

tbody tr:hover {
  background: #f8fcfc;
}

.stock-link {
  color: var(--teal);
  font-weight: 900;
}

.tag {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef3fb;
  color: #23365f;
  font-size: 12px;
  font-weight: 900;
}

.tag.green {
  background: #e8f7ef;
  color: #147048;
}

.tag.gold {
  background: #fff8e5;
  color: #826315;
}

body[data-diamond-type] .filter-card,
body[data-diamond-type] .builder-card {
  border-color: rgba(var(--type-primary-rgb), 0.18);
  background: linear-gradient(180deg, #fff, var(--type-panel));
}

body[data-diamond-type] .filter-header,
body[data-diamond-type] .data-card-header {
  border-bottom-color: rgba(var(--type-primary-rgb), 0.16);
  background: linear-gradient(180deg, #fff, var(--type-panel));
}

body[data-diamond-type] .choice-chip.active,
body[data-diamond-type] .shape-chip.active,
body[data-diamond-type] .preset-chip.active {
  border-color: rgba(var(--type-primary-rgb), 0.44);
  background: var(--type-soft);
  color: var(--type-primary);
}

body[data-diamond-type] .choice-chip:hover,
body[data-diamond-type] .shape-chip:hover,
body[data-diamond-type] .preset-chip:hover {
  border-color: rgba(var(--type-primary-rgb), 0.38);
}

body[data-diamond-type] .field input:focus,
body[data-diamond-type] .field select:focus {
  border-color: rgba(var(--type-primary-rgb), 0.5);
  box-shadow: 0 0 0 4px rgba(var(--type-primary-rgb), 0.08);
}

body[data-diamond-type] .btn-primary {
  background: var(--type-primary);
  box-shadow: 0 12px 24px rgba(var(--type-primary-rgb), 0.22);
}

body[data-diamond-type] .count-pill {
  background: var(--type-soft);
  color: var(--type-primary);
}

body[data-diamond-type="natural"] .tag.green[data-type-label] {
  background: #fff4d8;
  color: #7f5b1f;
}

.details-box {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.details-box summary {
  padding: 14px 16px;
  cursor: pointer;
  color: var(--navy);
  font-weight: 900;
}

.advanced-grid,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 16px 16px;
}

.builder-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 24px;
  align-items: start;
}

.gallery-card {
  padding: 18px;
}

.main-diamond-image {
  min-height: 430px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #eef7f8);
  overflow: hidden;
}

.main-diamond-image img {
  max-width: 84%;
  max-height: 340px;
  object-fit: contain;
  animation: floatDiamond 4.5s ease-in-out infinite;
}

.thumb-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.thumb-row img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.builder-options {
  display: grid;
  gap: 18px;
}

.option-line {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.option-line > label {
  color: var(--muted);
  font-weight: 800;
}

.option-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.price-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f6fbfb, #fff);
  border: 1px solid var(--line);
}

.price-display strong {
  color: var(--navy);
  font-size: 34px;
  line-height: 1;
}

.certificate-preview {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(11, 111, 120, 0.18);
  border-radius: var(--radius);
  background: #fbffff;
}

.size-page-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: start;
}

.chart-image {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}

.calculator-shell {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.calc-total {
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: #fff;
}

.calc-total strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: 340px;
  padding: 14px 16px;
  border: 1px solid rgba(11, 111, 120, 0.2);
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
  box-shadow: var(--shadow);
  font-weight: 800;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.reveal {
  animation: riseIn 0.64s ease both;
}

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

@keyframes floatDiamond {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

body[data-page="diamond-search"] {
  background: #eef5f7;
}

body[data-page="diamond-search"]::before {
  display: none;
}

body[data-page="diamond-search"] .top-strip {
  display: none;
}

.diamond-search-main {
  --filter-chip: var(--type-chip, #e8eef5);
  --filter-soft: var(--type-soft, #edf7f7);
  --filter-primary: var(--type-primary, var(--teal));
  --filter-primary-strong: var(--type-primary-strong, var(--teal-2));
  --filter-primary-rgb: var(--type-primary-rgb, 0, 77, 64);
  --filter-accent: var(--type-accent, var(--gold));
  --filter-accent-rgb: var(--type-accent-rgb, 77, 182, 172);
  --filter-ink: var(--navy);
  min-height: 100vh;
  padding: 0 0 56px;
  background: var(--theme-bg);
}

body[data-diamond-type="lab"] .diamond-search-main {
  background:
    linear-gradient(180deg, rgba(248, 251, 250, 0.96), rgba(237, 248, 246, 0.98));
}

body[data-diamond-type="natural"] .diamond-search-main {
  background:
    linear-gradient(180deg, rgba(248, 251, 250, 0.98), rgba(232, 244, 241, 0.96));
}

.diamond-search-shell {
  width: min(1432px, calc(100% - 28px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.diamond-search-main.results-mode .diamond-search-shell {
  width: min(1880px, calc(100% - 28px));
  grid-template-columns: 382px minmax(0, 1fr);
}

.vdb-topbar {
  position: sticky;
  top: 76px;
  z-index: 12;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding: 0 18px;
  border-bottom: 1px solid #d8dbe4;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.vdb-tabs {
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: 74px;
}

.vdb-type-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 5px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.24);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, var(--filter-soft));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 22px rgba(var(--filter-primary-rgb), 0.08);
}

.vdb-type-label {
  padding: 0 8px 0 10px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vdb-type-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--filter-ink);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.vdb-type-pill.active {
  border-color: rgba(var(--filter-primary-rgb), 0.36);
  background: linear-gradient(135deg, var(--filter-primary), var(--filter-primary-strong));
  color: #fff;
  box-shadow: 0 8px 18px rgba(var(--filter-primary-rgb), 0.22);
}

.vdb-type-pill:not(.active):hover {
  border-color: rgba(var(--filter-primary-rgb), 0.28);
  background: rgba(255, 255, 255, 0.88);
  color: var(--filter-primary);
}

.vdb-tab {
  position: relative;
  min-width: 126px;
  border: 0;
  background: transparent;
  color: #4e505a;
  font-weight: 700;
  cursor: pointer;
}

.vdb-tab.active {
  color: var(--filter-ink);
}

.vdb-tab.active::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--filter-primary);
}

.vdb-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.vdb-reset,
.vdb-apply {
  min-width: 164px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.vdb-reset {
  border: 1px solid rgba(var(--filter-primary-rgb), 0.16);
  background: var(--filter-soft);
  color: var(--filter-primary);
}

.vdb-apply {
  background: linear-gradient(135deg, var(--filter-primary), var(--filter-primary-strong));
  color: #fff;
  box-shadow: 0 10px 22px rgba(var(--filter-primary-rgb), 0.2);
}

.vdb-filter-form {
  display: grid;
  gap: 16px;
  padding: 16px 0;
}

.diamond-search-main.results-mode .vdb-topbar {
  display: none;
}

.diamond-search-main.results-mode .vdb-filter-form {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 104px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.diamond-search-main.results-mode.filters-hidden .diamond-search-shell {
  grid-template-columns: minmax(0, 1fr);
}

.diamond-search-main.results-mode.filters-hidden .vdb-filter-form {
  display: none;
}

.diamond-search-main.results-mode.filters-hidden .vdb-results-panel {
  grid-column: 1 / -1;
}

.diamond-search-main.results-mode .vdb-filter-form .vdb-two-col {
  grid-template-columns: 1fr;
}

.vdb-filter-card,
.vdb-results-panel {
  border: 1px solid #e4e5ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(25, 30, 45, 0.07);
}

.vdb-filter-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-color: rgba(var(--filter-primary-rgb), 0.16);
  background: linear-gradient(180deg, #fff 0%, var(--type-panel, #fff) 100%);
}

.vdb-filter-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--filter-primary), var(--filter-primary-strong));
  opacity: 0.42;
}

.vdb-results-panel {
  border-color: rgba(var(--filter-primary-rgb), 0.14);
}

.vdb-filter-card h2,
.vdb-results-panel h2 {
  margin: 0 0 14px;
  color: var(--filter-ink);
  font-size: 16px;
  line-height: 1.2;
}

.vdb-filter-card h3 {
  margin: 18px 0 10px;
  color: var(--filter-ink);
  font-size: 16px;
  line-height: 1.2;
}

.vdb-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 46px;
}

.vdb-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  color: #51535d;
  font-size: 14px;
  cursor: pointer;
}

.vdb-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vdb-check span {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--filter-ink);
  border-radius: 6px;
  background: #fff;
}

.vdb-check input:checked + span {
  border-color: var(--filter-primary);
  background: var(--filter-primary);
}

.vdb-check input:checked + span::after {
  content: "";
  width: 9px;
  height: 5px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: rotate(-45deg);
}

.diamond-search-main .vdb-shape-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 8px 10px;
}

.diamond-search-main .shape-chip {
  width: auto;
  min-width: 74px;
  min-height: 82px;
  padding: 8px 6px 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--filter-chip);
  color: #33405d;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
}

.diamond-search-main .shape-chip img,
.diamond-search-main .shape-chip .diamond-shape-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 4px;
  object-fit: contain;
  filter: grayscale(1) contrast(0.9) opacity(0.8);
}

.diamond-search-main .shape-chip .diamond-shape-icon {
  filter: none;
}

.diamond-search-main .shape-chip .shape-outline {
  stroke: #344762;
  stroke-width: 1.78;
}

.diamond-search-main .shape-chip .shape-facet {
  stroke: #7b89a4;
  stroke-width: .98;
}

.diamond-search-main .shape-chip .shape-accent {
  stroke: var(--filter-accent);
  stroke-width: 1.08;
}

.diamond-search-main .shape-chip .shape-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.08;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.diamond-search-main .shape-chip.active,
.diamond-search-main .choice-chip.active,
.diamond-search-main .preset-chip.active {
  border-color: rgba(var(--filter-primary-rgb), 0.42);
  background: var(--filter-soft);
  color: var(--filter-ink);
}

.diamond-search-main .shape-chip.active {
  box-shadow: inset 0 0 0 1px rgba(var(--filter-primary-rgb), 0.24), 0 8px 18px rgba(18, 42, 86, 0.08);
}

.diamond-search-main .shape-chip.active .diamond-shape-icon {
  transform: scale(1.05);
}

.diamond-search-main .shape-chip.active .shape-outline {
  stroke: var(--filter-primary);
}

.diamond-search-main .shape-chip.active .shape-facet {
  stroke: #51657f;
}

.vdb-range-row {
  display: grid;
  grid-template-columns: 190px 24px 190px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.vdb-range-row.compact {
  grid-template-columns: 180px 24px 180px 180px 24px 180px;
}

.diamond-search-main.results-mode .vdb-filter-form .vdb-range-row,
.diamond-search-main.results-mode .vdb-filter-form .vdb-range-row.compact {
  grid-template-columns: 1fr 24px 1fr;
}

.diamond-search-main.results-mode .vdb-filter-form .vdb-range-row .vdb-chip-grid,
.diamond-search-main.results-mode .vdb-filter-form .vdb-range-row.compact input:nth-of-type(n + 3),
.diamond-search-main.results-mode .vdb-filter-form .vdb-range-row.compact i:nth-of-type(2) {
  grid-column: 1 / -1;
}

.vdb-range-row > i,
.vdb-measure-grid > i {
  color: #a7a9b2;
  font-size: 22px;
  text-align: center;
}

.diamond-search-main input,
.diamond-search-main select {
  min-height: 56px;
  border: 1px solid #b9bcc8;
  border-radius: 8px;
  background: #fff;
  color: #343640;
  padding: 12px;
  outline: none;
}

.diamond-search-main input:focus,
.diamond-search-main select:focus {
  border-color: var(--filter-primary);
  box-shadow: 0 0 0 4px rgba(var(--filter-primary-rgb), 0.12);
}

.vdb-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 12px;
}

.vdb-range-row .vdb-chip-grid {
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
}

.diamond-search-main .choice-chip,
.diamond-search-main .preset-chip {
  width: 100%;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--filter-chip);
  color: #3f4a63;
  box-shadow: none;
  font-size: 14px;
  white-space: nowrap;
}

.diamond-search-main .choice-chip:hover,
.diamond-search-main .preset-chip:hover,
.diamond-search-main .shape-chip:hover {
  border-color: rgba(var(--filter-primary-rgb), 0.36);
  transform: translateY(-1px);
}

.vdb-tab-card {
  padding: 0;
  overflow: hidden;
}

.vdb-card-tabs {
  display: flex;
  gap: 16px;
  min-height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid #d6d8e0;
}

.vdb-card-tab {
  position: relative;
  border: 0;
  background: transparent;
  color: #4f515a;
  font-weight: 800;
  cursor: pointer;
}

.vdb-card-tab.active {
  color: var(--filter-primary);
}

.vdb-card-tab.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--filter-primary);
}

.vdb-card-body {
  padding: 16px;
}

.vdb-card-body > .vdb-check {
  margin-bottom: 22px;
}

.vdb-expand {
  width: 100%;
  min-height: 26px;
  margin-top: 16px;
  border: 0;
  border-radius: 8px;
  background: var(--filter-soft);
  color: var(--filter-primary);
  cursor: pointer;
}

.vdb-finish-group + .vdb-finish-group {
  margin-top: 18px;
}

.vdb-presets {
  max-width: 320px;
  margin-bottom: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vdb-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.vdb-search-field {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  margin-bottom: 12px;
  border: 1px solid #b9bcc8;
  border-radius: 8px;
  padding: 0 12px;
  color: #a7a9b2;
}

.vdb-search-field input {
  min-height: auto;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.vdb-search-field input:focus {
  box-shadow: none;
}

.vdb-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
}

.vdb-checkbox-grid .choice-chip {
  width: auto;
  min-width: 96px;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  padding: 0;
}

.vdb-checkbox-grid .choice-chip::before {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid var(--filter-ink);
  border-radius: 6px;
  background: #fff;
}

.vdb-checkbox-grid .choice-chip.active::before {
  border-color: var(--filter-primary);
  background: var(--filter-primary);
}

.vdb-measure-grid {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 24px minmax(140px, 1fr) minmax(140px, 1fr) 24px minmax(140px, 1fr) minmax(140px, 1fr) 24px minmax(140px, 1fr);
  gap: 10px 14px;
  align-items: center;
}

.diamond-search-main.results-mode .vdb-filter-form .vdb-measure-grid {
  grid-template-columns: 1fr 24px 1fr;
}

.vdb-stock-card {
  max-width: 700px;
}

.vdb-sidebar-actions {
  display: none;
}

.diamond-search-main.results-mode .vdb-sidebar-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -10px 24px rgba(16, 36, 71, 0.09);
  backdrop-filter: blur(14px);
}

.vdb-results-panel {
  display: none;
  margin-top: 2px;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.diamond-search-main.results-mode .vdb-results-panel {
  display: block;
}

.vdb-result-toolbar {
  position: sticky;
  top: 92px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 6px 14px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(16, 36, 71, 0.08);
  backdrop-filter: blur(16px);
}

.vdb-result-primary,
.vdb-result-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.vdb-result-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.vdb-back-link,
.vdb-toolbar-btn,
.vdb-toolbar-link,
.vdb-bulk-btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--filter-ink);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.vdb-back-link {
  color: #2563eb;
}

.vdb-toolbar-btn {
  padding: 0 13px;
  border-radius: 8px;
  background: #ececf2;
}

.vdb-toolbar-btn i {
  color: var(--filter-primary);
}

.vdb-toolbar-link i {
  color: #43516d;
  font-size: 18px;
}

.vdb-bulk-btn {
  padding: 0 14px;
  border-radius: 999px;
  background: #262236;
  color: #fff;
}

.vdb-bulk-btn i {
  color: #fff;
  font-size: 18px;
}

.vdb-select-all {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  color: #24324b;
  font-size: 14px;
  white-space: nowrap;
}

.vdb-select-all input,
.vdb-card-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vdb-select-all > span:first-of-type,
.vdb-card-check span {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid var(--theme-primary);
  border-radius: 6px;
  background: #fff;
}

.vdb-select-all input:checked + span,
.vdb-card-check input:checked + span {
  border-color: var(--filter-primary);
  background: var(--filter-primary);
}

.vdb-select-all input:checked + span::after,
.vdb-card-check input:checked + span::after {
  content: "";
  width: 9px;
  height: 5px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: rotate(-45deg);
}

.vdb-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 16px;
  padding: 16px 0 32px;
}

.vdb-result-card {
  position: relative;
  min-height: 362px;
  overflow: hidden;
  border: 1px solid #cfd4df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(16, 36, 71, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.vdb-result-card:hover,
.vdb-result-card.selected {
  border-color: rgba(var(--filter-primary-rgb), 0.5);
  box-shadow: 0 16px 28px rgba(16, 36, 71, 0.14);
  transform: translateY(-2px);
}

.vdb-card-media {
  position: relative;
  min-height: 234px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid #d6dbe5;
  background:
    radial-gradient(circle at 50% 58%, rgba(255, 255, 255, 0.95), transparent 45%),
    linear-gradient(135deg, #f7f7f8, #d8dadd);
}

.vdb-card-media img {
  width: min(78%, 180px);
  max-height: 188px;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(16, 36, 71, 0.18));
}

.vdb-card-check,
.vdb-card-heart {
  position: absolute;
  top: 8px;
  z-index: 2;
}

.vdb-card-check {
  left: 8px;
  display: inline-flex;
  cursor: pointer;
}

.vdb-card-heart {
  right: 8px;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(39, 56, 88, 0.28);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.vdb-card-info {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 9px 10px 12px;
}

.vdb-card-info h3 {
  margin: 0;
  padding-left: 18px;
  color: #020617;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.vdb-card-info p {
  margin: 0;
  color: var(--theme-primary);
  font-size: 13px;
}

.vdb-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #5c667c;
  font-size: 12px;
}

.vdb-card-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f2f5f9;
}

.vdb-status-dot {
  position: absolute;
  top: 16px;
  left: 10px;
  width: 10px;
  height: 10px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 1px rgba(16, 36, 71, 0.08);
}

.vdb-status-dot.lab {
  background: #0db45b;
}

.vdb-status-dot.natural {
  background: #f59e0b;
}

.vdb-card-price {
  display: grid;
  gap: 1px;
  margin-top: 2px;
}

.vdb-card-price strong {
  color: #020617;
  font-size: 20px;
  line-height: 1;
}

.vdb-card-price span {
  color: var(--theme-primary);
  font-size: 13px;
}

.vdb-card-menu {
  position: absolute;
  right: 0;
  bottom: 0;
  min-width: 34px;
  height: 32px;
  border: 0;
  border-radius: 14px 0 8px 0;
  background: #fde4d9;
  color: #f06f49;
  font-weight: 900;
  cursor: pointer;
}

.vdb-promo-card {
  min-height: 362px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.52)),
    radial-gradient(circle at 70% 20%, rgba(var(--filter-primary-rgb), 0.2), transparent 34%),
    linear-gradient(145deg, var(--filter-soft), #fff);
}

.vdb-promo-mark {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.22);
  border-radius: 50%;
  background: #fff;
  color: var(--filter-primary);
  font-size: 24px;
  font-weight: 900;
}

.vdb-promo-card strong {
  color: var(--theme-primary);
  font-size: 22px;
  line-height: 1.15;
}

.vdb-promo-card span {
  color: #5c667c;
  font-size: 14px;
  line-height: 1.5;
}

.vdb-empty-results {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  min-height: 180px;
  place-items: center;
  border: 1px dashed rgba(var(--filter-primary-rgb), 0.35);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.vdb-empty-results strong {
  color: var(--theme-primary);
  font-size: 20px;
}

.vdb-empty-results span {
  color: #66738a;
}

.vdb-ai-search {
  position: fixed;
  right: 48px;
  bottom: 72px;
  z-index: 30;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--filter-accent);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--filter-ink), var(--filter-primary));
  color: #fff;
  padding: 0 18px;
  box-shadow: 0 8px 20px rgba(18, 42, 86, 0.28);
  font-weight: 900;
  cursor: pointer;
}

.vdb-ai-search i {
  color: #fff;
  font-size: 20px;
}

.diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip,
.diamond-search-main .preset-chip,
.diamond-search-main .shape-chip,
.diamond-search-main .vdb-reset,
.diamond-search-main .vdb-apply,
.diamond-search-main .vdb-tab,
.diamond-search-main .vdb-type-pill,
.diamond-search-main .vdb-card-tab,
.diamond-search-main .vdb-expand,
.diamond-search-main .vdb-ai-search {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.diamond-search-main .vdb-ai-search {
  position: fixed;
  right: 48px;
  bottom: 72px;
  z-index: 30;
}

.diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip::before,
.diamond-search-main .preset-chip::before,
.diamond-search-main .shape-chip::before,
.diamond-search-main .vdb-reset::before,
.diamond-search-main .vdb-apply::before,
.diamond-search-main .vdb-tab::before,
.diamond-search-main .vdb-type-pill::before,
.diamond-search-main .vdb-card-tab::before,
.diamond-search-main .vdb-expand::before,
.diamond-search-main .vdb-ai-search::before {
  content: "";
  position: absolute;
  inset: -44% auto -44% -74%;
  z-index: -1;
  width: 56%;
  transform: skewX(-18deg);
  background: rgba(255, 255, 255, 0.36);
  pointer-events: none;
  transition: left 0.45s ease;
}

.diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip:hover::before,
.diamond-search-main .preset-chip:hover::before,
.diamond-search-main .shape-chip:hover::before,
.diamond-search-main .vdb-reset:hover::before,
.diamond-search-main .vdb-apply:hover::before,
.diamond-search-main .vdb-tab:hover::before,
.diamond-search-main .vdb-type-pill:hover::before,
.diamond-search-main .vdb-card-tab:hover::before,
.diamond-search-main .vdb-expand:hover::before,
.diamond-search-main .vdb-ai-search:hover::before {
  left: 118%;
}

.diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip:hover,
.diamond-search-main .preset-chip:hover,
.diamond-search-main .shape-chip:hover,
.diamond-search-main .vdb-reset:hover,
.diamond-search-main .vdb-apply:hover,
.diamond-search-main .vdb-tab:hover,
.diamond-search-main .vdb-type-pill:hover,
.diamond-search-main .vdb-card-tab:hover,
.diamond-search-main .vdb-expand:hover,
.diamond-search-main .vdb-ai-search:hover {
  border-color: rgba(var(--filter-accent-rgb), 0.55);
  box-shadow: 0 14px 28px rgba(16, 36, 71, 0.16);
  transform: translateY(-2px);
}

.diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip:active,
.diamond-search-main .preset-chip:active,
.diamond-search-main .shape-chip:active,
.diamond-search-main .vdb-reset:active,
.diamond-search-main .vdb-apply:active,
.diamond-search-main .vdb-tab:active,
.diamond-search-main .vdb-type-pill:active,
.diamond-search-main .vdb-card-tab:active,
.diamond-search-main .vdb-expand:active,
.diamond-search-main .vdb-ai-search:active {
  transform: translateY(0) scale(0.98);
}

.diamond-search-main .shape-chip.active,
.diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip.active,
.diamond-search-main .preset-chip.active {
  border-color: rgba(var(--filter-accent-rgb), 0.62);
  box-shadow: inset 0 0 0 1px rgba(var(--filter-accent-rgb), 0.32), 0 12px 24px rgba(16, 36, 71, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 1180px) {
  .diamond-search-shell,
  .diamond-search-main.results-mode.filters-hidden .diamond-search-shell {
    grid-template-columns: 1fr;
  }

  .vdb-filter-form,
  .vdb-results-panel {
    grid-column: 1 / -1;
  }

  .vdb-filter-form {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .vdb-result-toolbar {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .vdb-result-primary {
    flex-wrap: wrap;
  }

  .vdb-result-actions {
    justify-content: flex-start;
  }

  .vdb-range-row,
  .vdb-range-row.compact {
    grid-template-columns: 1fr 24px 1fr;
  }

  .vdb-range-row .vdb-chip-grid,
  .vdb-range-row.compact input:nth-of-type(n + 3),
  .vdb-range-row.compact i:nth-of-type(2) {
    grid-column: 1 / -1;
  }

  .vdb-measure-grid {
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  }
}

@media (max-width: 960px) {
  .main-nav {
    display: none;
  }

  .brand-logo-img {
    width: clamp(190px, 54vw, 280px);
    height: 50px;
  }

  .hero-panel,
  .workspace-grid,
  .builder-grid,
  .size-page-grid,
  .calculator-shell {
    grid-template-columns: 1fr;
  }

  .hero-stats,
  .advanced-grid,
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .option-line {
    grid-template-columns: 1fr;
  }

  .search-actions {
    position: static;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .vdb-topbar {
    top: 64px;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 10px;
  }

  .vdb-tabs {
    height: 46px;
  }

  .vdb-actions,
  .vdb-two-col {
    grid-template-columns: 1fr;
  }

  .vdb-two-col {
    display: grid;
  }

  .vdb-reset,
  .vdb-apply {
    flex: 1;
  }

  .vdb-ai-search {
    right: 18px;
    bottom: 18px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .top-actions {
    display: none;
  }

  .nav-shell {
    min-height: 64px;
  }

  .brand span {
    display: none;
  }

  .page-hero {
    padding-top: 24px;
  }

  .hero-panel {
    padding: 24px;
  }

  .hero-stats,
  .advanced-grid,
  .tool-grid,
  .input-row {
    grid-template-columns: 1fr;
  }

  .section-head,
  .result-toolbar {
    align-items: start;
    flex-direction: column;
  }

  .main-diamond-image {
    min-height: 300px;
  }

  .price-display {
    align-items: start;
    flex-direction: column;
  }
}

/* DND Search Studio refresh */
body[data-page="diamond-search"] {
  background: #f4f7fa;
}

.diamond-search-main {
  background: linear-gradient(180deg, #eef7f8 0%, #f7f9fc 38%, #ffffff 100%);
}

body[data-diamond-type="natural"] .diamond-search-main {
  background: linear-gradient(180deg, #fff7e9 0%, #f8f6f1 38%, #ffffff 100%);
}

.diamond-search-main .site-header {
  box-shadow: none;
}

.diamond-search-shell {
  width: min(1500px, calc(100% - 32px));
}

.diamond-search-main.results-mode .diamond-search-shell {
  width: min(1880px, calc(100% - 32px));
  grid-template-columns: 370px minmax(0, 1fr);
}

.vdb-topbar {
  top: 76px;
  min-height: 68px;
  margin-top: 14px;
  border: 1px solid rgba(39, 56, 88, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(39, 56, 88, 0.08);
}

.vdb-tabs {
  align-items: center;
  height: auto;
  min-height: 44px;
  padding: 4px;
  border: 1px solid rgba(39, 56, 88, 0.08);
  border-radius: 8px;
  background: #f2f5f8;
}

.vdb-tab {
  min-width: 126px;
  min-height: 36px;
  border-radius: 6px;
  padding: 0 14px;
}

.vdb-tab.active {
  background: var(--theme-primary);
  color: #fff;
  box-shadow: 0 8px 16px rgba(0, 77, 64, 0.18);
}

.vdb-tab.active::after {
  display: none;
}

.vdb-type-switch {
  min-height: 44px;
  border-radius: 8px;
  background: #fff;
}

.vdb-type-pill {
  border-radius: 6px;
}

.vdb-type-pill.active,
.vdb-apply {
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
}

.vdb-reset,
.vdb-apply {
  min-height: 42px;
  border-radius: 6px;
}

.vdb-filter-form {
  gap: 18px;
}

.diamond-search-main:not(.results-mode) .vdb-filter-form {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.diamond-search-main:not(.results-mode) .vdb-filter-card,
.diamond-search-main:not(.results-mode) .vdb-two-col,
.diamond-search-main:not(.results-mode) .vdb-sidebar-actions {
  grid-column: 1 / -1;
}

.vdb-filter-card,
.vdb-results-panel {
  border-color: var(--theme-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(0, 77, 64, 0.07);
}

.vdb-filter-card {
  padding: 18px;
}

.vdb-filter-card::before {
  inset: 0 0 auto;
  width: auto;
  height: 3px;
  opacity: 0.9;
}

.vdb-filter-card h2,
.vdb-results-panel h2,
.vdb-filter-card h3 {
  color: var(--theme-primary);
  letter-spacing: 0.01em;
}

.diamond-search-main .shape-chip,
.diamond-search-main .choice-chip,
.diamond-search-main .preset-chip {
  border: 1px solid rgba(39, 56, 88, 0.08);
  border-radius: 8px;
  background: #f3f7fb;
  color: var(--theme-primary);
}

.diamond-search-main .shape-chip {
  min-height: 88px;
}

.diamond-search-main .shape-chip.active,
.diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip.active,
.diamond-search-main .preset-chip.active {
  border-color: var(--theme-accent);
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 10px 20px rgba(0, 77, 64, 0.16);
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .preset-chip.active {
  border-color: var(--theme-accent);
  background: linear-gradient(135deg, var(--theme-secondary), var(--theme-primary));
}

.diamond-search-main .shape-chip.active .shape-outline,
.diamond-search-main .shape-chip.active .shape-facet {
  stroke: rgba(255, 255, 255, 0.86);
}

.diamond-search-main .shape-chip.active .shape-accent {
  stroke: #dff5f2;
}

.diamond-search-main .vdb-checkbox-grid .choice-chip.active {
  border: 1px solid var(--theme-accent);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
  color: #fff;
  padding: 8px 12px;
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-checkbox-grid .choice-chip.active {
  border-color: var(--theme-accent);
  background: linear-gradient(135deg, var(--theme-secondary), var(--theme-primary));
}

.diamond-search-main .vdb-checkbox-grid .choice-chip.active::before {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.18);
}

.vdb-type-pill.active {
  border-color: var(--theme-accent);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 10px 18px rgba(0, 77, 64, 0.18);
}

body[data-diamond-type="natural"] .vdb-type-pill.active {
  border-color: var(--theme-accent);
  background: linear-gradient(135deg, var(--theme-secondary), var(--theme-primary));
}

.diamond-search-main:not(.results-mode) .vdb-shape-grid {
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
}

.diamond-search-main.results-mode .vdb-shape-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.diamond-search-main.results-mode .shape-chip {
  min-height: 82px;
}

.diamond-search-main input,
.diamond-search-main select,
.vdb-search-field {
  border-color: rgba(39, 56, 88, 0.18);
  border-radius: 8px;
}

.vdb-card-tabs {
  min-height: 48px;
  border-bottom-color: rgba(39, 56, 88, 0.1);
  background: #f8fafc;
}

.vdb-card-tab.active::after {
  height: 3px;
  border-radius: 999px 999px 0 0;
}

.vdb-result-toolbar {
  top: 92px;
  min-height: 58px;
  border-color: rgba(39, 56, 88, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(39, 56, 88, 0.08);
}

.vdb-back-link {
  color: var(--filter-primary);
}

.vdb-toolbar-btn {
  background: #eef2f6;
  color: var(--theme-primary);
}

.vdb-toolbar-link {
  color: var(--theme-primary);
}

.vdb-bulk-btn {
  border: 1px solid rgba(39, 56, 88, 0.16);
  background: var(--theme-primary);
}

.vdb-result-grid {
  grid-template-columns: repeat(auto-fill, minmax(282px, 1fr));
  gap: 16px;
}

.dnd-stone-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-color: rgba(39, 56, 88, 0.14);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(39, 56, 88, 0.08);
}

.dnd-stone-card:hover,
.dnd-stone-card.selected {
  border-color: rgba(var(--filter-primary-rgb), 0.46);
  box-shadow: 0 22px 48px rgba(39, 56, 88, 0.14);
}

.dnd-stone-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(39, 56, 88, 0.1);
}

.dnd-stone-head .vdb-card-check,
.dnd-stone-head .vdb-card-heart {
  position: static;
  top: auto;
  left: auto;
  right: auto;
}

.dnd-stone-head .vdb-card-heart {
  margin-left: auto;
  border: 1px solid rgba(39, 56, 88, 0.1);
  background: #f3f6f9;
  color: var(--theme-primary);
}

.dnd-stone-id {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.dnd-stone-id strong {
  color: var(--theme-primary);
  font-size: 14px;
}

.dnd-stone-id span {
  overflow: hidden;
  color: #6b7280;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dnd-stone-media {
  position: relative;
  min-height: 184px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(39, 56, 88, 0.1);
  background:
    linear-gradient(135deg, #f8fafc, #eef2f6);
}

.dnd-stone-media img {
  width: min(72%, 178px);
  max-height: 156px;
  object-fit: contain;
  filter: drop-shadow(0 16px 22px rgba(39, 56, 88, 0.16));
}

.dnd-type-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff;
  color: var(--filter-primary);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(39, 56, 88, 0.12);
}

.dnd-type-badge.natural {
  color: var(--theme-secondary);
}

.dnd-stone-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.dnd-stone-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
}

.dnd-stone-title .vdb-status-dot {
  position: static;
  grid-row: 1 / span 2;
}

.dnd-stone-title h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  line-height: 1.2;
}

.dnd-stone-title p {
  grid-column: 2;
  margin: 0;
  color: #667085;
  font-size: 13px;
}

.dnd-grade-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dnd-grade-grid span {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(39, 56, 88, 0.08);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--theme-primary);
  font-size: 12px;
  font-weight: 800;
}

.dnd-grade-grid small {
  display: block;
  margin-bottom: 2px;
  color: #667085;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.dnd-stone-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(39, 56, 88, 0.1);
}

.dnd-stone-foot .vdb-card-price {
  margin: 0;
}

.dnd-stone-foot .vdb-card-price span {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.dnd-stone-foot .vdb-card-price strong {
  color: #111827;
  font-size: 22px;
}

.dnd-stone-foot .vdb-card-menu {
  position: static;
  width: auto;
  min-width: 76px;
  height: 38px;
  border-radius: 6px;
  background: var(--theme-primary);
  color: #fff;
}

.dnd-market-card {
  min-height: 382px;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.2);
  background:
    linear-gradient(180deg, #ffffff, var(--filter-soft));
}

.dnd-market-kicker {
  width: max-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(var(--filter-primary-rgb), 0.1);
  color: var(--filter-primary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dnd-market-card strong {
  color: var(--theme-primary);
  font-size: 26px;
  line-height: 1.08;
}

.dnd-market-card span:not(.dnd-market-kicker) {
  color: #667085;
  line-height: 1.55;
}

.dnd-market-action {
  width: max-content;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: var(--theme-primary);
  color: #fff;
  padding: 0 14px;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .diamond-search-main.results-mode .diamond-search-shell {
    grid-template-columns: 1fr;
  }

  .diamond-search-main.results-mode .vdb-filter-form {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 720px) {
  .vdb-result-grid {
    grid-template-columns: 1fr;
  }

  .dnd-grade-grid {
    grid-template-columns: 1fr;
  }
}

/* Unified selected filter button state */
.diamond-search-main .shape-chip.active,
.diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip.active,
.diamond-search-main .preset-chip.active,
.diamond-search-main .vdb-card-tab.active {
  border-color: var(--theme-accent);
  outline: none;
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 10px 20px rgba(0, 77, 64, 0.16);
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .preset-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-card-tab.active {
  border-color: var(--theme-accent);
  background: linear-gradient(135deg, var(--theme-secondary), var(--theme-primary));
}

.diamond-search-main .shape-chip.active .shape-outline,
.diamond-search-main .shape-chip.active .shape-facet {
  stroke: rgba(255, 255, 255, 0.88);
}

.diamond-search-main .shape-chip.active .shape-accent {
  stroke: #dff5f2;
}

/* Filled selected state for filter tiles */
.diamond-search-main .vdb-filter-form .shape-chip.active,
.diamond-search-main .vdb-filter-form .choice-grid:not(.vdb-checkbox-grid) .choice-chip.active,
.diamond-search-main .vdb-filter-form .preset-chip.active,
.diamond-search-main .vdb-filter-form .vdb-card-tab.active {
  border-color: var(--theme-accent);
  outline: none;
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 14px 26px rgba(0, 77, 64, 0.18);
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-filter-form .shape-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-filter-form .choice-grid:not(.vdb-checkbox-grid) .choice-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-filter-form .preset-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-filter-form .vdb-card-tab.active {
  border-color: var(--theme-accent);
  background: linear-gradient(135deg, var(--theme-secondary), var(--theme-primary));
}

.diamond-search-main .vdb-filter-form .shape-chip.active .shape-label {
  color: #fff;
}

.diamond-search-main .vdb-filter-form .shape-chip.active .shape-outline,
.diamond-search-main .vdb-filter-form .shape-chip.active .shape-facet {
  stroke: rgba(255, 255, 255, 0.9);
}

.diamond-search-main .vdb-filter-form .shape-chip.active .shape-accent {
  stroke: #dff5f2;
}

.diamond-search-main .vdb-filter-form .shape-chip:not(.active):is(:hover, :focus, :focus-visible),
.diamond-search-main .vdb-filter-form .choice-grid:not(.vdb-checkbox-grid) .choice-chip:not(.active):is(:hover, :focus, :focus-visible),
.diamond-search-main .vdb-filter-form .preset-chip:not(.active):is(:hover, :focus, :focus-visible),
.diamond-search-main .vdb-filter-form .vdb-card-tab:not(.active):is(:hover, :focus, :focus-visible) {
  border-color: rgba(var(--filter-primary-rgb), 0.38);
  outline: none;
  background: var(--theme-bg);
  color: var(--theme-primary);
  box-shadow: 0 10px 18px rgba(0, 77, 64, 0.08);
}

/* External SVG diamond shape assets */
.diamond-search-main .shape-chip .diamond-shape-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  filter: none;
}

.diamond-search-main .shape-chip .diamond-shape-svg {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
  opacity: 0.94;
  filter: brightness(0) saturate(100%) invert(21%) sepia(18%) saturate(1032%) hue-rotate(181deg) brightness(91%) contrast(91%);
  transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.diamond-search-main .shape-chip:not(.active):is(:hover, :focus, :focus-visible) .diamond-shape-svg {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(36%) sepia(57%) saturate(662%) hue-rotate(139deg) brightness(91%) contrast(89%);
}

.diamond-search-main .shape-chip.active .diamond-shape-svg {
  opacity: 1;
  transform: scale(1.06);
  filter: brightness(0) invert(1) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.22));
}

/* Final search-page view polish */
body[data-page="diamond-search"] {
  background:
    linear-gradient(180deg, #ffffff 0, var(--theme-bg) 28%, #ffffff 100%);
}

body[data-page="diamond-search"] .container {
  width: min(1660px, calc(100% - 88px));
}

body[data-page="diamond-search"] .site-header {
  z-index: 40;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--theme-border);
  box-shadow: 0 8px 26px rgba(0, 77, 64, 0.06);
}

body[data-page="diamond-search"] .nav-shell {
  min-height: 92px;
}

body[data-page="diamond-search"] .brand-logo-img {
  width: clamp(250px, 22vw, 342px);
  height: 62px;
  object-position: left center;
  filter: none;
}

body[data-page="diamond-search"] .main-nav {
  gap: 28px;
}

body[data-page="diamond-search"] .main-nav > a,
body[data-page="diamond-search"] .nav-trigger {
  color: #0b1411;
  padding: 12px 4px;
  font-size: 16px;
  font-weight: 800;
}

body[data-page="diamond-search"] .header-tools {
  gap: 18px;
}

body[data-page="diamond-search"] .header-tools .field {
  position: relative;
  width: min(360px, 24vw);
}

body[data-page="diamond-search"] .header-tools .field input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--theme-border);
  border-radius: 9px;
  background: #fff;
  color: var(--theme-primary);
  padding: 0 58px 0 18px;
  outline: none;
  box-shadow: 0 10px 22px rgba(0, 77, 64, 0.05);
}

.header-search-button {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #07120f;
  font-size: 20px;
  cursor: pointer;
}

body[data-page="diamond-search"] .icon-btn {
  width: 54px;
  height: 54px;
  border-color: var(--theme-border);
  color: #07120f;
  font-size: 20px;
  box-shadow: 0 10px 22px rgba(0, 77, 64, 0.05);
}

.diamond-search-main {
  padding: 20px 0 72px;
  background:
    radial-gradient(circle at 8% 24%, rgba(77, 182, 172, 0.16), transparent 28%),
    linear-gradient(180deg, #ffffff 0, var(--theme-bg) 34%, #ffffff 100%);
}

.diamond-search-shell,
.diamond-search-main.results-mode .diamond-search-shell {
  width: min(1660px, calc(100% - 108px));
  gap: 16px;
}

.vdb-topbar {
  position: sticky;
  top: 92px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 92px;
  padding: 20px 22px;
  border: 1px solid var(--theme-border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(0, 77, 64, 0.08);
}

.vdb-tabs,
.vdb-type-switch,
.vdb-actions {
  align-self: center;
}

.vdb-tabs {
  width: max-content;
  height: 52px;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--theme-border);
  border-radius: 7px;
  background: #fff;
}

.vdb-tab {
  min-width: 142px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 0;
  color: var(--theme-primary);
  font-size: 16px;
  font-weight: 900;
}

.vdb-tab.active {
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 24px rgba(0, 77, 64, 0.18);
}

.vdb-type-switch {
  min-height: 52px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.vdb-type-label {
  padding-right: 14px;
  color: #51645f;
  font-size: 14px;
}

.vdb-type-pill {
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid var(--theme-border);
  border-radius: 0;
  background: #fff;
  color: var(--theme-primary);
  font-size: 16px;
  font-weight: 900;
}

.vdb-type-pill:first-of-type {
  border-radius: 7px 0 0 7px;
}

.vdb-type-pill:last-of-type {
  border-left: 0;
  border-radius: 0 7px 7px 0;
}

.vdb-type-pill.active {
  border-color: var(--theme-secondary);
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
  color: #fff;
  box-shadow: 0 12px 24px rgba(0, 77, 64, 0.18);
}

.vdb-actions {
  justify-self: end;
  gap: 18px;
}

.vdb-reset,
.vdb-apply {
  min-width: 146px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 7px;
  font-size: 16px;
  font-weight: 900;
}

.vdb-reset {
  border: 1px solid rgba(0, 77, 64, 0.5);
  background: #fff;
  color: var(--theme-secondary);
}

.vdb-apply {
  border: 1px solid var(--theme-primary);
  background: linear-gradient(135deg, var(--theme-primary), #006b5a);
  color: #fff;
  box-shadow: 0 12px 24px rgba(0, 77, 64, 0.2);
}

.vdb-filter-form {
  gap: 16px;
  padding: 0;
}

.vdb-filter-card,
.vdb-results-panel {
  border: 1px solid var(--theme-border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 14px 34px rgba(0, 77, 64, 0.07);
}

.vdb-filter-card {
  min-height: 116px;
  padding: 22px;
}

.vdb-filter-card::before {
  display: none;
}

.vdb-filter-card h2,
.vdb-results-panel h2,
.vdb-filter-card h3 {
  color: var(--theme-primary);
  font-size: 18px;
  font-weight: 900;
}

.vdb-check-row {
  gap: 86px;
}

.vdb-check {
  color: var(--theme-primary);
  font-size: 15px;
  font-weight: 600;
}

.vdb-check span {
  border-color: var(--theme-secondary);
  border-radius: 5px;
}

.vdb-filter-form > section:nth-of-type(1)::after,
.vdb-filter-form > section:nth-of-type(2)::after,
.vdb-filter-form > section:nth-of-type(3)::after,
.vdb-summary-card::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 0;
  width: 210px;
  height: 118px;
  opacity: 0.08;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg width='220' height='132' viewBox='0 0 220 132' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23004D40' stroke-width='3' stroke-linejoin='round'%3E%3Cpath d='M84 20h78l38 40-77 66-77-66 38-40Z'/%3E%3Cpath d='M84 20 122 126 162 20M46 60h154M65 60l57-40 59 40M46 60l76 66 78-66'/%3E%3C/g%3E%3Cg fill='%234DB6AC' opacity='.85'%3E%3Cpath d='M28 38 35 57 54 64 35 71 28 90 21 71 2 64 21 57Z'/%3E%3Cpath d='M198 7 202 18 213 22 202 26 198 37 194 26 183 22 194 18Z'/%3E%3C/g%3E%3C/svg%3E");
}

.vdb-filter-form > section:nth-of-type(2)::after {
  width: 170px;
  height: 110px;
}

.diamond-search-main .vdb-shape-grid {
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 12px;
}

.diamond-search-main .shape-chip {
  min-width: 86px;
  min-height: 88px;
  padding: 8px 7px 8px;
  border: 1px solid rgba(0, 121, 107, 0.2);
  border-radius: 8px;
  background: rgba(248, 251, 250, 0.9);
  color: var(--theme-primary);
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.diamond-search-main .shape-chip .diamond-shape-icon,
.diamond-search-main .shape-chip .diamond-shape-svg {
  width: 42px;
  height: 42px;
}

.diamond-search-main .shape-chip .diamond-shape-svg {
  filter: brightness(0) saturate(100%) invert(19%) sepia(55%) saturate(924%) hue-rotate(127deg) brightness(87%) contrast(102%);
}

.diamond-search-main .shape-chip .shape-label {
  color: var(--theme-primary);
}

.diamond-search-main .shape-chip.active,
.diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip.active,
.diamond-search-main .preset-chip.active,
.diamond-search-main .vdb-card-tab.active {
  border-color: var(--theme-accent);
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
  color: #fff;
}

.diamond-search-main .shape-chip.active .shape-label {
  color: #fff;
}

.vdb-range-row {
  grid-template-columns: 198px 32px 198px minmax(0, 1fr);
  gap: 14px 18px;
}

.vdb-filter-form > section:nth-of-type(3) {
  min-height: 144px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.diamond-search-main input,
.diamond-search-main select {
  min-height: 56px;
  border-color: var(--theme-border);
  border-radius: 8px;
  color: var(--theme-primary);
}

.vdb-range-row > i,
.vdb-measure-grid > i {
  color: var(--theme-secondary);
}

.vdb-range-row .vdb-chip-grid {
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 8px 12px;
}

.diamond-search-main .choice-chip,
.diamond-search-main .preset-chip {
  min-height: 38px;
  border: 1px solid var(--theme-border);
  background: rgba(248, 251, 250, 0.92);
  color: var(--theme-primary);
  font-size: 15px;
  font-weight: 900;
}

.vdb-summary-card {
  min-height: 112px;
  padding: 0;
}

.vdb-summary-card .vdb-card-tabs {
  min-height: 58px;
  padding: 0 22px;
  border-bottom-color: var(--theme-border);
  background: transparent;
}

.vdb-summary-card .vdb-card-tab {
  color: #5b6a66;
  font-size: 18px;
}

.vdb-summary-card .vdb-card-tab.active {
  color: var(--theme-primary);
}

.vdb-summary-card .vdb-card-tab.active::after {
  height: 3px;
  background: var(--theme-secondary);
}

.vdb-summary-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  min-height: 56px;
  align-items: center;
}

.vdb-summary-row button {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--theme-primary);
  font-weight: 800;
  cursor: pointer;
}

.vdb-ai-search {
  right: 92px;
  bottom: 42px;
  min-height: 60px;
  padding: 0 28px;
  border: 1px solid rgba(77, 182, 172, 0.7);
  background: linear-gradient(135deg, var(--theme-primary), #006b5a);
  box-shadow: 0 16px 36px rgba(0, 77, 64, 0.24);
  font-size: 18px;
}

.diamond-search-main.results-mode .vdb-summary-card {
  display: none;
}

@media (min-width: 1500px) {
  .diamond-search-main:not(.results-mode) .vdb-shape-grid {
    grid-template-columns: repeat(15, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  body[data-page="diamond-search"] .container,
  .diamond-search-shell,
  .diamond-search-main.results-mode .diamond-search-shell {
    width: calc(100% - 28px);
  }

  .vdb-topbar {
    grid-template-columns: 1fr;
    top: 76px;
  }

  .vdb-actions {
    justify-self: stretch;
  }

  .vdb-reset,
  .vdb-apply {
    flex: 1;
  }

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

@media (max-width: 720px) {
  body[data-page="diamond-search"] .nav-shell {
    min-height: 76px;
  }

  body[data-page="diamond-search"] .brand-logo-img {
    width: 210px;
    height: 54px;
  }

  body[data-page="diamond-search"] .header-tools .field {
    display: none;
  }

  .diamond-search-main {
    padding-top: 12px;
  }

  .vdb-tabs,
  .vdb-type-switch {
    width: 100%;
  }

  .vdb-tab,
  .vdb-type-pill {
    flex: 1;
    min-width: 0;
    padding-inline: 12px;
  }

  .vdb-type-label {
    display: none;
  }

  .vdb-range-row,
  .vdb-range-row.compact {
    grid-template-columns: 1fr 24px 1fr;
  }

  .vdb-range-row .vdb-chip-grid {
    grid-column: 1 / -1;
  }

  .vdb-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vdb-ai-search {
    right: 18px;
    bottom: 20px;
  }
}

/* Repair tab structures after filled filter-chip styling */
.vdb-tabs .vdb-tab:first-child {
  border-radius: 6px 0 0 6px;
}

.vdb-tabs .vdb-tab:last-child {
  border-radius: 0 6px 6px 0;
}

.vdb-card-tabs {
  gap: 22px;
}

.diamond-search-main .vdb-card-tab,
.diamond-search-main .vdb-card-tab:hover,
.diamond-search-main .vdb-card-tab:focus,
.diamond-search-main .vdb-card-tab:focus-visible,
.diamond-search-main .vdb-card-tab.active,
.diamond-search-main .vdb-filter-form .vdb-card-tab.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-card-tab.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-filter-form .vdb-card-tab.active {
  border-color: transparent;
  outline: none;
  background: transparent;
  color: #5b6a66;
  box-shadow: none;
  transform: none;
}

.diamond-search-main .vdb-card-tab.active,
.diamond-search-main .vdb-filter-form .vdb-card-tab.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-card-tab.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-filter-form .vdb-card-tab.active {
  color: var(--theme-primary);
}

.diamond-search-main .vdb-card-tab::before {
  display: none;
}

.diamond-search-main .vdb-card-tab.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--theme-secondary);
}

.vdb-summary-card .vdb-card-tabs,
.vdb-tab-card .vdb-card-tabs {
  align-items: stretch;
  min-height: 58px;
  padding: 0 22px;
  background: transparent;
}

.vdb-summary-card .vdb-card-tab,
.vdb-tab-card .vdb-card-tab {
  min-height: 58px;
  padding: 0;
}

/* Final filter theme refinement */
body[data-page="diamond-search"] {
  background: var(--theme-bg);
}

body[data-diamond-type="lab"] .diamond-search-main {
  background:
    radial-gradient(circle at 8% 18%, rgba(77, 182, 172, 0.18), transparent 27%),
    radial-gradient(circle at 92% 76%, rgba(0, 121, 107, 0.12), transparent 26%),
    linear-gradient(180deg, #ffffff 0, var(--theme-bg) 42%, #ffffff 100%);
}

body[data-diamond-type="natural"] .diamond-search-main {
  background:
    radial-gradient(circle at 8% 18%, rgba(111, 168, 179, 0.16), transparent 27%),
    radial-gradient(circle at 92% 76%, rgba(39, 56, 88, 0.1), transparent 26%),
    linear-gradient(180deg, #ffffff 0, #f4f8fa 44%, #ffffff 100%);
}

.diamond-search-main .vdb-topbar,
.diamond-search-main .vdb-filter-card,
.diamond-search-main .vdb-results-panel {
  border-color: rgba(var(--filter-primary-rgb), 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94)),
    var(--type-panel, #ffffff);
  box-shadow:
    0 18px 44px rgba(var(--filter-primary-rgb), 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.diamond-search-main .vdb-topbar {
  overflow: hidden;
  border-radius: 10px;
}

.diamond-search-main .vdb-topbar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--filter-primary), var(--filter-accent));
}

.diamond-search-main .vdb-filter-card {
  position: relative;
  overflow: hidden;
}

.diamond-search-main .vdb-filter-card h2,
.diamond-search-main .vdb-filter-card h3,
.diamond-search-main .vdb-results-panel h2 {
  color: var(--filter-primary);
}

.vdb-tabs,
.vdb-type-switch {
  border-color: rgba(var(--filter-primary-rgb), 0.22);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.vdb-tab,
.vdb-type-pill {
  color: var(--filter-primary);
}

.vdb-tab.active,
.vdb-type-pill.active,
.vdb-apply,
.diamond-search-main .vdb-checkbox-grid .choice-chip.active {
  border-color: rgba(var(--filter-accent-rgb), 0.82);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, var(--filter-primary), var(--filter-primary-strong));
  color: #fff;
  box-shadow:
    0 14px 28px rgba(var(--filter-primary-rgb), 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.vdb-reset {
  border-color: rgba(var(--filter-primary-rgb), 0.35);
  background: rgba(255, 255, 255, 0.9);
  color: var(--filter-primary);
}

.vdb-reset:hover,
.vdb-type-pill:not(.active):hover,
.vdb-tab:not(.active):hover {
  border-color: rgba(var(--filter-primary-rgb), 0.44);
  background: var(--filter-soft);
  color: var(--filter-primary);
}

.diamond-search-main .shape-chip,
.diamond-search-main .choice-chip,
.diamond-search-main .preset-chip {
  border-color: rgba(var(--filter-primary-rgb), 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(var(--filter-accent-rgb), 0.06)),
    var(--filter-chip);
  color: var(--filter-primary);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.74),
    0 8px 18px rgba(var(--filter-primary-rgb), 0.045);
}

.diamond-search-main .shape-chip .shape-label {
  color: var(--filter-primary);
}

.diamond-search-main .shape-chip .diamond-shape-svg {
  filter: brightness(0) saturate(100%) invert(21%) sepia(34%) saturate(1195%) hue-rotate(127deg) brightness(88%) contrast(101%);
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip .diamond-shape-svg {
  filter: brightness(0) saturate(100%) invert(22%) sepia(22%) saturate(1168%) hue-rotate(179deg) brightness(87%) contrast(91%);
}

.diamond-search-main .shape-chip:not(.active):is(:hover, :focus, :focus-visible),
.diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip:not(.active):is(:hover, :focus, :focus-visible),
.diamond-search-main .preset-chip:not(.active):is(:hover, :focus, :focus-visible) {
  border-color: rgba(var(--filter-primary-rgb), 0.42);
  background:
    linear-gradient(180deg, #ffffff, rgba(var(--filter-accent-rgb), 0.11)),
    var(--filter-soft);
  color: var(--filter-primary);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(var(--filter-primary-rgb), 0.1);
}

.diamond-search-main .shape-chip:not(.active):is(:hover, :focus, :focus-visible) .diamond-shape-svg {
  filter: brightness(0) saturate(100%) invert(35%) sepia(70%) saturate(721%) hue-rotate(133deg) brightness(83%) contrast(92%);
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip:not(.active):is(:hover, :focus, :focus-visible) .diamond-shape-svg {
  filter: brightness(0) saturate(100%) invert(42%) sepia(18%) saturate(956%) hue-rotate(153deg) brightness(90%) contrast(88%);
}

.diamond-search-main .shape-chip.active,
.diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip.active,
.diamond-search-main .preset-chip.active {
  border-color: rgba(var(--filter-accent-rgb), 0.92);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, var(--filter-primary), var(--filter-primary-strong));
  color: #fff;
  box-shadow:
    0 16px 30px rgba(var(--filter-primary-rgb), 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.diamond-search-main .shape-chip.active .shape-label,
.diamond-search-main .choice-chip.active,
.diamond-search-main .preset-chip.active {
  color: #fff;
}

.diamond-search-main .shape-chip.active .diamond-shape-svg {
  opacity: 1;
  filter: brightness(0) invert(1) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.14));
}

.diamond-search-main input,
.diamond-search-main select {
  border-color: rgba(var(--filter-primary-rgb), 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: var(--filter-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.diamond-search-main input:focus,
.diamond-search-main select:focus {
  border-color: rgba(var(--filter-primary-rgb), 0.72);
  box-shadow:
    0 0 0 4px rgba(var(--filter-accent-rgb), 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.diamond-search-main .vdb-check span {
  border-color: rgba(var(--filter-primary-rgb), 0.58);
}

.diamond-search-main .vdb-check input:checked + span {
  border-color: var(--filter-primary);
  background: var(--filter-primary);
  box-shadow: 0 0 0 4px rgba(var(--filter-accent-rgb), 0.16);
}

.diamond-search-main .vdb-card-tab.active,
.diamond-search-main .vdb-filter-form .vdb-card-tab.active {
  color: var(--filter-primary);
}

.diamond-search-main .vdb-card-tab.active::after {
  background: linear-gradient(90deg, var(--filter-primary), var(--filter-accent));
}

.vdb-summary-row button {
  color: var(--filter-primary);
}

.vdb-summary-row button:hover {
  background: rgba(var(--filter-accent-rgb), 0.1);
}

.vdb-ai-search {
  border-color: rgba(var(--filter-accent-rgb), 0.78);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, var(--filter-primary), var(--filter-primary-strong));
  box-shadow: 0 18px 38px rgba(var(--filter-primary-rgb), 0.28);
}

body[data-diamond-type="natural"] .vdb-type-switch::before {
  content: "Natural stones";
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid rgba(var(--filter-primary-rgb), 0.18);
  color: var(--filter-primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body[data-diamond-type="natural"] .vdb-type-label {
  display: none;
}

body[data-diamond-type="natural"] .vdb-filter-form > section:nth-of-type(1)::after,
body[data-diamond-type="natural"] .vdb-filter-form > section:nth-of-type(2)::after,
body[data-diamond-type="natural"] .vdb-filter-form > section:nth-of-type(3)::after,
body[data-diamond-type="natural"] .vdb-summary-card::after {
  opacity: 0.1;
  filter: hue-rotate(156deg) saturate(0.58) brightness(0.96);
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-tab.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-type-pill.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-apply,
body[data-diamond-type="natural"] .diamond-search-main .vdb-ai-search,
body[data-diamond-type="natural"] .diamond-search-main .vdb-checkbox-grid .choice-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .shape-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .preset-chip.active {
  border-color: rgba(var(--filter-accent-rgb), 0.9);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, var(--filter-primary), var(--filter-primary-strong));
  color: #fff;
  box-shadow:
    0 16px 30px rgba(var(--filter-primary-rgb), 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-card-tab.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-filter-form .vdb-card-tab.active {
  color: var(--filter-primary);
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-card-tab.active::after {
  background: linear-gradient(90deg, var(--filter-primary), var(--filter-accent));
}

/* Natural mode final color lock: platinum/navy, no gold or emerald bleed */
body[data-diamond-type="natural"] .diamond-search-main {
  --filter-chip: #eef4f6;
  --filter-soft: #f3f7fa;
  --filter-primary: #273858;
  --filter-primary-strong: #405c78;
  --filter-primary-rgb: 39, 56, 88;
  --filter-accent: #6fa8b3;
  --filter-accent-rgb: 111, 168, 179;
  --filter-ink: #1f304d;
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-topbar,
body[data-diamond-type="natural"] .diamond-search-main .vdb-filter-card,
body[data-diamond-type="natural"] .diamond-search-main .vdb-results-panel {
  border-color: rgba(39, 56, 88, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 252, 0.95)),
    #fbfcfd;
  box-shadow:
    0 18px 44px rgba(39, 56, 88, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip,
body[data-diamond-type="natural"] .diamond-search-main .choice-chip,
body[data-diamond-type="natural"] .diamond-search-main .preset-chip {
  border-color: rgba(39, 56, 88, 0.17);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(111, 168, 179, 0.08)),
    #eef4f6;
  color: #273858;
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip .shape-label {
  color: #273858;
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-tab.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-type-pill.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-apply,
body[data-diamond-type="natural"] .diamond-search-main .vdb-ai-search,
body[data-diamond-type="natural"] .diamond-search-main .vdb-checkbox-grid .choice-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .shape-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .preset-chip.active {
  border-color: rgba(111, 168, 179, 0.88);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #273858, #405c78);
  color: #fff;
  box-shadow:
    0 16px 30px rgba(39, 56, 88, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip.active .shape-label {
  color: #fff;
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip.active .diamond-shape-svg {
  filter: brightness(0) invert(1) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.16));
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-range-row > i,
body[data-diamond-type="natural"] .diamond-search-main .vdb-measure-grid > i,
body[data-diamond-type="natural"] .diamond-search-main .vdb-summary-row i,
body[data-diamond-type="natural"] .diamond-search-main .vdb-expand,
body[data-diamond-type="natural"] .diamond-search-main .vdb-card-tab i {
  color: #273858;
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-reset:hover,
body[data-diamond-type="natural"] .diamond-search-main .vdb-type-pill:not(.active):hover,
body[data-diamond-type="natural"] .diamond-search-main .vdb-tab:not(.active):hover,
body[data-diamond-type="natural"] .diamond-search-main .shape-chip:not(.active):is(:hover, :focus, :focus-visible),
body[data-diamond-type="natural"] .diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip:not(.active):is(:hover, :focus, :focus-visible),
body[data-diamond-type="natural"] .diamond-search-main .preset-chip:not(.active):is(:hover, :focus, :focus-visible) {
  border-color: rgba(39, 56, 88, 0.34);
  background:
    linear-gradient(180deg, #ffffff, rgba(111, 168, 179, 0.11)),
    #f3f7fa;
  color: #273858;
}

/* DND filter rebuild */
body[data-page="diamond-search"] {
  background: #f8fbfa;
}

body[data-page="diamond-search"] .site-header {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #d6eae7;
  box-shadow: 0 10px 28px rgba(0, 77, 64, 0.055);
}

body[data-page="diamond-search"] .nav-shell {
  min-height: 84px;
}

body[data-page="diamond-search"] .brand-logo-img {
  width: clamp(320px, 27vw, 460px);
  height: 58px;
  object-fit: contain;
  object-position: left center;
  filter: none;
  transition: filter 0.34s ease, opacity 0.34s ease;
}

body[data-page="diamond-search"],
body[data-page="diamond-search"]::before,
body[data-page="diamond-search"] .site-header,
body[data-page="diamond-search"] .diamond-search-main,
body[data-page="diamond-search"] .vdb-topbar,
body[data-page="diamond-search"] .vdb-filter-card,
body[data-page="diamond-search"] .vdb-results-panel,
body[data-page="diamond-search"] .vdb-tabs,
body[data-page="diamond-search"] .vdb-type-switch,
body[data-page="diamond-search"] .vdb-tab,
body[data-page="diamond-search"] .vdb-type-pill,
body[data-page="diamond-search"] .vdb-reset,
body[data-page="diamond-search"] .vdb-apply,
body[data-page="diamond-search"] .shape-chip,
body[data-page="diamond-search"] .choice-chip,
body[data-page="diamond-search"] .preset-chip,
body[data-page="diamond-search"] input,
body[data-page="diamond-search"] select,
body[data-page="diamond-search"] .vdb-search-field {
  transition:
    background 0.34s ease,
    background-color 0.34s ease,
    border-color 0.34s ease,
    color 0.34s ease,
    box-shadow 0.34s ease,
    filter 0.34s ease;
}

body[data-page="diamond-search"] .main-nav {
  gap: 24px;
}

body[data-page="diamond-search"] .main-nav > a,
body[data-page="diamond-search"] .nav-trigger {
  color: #111417;
  font-size: 15px;
  font-weight: 850;
}

body[data-page="diamond-search"] .header-tools .field input,
body[data-page="diamond-search"] .icon-btn {
  border-color: #d6eae7;
  box-shadow: none;
}

body[data-page="diamond-search"] .diamond-search-main {
  padding: 22px 0 84px;
  background:
    radial-gradient(circle at 6% 12%, rgba(77, 182, 172, 0.12), transparent 24%),
    linear-gradient(180deg, #ffffff 0, #f8fbfa 34%, #ffffff 100%);
}

body[data-diamond-type="lab"] .diamond-search-main {
  --filter-primary: #004D40;
  --filter-primary-strong: #00796B;
  --filter-primary-rgb: 0, 77, 64;
  --filter-accent: #4DB6AC;
  --filter-accent-rgb: 77, 182, 172;
  --filter-chip: #f2faf8;
  --filter-soft: #eaf7f5;
  --filter-ink: #092f29;
}

body[data-diamond-type="natural"] .diamond-search-main {
  --filter-primary: #273858;
  --filter-primary-strong: #405c78;
  --filter-primary-rgb: 39, 56, 88;
  --filter-accent: #7faeb9;
  --filter-accent-rgb: 127, 174, 185;
  --filter-chip: #f3f7f8;
  --filter-soft: #edf4f6;
  --filter-ink: #1c2b44;
  background:
    radial-gradient(circle at 6% 12%, rgba(127, 174, 185, 0.15), transparent 24%),
    linear-gradient(180deg, #ffffff 0, #f3f7f8 36%, #ffffff 100%);
}

body[data-page="diamond-search"] .diamond-search-shell,
body[data-page="diamond-search"] .diamond-search-main.results-mode .diamond-search-shell {
  width: min(1580px, calc(100% - 72px));
  gap: 14px;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .diamond-search-shell {
  grid-template-columns: 356px minmax(0, 1fr);
}

body[data-page="diamond-search"] .vdb-topbar {
  top: 84px;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto minmax(280px, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  overflow: hidden;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 250, 0.95));
  box-shadow: 0 14px 34px rgba(var(--filter-primary-rgb), 0.08);
}

body[data-page="diamond-search"] .vdb-topbar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--filter-primary), var(--filter-accent));
}

body[data-page="diamond-search"] .vdb-tabs,
body[data-page="diamond-search"] .vdb-type-switch {
  width: max-content;
  min-height: 46px;
  height: 46px;
  padding: 3px;
  gap: 3px;
  overflow: hidden;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

body[data-page="diamond-search"] .vdb-type-switch {
  justify-self: center;
}

body[data-page="diamond-search"] .vdb-tabs {
  justify-self: start;
}

body[data-page="diamond-search"] .vdb-actions {
  justify-self: end;
  gap: 12px;
}

body[data-page="diamond-search"] .vdb-tab,
body[data-page="diamond-search"] .vdb-type-pill {
  min-width: 132px;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--filter-primary);
  font-size: 15px;
  font-weight: 900;
}

body[data-page="diamond-search"] .vdb-type-label {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: rgba(var(--filter-primary-rgb), 0.78);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-diamond-type="natural"] .vdb-type-switch::before {
  display: none;
}

body[data-diamond-type="natural"] .vdb-type-label {
  display: inline-flex;
}

body[data-page="diamond-search"] .vdb-tab.active,
body[data-page="diamond-search"] .vdb-type-pill.active,
body[data-page="diamond-search"] .vdb-apply,
body[data-page="diamond-search"] .vdb-ai-search {
  border-color: rgba(var(--filter-accent-rgb), 0.78);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, var(--filter-primary), var(--filter-primary-strong));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(var(--filter-primary-rgb), 0.2);
}

body[data-page="diamond-search"] .vdb-reset,
body[data-page="diamond-search"] .vdb-apply {
  min-width: 142px;
  min-height: 44px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
}

body[data-page="diamond-search"] .vdb-reset {
  border: 1px solid rgba(var(--filter-primary-rgb), 0.32);
  background: #ffffff;
  color: var(--filter-primary);
  box-shadow: none;
}

body[data-page="diamond-search"] .vdb-filter-form {
  gap: 14px;
}

body[data-page="diamond-search"] .vdb-filter-card,
body[data-page="diamond-search"] .vdb-results-panel {
  overflow: hidden;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.15);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
  box-shadow: 0 12px 28px rgba(var(--filter-primary-rgb), 0.055);
}

body[data-page="diamond-search"] .vdb-filter-card {
  min-height: 0;
  padding: 18px;
}

body[data-page="diamond-search"] .vdb-filter-card::before {
  display: block;
  inset: 0 0 auto;
  width: auto;
  height: 2px;
  background: linear-gradient(90deg, var(--filter-primary), var(--filter-accent));
  opacity: 0.82;
}

body[data-page="diamond-search"] .vdb-filter-card::after,
body[data-diamond-type="natural"] .vdb-filter-form > section:nth-of-type(1)::after,
body[data-diamond-type="natural"] .vdb-filter-form > section:nth-of-type(2)::after,
body[data-diamond-type="natural"] .vdb-filter-form > section:nth-of-type(3)::after,
body[data-diamond-type="natural"] .vdb-summary-card::after {
  display: none;
}

body[data-page="diamond-search"] .vdb-filter-card h2,
body[data-page="diamond-search"] .vdb-filter-card h3,
body[data-page="diamond-search"] .vdb-results-panel h2 {
  margin-bottom: 12px;
  color: var(--filter-ink);
  font-size: 16px;
  line-height: 1.1;
  font-weight: 900;
}

body[data-page="diamond-search"] .vdb-check-row {
  gap: 54px;
}

body[data-page="diamond-search"] .vdb-check {
  color: var(--filter-ink);
  font-size: 14px;
  font-weight: 700;
}

body[data-page="diamond-search"] .vdb-check span {
  width: 20px;
  height: 20px;
  border-color: rgba(var(--filter-primary-rgb), 0.52);
  border-radius: 5px;
}

body[data-page="diamond-search"] .vdb-check input:checked + span {
  border-color: var(--filter-primary);
  background: var(--filter-primary);
  box-shadow: 0 0 0 4px rgba(var(--filter-accent-rgb), 0.16);
}

body[data-page="diamond-search"] .vdb-shape-grid {
  grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
  gap: 10px;
}

body[data-page="diamond-search"] .shape-chip {
  min-width: 0;
  min-height: 88px;
  padding: 9px 8px 8px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, rgba(var(--filter-accent-rgb), 0.06)),
    var(--filter-chip);
  color: var(--filter-primary);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

body[data-page="diamond-search"] .shape-chip .diamond-shape-icon,
body[data-page="diamond-search"] .shape-chip .diamond-shape-svg {
  width: 42px;
  height: 42px;
}

body[data-page="diamond-search"] .shape-chip .diamond-shape-svg {
  filter: brightness(0) saturate(100%) invert(21%) sepia(34%) saturate(1195%) hue-rotate(127deg) brightness(88%) contrast(101%);
}

body[data-diamond-type="natural"] .shape-chip .diamond-shape-svg {
  filter: brightness(0) saturate(100%) invert(27%) sepia(17%) saturate(1437%) hue-rotate(18deg) brightness(88%) contrast(92%);
}

body[data-page="diamond-search"] .shape-chip .shape-label {
  color: var(--filter-primary);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.05;
}

body[data-page="diamond-search"] .shape-chip:hover,
body[data-page="diamond-search"] .choice-grid:not(.vdb-checkbox-grid) .choice-chip:hover,
body[data-page="diamond-search"] .preset-chip:hover {
  border-color: rgba(var(--filter-primary-rgb), 0.38);
  background: linear-gradient(180deg, #ffffff, rgba(var(--filter-accent-rgb), 0.12));
  color: var(--filter-primary);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(var(--filter-primary-rgb), 0.08);
}

body[data-page="diamond-search"] .shape-chip.active,
body[data-page="diamond-search"] .choice-grid:not(.vdb-checkbox-grid) .choice-chip.active,
body[data-page="diamond-search"] .preset-chip.active,
body[data-page="diamond-search"] .vdb-checkbox-grid .choice-chip.active {
  border-color: rgba(var(--filter-accent-rgb), 0.9);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, var(--filter-primary), var(--filter-primary-strong));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(var(--filter-primary-rgb), 0.18);
}

body[data-page="diamond-search"] .shape-chip.active .shape-label {
  color: #ffffff;
}

body[data-page="diamond-search"] .shape-chip.active .diamond-shape-svg {
  opacity: 1;
  filter: brightness(0) invert(1) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.16));
}

body[data-page="diamond-search"] .choice-chip,
body[data-page="diamond-search"] .preset-chip {
  min-height: 38px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, rgba(var(--filter-accent-rgb), 0.06));
  color: var(--filter-primary);
  font-size: 14px;
  font-weight: 900;
}

body[data-page="diamond-search"] .vdb-range-row {
  grid-template-columns: 200px 28px 200px minmax(0, 1fr);
  gap: 12px 16px;
}

body[data-page="diamond-search"] .vdb-range-row > i,
body[data-page="diamond-search"] .vdb-measure-grid > i {
  color: var(--filter-primary);
}

body[data-page="diamond-search"] .vdb-range-row .vdb-chip-grid {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px 10px;
}

body[data-page="diamond-search"] input,
body[data-page="diamond-search"] select {
  min-height: 52px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.22);
  border-radius: 8px;
  background: #ffffff;
  color: var(--filter-ink);
  box-shadow: none;
}

body[data-page="diamond-search"] input:focus,
body[data-page="diamond-search"] select:focus {
  border-color: rgba(var(--filter-primary-rgb), 0.7);
  box-shadow: 0 0 0 4px rgba(var(--filter-accent-rgb), 0.16);
}

body[data-page="diamond-search"] .vdb-summary-card {
  display: none;
}

body[data-page="diamond-search"] .vdb-summary-card .vdb-card-tabs,
body[data-page="diamond-search"] .vdb-tab-card .vdb-card-tabs {
  min-height: 54px;
  padding: 0 18px;
  gap: 22px;
  border-bottom: 1px solid rgba(var(--filter-primary-rgb), 0.13);
  background: #ffffff;
}

body[data-page="diamond-search"] .vdb-card-tab,
body[data-page="diamond-search"] .vdb-card-tab:hover,
body[data-page="diamond-search"] .vdb-card-tab:focus,
body[data-page="diamond-search"] .vdb-card-tab.active,
body[data-page="diamond-search"] .vdb-filter-form .vdb-card-tab.active {
  min-height: 54px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(var(--filter-primary-rgb), 0.72);
  box-shadow: none;
  transform: none;
}

body[data-page="diamond-search"] .vdb-card-tab.active,
body[data-page="diamond-search"] .vdb-filter-form .vdb-card-tab.active {
  color: var(--filter-primary);
}

body[data-page="diamond-search"] .vdb-card-tab.active::after {
  height: 3px;
  background: linear-gradient(90deg, var(--filter-primary), var(--filter-accent));
}

body[data-page="diamond-search"] .vdb-summary-row {
  min-height: 54px;
}

body[data-page="diamond-search"] .vdb-summary-row button {
  min-height: 54px;
  color: var(--filter-primary);
  font-size: 14px;
  font-weight: 850;
}

body[data-page="diamond-search"] .vdb-ai-search {
  right: 78px;
  bottom: 38px;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 16px;
}

body[data-page="diamond-search"] .vdb-result-toolbar {
  border-bottom-color: rgba(var(--filter-primary-rgb), 0.14);
  background: #ffffff;
}

body[data-page="diamond-search"] .vdb-result-card {
  border-color: rgba(var(--filter-primary-rgb), 0.16);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(var(--filter-primary-rgb), 0.08);
}

@media (min-width: 1500px) {
  body[data-page="diamond-search"] .diamond-search-main:not(.results-mode) .vdb-shape-grid {
    grid-template-columns: repeat(15, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  body[data-page="diamond-search"] .diamond-search-shell,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .diamond-search-shell {
    width: calc(100% - 28px);
  }

  body[data-page="diamond-search"] .vdb-topbar {
    top: 84px;
    grid-template-columns: 1fr;
  }

  body[data-page="diamond-search"] .vdb-tabs,
  body[data-page="diamond-search"] .vdb-type-switch,
  body[data-page="diamond-search"] .vdb-actions {
    justify-self: stretch;
  }
}

@media (max-width: 720px) {
  body[data-page="diamond-search"] .brand-logo-img {
    width: 248px;
    height: 48px;
  }

  body[data-page="diamond-search"] .diamond-search-main {
    padding-top: 12px;
  }

  body[data-page="diamond-search"] .vdb-tabs,
  body[data-page="diamond-search"] .vdb-type-switch {
    width: 100%;
  }

  body[data-page="diamond-search"] .vdb-tab,
  body[data-page="diamond-search"] .vdb-type-pill {
    flex: 1;
    min-width: 0;
    padding-inline: 10px;
  }

  body[data-page="diamond-search"] .vdb-range-row,
  body[data-page="diamond-search"] .vdb-range-row.compact {
    grid-template-columns: 1fr 24px 1fr;
  }
}

/* Filter component corrections */
body[data-page="diamond-search"] .vdb-tabs {
  height: 48px;
  padding: 4px;
}

body[data-page="diamond-search"] .vdb-tabs .vdb-tab {
  min-height: 38px;
  height: 38px;
  border-radius: 6px;
}

body[data-page="diamond-search"] .vdb-tabs .vdb-tab:first-child,
body[data-page="diamond-search"] .vdb-tabs .vdb-tab:last-child {
  border-radius: 6px;
}

body[data-page="diamond-search"] .vdb-type-switch {
  height: 48px;
  min-height: 48px;
  padding: 4px;
}

body[data-page="diamond-search"] .vdb-type-pill {
  min-height: 38px;
  height: 38px;
  border-radius: 6px;
}

body[data-page="diamond-search"] .vdb-type-pill:first-of-type,
body[data-page="diamond-search"] .vdb-type-pill:last-of-type {
  border-radius: 6px;
}

body[data-page="diamond-search"] .vdb-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

body[data-page="diamond-search"] .diamond-search-main:not(.results-mode) .vdb-two-col > .vdb-filter-card {
  grid-column: auto;
}

body[data-page="diamond-search"] .vdb-search-field {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  margin-bottom: 14px;
  padding: 0 12px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.22);
  border-radius: 8px;
  background: #ffffff;
  color: rgba(var(--filter-primary-rgb), 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

body[data-page="diamond-search"] .vdb-search-field:focus-within {
  border-color: rgba(var(--filter-primary-rgb), 0.68);
  box-shadow: 0 0 0 4px rgba(var(--filter-accent-rgb), 0.15);
}

body[data-page="diamond-search"] .vdb-search-field i {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: rgba(var(--filter-primary-rgb), 0.58);
  font-size: 16px;
}

body[data-page="diamond-search"] .vdb-search-field i:first-child {
  border-radius: 8px;
  background: rgba(var(--filter-accent-rgb), 0.1);
}

body[data-page="diamond-search"] .vdb-search-field i:last-child {
  justify-self: end;
  font-size: 18px;
}

body[data-page="diamond-search"] .vdb-search-field input,
body[data-page="diamond-search"] .vdb-search-field input:focus {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--filter-ink);
  padding: 0;
  box-shadow: none;
}

body[data-page="diamond-search"] .vdb-search-field input::placeholder {
  color: rgba(31, 48, 77, 0.62);
}

body[data-page="diamond-search"] .vdb-stock-card {
  width: 100%;
  max-width: none;
}

body[data-page="diamond-search"] .vdb-stock-card .vdb-search-field {
  max-width: 760px;
  margin-bottom: 0;
}

body[data-page="diamond-search"] .vdb-range-row.compact {
  grid-template-columns: minmax(150px, 1fr) 28px minmax(150px, 1fr) minmax(150px, 1fr) 28px minmax(150px, 1fr);
  gap: 12px 14px;
}

body[data-page="diamond-search"] .vdb-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-page="diamond-search"] .vdb-checkbox-grid .choice-chip {
  width: auto;
  min-width: 110px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 16px 0 12px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, rgba(var(--filter-accent-rgb), 0.06));
  color: var(--filter-primary);
  box-shadow: none;
}

body[data-page="diamond-search"] .vdb-checkbox-grid .choice-chip::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(var(--filter-primary-rgb), 0.72);
  border-radius: 6px;
  background: #ffffff;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

body[data-page="diamond-search"] .vdb-checkbox-grid .choice-chip.active {
  border-color: rgba(var(--filter-accent-rgb), 0.9);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, var(--filter-primary), var(--filter-primary-strong));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(var(--filter-primary-rgb), 0.18);
}

body[data-page="diamond-search"] .vdb-checkbox-grid .choice-chip.active::before {
  content: "\2713";
  border-color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.16);
}

body[data-page="diamond-search"] .vdb-filter-card:has(.vdb-search-field) {
  padding-top: 20px;
}

body[data-page="diamond-search"] .vdb-filter-card:has(.vdb-checkbox-grid) {
  min-height: 116px;
}

@media (max-width: 720px) {
  body[data-page="diamond-search"] .vdb-two-col {
    grid-template-columns: 1fr;
  }

  body[data-page="diamond-search"] .vdb-search-field {
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    gap: 8px;
  }

  body[data-page="diamond-search"] .vdb-stock-card {
    width: 100%;
  }

  body[data-page="diamond-search"] .vdb-stock-card .vdb-search-field {
    max-width: none;
  }

  body[data-page="diamond-search"] .vdb-range-row.compact {
    grid-template-columns: 1fr 24px 1fr;
  }
}

/* Page and search motion */
body.has-page-motion.page-ready .top-strip {
  animation: dndPageFade 0.36s ease both;
}

body.has-page-motion.page-ready .site-header {
  animation: dndHeaderIn 0.48s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body.has-page-motion.page-ready main {
  animation: dndContentIn 0.56s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body.has-page-motion.page-leaving .top-strip,
body.has-page-motion.page-leaving .site-header,
body.has-page-motion.page-leaving main {
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.diamond-search-main {
  position: relative;
}

body[data-page="diamond-search"] .diamond-search-main.view-swapping .vdb-filter-form,
body[data-page="diamond-search"] .diamond-search-main.view-swapping .vdb-results-panel {
  animation: dndSearchViewIn 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body[data-page="diamond-search"] .diamond-search-main.view-swapping.results-mode .vdb-result-card {
  animation: dndResultCardIn 0.46s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body[data-page="diamond-search"] .diamond-search-main.view-swapping.results-mode .vdb-result-card:nth-child(2) { animation-delay: 0.03s; }
body[data-page="diamond-search"] .diamond-search-main.view-swapping.results-mode .vdb-result-card:nth-child(3) { animation-delay: 0.06s; }
body[data-page="diamond-search"] .diamond-search-main.view-swapping.results-mode .vdb-result-card:nth-child(4) { animation-delay: 0.09s; }
body[data-page="diamond-search"] .diamond-search-main.view-swapping.results-mode .vdb-result-card:nth-child(5) { animation-delay: 0.12s; }
body[data-page="diamond-search"] .diamond-search-main.view-swapping.results-mode .vdb-result-card:nth-child(6) { animation-delay: 0.15s; }
body[data-page="diamond-search"] .diamond-search-main.view-swapping.results-mode .vdb-result-card:nth-child(7) { animation-delay: 0.18s; }
body[data-page="diamond-search"] .diamond-search-main.view-swapping.results-mode .vdb-result-card:nth-child(8) { animation-delay: 0.21s; }

@keyframes dndPageFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes dndHeaderIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

/* Natural diamond warm premium theme */
body[data-page="diamond-search"][data-diamond-type="natural"] {
  background: #fbf9ee;
}

body[data-page="diamond-search"][data-diamond-type="natural"]::before {
  background:
    radial-gradient(circle at 8% 18%, rgba(137, 129, 33, 0.16), transparent 26%),
    radial-gradient(circle at 92% 74%, rgba(76, 75, 22, 0.09), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #fbf9ee 50%, #fffdf4 100%);
}

body[data-diamond-type="natural"] .diamond-search-main {
  --filter-primary: #4C4B16;
  --filter-primary-strong: #898121;
  --filter-primary-rgb: 76, 75, 22;
  --filter-accent: #898121;
  --filter-accent-rgb: 137, 129, 33;
  --filter-chip: #fbf9ee;
  --filter-soft: #f7f5e9;
  --filter-ink: #302f0e;
  background:
    radial-gradient(circle at 8% 16%, rgba(137, 129, 33, 0.14), transparent 24%),
    radial-gradient(circle at 88% 76%, rgba(76, 75, 22, 0.08), transparent 27%),
    linear-gradient(180deg, #ffffff 0%, #fbf9ee 48%, #fffdf4 100%);
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-topbar,
body[data-diamond-type="natural"] .diamond-search-main .vdb-filter-card,
body[data-diamond-type="natural"] .diamond-search-main .vdb-results-panel {
  border-color: rgba(137, 129, 33, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 253, 244, 0.96)),
    #ffffff;
  box-shadow:
    0 18px 42px rgba(76, 75, 22, 0.095),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-topbar::before {
  background: linear-gradient(180deg, #4C4B16, #898121);
}

body[data-diamond-type="natural"] .vdb-tabs,
body[data-diamond-type="natural"] .vdb-type-switch {
  border-color: rgba(137, 129, 33, 0.38);
  background: rgba(255, 253, 244, 0.92);
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-tab,
body[data-diamond-type="natural"] .diamond-search-main .vdb-type-pill,
body[data-diamond-type="natural"] .diamond-search-main .vdb-type-label,
body[data-diamond-type="natural"] .diamond-search-main .vdb-filter-card h2,
body[data-diamond-type="natural"] .diamond-search-main .vdb-filter-card h3,
body[data-diamond-type="natural"] .diamond-search-main .vdb-results-panel h2 {
  color: #4C4B16;
}

body[data-diamond-type="natural"] .vdb-type-switch::before {
  color: #898121;
  border-right-color: rgba(137, 129, 33, 0.34);
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-tab i,
body[data-diamond-type="natural"] .diamond-search-main .vdb-type-pill i,
body[data-diamond-type="natural"] .diamond-search-main .vdb-reset i,
body[data-diamond-type="natural"] .diamond-search-main .vdb-apply i,
body[data-diamond-type="natural"] .diamond-search-main .vdb-range-row > i,
body[data-diamond-type="natural"] .diamond-search-main .vdb-measure-grid > i,
body[data-diamond-type="natural"] .diamond-search-main .vdb-expand,
body[data-diamond-type="natural"] .diamond-search-main .vdb-card-tab i {
  color: #898121;
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-tab.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-type-pill.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-apply,
body[data-diamond-type="natural"] .diamond-search-main .vdb-ai-search,
body[data-diamond-type="natural"] .diamond-search-main .vdb-checkbox-grid .choice-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .shape-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .preset-chip.active {
  border-color: rgba(137, 129, 33, 0.86);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #4C4B16, #898121);
  color: #ffffff;
  box-shadow:
    0 14px 28px rgba(76, 75, 22, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-tab.active i,
body[data-diamond-type="natural"] .diamond-search-main .vdb-type-pill.active i,
body[data-diamond-type="natural"] .diamond-search-main .vdb-apply i,
body[data-diamond-type="natural"] .diamond-search-main .vdb-ai-search i {
  color: #fff7c6;
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-reset {
  border-color: rgba(137, 129, 33, 0.58);
  background: rgba(255, 253, 244, 0.95);
  color: #4C4B16;
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip,
body[data-diamond-type="natural"] .diamond-search-main .choice-chip,
body[data-diamond-type="natural"] .diamond-search-main .preset-chip {
  border-color: rgba(137, 129, 33, 0.34);
  background:
    linear-gradient(180deg, #ffffff, rgba(251, 249, 238, 0.82)),
    #fbf9ee;
  color: #4C4B16;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.78),
    0 8px 18px rgba(76, 75, 22, 0.05);
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip .shape-label {
  color: #4C4B16;
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip .diamond-shape-svg {
  filter: brightness(0) saturate(100%) invert(27%) sepia(17%) saturate(1437%) hue-rotate(18deg) brightness(88%) contrast(92%);
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip:not(.active):is(:hover, :focus, :focus-visible),
body[data-diamond-type="natural"] .diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip:not(.active):is(:hover, :focus, :focus-visible),
body[data-diamond-type="natural"] .diamond-search-main .preset-chip:not(.active):is(:hover, :focus, :focus-visible),
body[data-diamond-type="natural"] .diamond-search-main .vdb-reset:hover,
body[data-diamond-type="natural"] .diamond-search-main .vdb-type-pill:not(.active):hover,
body[data-diamond-type="natural"] .diamond-search-main .vdb-tab:not(.active):hover {
  border-color: rgba(137, 129, 33, 0.68);
  background:
    linear-gradient(180deg, #ffffff, rgba(247, 245, 233, 0.88)),
    #fbf9ee;
  color: #4C4B16;
  box-shadow: 0 12px 24px rgba(76, 75, 22, 0.09);
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip:not(.active):is(:hover, :focus, :focus-visible) .diamond-shape-svg {
  filter: brightness(0) saturate(100%) invert(51%) sepia(21%) saturate(1295%) hue-rotate(18deg) brightness(89%) contrast(88%);
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip.active .shape-label,
body[data-diamond-type="natural"] .diamond-search-main .choice-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .preset-chip.active {
  color: #ffffff;
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip.active .diamond-shape-svg {
  filter: brightness(0) invert(1) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.14));
}

body[data-diamond-type="natural"] .diamond-search-main input,
body[data-diamond-type="natural"] .diamond-search-main select,
body[data-diamond-type="natural"] .diamond-search-main .vdb-search-field {
  border-color: rgba(137, 129, 33, 0.36);
  background: rgba(255, 253, 244, 0.96);
  color: #4C4B16;
}

body[data-diamond-type="natural"] .diamond-search-main input:focus,
body[data-diamond-type="natural"] .diamond-search-main select:focus,
body[data-diamond-type="natural"] .diamond-search-main .vdb-search-field:focus-within {
  border-color: rgba(137, 129, 33, 0.78);
  box-shadow:
    0 0 0 4px rgba(137, 129, 33, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-check span,
body[data-diamond-type="natural"] .diamond-search-main .vdb-checkbox-grid .choice-chip::before {
  border-color: rgba(137, 129, 33, 0.78);
}

body[data-diamond-type="natural"] .diamond-search-main .vdb-check input:checked + span {
  border-color: #4C4B16;
  background: #4C4B16;
  box-shadow: 0 0 0 4px rgba(137, 129, 33, 0.16);
}

body[data-diamond-type="natural"] .vdb-filter-form > section:nth-of-type(1)::after,
body[data-diamond-type="natural"] .vdb-filter-form > section:nth-of-type(2)::after,
body[data-diamond-type="natural"] .vdb-filter-form > section:nth-of-type(3)::after,
body[data-diamond-type="natural"] .vdb-summary-card::after {
  opacity: 0.13;
  filter: hue-rotate(38deg) saturate(0.78) brightness(0.92);
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-filter-form .shape-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .choice-grid:not(.vdb-checkbox-grid) .choice-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-filter-form .choice-grid:not(.vdb-checkbox-grid) .choice-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .preset-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-filter-form .preset-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-checkbox-grid .choice-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-type-pill.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-tab.active,
body[data-diamond-type="natural"] .diamond-search-main .vdb-apply,
body[data-diamond-type="natural"] .diamond-search-main .vdb-ai-search {
  border-color: rgba(137, 129, 33, 0.9) !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #4C4B16, #898121) !important;
  color: #ffffff !important;
  box-shadow:
    0 14px 28px rgba(76, 75, 22, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip.active .shape-label,
body[data-diamond-type="natural"] .diamond-search-main .choice-chip.active,
body[data-diamond-type="natural"] .diamond-search-main .preset-chip.active {
  color: #ffffff !important;
}

body[data-diamond-type="natural"] .diamond-search-main .shape-chip.active .diamond-shape-svg {
  filter: brightness(0) invert(1) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.16)) !important;
}

/* Loose diamond single-screen studio */
body[data-page="loose-builder"] {
  background:
    radial-gradient(circle at 8% 18%, rgba(77, 182, 172, 0.1), transparent 30%),
    radial-gradient(circle at 88% 82%, rgba(0, 121, 107, 0.08), transparent 32%),
    linear-gradient(180deg, #f8fbfa 0%, #ffffff 100%);
}

body[data-page="loose-builder"]::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 250, 0.9)),
    linear-gradient(90deg, rgba(0, 77, 64, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 77, 64, 0.035) 1px, transparent 1px);
  background-size: auto, 72px 72px, 72px 72px;
}

.loose-studio-main {
  position: relative;
  z-index: 1;
}

.loose-studio {
  height: 100%;
}

.loose-studio-shell {
  width: min(1440px, calc(100% - 28px));
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.loose-studio-top {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 18px;
  border: 1px solid rgba(var(--type-primary-rgb, 0, 77, 64), 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 250, 0.92)),
    #ffffff;
  box-shadow: 0 16px 38px rgba(0, 77, 64, 0.08);
}

.loose-studio-top .kicker {
  margin-bottom: 5px;
}

.loose-studio-top h1 {
  margin: 0;
  color: var(--type-primary, var(--navy));
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.02;
  letter-spacing: 0;
}

.loose-studio-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.loose-studio-status span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(var(--type-primary-rgb, 0, 77, 64), 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  color: var(--type-primary, var(--navy));
  font-weight: 900;
}

.loose-certificate-btn {
  min-width: 154px;
  min-height: 42px;
  border-color: rgba(var(--type-primary-rgb, 0, 77, 64), 0.34);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, var(--type-primary, #004D40), var(--type-primary-strong, #00796B));
  color: #ffffff;
  box-shadow:
    0 14px 24px rgba(var(--type-primary-rgb, 0, 77, 64), 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.loose-certificate-btn:hover,
.loose-certificate-btn:focus-visible {
  border-color: rgba(var(--type-primary-rgb, 0, 77, 64), 0.7);
  box-shadow:
    0 18px 30px rgba(var(--type-primary-rgb, 0, 77, 64), 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.loose-workbench {
  min-height: 0;
  display: grid;
  grid-template-columns: 338px minmax(280px, 0.72fr) minmax(500px, 1.28fr);
  gap: 12px;
}

.loose-panel {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(var(--type-primary-rgb, 0, 77, 64), 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 250, 0.94)),
    #ffffff;
  box-shadow: 0 18px 42px rgba(0, 77, 64, 0.09);
}

.loose-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--type-primary, #004D40), var(--type-accent, #4DB6AC), transparent);
  opacity: 0.85;
  pointer-events: none;
}

.loose-panel-head {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid rgba(var(--type-primary-rgb, 0, 77, 64), 0.14);
  background: linear-gradient(180deg, #ffffff, var(--type-soft, #edf8f6));
}

.loose-panel-head h2,
.loose-config-panel .data-card-header h2 {
  margin: 0;
  color: var(--type-primary, var(--navy));
  font-size: 18px;
  line-height: 1;
}

.loose-panel-head span {
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(var(--type-primary-rgb, 0, 77, 64), 0.08);
  color: var(--type-primary, var(--navy));
  font-size: 12px;
  font-weight: 900;
}

.loose-shape-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.loose-shape-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 9px;
  padding: 12px;
  overflow: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--type-primary-rgb, 0, 77, 64), 0.38) transparent;
}

.loose-shape-grid::-webkit-scrollbar {
  width: 8px;
}

.loose-shape-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(var(--type-primary-rgb, 0, 77, 64), 0.32);
}

body[data-page="loose-builder"] .loose-shape-grid .shape-chip {
  position: relative;
  overflow: hidden;
  width: auto;
  min-height: 78px;
  padding: 8px 6px;
  border-color: rgba(var(--type-primary-rgb, 0, 77, 64), 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 250, 0.9));
  color: #24324b;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

body[data-page="loose-builder"] .loose-shape-grid .shape-chip::after,
body[data-page="loose-builder"] .choice-chip::after,
body[data-page="loose-builder"] .btn::after {
  content: "";
  position: absolute;
  inset: -45% auto -45% -70%;
  width: 55%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  opacity: 0;
  pointer-events: none;
  transition: left 0.46s ease, opacity 0.2s ease;
}

body[data-page="loose-builder"] .loose-shape-grid .shape-chip .diamond-shape-icon,
body[data-page="loose-builder"] .loose-shape-grid .shape-chip img {
  width: 34px;
  height: 34px;
  filter: brightness(0) saturate(100%) opacity(0.9);
}

body[data-page="loose-builder"] .loose-shape-grid .shape-chip .shape-label {
  color: #172b4d;
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.05;
}

body[data-page="loose-builder"] .loose-shape-grid .shape-chip:hover,
body[data-page="loose-builder"] .loose-shape-grid .shape-chip:focus-visible {
  border-color: rgba(var(--type-primary-rgb, 0, 77, 64), 0.46);
  transform: translateY(-3px);
  box-shadow: 0 14px 26px rgba(0, 77, 64, 0.13);
}

body[data-page="loose-builder"] .loose-shape-grid .shape-chip:hover::after,
body[data-page="loose-builder"] .loose-shape-grid .shape-chip:focus-visible::after,
body[data-page="loose-builder"] .choice-chip:hover::after,
body[data-page="loose-builder"] .choice-chip:focus-visible::after,
body[data-page="loose-builder"] .btn:hover::after,
body[data-page="loose-builder"] .btn:focus-visible::after {
  left: 118%;
  opacity: 1;
}

body[data-page="loose-builder"] .loose-shape-grid .shape-chip.active {
  border-color: rgba(var(--type-primary-rgb, 0, 77, 64), 0.72);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, var(--type-primary, #004D40), var(--type-primary-strong, #00796B));
  color: #ffffff;
  box-shadow:
    0 14px 28px rgba(var(--type-primary-rgb, 0, 77, 64), 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

body[data-page="loose-builder"] .loose-shape-grid .shape-chip.active .shape-label {
  color: #ffffff;
}

body[data-page="loose-builder"] .loose-shape-grid .shape-chip.active .diamond-shape-icon {
  filter: none;
}

body[data-page="loose-builder"] .loose-shape-grid .shape-chip.active .diamond-shape-svg {
  filter: brightness(0) invert(1) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.18)) !important;
}

.loose-preview-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
}

.loose-preview-image {
  position: relative;
  overflow: hidden;
  min-height: 0;
  height: 100%;
  border-color: rgba(var(--type-primary-rgb, 0, 77, 64), 0.18);
  background:
    radial-gradient(circle at 50% 44%, rgba(77, 182, 172, 0.18), transparent 42%),
    linear-gradient(135deg, #ffffff, #f1faf8);
}

.loose-preview-image::before {
  content: "";
  position: absolute;
  width: min(78%, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(77, 182, 172, 0.18), transparent 54%),
    conic-gradient(from 35deg, transparent, rgba(0, 121, 107, 0.12), transparent 36%);
  animation: loosePreviewOrbit 8s linear infinite;
}

.loose-preview-image img {
  position: relative;
  z-index: 1;
  max-width: min(70%, 230px);
  max-height: 230px;
  filter:
    brightness(0) saturate(100%)
    invert(23%) sepia(27%) saturate(1708%) hue-rotate(128deg) brightness(88%) contrast(95%)
    drop-shadow(0 18px 24px rgba(0, 77, 64, 0.16));
}

.loose-preview-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.loose-preview-meta div {
  min-height: 70px;
  padding: 12px;
  border: 1px solid rgba(var(--type-primary-rgb, 0, 77, 64), 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.loose-preview-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.loose-preview-meta strong {
  display: block;
  margin-top: 5px;
  color: var(--type-primary, var(--navy));
  font-size: 20px;
  line-height: 1;
}

.loose-preview-panel .thumb-row {
  margin: 0;
}

.loose-preview-panel .thumb-row img {
  width: 54px;
  height: 54px;
  filter:
    brightness(0) saturate(100%)
    invert(23%) sepia(27%) saturate(1708%) hue-rotate(128deg) brightness(88%) contrast(95%);
}

.loose-config-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.loose-config-panel .data-card-header {
  min-height: 50px;
  padding: 8px 16px;
}

.loose-config-panel .builder-options {
  min-height: 0;
  overflow: hidden;
  gap: 8px;
  padding: 8px 16px 10px;
}

.loose-config-panel .price-display {
  min-height: 58px;
  padding: 8px 14px;
  border-color: rgba(var(--type-primary-rgb, 0, 77, 64), 0.18);
  background:
    radial-gradient(circle at 82% 18%, rgba(77, 182, 172, 0.12), transparent 32%),
    linear-gradient(135deg, #ffffff, var(--type-soft, #edf8f6));
}

.loose-config-panel .price-display strong {
  color: var(--type-primary, var(--navy));
  font-size: clamp(24px, 2vw, 30px);
}

.loose-option-stack {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(var(--type-primary-rgb, 0, 77, 64), 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 250, 0.88));
}

.loose-option-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 34px;
}

.loose-option-row > label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

.loose-option-row .option-buttons {
  gap: 9px;
}

.loose-field-row select,
.loose-field-row input {
  width: min(100%, 240px);
}

.loose-inline-field-row {
  grid-template-columns: 128px minmax(0, 120px) 104px minmax(0, 1fr);
}

.loose-inline-field-row label[for="loosePcs"] {
  grid-column: 3;
}

.loose-inline-field-row #loosePcs {
  grid-column: 4;
}

body[data-page="loose-builder"] .choice-chip {
  position: relative;
  overflow: hidden;
  min-width: 82px;
  min-height: 36px;
  border-radius: 8px;
  padding: 6px 13px;
  font-size: 14px;
  justify-content: center;
  background: #ffffff;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

body[data-page="loose-builder"] .choice-chip:hover,
body[data-page="loose-builder"] .choice-chip:focus-visible {
  border-color: rgba(var(--type-primary-rgb, 0, 77, 64), 0.42);
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(var(--type-primary-rgb, 0, 77, 64), 0.11);
}

body[data-page="loose-builder"] .choice-chip.active {
  border-color: rgba(var(--type-primary-rgb, 0, 77, 64), 0.72);
  background: linear-gradient(135deg, var(--type-primary, #004D40), var(--type-primary-strong, #00796B));
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(var(--type-primary-rgb, 0, 77, 64), 0.18);
}

.loose-measure-grid .field {
  gap: 5px;
}

.loose-measure-grid input,
.loose-measure-grid select,
.loose-field-row input,
.loose-field-row select {
  min-height: 38px;
  border: 1px solid rgba(var(--type-primary-rgb, 0, 77, 64), 0.22);
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 251, 250, 0.96));
  border-radius: 7px;
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.loose-field-row select {
  appearance: none;
  padding: 0 38px 0 12px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--type-primary, #004D40) 50%),
    linear-gradient(135deg, var(--type-primary, #004D40) 50%, transparent 50%),
    linear-gradient(180deg, #ffffff, rgba(248, 251, 250, 0.96));
  background-position:
    calc(100% - 19px) 50%,
    calc(100% - 13px) 50%,
    0 0;
  background-size:
    6px 6px,
    6px 6px,
    100% 100%;
  background-repeat: no-repeat;
}

.loose-field-row input {
  padding: 0 12px;
}

.loose-field-row input:focus,
.loose-field-row select:focus {
  outline: none;
  border-color: rgba(var(--type-primary-rgb, 0, 77, 64), 0.58);
  box-shadow:
    0 0 0 4px rgba(var(--type-primary-rgb, 0, 77, 64), 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.loose-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  padding: 8px 10px;
  border-color: rgba(var(--type-primary-rgb, 0, 77, 64), 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 250, 0.9));
}

.loose-summary strong {
  grid-column: 1 / -1;
  color: var(--type-primary, var(--navy));
}

.loose-summary span {
  display: grid;
  gap: 1px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
}

.loose-summary b {
  color: #172b4d;
  font-size: 11.5px;
}

.loose-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

.loose-action-row .btn {
  width: auto;
  min-height: 40px;
  min-width: 168px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 15px;
}

.loose-action-row .btn-primary {
  min-width: 196px;
}

body[data-page="loose-builder"] .btn {
  position: relative;
  overflow: hidden;
}

body[data-page="loose-builder"] .btn:hover,
body[data-page="loose-builder"] .btn:focus-visible {
  transform: translateY(-2px);
}

@keyframes loosePreviewOrbit {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 1100px) {
  body[data-page="loose-builder"] {
    overflow: hidden;
  }

  body[data-page="loose-builder"] .top-strip {
    display: none;
  }

  body[data-page="loose-builder"] .top-strip .container {
    min-height: 28px;
  }

  body[data-page="loose-builder"] .nav-shell {
    min-height: 64px;
  }

  body[data-page="loose-builder"] .brand-logo-img {
    width: clamp(220px, 20vw, 300px);
    height: 48px;
  }

  .loose-studio-main {
    height: calc(100vh - 64px);
    min-height: 560px;
    overflow: hidden;
  }

  .loose-studio {
    padding: 8px 0 10px;
  }
}

@media (max-width: 1200px) {
  .loose-workbench {
    grid-template-columns: 300px minmax(260px, 0.78fr) minmax(410px, 1.22fr);
  }

  .loose-choice-grid,
  .loose-measure-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 1099px) {
  body[data-page="loose-builder"] {
    overflow: auto;
  }

  .loose-studio {
    padding: 18px 0 54px;
  }

  .loose-studio-shell {
    height: auto;
  }

  .loose-studio-top,
  .loose-workbench {
    grid-template-columns: 1fr;
  }

  .loose-workbench {
    display: grid;
  }

  .loose-shape-grid {
    overflow: auto;
    max-height: 330px;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  }

  .loose-preview-image {
    min-height: 280px;
  }
}

@media (max-width: 720px) {
  .loose-studio-top,
  .loose-panel-head,
  .loose-config-panel .data-card-header {
    align-items: start;
    flex-direction: column;
  }

  .loose-studio-status,
  .loose-choice-grid,
  .loose-measure-grid,
  .loose-summary,
  .loose-action-row {
    grid-template-columns: 1fr;
  }

  .loose-studio-status {
    align-items: stretch;
    justify-content: stretch;
  }

  .loose-studio-status span,
  .loose-studio-status .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Desktop result view optimization */
@media (min-width: 1181px) {
  body[data-page="diamond-search"] .diamond-search-main.results-mode {
    padding: 12px 0 40px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .diamond-search-shell {
    width: min(1760px, calc(100% - 42px));
    grid-template-columns: clamp(340px, 21vw, 400px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode.filters-hidden .diamond-search-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 94px);
    gap: 12px;
    padding: 0 2px 76px 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--filter-primary-rgb), 0.36) transparent;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form::-webkit-scrollbar {
    width: 8px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(var(--filter-primary-rgb), 0.28);
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-card {
    padding: 14px;
    border-color: rgba(var(--filter-primary-rgb), 0.16);
    box-shadow: 0 10px 24px rgba(var(--filter-primary-rgb), 0.055);
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-card h2,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-card h3 {
    margin-bottom: 10px;
    font-size: 15px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-check-row {
    display: grid;
    gap: 14px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-check {
    min-height: 26px;
    font-size: 13px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-shape-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    overflow: auto;
    max-height: 314px;
    padding-right: 3px;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--filter-primary-rgb), 0.32) transparent;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-shape-grid::-webkit-scrollbar {
    width: 6px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-shape-grid::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(var(--filter-primary-rgb), 0.28);
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form > .vdb-filter-card:nth-of-type(2) {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    max-height: 386px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .shape-chip {
    min-height: 76px;
    padding: 7px 5px 6px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .shape-chip .diamond-shape-icon,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .shape-chip .diamond-shape-svg {
    width: 36px;
    height: 36px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .shape-chip .shape-label {
    font-size: 11px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-chip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .choice-chip,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .preset-chip {
    min-height: 34px;
    font-size: 13px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode input,
  body[data-page="diamond-search"] .diamond-search-main.results-mode select,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-search-field {
    min-height: 44px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-search-field input,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-search-field input:focus {
    min-height: 42px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-card-tabs,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-card-tab,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-summary-row,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-summary-row button {
    min-height: 42px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-results-panel {
    min-width: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-toolbar {
    top: 84px;
    min-height: 50px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 7px 12px;
    border-color: rgba(var(--filter-primary-rgb), 0.18);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 250, 0.94));
    box-shadow: 0 14px 30px rgba(var(--filter-primary-rgb), 0.08);
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-primary,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-actions {
    gap: 10px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-actions {
    flex-wrap: nowrap;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-back-link,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-toolbar-btn,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-toolbar-link,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-bulk-btn,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-select-all {
    min-height: 34px;
    font-size: 13px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-toolbar-btn,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-bulk-btn {
    padding-inline: 12px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-grid {
    grid-template-columns: repeat(auto-fill, minmax(214px, 238px));
    justify-content: start;
    align-items: start;
    gap: 14px;
    padding: 14px 0 42px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode.filters-hidden .vdb-result-grid {
    grid-template-columns: repeat(auto-fill, minmax(214px, 1fr));
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-stone-card,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-market-card {
    min-height: 330px;
    box-shadow: 0 14px 32px rgba(var(--filter-primary-rgb), 0.075);
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-stone-head {
    min-height: 48px;
    padding: 9px 10px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-stone-media {
    min-height: 154px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-stone-media img {
    width: min(70%, 150px);
    max-height: 132px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-stone-body {
    gap: 9px;
    padding: 11px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-stone-title h3 {
    font-size: 16px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-grade-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 0.9fr);
    gap: 6px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-grade-grid span {
    padding: 7px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-stone-foot {
    padding: 10px 11px 12px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-stone-foot .vdb-card-price strong {
    font-size: 20px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-market-card {
    align-content: center;
    padding: 20px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-market-card strong {
    font-size: 23px;
  }
}

@media (min-width: 1181px) and (max-width: 1280px) {
  body[data-page="diamond-search"] .diamond-search-main.results-mode .diamond-search-shell {
    width: min(100% - 28px, 1340px);
    grid-template-columns: 332px minmax(0, 1fr);
    gap: 14px;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-primary,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-actions {
    flex-wrap: wrap;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-actions {
    justify-content: flex-start;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-grid {
    grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  }
}

/* Result page usability polish: fixed sidebar actions + real grid/list modes */
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-sidebar-actions {
  order: -20;
  position: sticky;
  top: 0;
  bottom: auto;
  z-index: 12;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 2px;
  padding: 12px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 250, 0.94));
  box-shadow: 0 14px 30px rgba(var(--filter-primary-rgb), 0.1);
  backdrop-filter: blur(16px);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form {
  padding-bottom: 18px;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-sidebar-actions .vdb-reset,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-sidebar-actions .vdb-apply {
  min-width: 0;
  min-height: 44px;
  padding-inline: 10px;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form .vdb-filter-card {
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form .vdb-filter-card:focus-within,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form .vdb-filter-card:hover {
  border-color: rgba(var(--filter-primary-rgb), 0.34);
  box-shadow: 0 16px 32px rgba(var(--filter-primary-rgb), 0.09);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-toolbar button,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-toolbar .vdb-select-all,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-card-menu,
body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-market-action,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-card-heart {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.18s ease,
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-toolbar button::before,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-card-menu::before,
body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-market-action::before,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-card-heart::before {
  content: "";
  position: absolute;
  inset: -45% auto -45% -70%;
  width: 48%;
  transform: skewX(-18deg);
  background: rgba(255, 255, 255, 0.38);
  pointer-events: none;
  transition: left 0.45s ease;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-toolbar button:hover::before,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-card-menu:hover::before,
body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-market-action:hover::before,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-card-heart:hover::before {
  left: 118%;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-toolbar-link:hover,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-toolbar-link.active,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-toolbar-btn:hover,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-back-link:hover {
  border-radius: 8px;
  background: rgba(var(--filter-primary-rgb), 0.1);
  color: var(--filter-primary);
  transform: translateY(-1px);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-toolbar-link.active {
  padding-inline: 12px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.18);
  box-shadow: 0 10px 22px rgba(var(--filter-primary-rgb), 0.08);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-bulk-btn:hover,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-card-menu:hover,
body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-market-action:hover {
  background: linear-gradient(135deg, var(--filter-primary), var(--filter-primary-strong));
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(var(--filter-primary-rgb), 0.18);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-card-heart:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--filter-primary), var(--filter-primary-strong));
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(var(--filter-primary-rgb), 0.15);
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .vdb-result-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-market-card {
  min-height: 136px;
  grid-template-columns: minmax(160px, 0.5fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-market-card .dnd-market-kicker {
  grid-column: 1;
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-market-card strong {
  grid-column: 1;
  font-size: 21px;
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-market-card span:not(.dnd-market-kicker) {
  grid-column: 2;
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-market-card .dnd-market-action {
  grid-column: 3;
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-stone-card {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) 178px minmax(260px, 1.35fr) minmax(150px, 0.55fr);
  align-items: stretch;
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-stone-head,
body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-stone-media,
body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-stone-body,
body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-stone-foot {
  min-height: 132px;
  border-bottom: 0;
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-stone-head {
  align-content: center;
  align-items: center;
  border-right: 1px solid rgba(var(--filter-primary-rgb), 0.1);
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-stone-media {
  border-right: 1px solid rgba(var(--filter-primary-rgb), 0.1);
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-stone-media img {
  width: min(72%, 128px);
  max-height: 108px;
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-type-badge {
  right: 10px;
  bottom: 10px;
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-stone-body {
  align-content: center;
  border-right: 1px solid rgba(var(--filter-primary-rgb), 0.1);
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-grade-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-stone-foot {
  align-content: center;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  margin-top: 0;
  border-top: 0;
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-stone-foot .vdb-card-menu {
  width: 100%;
}

@media (min-width: 1181px) {
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form {
    padding: 0 2px 18px 0;
  }
}

@media (max-width: 1180px) {
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-sidebar-actions {
    position: sticky;
    top: 0;
  }

  body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-stone-card,
  body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-market-card {
    display: grid;
    grid-template-columns: 1fr;
  }

  body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .dnd-market-card > * {
    grid-column: auto;
  }
}

/* VDB-inspired result board rebuild in DND theme */
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow-x: hidden;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-sidebar-actions {
  position: sticky !important;
  top: 0 !important;
  bottom: auto !important;
  order: -100;
  z-index: 18;
  margin: 0 0 10px;
  padding: 10px;
  border-color: rgba(var(--filter-primary-rgb), 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 250, 0.96));
  box-shadow: 0 14px 26px rgba(var(--filter-primary-rgb), 0.09);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form input,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form select {
  width: 100%;
  min-width: 0;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form .vdb-range-row,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form .vdb-range-row.compact,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form .vdb-measure-grid {
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) !important;
  gap: 10px 12px;
  max-width: 100%;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form .vdb-measure-grid > input,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form .vdb-range-row > input {
  min-height: 48px;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form .vdb-measure-grid > input:nth-of-type(2n + 1) {
  grid-column: 1;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form .vdb-measure-grid > input:nth-of-type(2n) {
  grid-column: 3;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form .vdb-measure-grid > i,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form .vdb-range-row > i {
  grid-column: 2;
  justify-self: center;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form > .vdb-filter-card,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form > .vdb-two-col {
  flex: 0 0 auto;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-card {
  height: auto !important;
  min-height: 0;
  overflow: visible;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form > .vdb-filter-card:nth-of-type(1) {
  min-height: 112px;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form > .vdb-filter-card:nth-of-type(1) .vdb-check-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form > .vdb-filter-card:nth-of-type(2) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 380px;
  max-height: 420px;
  overflow: hidden;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form > .vdb-filter-card:nth-of-type(2) .vdb-shape-grid {
  overflow-y: auto;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form > .vdb-filter-card:nth-of-type(3) {
  min-height: 300px;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form > .vdb-filter-card:nth-of-type(3) .vdb-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form > .vdb-filter-card:nth-of-type(3) .preset-chip {
  min-height: 40px;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-toolbar {
  overflow: visible;
}

.vdb-view-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.vdb-view-options {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 40;
  min-width: 212px;
  display: none;
  overflow: hidden;
  padding: 7px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.18);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 39, 35, 0.16);
}

.vdb-view-menu.open .vdb-view-options {
  display: grid;
  gap: 4px;
}

.vdb-view-options button {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--filter-ink);
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}

.vdb-view-options button:hover,
.vdb-view-options button.active {
  background: rgba(var(--filter-primary-rgb), 0.1);
  color: var(--filter-primary);
}

.vdb-view-options button.active::after {
  content: "\2713";
  color: var(--filter-primary);
  font-weight: 900;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-grid {
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 14px;
  align-items: start;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-stone-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.2);
  border-radius: 8px;
  background: #fff;
}

.dnd-vdb-media {
  position: relative;
  min-height: 214px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(var(--filter-primary-rgb), 0.13);
  background:
    radial-gradient(circle at 52% 46%, rgba(255, 255, 255, 0.92), transparent 36%),
    linear-gradient(135deg, #fbfbfc 0%, #d9dadd 100%);
}

.dnd-vdb-media img {
  width: min(76%, 178px);
  max-height: 174px;
  object-fit: contain;
  filter: drop-shadow(0 16px 20px rgba(31, 48, 77, 0.18));
}

.dnd-vdb-media .vdb-status-dot {
  top: auto;
  right: auto;
  bottom: 10px;
  left: 10px;
}

.dnd-vdb-media .dnd-type-badge {
  right: 10px;
  bottom: 8px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: var(--filter-primary);
  box-shadow: 0 10px 20px rgba(var(--filter-primary-rgb), 0.1);
}

.dnd-vdb-info {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.dnd-vdb-stock {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  color: var(--filter-primary);
  font-size: 12px;
  line-height: 1.15;
}

.dnd-vdb-stock span {
  color: #6b7280;
  font-weight: 700;
}

.dnd-vdb-info h3 {
  margin: 0;
  color: #111827;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.18;
}

.dnd-vdb-info p {
  margin: 0;
  color: #40516b;
  font-size: 13px;
  font-weight: 600;
}

.dnd-vdb-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.dnd-vdb-detail-grid span {
  min-width: 0;
  overflow: hidden;
  padding: 7px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.1);
  border-radius: 6px;
  background: linear-gradient(180deg, #fff, rgba(var(--filter-accent-rgb), 0.045));
  color: var(--filter-ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dnd-vdb-detail-grid span.wide {
  grid-column: 1 / -1;
}

.dnd-vdb-detail-grid small {
  display: block;
  margin-bottom: 2px;
  color: #69758b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dnd-vdb-foot {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(var(--filter-primary-rgb), 0.1);
}

.dnd-vdb-foot .vdb-card-price {
  min-width: 0;
}

.dnd-vdb-foot .vdb-card-price strong {
  color: #111827;
  font-size: 19px;
}

.dnd-vdb-foot .vdb-card-price span {
  color: #5d6980;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dnd-vdb-foot .vdb-card-menu {
  position: static;
  min-width: 38px;
  height: 34px;
  border-radius: 13px 0 8px 0;
  background: rgba(var(--filter-accent-rgb), 0.18);
  color: var(--filter-primary);
}

body[data-page="diamond-search"] .diamond-search-main[data-result-view="list"].results-mode .vdb-result-grid {
  display: block;
  padding: 14px 0 42px;
}

.dnd-result-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(var(--filter-primary-rgb), 0.07);
}

.dnd-result-table {
  width: 100%;
  min-width: 1780px;
  border-collapse: separate;
  border-spacing: 0;
  color: #0f172a;
  font-size: 13px;
}

.dnd-result-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 36px;
  border-right: 1px solid #eef1f4;
  background: #dfe1e8;
  color: #263349;
  padding: 0 10px;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}

.dnd-result-table th i {
  float: right;
  color: #40516b;
  font-size: 13px;
}

.dnd-result-table th.dnd-list-control {
  width: 96px;
  text-align: center;
}

.dnd-result-table td {
  height: 38px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
  padding: 0 10px;
  white-space: nowrap;
  vertical-align: middle;
}

.dnd-result-table tbody tr:nth-child(odd) {
  background: #f4f5f8;
}

.dnd-result-table tbody tr:nth-child(even) {
  background: #fff;
}

.dnd-result-table tbody tr:hover,
.dnd-result-table tbody tr.selected {
  background: rgba(var(--filter-accent-rgb), 0.14);
}

.dnd-list-select {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dnd-row-check {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.dnd-row-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dnd-row-check span {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  border: 2px solid #1f2937;
  border-radius: 6px;
  background: #fff;
}

.dnd-row-check input:checked + span {
  border-color: var(--filter-primary);
  background: var(--filter-primary);
}

.dnd-row-check input:checked + span::after {
  content: "";
  width: 9px;
  height: 5px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: rotate(-45deg);
}

.dnd-row-heart {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #97a0b2;
  font-size: 18px;
  cursor: pointer;
}

.dnd-row-heart:hover {
  color: #e11d48;
}

.dnd-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--filter-ink);
  font-size: 12px;
  font-weight: 800;
}

.dnd-status-pill > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f59e0b;
}

.dnd-status-pill.lab > span {
  background: #0db45b;
}

@media (min-width: 1500px) {
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-grid {
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  }
}

@media (max-width: 1180px) {
  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-result-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .vdb-view-options {
    right: auto;
    left: 0;
  }
}

/* Result refinements: apply-only filters, wishlist, themed table header, shape load more */
body[data-page="diamond-search"] .vdb-filter-load-more {
  display: none;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form > .vdb-filter-card:nth-of-type(2) {
  display: block;
  min-height: 0 !important;
  max-height: none;
  overflow: visible;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form > .vdb-filter-card:nth-of-type(2) .vdb-shape-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: none !important;
  overflow: visible !important;
  padding-right: 0;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-shape-grid:not(.expanded) .shape-chip:nth-child(n + 9) {
  display: none;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-load-more {
  width: 100%;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(var(--filter-accent-rgb), 0.1));
  color: var(--filter-primary);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-load-more:hover,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-load-more:focus-visible {
  border-color: rgba(var(--filter-primary-rgb), 0.4);
  background: rgba(var(--filter-primary-rgb), 0.08);
  box-shadow: 0 10px 20px rgba(var(--filter-primary-rgb), 0.08);
  transform: translateY(-1px);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form > .vdb-filter-card:nth-of-type(2) .shape-chip {
  min-height: 76px !important;
  height: 76px;
  padding: 7px 5px 6px !important;
  border-radius: 8px;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form > .vdb-filter-card:nth-of-type(2) .shape-chip .diamond-shape-icon,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form > .vdb-filter-card:nth-of-type(2) .shape-chip .diamond-shape-svg {
  width: 36px !important;
  height: 36px !important;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form > .vdb-filter-card:nth-of-type(2) .shape-chip .shape-label {
  font-size: 11px !important;
  line-height: 1.05;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode.filters-dirty .vdb-sidebar-actions .vdb-apply {
  position: relative;
  animation: dndApplyNudge 1.15s ease-in-out infinite;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode.filters-dirty .vdb-sidebar-actions .vdb-apply::after {
  content: "Apply changes";
  position: absolute;
  right: 8px;
  bottom: -22px;
  color: var(--filter-primary);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

@keyframes dndApplyNudge {
  0%, 100% {
    box-shadow: 0 10px 22px rgba(var(--filter-primary-rgb), 0.2);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 14px 30px rgba(var(--filter-primary-rgb), 0.28);
    transform: translateY(-1px);
  }
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table th {
  border-right: 1px solid rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, #e7e8ee 0%, #d7d8df 100%);
  color: #273044;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table th i {
  color: #43516a;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table th.dnd-list-control {
  color: #273044;
}

body[data-page="diamond-search"] .vdb-card-heart.active,
body[data-page="diamond-search"] .dnd-row-heart.active {
  color: #e11d48;
}

body[data-page="diamond-search"] .vdb-card-heart.active {
  background: rgba(225, 29, 72, 0.14);
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.18);
}

body[data-page="diamond-search"] .dnd-row-heart.active,
body[data-page="diamond-search"] .dnd-row-heart:hover {
  color: #e11d48;
}

body[data-page="diamond-search"] .vdb-card-heart.active:hover {
  color: #fff;
  background: linear-gradient(135deg, #e11d48, #fb7185);
}

/* Collapse and VDB-style list header final pass */
body[data-page="diamond-search"] .diamond-search-main.results-mode.filters-hidden .diamond-search-shell {
  grid-template-columns: minmax(0, 1fr) !important;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode.filters-hidden .vdb-filter-form {
  display: none !important;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode.filters-hidden .vdb-results-panel {
  grid-column: 1 / -1 !important;
  min-width: 0;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-toolbar-btn.active {
  border-color: rgba(var(--filter-primary-rgb), 0.22);
  background: linear-gradient(180deg, #ffffff, rgba(var(--filter-accent-rgb), 0.16));
  color: var(--filter-primary);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table th,
body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table thead th {
  border-right: 1px solid rgba(255, 255, 255, 0.72) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1) !important;
  background: linear-gradient(180deg, #e7e8ee 0%, #d8d9e0 100%) !important;
  color: #273044 !important;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table th i,
body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table thead th i {
  color: #43516a !important;
}

/* Premium result polish, compact view menu, and Live Demand header repair */
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-view-menu {
  isolation: isolate;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-view-options {
  top: calc(100% + 7px);
  right: 0;
  z-index: 95;
  min-width: 168px;
  max-width: 180px;
  padding: 6px;
  border-color: rgba(var(--filter-primary-rgb), 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 38px rgba(15, 39, 35, 0.14);
  backdrop-filter: blur(14px);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-view-options::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 34px;
  width: 11px;
  height: 11px;
  transform: rotate(45deg);
  border-top: 1px solid rgba(var(--filter-primary-rgb), 0.18);
  border-left: 1px solid rgba(var(--filter-primary-rgb), 0.18);
  background: rgba(255, 255, 255, 0.98);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-view-options button {
  min-height: 36px;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-view-options button.active {
  padding-right: 30px;
  background: rgba(var(--filter-primary-rgb), 0.1);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-view-options button.active::after {
  position: absolute;
  right: 10px;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-premium-card {
  border-color: rgba(var(--filter-primary-rgb), 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(var(--filter-accent-rgb), 0.035)),
    #fff;
  box-shadow: 0 18px 38px rgba(15, 39, 35, 0.09);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-premium-card:hover {
  border-color: rgba(var(--filter-primary-rgb), 0.34);
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(15, 39, 35, 0.13);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-premium-card .dnd-vdb-media {
  min-height: 232px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.98), transparent 34%),
    linear-gradient(135deg, #f8fafb 0%, #d7d9dd 100%);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-card-image-stage {
  width: calc(100% - 42px);
  aspect-ratio: 1.18;
  display: grid;
  place-items: center;
  margin-top: 16px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.78), transparent 44%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.45), rgba(164, 169, 178, 0.24));
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-card-image-stage img {
  width: min(84%, 190px);
  max-height: 202px;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(31, 48, 77, 0.2));
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-premium-card .dnd-vdb-info {
  gap: 9px;
  padding: 12px 13px 11px;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-premium-card .dnd-vdb-stock {
  align-items: center;
  color: var(--filter-primary);
  font-size: 12px;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-premium-card .dnd-vdb-stock span {
  max-width: 48%;
  overflow: hidden;
  color: #6a7283;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-premium-card .dnd-vdb-info h3 {
  color: #111827;
  font-size: 18px;
  line-height: 1.15;
}

.dnd-card-finish,
.dnd-card-party,
.dnd-card-spec-strip {
  display: grid;
  gap: 6px;
}

.dnd-card-finish {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.dnd-card-finish > span {
  min-width: 0;
  overflow: hidden;
  color: #40516b;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dnd-card-party {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dnd-card-party span,
.dnd-card-spec-strip span,
.dnd-card-measure {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.1);
  border-radius: 7px;
  background: linear-gradient(180deg, #fff, rgba(var(--filter-accent-rgb), 0.055));
  color: var(--filter-ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.18;
}

.dnd-card-party span {
  padding: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dnd-card-spec-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dnd-card-spec-strip span {
  padding: 7px 8px;
}

.dnd-card-party small,
.dnd-card-spec-strip small,
.dnd-card-measure small {
  display: block;
  margin-bottom: 2px;
  color: #69758b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dnd-card-measure {
  padding: 8px;
}

.dnd-card-measure strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-premium-card .dnd-vdb-foot {
  align-items: center;
  padding: 11px 13px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(var(--filter-accent-rgb), 0.08));
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-premium-card .dnd-vdb-foot .vdb-card-price strong {
  font-size: 20px;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-premium-card .vdb-card-menu {
  border-radius: 14px 0 8px 0;
  background: rgba(var(--filter-accent-rgb), 0.18);
  font-size: 17px;
  font-weight: 900;
}

body[data-page="live-demands"] .container.nav-shell {
  width: min(1560px, calc(100% - 72px));
  gap: clamp(18px, 2vw, 34px);
}

body[data-page="live-demands"] .brand-logo-img {
  width: clamp(250px, 22vw, 342px);
  height: 62px;
}

body[data-page="live-demands"] .main-nav {
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

body[data-page="live-demands"] .header-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

body[data-page="live-demands"] .header-tools .field {
  position: relative;
  width: clamp(220px, 22vw, 330px);
  min-width: 0;
  display: block;
  margin: 0;
}

body[data-page="live-demands"] .header-tools .field input {
  width: 100%;
  min-height: 50px;
  padding: 0 52px 0 16px;
  border-color: var(--theme-border);
  border-radius: 8px;
  color: var(--theme-primary);
  box-shadow: 0 10px 22px rgba(0, 77, 64, 0.05);
}

body[data-page="live-demands"] .header-tools .header-search-button {
  right: 8px;
}

body[data-page="live-demands"] .header-tools .icon-btn {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border-color: var(--theme-border);
  color: #07120f;
  font-size: 18px;
  box-shadow: 0 10px 22px rgba(0, 77, 64, 0.05);
}

@media (max-width: 1160px) {
  body[data-page="live-demands"] .main-nav {
    display: none;
  }

  body[data-page="live-demands"] .container.nav-shell {
    width: min(100% - 34px, 960px);
  }
}

@media (max-width: 720px) {
  body[data-page="live-demands"] .nav-shell {
    flex-wrap: wrap;
  }

  body[data-page="live-demands"] .header-tools {
    width: 100%;
  }

body[data-page="live-demands"] .header-tools .field {
    flex: 1 1 auto;
    width: auto;
  }
}

/* DND result power tools: compact hover data, columns, bulk actions, and controlled loading */
body[data-page="diamond-search"] {
  padding-bottom: 86px;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-results-toolbar {
  position: sticky;
  top: 0;
  z-index: 42;
  border-color: rgba(var(--filter-primary-rgb), 0.16);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 28px rgba(15, 39, 35, 0.07);
  backdrop-filter: blur(14px);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-results-panel {
  overflow: visible;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table-wrap {
  max-width: 100%;
  overflow: auto;
  border-radius: 6px;
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table {
  min-width: 1440px;
  font-size: 12px;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table th,
body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table thead th {
  height: 30px;
  padding: 0 8px;
  background: #d9dbe2 !important;
  color: #273044 !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table th[data-sort-column] {
  cursor: pointer;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table th[data-sort-column]:hover {
  background: #cfd2db !important;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table td {
  height: 34px;
  padding: 0 8px;
  color: #061b2f;
  font-size: 12px;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table tbody tr:nth-child(odd) {
  background: #f2f3f7;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table tbody tr:nth-child(even) {
  background: #fff;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table tbody tr:hover {
  background: rgba(var(--filter-accent-rgb), 0.16);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table tbody tr.selected {
  background: rgba(var(--filter-primary-rgb), 0.13);
}

body[data-page="diamond-search"] .dnd-list-select {
  width: 84px;
  gap: 9px;
}

body[data-page="diamond-search"] .dnd-row-check span {
  width: 19px;
  height: 19px;
  border-color: #1f2937;
}

body[data-page="diamond-search"] .dnd-row-heart {
  width: 22px;
  height: 22px;
  font-size: 17px;
}

body[data-page="diamond-search"] .dnd-status-cell {
  width: 48px;
  text-align: center;
}

body[data-page="diamond-search"] .dnd-status-dot-only {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d09b17;
  box-shadow: 0 0 0 3px rgba(208, 155, 23, 0.12);
}

body[data-page="diamond-search"] .dnd-status-dot-only.lab {
  background: #11af62;
  box-shadow: 0 0 0 3px rgba(17, 175, 98, 0.12);
}

body[data-page="diamond-search"] .dnd-status-dot-only.natural {
  background: #898121;
  box-shadow: 0 0 0 3px rgba(137, 129, 33, 0.14);
}

body[data-page="diamond-search"] .dnd-cell-truncate {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="diamond-search"] .dnd-clip-cell {
  max-width: 150px;
}

body[data-page="diamond-search"] .dnd-measure-cell {
  max-width: 185px;
}

body[data-page="diamond-search"] .dnd-compact-cell {
  max-width: 92px;
}

body[data-page="diamond-search"] .dnd-number-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

body[data-page="diamond-search"] [data-dnd-tooltip] {
  position: relative;
}

body[data-page="diamond-search"] [data-dnd-tooltip]:hover::before,
body[data-page="diamond-search"] [data-dnd-tooltip]:focus-within::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  z-index: 150;
  width: 10px;
  height: 10px;
  transform: translateX(-50%) rotate(45deg);
  background: #3d3b47;
}

body[data-page="diamond-search"] [data-dnd-tooltip]:hover::after,
body[data-page="diamond-search"] [data-dnd-tooltip]:focus-within::after {
  content: attr(data-dnd-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 151;
  max-width: 280px;
  padding: 7px 9px;
  transform: translateX(-50%);
  border-radius: 6px;
  background: #3d3b47;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.24);
  pointer-events: none;
}

body.dnd-tooltip-ready [data-dnd-tooltip]:hover::before,
body.dnd-tooltip-ready [data-dnd-tooltip]:hover::after,
body.dnd-tooltip-ready [data-dnd-tooltip]:focus-within::before,
body.dnd-tooltip-ready [data-dnd-tooltip]:focus-within::after {
  display: none;
}

.dnd-floating-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 999;
  max-width: 280px;
  padding: 7px 9px;
  border-radius: 6px;
  background: #3d3b47;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-999px, -999px);
  transition: opacity 0.12s ease;
}

.dnd-floating-tooltip.show {
  opacity: 1;
}

body[data-page="diamond-search"] .vdb-columns-menu {
  position: relative;
  display: inline-flex;
}

body[data-page="diamond-search"] .vdb-columns-options {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 96;
  width: 230px;
  max-height: 334px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 38px rgba(15, 39, 35, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

body[data-page="diamond-search"] .vdb-columns-menu.open .vdb-columns-options {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body[data-page="diamond-search"] .dnd-column-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--filter-primary);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

body[data-page="diamond-search"] .dnd-column-option:hover {
  background: rgba(var(--filter-primary-rgb), 0.08);
}

body[data-page="diamond-search"] .dnd-column-option input {
  width: 17px;
  height: 17px;
  accent-color: var(--filter-primary);
}

body[data-page="diamond-search"] .dnd-insight-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

body[data-page="diamond-search"] .dnd-insight-strip[hidden] {
  display: none;
}

body[data-page="diamond-search"] .dnd-insight-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 9px;
  row-gap: 1px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.14);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, rgba(var(--filter-accent-rgb), 0.07));
  box-shadow: 0 12px 24px rgba(var(--filter-primary-rgb), 0.05);
}

body[data-page="diamond-search"] .dnd-insight-item i {
  grid-row: span 2;
  color: var(--filter-secondary);
  font-size: 18px;
}

body[data-page="diamond-search"] .dnd-insight-item span {
  color: #667085;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body[data-page="diamond-search"] .dnd-insight-item strong {
  min-width: 0;
  overflow: hidden;
  color: var(--filter-primary);
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="diamond-search"] .dnd-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 230px;
  min-height: 44px;
  margin: 20px auto 0;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.22);
  border-radius: 999px;
  background: #fff;
  color: var(--filter-primary);
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(var(--filter-primary-rgb), 0.08);
  cursor: pointer;
}

body[data-page="diamond-search"] .dnd-load-more:hover,
body[data-page="diamond-search"] .dnd-load-more:focus-visible {
  background: var(--filter-primary);
  color: #fff;
  transform: translateY(-1px);
}

body[data-page="diamond-search"] .dnd-load-more[hidden] {
  display: none;
}

body[data-page="diamond-search"] .dnd-quick-rail {
  position: fixed;
  right: 18px;
  top: 42%;
  z-index: 44;
  display: grid;
  gap: 5px;
}

body[data-page="diamond-search"] .diamond-search-main:not(.results-mode) ~ .dnd-quick-rail {
  display: none;
}

body[data-page="diamond-search"] .dnd-quick-rail button {
  width: 38px;
  height: 38px;
  display: grid;
  grid-template-columns: 20px 0fr;
  align-items: center;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.22);
  border-radius: 999px;
  background: var(--filter-primary);
  color: #fff;
  font-size: 15px;
  box-shadow: 0 12px 26px rgba(15, 39, 35, 0.18);
  cursor: pointer;
  transition: width 0.18s ease, grid-template-columns 0.18s ease, background 0.18s ease;
}

body[data-page="diamond-search"] .dnd-quick-rail button:hover,
body[data-page="diamond-search"] .dnd-quick-rail button:focus-visible {
  width: 132px;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  background: #073b34;
}

body[data-page="diamond-search"] .dnd-quick-rail span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

body[data-page="diamond-search"] .dnd-bulk-action-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 98;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(960px, calc(100% - 32px));
  padding: 10px 12px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 48px rgba(15, 39, 35, 0.18);
  backdrop-filter: blur(14px);
  transform: translate(-50%, 0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

body[data-page="diamond-search"] .dnd-bulk-action-bar[aria-hidden="true"] {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
}

body[data-page="diamond-search"] .dnd-bulk-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 7px;
  align-items: center;
  min-width: 188px;
  color: var(--filter-primary);
}

body[data-page="diamond-search"] .dnd-bulk-summary i {
  grid-row: span 2;
  font-size: 18px;
}

body[data-page="diamond-search"] .dnd-bulk-summary strong {
  font-size: 14px;
  font-weight: 950;
}

body[data-page="diamond-search"] .dnd-bulk-summary span {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

body[data-page="diamond-search"] .dnd-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

body[data-page="diamond-search"] .dnd-bulk-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(var(--filter-primary-rgb), 0.16);
  border-radius: 999px;
  background: rgba(var(--filter-accent-rgb), 0.12);
  color: var(--filter-primary);
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

body[data-page="diamond-search"] .dnd-bulk-actions button:hover,
body[data-page="diamond-search"] .dnd-bulk-actions button:focus-visible {
  background: var(--filter-primary);
  color: #fff;
}

@media (max-width: 1280px) {
  body[data-page="diamond-search"] .dnd-insight-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="diamond-search"] .dnd-quick-rail {
    display: none;
  }
}

@media (max-width: 760px) {
  body[data-page="diamond-search"] .dnd-insight-strip {
    grid-template-columns: 1fr;
  }

  body[data-page="diamond-search"] .dnd-bulk-action-bar {
    align-items: stretch;
    border-radius: 18px;
    flex-direction: column;
  }
}

/* Final motion and compact table polish */
body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table-wrap,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form,
body[data-page="diamond-search"] .vdb-columns-options {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html:has(body[data-page="diamond-search"]),
body[data-page="diamond-search"] {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table-wrap::-webkit-scrollbar,
body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-filter-form::-webkit-scrollbar,
body[data-page="diamond-search"] .vdb-columns-options::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html:has(body[data-page="diamond-search"])::-webkit-scrollbar,
body[data-page="diamond-search"]::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table {
  width: max-content;
  min-width: 100%;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table th,
body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table thead th {
  position: sticky;
  top: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #e3e5eb 0%, #d5d8e0 100%) !important;
  color: #253149 !important;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table th[data-sort-column]:hover,
body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table th[data-sort-column]:focus-visible {
  background: linear-gradient(135deg, var(--filter-primary), var(--filter-secondary)) !important;
  color: #fff !important;
  box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.32);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table th.sorted {
  background: linear-gradient(135deg, var(--filter-primary), #006b5f) !important;
  color: #fff !important;
  box-shadow: inset 0 -3px 0 rgba(var(--filter-accent-rgb), 0.8);
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table th.sorted i,
body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table th:hover i {
  color: currentColor !important;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table tbody tr {
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(var(--filter-accent-rgb), 0.24), rgba(var(--filter-accent-rgb), 0.1)) !important;
  box-shadow: inset 3px 0 0 var(--filter-primary);
}

body[data-page="diamond-search"] .dnd-status-dot-only.on-hand,
.dnd-status-pill.on-hand > span,
.vdb-status-dot.on-hand {
  background: #10b75c;
  box-shadow: 0 0 0 3px rgba(16, 183, 92, 0.16);
}

body[data-page="diamond-search"] .dnd-status-dot-only.unknown,
.dnd-status-pill.unknown > span,
.vdb-status-dot.unknown {
  background: #f0a500;
  box-shadow: 0 0 0 3px rgba(240, 165, 0, 0.17);
}

body[data-page="diamond-search"] .dnd-status-dot-only.please-call,
.dnd-status-pill.please-call > span,
.vdb-status-dot.please-call {
  background: #df3f3f;
  box-shadow: 0 0 0 3px rgba(223, 63, 63, 0.16);
}

body[data-page="diamond-search"] .dnd-status-pill.on-hand {
  color: #067a3d;
}

body[data-page="diamond-search"] .dnd-status-pill.unknown {
  color: #9a6600;
}

body[data-page="diamond-search"] .dnd-status-pill.please-call {
  color: #b42318;
}

body[data-page="diamond-search"] .dnd-insight-strip {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 8px;
  margin: 0 0 8px;
}

body[data-page="diamond-search"] .dnd-insight-item {
  min-height: 42px;
  padding: 7px 10px;
  border-radius: 7px;
}

body[data-page="diamond-search"] .dnd-insight-item i {
  font-size: 15px;
}

body[data-page="diamond-search"] .dnd-insight-item span {
  font-size: 9px;
}

body[data-page="diamond-search"] .dnd-insight-item strong {
  font-size: 12px;
}

@keyframes dndPremiumRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes dndSoftSweep {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  body.has-page-motion.page-ready main,
  body.has-page-motion.page-ready .site-footer {
    animation: dndPremiumRise 0.58s cubic-bezier(0.2, 0.78, 0.22, 1) both;
  }

  body.has-page-motion.page-ready :where(.hero-copy, .section-header, .feature-card, .demand-card, .jewellery-card, .vdb-filter-card, .loose-option-card, .footer-grid > *, .dnd-premium-card, .dnd-market-card) {
    animation: dndPremiumRise 0.58s cubic-bezier(0.2, 0.78, 0.22, 1) both;
  }

  body.has-page-motion.page-ready :where(.feature-card, .demand-card, .jewellery-card, .vdb-filter-card, .loose-option-card, .dnd-premium-card):nth-child(2) { animation-delay: 0.04s; }
  body.has-page-motion.page-ready :where(.feature-card, .demand-card, .jewellery-card, .vdb-filter-card, .loose-option-card, .dnd-premium-card):nth-child(3) { animation-delay: 0.08s; }
  body.has-page-motion.page-ready :where(.feature-card, .demand-card, .jewellery-card, .vdb-filter-card, .loose-option-card, .dnd-premium-card):nth-child(4) { animation-delay: 0.12s; }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .vdb-results-toolbar,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-insight-item,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-row,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-load-more {
    animation: dndPremiumRise 0.42s cubic-bezier(0.2, 0.78, 0.22, 1) both;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-row:nth-child(2n) { animation-delay: 0.018s; }
  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-row:nth-child(3n) { animation-delay: 0.034s; }
  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-row:nth-child(4n) { animation-delay: 0.05s; }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-insight-item {
    position: relative;
    overflow: hidden;
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-insight-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.62) 48%, transparent 65%);
    background-size: 220% 100%;
    opacity: 0.55;
    pointer-events: none;
    animation: dndSoftSweep 3.8s ease-in-out infinite;
  }

  body[data-page="diamond-search"] :where(button, .choice-chip, .preset-chip, .shape-chip, .vdb-toolbar-link, .dnd-column-option) {
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  }

  body[data-page="diamond-search"] :where(button, .choice-chip, .preset-chip, .shape-chip, .vdb-toolbar-link):hover {
    transform: translateY(-1px);
  }
}

@media (max-width: 980px) {
  body[data-page="diamond-search"] .dnd-insight-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table th,
  body[data-page="diamond-search"] .diamond-search-main.results-mode .dnd-result-table td {
    padding-inline: 7px;
    font-size: 11px;
  }
}


