:root {
  --ink: #272727;
  --ink-soft: #4d4a47;
  --walnut: #92745b;
  --walnut-dark: #6d5440;
  --sand: #f3eee8;
  --paper: #fbfaf8;
  --white: #ffffff;
  --line: #ded8d1;
  --focus: #ff8562;
  --radius: 5px;
  --shadow: 0 18px 50px rgba(39, 39, 39, 0.1);
}

.catalog-app * { box-sizing: border-box; }

html { scroll-behavior: smooth; }

.catalog-app {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: TildaSans, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.catalog-app a { color: inherit; }

.catalog-app img { display: block; max-width: 100%; }

.catalog-app :focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.catalog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: end;
  gap: 56px;
  min-height: 410px;
  padding: 80px clamp(24px, 8vw, 128px) 74px;
  color: var(--white);
  background:
    linear-gradient(115deg, rgba(39,39,39,.98) 0 48%, rgba(39,39,39,.78) 70%, rgba(39,39,39,.92) 100%),
    repeating-linear-gradient(90deg, transparent 0 83px, rgba(255,255,255,.08) 84px 85px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--walnut);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.catalog-hero .eyebrow, .detail-header .eyebrow { color: #c5aa91; }

.catalog-hero h1, .detail-header h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(42px, 7vw, 88px);
  line-height: .98;
  letter-spacing: -.055em;
}

.hero-copy { max-width: 650px; margin: 28px 0 0; color: rgba(255,255,255,.74); font-size: clamp(16px, 1.7vw, 20px); }

.sync-note {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 24px 0 3px;
  border-top: 1px solid rgba(255,255,255,.28);
}

.sync-dot { width: 9px; height: 9px; margin-top: 8px; background: #c5aa91; border-radius: 50%; box-shadow: 0 0 0 5px rgba(197,170,145,.13); }
.sync-note strong, .sync-note span { display: block; }
.sync-note strong { font-size: 24px; }
.sync-note div span { color: rgba(255,255,255,.58); font-size: 12px; }

.catalog-shell { padding: 80px clamp(24px, 8vw, 128px) 112px; }
.catalog-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 38px; }
.catalog-toolbar h2, .detail-main h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.05; letter-spacing: -.045em; }

