:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --ink: #1a1a2e;
  --muted: #6b6b7b;
  --gold: #c9a962;
  --gold-soft: #f3ead2;
  --border: #e8e2d8;
  --shadow: 0 12px 40px rgba(26, 26, 46, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
body {
  font-family: Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
}

.container { width: min(1400px, 96vw); margin: 0 auto; }

.site-header {
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #fff;
  text-decoration: none;
}
.logo { height: 42px; width: auto; }
.brand-text {
  font-size: 1.1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
nav { display: flex; gap: 1rem; flex-wrap: wrap; }
nav a { color: #d9d9e3; text-decoration: none; }
nav a.active, nav a:hover { color: var(--gold); }

.hero { padding: 2.5rem 0 1.5rem; text-align: center; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .75rem;
  color: var(--gold);
  margin: 0 0 .5rem;
}
.hero h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 0 0 .5rem; font-weight: 500; }
.hero-sub { color: var(--muted); margin: 0; }

.layout-with-filters {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding-bottom: 4rem;
  align-items: start;
}

.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 90px;
}
.filter-panel h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
}
.filter-group { margin-bottom: 1rem; }
.filter-group label {
  display: block;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: .35rem;
}
.filter-group select,
.filter-group input {
  width: 100%;
  padding: .55rem .65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: .92rem;
  background: #fff;
}
.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.btn-primary {
  width: 100%;
  padding: .75rem 1rem;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: .95rem;
  cursor: pointer;
  margin-top: .5rem;
}
.btn-primary:hover { background: #2a2a42; }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: .75rem;
}
.results-count { color: var(--muted); font-size: .92rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  width: 100%;
  max-width: 100%;
}
.diamond-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
}
.diamond-card-selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-soft);
}
.card-select {
  position: absolute;
  top: .65rem;
  left: .65rem;
  z-index: 2;
  background: rgba(255, 255, 255, .92);
  border-radius: 6px;
  padding: .25rem;
  cursor: pointer;
}
.card-select input { width: 1rem; height: 1rem; cursor: pointer; }
.diamond-card:hover { transform: translateY(-4px); box-shadow: 0 18px 50px rgba(26,26,46,.12); }
.card-link { color: inherit; text-decoration: none; display: block; }
.card-media {
  aspect-ratio: 1;
  background: linear-gradient(180deg, #fff, var(--gold-soft));
  display: grid;
  place-items: center;
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-placeholder { color: var(--muted); font-size: .85rem; }
.card-body { padding: 1rem 1.1rem 1.25rem; }
.card-ref {
  color: var(--gold);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 .35rem;
}
.card-body h3 { font-size: 1.05rem; margin: 0 0 .35rem; font-weight: 600; }
.card-specs { color: var(--muted); margin: 0 0 .75rem; font-size: .92rem; }
.card-price { display: flex; justify-content: space-between; align-items: baseline; }
.card-price span { color: var(--muted); font-size: .85rem; }
.card-price strong { color: var(--ink); font-size: 1.1rem; }
.video-badge {
  display: inline-block;
  font-size: .7rem;
  background: var(--gold-soft);
  color: var(--ink);
  padding: .15rem .45rem;
  border-radius: 4px;
  margin-left: .35rem;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}
.pagination button {
  padding: .55rem 1.1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
}
.pagination button:disabled { opacity: .5; cursor: not-allowed; }

.status-message {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.status-message.error { color: #9b2c2c; }

.back-link {
  display: inline-block;
  margin: 2rem 0 1rem;
  color: var(--gold);
  text-decoration: none;
}
.detail-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 2rem;
  padding-bottom: 4rem;
}
.detail-gallery {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.gallery-image, .gallery-video {
  width: 100%;
  border-radius: 12px;
  display: block;
  margin-bottom: 1rem;
  background: #111;
}
.gallery-placeholder {
  min-height: 320px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--gold-soft);
  border-radius: 12px;
}
.detail-info h1 { margin: .25rem 0; font-size: 2rem; font-weight: 500; }
.detail-sub { color: var(--muted); margin-top: 0; }
.price-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--gold-soft);
  border-radius: 12px;
}
.price-box span { display: block; color: var(--muted); font-size: .85rem; }
.price-box strong { font-size: 1.35rem; }
.cert-link {
  display: inline-block;
  padding: .65rem 1.1rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: .92rem;
}
.cert-link:hover { background: #2a2a42; }

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin: 1rem 0 1.25rem;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem 1.1rem;
  border: none;
  border-radius: 8px;
  background: #25d366;
  color: #fff;
  font-family: system-ui, sans-serif;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-whatsapp:hover:not(:disabled) { background: #1ebe57; }

.btn-whatsapp:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.spec-table th, .spec-table td {
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.spec-table th {
  width: 38%;
  color: var(--muted);
  font-weight: 500;
  background: #fcfaf7;
}
.inquiry-box {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.inquiry-box p { margin: 0 0 .5rem; color: var(--muted); font-size: .92rem; }
.inquiry-box a { color: var(--gold); text-decoration: none; font-weight: 600; }

.site-footer {
  background: var(--ink);
  color: #d9d9e3;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding: 2.5rem 0 1.5rem;
}
.site-footer h3, .site-footer h4 { color: #fff; margin-top: 0; }
.site-footer a { color: var(--gold); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1rem 0 1.5rem;
  font-size: .85rem;
  color: #9a9ab0;
}

.about-page { padding-bottom: 4rem; }
.about-page h1 { font-size: 2.25rem; font-weight: 500; }
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  max-width: 720px;
}

.hero-compact { padding: 1.75rem 0 1rem; }

.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}

.filters-toggle {
  padding: .45rem .85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-family: system-ui, sans-serif;
  font-size: .85rem;
  cursor: pointer;
}

.filters-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.layout-catalog {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 1.25rem;
  padding-bottom: 4rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

.layout-catalog.filters-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.results-main {
  min-width: 0;
  max-width: 100%;
}

.filter-panel-expanded {
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  position: sticky;
  top: 80px;
}

.filter-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
}

.filter-panel-head h2 { margin: 0; }

.btn-text {
  background: none;
  border: none;
  color: var(--gold);
  font-family: inherit;
  font-size: .85rem;
  cursor: pointer;
  text-decoration: underline;
}

.filter-section {
  background: #f7f6f4;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .85rem;
  margin-bottom: .75rem;
}

.filter-section h3 {
  margin: 0 0 .65rem;
  font-size: .88rem;
  font-weight: 600;
  font-family: system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
}

.filter-sub {
  margin: .5rem 0 .35rem;
  font-size: .78rem;
  color: var(--muted);
  font-family: system-ui, sans-serif;
}

.filter-section select,
.filter-section input[type="number"],
.filter-section input:not([type="checkbox"]) {
  width: 100%;
  padding: .5rem .6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: system-ui, sans-serif;
  font-size: .85rem;
  background: #fff;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: .4rem;
  align-items: center;
}

.range-arrow { color: var(--muted); font-size: .85rem; text-align: center; }

.chip-row {
  display: flex;
  flex-wrap: nowrap;
  gap: .35rem;
  overflow-x: auto;
  padding-bottom: .15rem;
}

.chip-row-wrap { flex-wrap: wrap; overflow: visible; }

.chip {
  flex-shrink: 0;
  padding: .35rem .55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-family: system-ui, sans-serif;
  font-size: .78rem;
  cursor: pointer;
  color: var(--ink);
}

.chip:hover { border-color: var(--gold); }

.chip-active {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--ink);
  font-weight: 600;
}

.check-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: system-ui, sans-serif;
  font-size: .85rem;
  margin-bottom: .4rem;
  cursor: pointer;
}

.view-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.view-toggle button {
  padding: .45rem .85rem;
  border: none;
  background: var(--surface);
  font-family: system-ui, sans-serif;
  font-size: .85rem;
  cursor: pointer;
}

.view-toggle button.active {
  background: var(--ink);
  color: #fff;
}

.list-view-wrap {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.diamond-list-table {
  width: 100%;
  border-collapse: collapse;
  font-family: system-ui, sans-serif;
  font-size: .82rem;
  min-width: 980px;
}

.diamond-list-table thead th {
  position: sticky;
  top: 0;
  background: #f3f1ed;
  padding: .65rem .5rem;
  text-align: left;
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.diamond-list-table tbody td {
  padding: .55rem .5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

.diamond-list-table tbody tr:hover { background: #fcfaf7; }

.list-row-selected { background: var(--gold-soft) !important; }

.list-select-col,
.list-select {
  width: 2rem;
  text-align: center;
  padding-left: .65rem !important;
}

.list-select input { width: 1rem; height: 1rem; cursor: pointer; }

.list-thumb img,
.list-thumb-placeholder {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  background: var(--gold-soft);
}

.list-ref {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  font-size: .78rem;
}

.list-highlight { color: #2563eb; font-weight: 600; }

.list-price { font-weight: 600; }

.list-price-total { color: var(--ink); }

.search-prompt {
  text-align: center;
  padding: 3.5rem 2rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--muted);
}

.search-prompt h2 {
  margin: 0 0 .75rem;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ink);
}

.search-prompt p {
  margin: 0;
  max-width: 480px;
  margin-inline: auto;
  line-height: 1.6;
}

.search-prompt strong { color: var(--ink); }

@media (max-width: 1100px) {
  .layout-catalog { grid-template-columns: 1fr; }
  .filter-panel-expanded {
    position: static;
    max-height: none;
  }
}

@media (max-width: 900px) {
  .layout-with-filters { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .detail-layout { grid-template-columns: 1fr; }
}
