/* LA GEM — public catalog (dark). Brand tokens from lagem-web, inverted.
   Ground #1d1c19, warm off-white text, gold #c9b07d / #ad9159 accents. */

:root {
  --ground:   #1d1c19;
  --ground-2: #232019;
  --panel:    #26241f;
  --text:     #ece7dc;
  --text-soft:#a49d8e;
  --gold:     #c9b07d;
  --gold-dark:#ad9159;
  --hairline: rgba(201, 176, 125, 0.22);
  --hairline-soft: rgba(201, 176, 125, 0.12);
  --serif: 'Frank Ruhl Libre', Georgia, 'Times New Roman', serif;
  --sans:  'Noto Sans', system-ui, -apple-system, sans-serif;
  --container: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

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

::selection { background: var(--gold-dark); color: #1a1813; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ---------------------------- header ---------------------------- */

.cat-head {
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(180deg, #201e19, var(--ground));
}
.cat-head-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 30px 24px 26px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.cat-brand { display: flex; flex-direction: column; gap: 10px; }
.cat-logo {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 34px;
  letter-spacing: .16em;
  color: var(--gold);
  line-height: 1;
}
.cat-tagline {
  margin: 0;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-soft);
  max-width: 36ch;
}
.cat-contact {
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--text-soft);
  padding-top: 6px;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.cat-contact:hover { color: var(--gold); border-color: var(--hairline); }

/* ---------------------------- filters ---------------------------- */

.cat-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 34px 24px 60px;
}
.cat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}
.cat-tab {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: transparent;
  border: 1px solid var(--hairline-soft);
  padding: 8px 16px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.cat-tab:hover { color: var(--text); border-color: var(--hairline); }
.cat-tab.is-active {
  color: #1a1813;
  background: var(--gold);
  border-color: var(--gold);
}

/* ---------------------------- grid ---------------------------- */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 56px 44px;
}
.cat-card[hidden] { display: none; }

.cat-card-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.cat-photo {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ground-2);
  aspect-ratio: 4 / 5;
  border: 1px solid var(--hairline-soft);
}
.cat-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s ease, opacity .6s ease;
}
.cat-photo-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.cat-card-btn:hover .cat-photo-main { transform: scale(1.04); }
.cat-card-btn:hover .cat-photo.has-hover .cat-photo-main { opacity: 0; }
.cat-card-btn:hover .cat-photo.has-hover .cat-photo-hover { opacity: 1; transform: scale(1.04); }

/* Placeholder cards (gems catalog, before a photo is added): the SVG carries its
   own ground, so show it whole and skip the hover zoom. */
.cat-photo.is-placeholder img { object-fit: contain; }
.cat-card-btn:hover .cat-photo.is-placeholder .cat-photo-main { transform: none; }

.cat-card-body { padding: 18px 2px 0; }
.cat-card-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.3;
  margin: 0 0 14px;
  color: var(--text);
}

/* spec block — lowercase label column + value */
.cat-specs { margin: 0; }
.cat-spec {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 3px 0;
  font-size: 13.5px;
}
.cat-spec dt {
  color: var(--text-soft);
  text-transform: lowercase;
  letter-spacing: .04em;
}
.cat-spec dd { margin: 0; color: var(--text); }
.cat-spec--price { margin-top: 6px; }
.cat-spec--price dt { color: var(--gold-dark); }
.cat-spec--price dd {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 16px;
}

.cat-empty {
  text-align: center;
  color: var(--text-soft);
  padding: 60px 0;
  font-size: 15px;
}

/* ---------------------------- footer ---------------------------- */

.cat-foot {
  border-top: 1px solid var(--hairline);
  margin-top: 20px;
}
.cat-foot-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--text-soft);
}
.cat-foot-inner a:hover { color: var(--gold); }

/* ---------------------------- lightbox ---------------------------- */

body.cat-lb-open { overflow: hidden; }

.cat-lb {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 11, 9, 0.94);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-lb[hidden] { display: none; }

.cat-lb-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 56px 72px;
}
.cat-lb-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 62%;
  min-width: 0;
}
.cat-lb-img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border: 1px solid var(--hairline-soft);
  background: var(--ground-2);
}
.cat-lb-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.cat-lb-thumb {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid var(--hairline-soft);
  background: none;
  cursor: pointer;
  opacity: .55;
  transition: opacity .2s, border-color .2s;
}
.cat-lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-lb-thumb:hover { opacity: .85; }
.cat-lb-thumb.is-active { opacity: 1; border-color: var(--gold); }

.cat-lb-side {
  width: 300px;
  flex-shrink: 0;
}
.cat-lb-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.25;
  margin: 0 0 22px;
  color: var(--text);
}
.cat-specs--lb .cat-spec { font-size: 14.5px; padding: 5px 0; }
.cat-specs--lb .cat-spec--price dd { font-size: 18px; }

.cat-enquire {
  display: inline-block;
  margin-top: 30px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #1a1813;
  background: var(--gold);
  padding: 13px 30px;
  transition: background .2s;
}
.cat-enquire:hover { background: var(--gold-dark); }

.cat-lb-close, .cat-lb-nav {
  position: absolute;
  background: none;
  border: 0;
  color: var(--text-soft);
  cursor: pointer;
  transition: color .2s;
  z-index: 2;
}
.cat-lb-close:hover, .cat-lb-nav:hover { color: var(--gold); }
.cat-lb-close { top: 20px; right: 26px; font-size: 26px; line-height: 1; }
.cat-lb-nav { top: 50%; transform: translateY(-50%); font-size: 52px; line-height: 1; padding: 0 18px; }
.cat-lb-prev { left: 8px; }
.cat-lb-next { right: 8px; }

/* ---------------------------- responsive ---------------------------- */

@media (max-width: 860px) {
  .cat-lb-stage { flex-direction: column; gap: 20px; padding: 64px 20px 28px; overflow-y: auto; justify-content: flex-start; }
  .cat-lb-frame { max-width: 100%; }
  .cat-lb-img { max-height: 54vh; }
  .cat-lb-side { width: 100%; max-width: 420px; }
  .cat-lb-title { font-size: 22px; margin-bottom: 14px; }
  .cat-enquire { margin-top: 20px; }
  .cat-lb-nav { font-size: 40px; }
}

@media (max-width: 640px) {
  .cat-head-inner { flex-direction: column; gap: 14px; padding: 22px 20px; }
  .cat-logo { font-size: 28px; }
  .cat-main { padding: 26px 20px 48px; }
  .cat-grid { grid-template-columns: 1fr; gap: 44px; }
  .cat-filters { margin-bottom: 30px; }
}
