/* Страница картины (по шаблону preview.html) */
.detail-page { padding: 7.2rem 3.5rem 4rem; min-height: calc(100vh - 120px); }
.breadcrumb { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--muted); text-decoration: none; font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase; margin-bottom: 2.2rem; transition: color 0.2s; }
.breadcrumb:hover { color: var(--ink); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.art-view { position: sticky; top: 6rem; }
.art-frame { background: var(--surface); border: 1px solid var(--border); padding: clamp(1rem, 2.2vw, 2rem); display: flex; align-items: center; justify-content: center; min-height: 68vh; }
.art-image { width: min(100%, 620px); min-height: 560px; box-shadow: 0 28px 70px rgba(26,23,20,0.16); position: relative; overflow: hidden; }
.art-image::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 35% 25%, rgba(255,255,255,0.16), transparent 28%), linear-gradient(160deg, transparent 40%, rgba(255,255,255,0.1)); pointer-events: none; }
.p1 { background: linear-gradient(135deg, #3d4a2a, #1e2d14, #4a5c30); }
.p2 { background: linear-gradient(135deg, #4a3520, #2a1e0e, #5c4025); }
.p3 { background: linear-gradient(135deg, #1e2a3d, #0e1820, #253548); }
.p4 { background: linear-gradient(135deg, #3d2a1e, #1e140e, #4d3525); }
.p5 { background: linear-gradient(135deg, #2a3d1e, #1a2a14, #3a501e); }
.p6 { background: linear-gradient(135deg, #3d3520, #201c0e, #4d4525); }
.p7 { background: linear-gradient(135deg, #2a1e3d, #18102e, #362a4d); }
.p8 { background: linear-gradient(135deg, #3d2020, #2a1414, #4d2a2a); }
.p9 { background: linear-gradient(135deg, #1e3d35, #0e2820, #253d38); }

.detail-eyebrow { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.65rem; display: flex; align-items: center; gap: 0.8rem; }
.detail-eyebrow::before { content: ''; width: 2rem; height: 1px; background: var(--accent); }
.detail-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(2.6rem, 5vw, 5.2rem); font-weight: 300; line-height: 0.98; margin-bottom: 1rem; }
.detail-meta { font-size: 0.86rem; color: var(--muted); letter-spacing: 0.07em; margin-bottom: 2rem; }
.price-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.35rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.price { font-family: 'Cormorant Garamond', serif; font-size: 2.2rem; color: var(--accent); }
.status { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.25rem 0.7rem; background: var(--surface); color: var(--muted); }
.status.sold { background: var(--ink); color: #fff; }
.description { color: var(--muted); line-height: 1.8; font-size: 1rem; margin-bottom: 2rem; max-width: 58ch; }
.details-table { border-top: 1px solid var(--border); margin-bottom: 2.2rem; }
.details-row { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--border); }
.details-label { font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--light); }
.details-value { color: var(--ink); font-size: 0.9rem; }
.actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 2rem; }
.btn { border: 1px solid var(--ink); background: var(--ink); color: #fff; padding: 0.85rem 1.45rem; font-family: 'Jost', sans-serif; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; transition: all 0.25s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn:disabled { opacity: 0.4; cursor: default; background: var(--light); border-color: var(--light); }
.note { font-size: 0.78rem; color: var(--light); line-height: 1.7; }

.more-section { padding: 1rem 3.5rem 4rem; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; }
.section-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 300; }
.section-link { font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.mini-card { cursor: pointer; text-decoration: none; color: inherit; }
.mini-img { height: 600px; margin-bottom: 0.8rem; overflow: hidden; }
.mini-title { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; }
.mini-meta { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.05em; margin-top: 0.15rem; }

@media (max-width: 900px) {
  .detail-page, .more-section { padding-left: 1.2rem; padding-right: 1.2rem; }
  .detail-layout { grid-template-columns: 1fr; }
  .art-view { position: static; }
  .art-frame { min-height: 0; }
  .art-image { min-height: 420px; }
  .more-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .detail-page { padding-top: 6.2rem; }
  .art-image { min-height: 340px; }
  .details-row { grid-template-columns: 1fr; gap: 0.2rem; }
  .actions { flex-direction: column; }
  .btn { width: 100%; }
  .more-grid { grid-template-columns: 1fr; }
}

/* Фото картины и переключатель дополнительных фото */
.art-photo { width: auto; max-width: 100%; min-height: 0; height: auto; max-height: 78vh; }
.art-photo::after { display: none; }
.art-thumbs { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.8rem; }
.art-thumb { width: 72px; height: 72px; padding: 0; border: 1px solid var(--border); background: var(--surface); cursor: pointer; opacity: 0.6; transition: opacity 0.2s, border-color 0.2s; }
.art-thumb img { width: 100%; height: 100%; object-fit: cover; }
.art-thumb:hover, .art-thumb.active { opacity: 1; border-color: var(--ink); }
img.mini-img { width: 100%; object-fit: cover; }
.status.reserved { background: var(--accent); color: #fff; }

/* Лупа на фото картины */
.art-zoom { position: relative; display: inline-block; max-width: 100%; line-height: 0; }
.art-zoom.zoom-enabled { cursor: zoom-in; }
.art-lens { position: absolute; width: 220px; height: 220px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.9); box-shadow: 0 10px 40px rgba(26,23,20,0.35), inset 0 0 0 1px rgba(26,23,20,0.15); background-repeat: no-repeat; background-color: var(--surface); pointer-events: none; opacity: 0; transform: scale(0.85); transition: opacity 0.15s ease, transform 0.15s ease; z-index: 5; }
.art-lens.show { opacity: 1; transform: scale(1); }
.art-zoom.zoom-enabled:has(.art-lens.show) { cursor: none; }

/* «Другие работы» на планшете и телефоне: фото целиком, без обрезки по высоте 600px */
@media (max-width: 900px) {
  img.mini-img { height: auto; object-fit: contain; }
  div.mini-img { height: 320px; }
}

/* Кнопка «на весь экран» на фото и полноэкранный просмотр */
.art-zoom { cursor: zoom-in; }
.art-expand { position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255,255,255,0.85); color: var(--ink); cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.15); line-height: 0; }
.art-expand:hover { background: #fff; }

html.viewer-open, html.viewer-open body { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 1000; background: #0c0b0a; }
.viewer[hidden] { display: none; }
.viewer-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; cursor: zoom-in; }
.viewer.zoomed .viewer-stage { cursor: grab; }
.viewer.zoomed .viewer-stage:active { cursor: grabbing; }
.viewer-img { max-width: 94vw; max-height: 90vh; max-height: 90dvh; object-fit: contain; transform-origin: center center; user-select: none; -webkit-user-drag: none; will-change: transform; }
.viewer-close { position: absolute; top: 12px; right: 14px; width: 44px; height: 44px; border: 0; background: transparent; color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; opacity: 0.8; }
.viewer-close:hover { opacity: 1; }
.viewer-close:focus:not(:focus-visible) { outline: none; }
.viewer-hint { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: rgba(255,255,255,0.55); font-size: 0.72rem; letter-spacing: 0.05em; pointer-events: none; transition: opacity .3s; padding: 0 1rem; }
.viewer.zoomed .viewer-hint { opacity: 0; }