.search-field { display: grid; gap: 6px; width: min(100%, 340px); color: #716c67; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.search-field input { width: 100%; min-height: 48px; padding: 0 16px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.catalog-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.search-field select { min-height: 48px; padding: 0 36px 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.filter-submit { min-height: 48px; padding: 0 22px; border: 0; border-radius: var(--radius); color: white; background: var(--ink); font-weight: 700; cursor: pointer; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 30px; }

.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.asset-card { min-width: 0; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); transition: box-shadow .25s ease, border-color .25s ease; }
.asset-card:hover { border-color: #c5bcb3; box-shadow: var(--shadow); }
.asset-card[hidden] { display: none; }
.asset-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #d4cec7; }
.asset-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.asset-card:hover .asset-media img { transform: scale(1.025); }
.asset-source { position: absolute; top: 14px; right: 14px; padding: 7px 9px; color: var(--white); background: rgba(39,39,39,.88); border-radius: 3px; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.media-placeholder { position: absolute; inset: 0; display: flex; align-items: end; justify-content: center; gap: 8px; padding-bottom: 28%; background: linear-gradient(145deg, #b8aea5, #d9d3cd 55%, #a89b90); }
.media-placeholder i { width: 12%; height: 35%; background: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.55); }
.media-placeholder i:nth-child(2) { height: 52%; }
.media-placeholder i:nth-child(3) { height: 42%; }
.asset-body { padding: 24px; }
.asset-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #756f69; font-size: 12px; }
.asset-meta span + span { position: relative; }
.asset-meta span + span::before { content: ""; position: absolute; left: -10px; top: 50%; width: 3px; height: 3px; background: var(--walnut); border-radius: 50%; }
.asset-card h3 { margin: 14px 0 10px; font-size: 21px; line-height: 1.2; letter-spacing: -.025em; }
.asset-card h3 a { text-decoration: none; }
.asset-body > p { min-height: 48px; margin: 0; color: #6c6762; font-size: 14px; }
.asset-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.asset-footer strong { font-size: 18px; }
.card-link { color: var(--walnut-dark); font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.filter-empty, .catalog-empty { padding: 60px 24px; text-align: center; background: var(--sand); border-radius: var(--radius); }
.catalog-empty { max-width: 720px; margin: 0 auto; }
.catalog-empty h3 { margin: 18px 0 8px; font-size: 28px; }
.catalog-empty p { max-width: 540px; margin: 0 auto; color: #6c6762; }
.empty-mark { display: inline-block; width: 44px; height: 44px; border: 1px solid var(--walnut); border-radius: 50%; box-shadow: inset 0 0 0 9px var(--sand), inset 0 0 0 10px var(--walnut); }

.detail-page { min-height: 70vh; background: var(--paper); }
.back-link { display: inline-flex; gap: 8px; margin: 34px clamp(24px, 8vw, 128px); color: #645f5a; font-size: 13px; font-weight: 700; text-decoration: none; }
.detail-header { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: end; gap: 60px; padding: 72px clamp(24px, 8vw, 128px); color: var(--white); background: var(--ink); }
.detail-header h1 { font-size: clamp(38px, 5.8vw, 74px); }
.detail-lead { max-width: 700px; margin: 24px 0 0; color: rgba(255,255,255,.68); font-size: 18px; }
.detail-price { padding-top: 20px; border-top: 1px solid rgba(255,255,255,.25); }
.detail-price span, .detail-price strong { display: block; }
.detail-price span { margin-bottom: 8px; color: rgba(255,255,255,.55); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.detail-price strong { font-size: 28px; }
.detail-gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; padding: 8px; background: var(--ink); }
.detail-gallery-item { position: relative; display: block; min-width: 0; height: 260px; padding: 0; overflow: hidden; border: 0; background: #171717; cursor: zoom-in; }
.detail-gallery-item:first-child { height: 528px; grid-row: span 2; }
.detail-gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease, opacity .25s ease; }
.detail-gallery-item:hover img { transform: scale(1.035); opacity: .78; }
.detail-gallery-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; color: #fff; background: rgba(20,20,20,.34); pointer-events: none; transition: background .25s ease; }
.detail-gallery-more-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 18px; background: rgba(20,20,20,.9); border: 1px solid rgba(255,255,255,.65); border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.22); font-size: 14px; font-weight: 700; line-height: 1.2; white-space: nowrap; transition: color .25s ease, background .25s ease, transform .25s ease; }
.detail-gallery-more-icon { display: block; width: 19px; height: 19px; flex: 0 0 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.detail-gallery-item:hover .detail-gallery-more { background: rgba(20,20,20,.5); }
.detail-gallery-item:hover .detail-gallery-more-button { color: #272727; background: #fff; transform: translateY(-2px) scale(1.03); }
.gallery-lightbox { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; overflow: hidden; color: #fff; background: rgba(18,18,18,.97); border: 0; }
.gallery-lightbox[open] { display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; align-items: center; }
.gallery-lightbox::backdrop { background: rgba(0,0,0,.72); }
.gallery-lightbox figure { display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 14px; width: 100%; height: 100vh; margin: 0; padding: 32px 0 20px; box-sizing: border-box; }
.gallery-lightbox figure img { display: block; align-self: center; max-width: 100%; max-height: calc(100vh - 90px); width: auto; height: auto; object-fit: contain; }
.gallery-lightbox figcaption { color: rgba(255,255,255,.72); font-size: 13px; }
.gallery-lightbox-close, .gallery-lightbox-nav { display: grid; place-items: center; padding: 0; color: #fff; background: rgba(255,255,255,.12); border: 0; border-radius: 50%; cursor: pointer; }
.gallery-lightbox-close { position: fixed; top: 20px; right: 20px; z-index: 2; width: 44px; height: 44px; font-size: 30px; }
.gallery-lightbox-nav { width: 48px; height: 48px; margin: auto; font-size: 38px; line-height: 1; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(44px, 8vw, 120px); padding: 88px clamp(24px, 8vw, 128px) 120px; }
.detail-main { display: grid; gap: 72px; }
.detail-main section > p:last-child { max-width: 780px; color: #5f5a55; font-size: 17px; line-height: 1.75; }
.characteristics { margin: 28px 0 0; border-top: 1px solid var(--line); }
.characteristics div { display: grid; grid-template-columns: minmax(140px, 1fr) 1fr; gap: 24px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.characteristics dt { color: #746e68; }
.characteristics dd { margin: 0; font-weight: 700; }
.document-list { display: grid; gap: 10px; margin-top: 26px; }
.document-list a { display: flex; justify-content: space-between; gap: 20px; padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 700; text-decoration: none; }
.document-list a:hover { border-color: var(--walnut); }
.detail-aside { align-self: start; padding: 28px; background: var(--sand); border-radius: var(--radius); }
.detail-aside dl { margin: 0 0 26px; }
.detail-aside dl div { padding: 13px 0; border-bottom: 1px solid #d7cfc7; }
.detail-aside dt { color: #766f68; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.detail-aside dd { margin: 5px 0 0; font-weight: 700; }
.catalog-app .primary-action { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 24px; color: var(--white); background: var(--walnut); border: 1px solid var(--walnut); border-radius: 999px; box-sizing: border-box; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; transition: background-color .2s ease, border-color .2s ease; }
.catalog-app .primary-action:hover { color: var(--white); background: var(--walnut-dark); border-color: var(--walnut-dark); }
.detail-aside .primary-action { width: 100%; }
.source-link { display: block; margin-top: 17px; color: #625c57; font-size: 12px; font-weight: 700; text-align: center; }

.request-dialog { width: min(92vw, 560px); padding: 0; color: var(--ink); background: var(--paper); border: 0; border-radius: 12px; box-shadow: 0 24px 80px rgba(0,0,0,.28); }
.request-dialog::backdrop { background: rgba(23,23,23,.72); }
.request-dialog-close { position: absolute; top: 14px; right: 16px; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: var(--sand); color: var(--ink); font-size: 27px; line-height: 1; cursor: pointer; }
.request-dialog-copy { padding: 42px 42px 18px; }
.request-dialog-copy h2 { margin: 0; font-size: 36px; line-height: 1.05; letter-spacing: -.04em; }
.request-dialog-copy > p:last-child { margin: 14px 0 0; color: #6c6762; }
.request-form { padding: 8px 42px 42px; }
.request-field { display: grid; gap: 6px; margin-top: 14px; color: #716c67; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.request-field input, .request-field textarea { width: 100%; min-height: 50px; padding: 0 15px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; box-sizing: border-box; }
.request-field textarea { min-height: 88px; padding-top: 14px; resize: vertical; }
.request-contact-method { min-width: 0; margin: 22px 0 0; padding: 0; border: 0; }
.request-contact-method legend { margin-bottom: 10px; color: #716c67; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.request-contact-options { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.request-contact-options label { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: 4px; color: #4d4945; font-size: 14px; cursor: pointer; }
.request-contact-options label:has(input:checked) { border-color: #8a8580; color: var(--ink); }
.request-contact-options input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.request-contact-icon { display: block; width: 18px; height: 18px; flex: 0 0 18px; object-fit: contain; }
.request-submit { width: 100%; min-height: 50px; margin-top: 20px; color: var(--white); background: var(--ink); border: 0; border-radius: 999px; font-weight: 700; cursor: pointer; }
.request-success { padding: 22px; color: #245d3a; background: #e8f4ec; border-radius: var(--radius); font-weight: 700; text-align: center; }
.request-success[hidden] { display: none !important; }
.request-success:not([hidden]) { display: block !important; margin: 8px 42px 42px; }
.request-error { margin-top: 12px; color: #9b3327; font-size: 13px; }


.admin-page { min-height: 75vh; padding: 70px clamp(20px, 6vw, 96px) 110px; }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 64px; }
.admin-heading h1 { margin: 0; font-size: clamp(38px, 6vw, 72px); line-height: 1; letter-spacing: -.055em; }
.admin-heading p:last-child { max-width: 680px; color: #67615c; }
.admin-heading button { cursor: pointer; }
.admin-section { margin-top: 52px; }
.admin-section-title { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.admin-section-title h2 { margin: 0; font-size: 26px; }
.admin-section-title > span { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; color: #fff; background: var(--walnut); border-radius: 999px; font-size: 12px; font-weight: 800; }
.admin-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.admin-table th { color: #6c6661; background: var(--sand); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table td:nth-child(2) { min-width: 300px; font-weight: 700; }
.admin-table form { display: flex; gap: 8px; }
.admin-table select, .admin-table button { min-height: 36px; padding: 0 10px; border: 1px solid #cfc7c0; border-radius: 4px; background: #fff; font: inherit; }
.admin-table button { color: #fff; background: var(--ink); border-color: var(--ink); cursor: pointer; }
.sync-history { display: grid; gap: 8px; }
.sync-history article { display: grid; grid-template-columns: 170px 120px 1fr; gap: 18px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; }
.status-ok { color: #2f7047; font-weight: 800; }
.status-error { color: #9b3327; font-weight: 800; }

@media (max-width: 980px) {
  .catalog-hero { grid-template-columns: 1fr; min-height: 0; }
  .sync-note { max-width: 280px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-header, .detail-layout { grid-template-columns: 1fr; }
  .detail-price { max-width: 320px; }
  .detail-aside { width: min(100%, 480px); }
}

@media (max-width: 640px) {
  .catalog-hero { gap: 42px; padding: 60px 22px 52px; }
  .catalog-hero h1 { font-size: 48px; }
  .catalog-shell { padding: 56px 18px 80px; }
  .catalog-toolbar { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .catalog-grid { grid-template-columns: 1fr; }
  .asset-body { padding: 20px; }
  .detail-header { padding: 56px 22px; }
  .detail-header h1 { font-size: 42px; }
  .detail-gallery { grid-template-columns: 1fr 1fr; }
  .detail-gallery-item, .detail-gallery-item:first-child { height: 220px; grid-row: auto; }
  .detail-gallery-item:first-child { grid-column: 1 / -1; height: 300px; }
  .detail-gallery-more { padding: 10px; background: rgba(20,20,20,.42); }
  .detail-gallery-more-button { gap: 7px; max-width: 100%; padding: 10px 13px; font-size: 12px; white-space: normal; }
  .detail-gallery-more-icon { width: 17px; height: 17px; flex-basis: 17px; }
  .gallery-lightbox[open] { grid-template-columns: 46px minmax(0, 1fr) 46px; }
  .gallery-lightbox figure { padding: 70px 0 18px; }
  .gallery-lightbox figure img { max-height: calc(100vh - 120px); }
  .gallery-lightbox-nav { width: 38px; height: 38px; font-size: 30px; }
  .gallery-lightbox-close { top: 14px; right: 14px; }
  .detail-layout { padding: 64px 20px 86px; }
  .characteristics div { grid-template-columns: 1fr; gap: 5px; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .sync-history article { grid-template-columns: 1fr; gap: 4px; }
}

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