/* =========================================
   СТРАНИЦА РАБОТЫ
   Единый стиль проекта (CSS-переменные)
   ========================================= */

/* --- КОНТЕЙНЕР --- */
.container { max-width: 900px; margin: auto; padding: 20px 15px 120px; color: var(--text); }

/* --- ХЛЕБНЫЕ КРОШКИ --- */
.breadcrumb-nav {
    padding: 15px 0;
    font-family: 'PT Sans Narrow'; font-size: 0.7rem;
    text-transform: uppercase; letter-spacing: 1px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.breadcrumb-nav a {
    color: var(--text-muted); text-decoration: none;
    border-bottom: 1px solid transparent; transition: 0.2s;
}
.breadcrumb-nav a:hover { color: var(--text); border-bottom-color: var(--accent); }

/* --- ПРОСМОТР КАРТИНЫ --- */
.art-viewer {
    background: var(--glass-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(15px);
    box-shadow: var(--shadow-lg);
}

/* Двухколоночная раскладка на десктопе: слева картина+миниатюры, справа детали (sticky) */
@media (min-width: 900px) {
    .art-viewer {
        display: grid;
        grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
        grid-template-rows: auto auto;
        align-items: start;
    }
    .main-img-container { grid-column: 1; grid-row: 1; border-bottom: none; }
    .art-thumbs { grid-column: 1; grid-row: 2; }
    .details-panel {
        grid-column: 2; grid-row: 1 / span 2;
        align-self: stretch;
        position: sticky; top: 16px;
        display: flex; flex-direction: column;
        height: max-content;
        border-left: 1px solid var(--border);
        max-height: calc(100vh - 32px);
        overflow-y: auto;
    }
    .main-img { max-height: calc(100vh - 60px); }
}

/* Главное изображение */
.main-img-container {
    width: 100%; background: var(--dark);
    display: flex; align-items: center; justify-content: center;
    position: relative; border-bottom: 1px solid var(--border);
}
.main-img { width: 100%; max-height: 80vh; object-fit: contain; display: block; }

.dl-btn {
    position: absolute; top: 15px; right: 15px;
    background: var(--glass-bg); color: var(--text);
    border: 1px solid var(--border);
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; backdrop-filter: blur(8px); transition: 0.2s;
}
.dl-btn:hover { background: var(--surface-hover); border-color: var(--text); }

/* --- МИНИАТЮРЫ ГАЛЕРЕИ --- */
.art-thumbs {
    display: flex; gap: 8px; padding: 10px 15px;
    background: var(--surface);
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.art-thumb-item {
    flex-shrink: 0; width: 60px; height: 60px;
    border-radius: var(--radius-sm); overflow: hidden;
    cursor: pointer; border: 2px solid transparent;
    opacity: 0.5; transition: 0.2s;
}
.art-thumb-item:hover { opacity: 0.8; }
.art-thumb-item.active { border-color: var(--accent); opacity: 1; }
.art-thumb-item img { width: 100%; height: 100%; object-fit: cover; }

/* --- ИНФО-ПАНЕЛЬ --- */
.details-panel { padding: 30px; }

.author-link {
    display: inline-block;
    font-family: 'PT Sans Narrow'; font-size: 0.85rem;
    color: var(--accent); text-decoration: none;
    text-transform: uppercase; font-weight: bold;
    border-bottom: 2px solid var(--accent); margin-bottom: 15px;
    transition: 0.2s;
}
.author-link:hover { color: var(--accent-hover); }

.artwork-title {
    font-family: 'PT Sans'; font-size: 1.1rem; font-weight: 900;
    line-height: 1.1; margin-bottom: 15px;
    text-transform: uppercase; color: var(--text);
}

.artwork-dims {
    font-family: 'PT Sans Narrow'; color: var(--text-muted);
    font-size: 0.8rem; margin-top: 0; margin-bottom: 20px;
    text-transform: uppercase;
}
/* Теги на странице работы — компактная строка, без наезда на следующий блок */
.details-panel .tag-chips { margin: 4px 0 10px; }

/* Кнопка локации */
.city-point-link {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); padding: 8px 14px;
    border-radius: var(--radius-sm); text-decoration: none;
    font-family: 'PT Sans Narrow'; font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 20px; transition: 0.2s;
}
.city-point-link:hover { background: var(--surface-hover); border-color: var(--accent); }

/* --- ЦЕНА / СТАТУС --- */
.meta-grid {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: 20px 0; margin-bottom: 25px;
}
.price-box {
    font-family: 'PT Sans'; font-size: 1.8rem; font-weight: 900;
    color: var(--text);
}
.status-stamp {
    font-family: 'PT Sans Narrow'; font-size: 0.7rem; font-weight: bold;
    padding: 6px 15px; border: 2px solid var(--text);
    text-transform: uppercase; border-radius: var(--radius-sm);
}
.status-available { color: var(--green); border-color: var(--green); }
.status-sold { color: var(--accent); border-color: var(--accent); transform: rotate(-3deg); }
.status-expo { color: var(--text-muted); border-color: var(--text-muted); width: 100%; text-align: center; }

/* --- ОПИСАНИЕ --- */
.art-desc {
    font-family: 'PT Serif'; font-size: 1.1rem; line-height: 1.6;
    color: var(--text-muted); margin-bottom: 30px; white-space: pre-wrap;
}

/* --- КНОПКИ ДЕЙСТВИЯ --- */
/* На десктопе прижимаем блок действий к низу правой колонки через margin-top:auto */
.action-area { display: flex; flex-direction: column; gap: 14px; margin-top: auto; padding-top: 20px; }

.action-row {
    display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding-bottom: 14px;
    border-bottom: 1px dashed var(--border-light);
}

/* Компактные кнопки */
.secondary-actions {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%;
}
.btn-buy-compact, .btn-viz-compact {
    padding: 14px 5px;
    font-family: 'PT Sans Narrow'; font-weight: bold; font-size: 0.8rem;
    text-align: center; text-decoration: none;
    border-radius: var(--radius-sm); text-transform: uppercase;
    transition: 0.2s; display: flex; align-items: center; justify-content: center;
}
.btn-buy-compact {
    background: var(--dark); color: var(--text);
    border: 1px solid var(--border);
}
.btn-buy-compact:hover {
    background: var(--accent); color: #fff; border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}
.btn-buy-compact.status-expo { opacity: 0.5; cursor: default; pointer-events: none; }
.btn-viz-compact {
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border);
}
.btn-viz-compact:hover {
    background: var(--surface-hover); border-color: var(--text);
}

/* Кнопки «Поделиться» */
.btn-share-big {
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); text-decoration: none;
    font-family: 'PT Sans'; font-weight: 900; font-size: 0.9rem;
    color: #fff; transition: 0.3s; border: none;
}
.btn-vk { background: #0077ff; }
.btn-tg { background: #229ED9; }
.btn-share-big:hover { transform: scale(1.05); filter: brightness(1.15); }

/* Лайк */
.like-btn {
    background: var(--glass-bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex; flex-direction: row; align-items: center; justify-content: center;
    gap: 6px; padding: 6px 12px; cursor: pointer;
    color: var(--text); transition: 0.2s; flex-shrink: 0;
    font-family: 'PT Sans Narrow';
}
.like-btn:hover { border-color: var(--accent); }
.like-btn.active {
    background: var(--accent); border-color: var(--accent); color: #fff; cursor: default;
}
.like-btn .like-count { font-family: 'PT Sans'; font-weight: 900; }
.like-btn .like-label { font-size: 0.6rem; text-transform: uppercase; }

/* Аудио-чтец */
.btn-audio {
    display: flex; align-items: center; gap: 6px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border);
    padding: 0 12px; height: 50px;
    font-family: 'PT Sans Narrow'; font-weight: bold;
    font-size: 0.7rem; text-transform: uppercase;
    border-radius: var(--radius-sm); cursor: pointer;
    white-space: nowrap; transition: 0.2s;
}
.btn-audio:hover { background: var(--surface-hover); border-color: var(--text); }
.btn-audio.playing { background: var(--accent); color: #fff; border-color: var(--accent); }

/* --- МОДАЛКА (доп. стили для ts-notify) --- */
.ts-notify-subtitle {
    color: var(--text-muted); font-family: 'PT Sans Narrow';
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px;
}
.ts-notify-hint {
    margin-top: 12px; padding: 10px;
    background: var(--surface-hover); border-radius: var(--radius-sm);
    text-align: left;
}
.ts-notify-hint p {
    font-size: 0.65rem; color: var(--text-muted);
    font-family: 'PT Serif'; margin: 0; line-height: 1.4;
}
.vk-success-layer {
    margin-top: 8px; padding: 10px;
    background: #4caf50; color: #fff; border-radius: var(--radius-sm);
    text-align: center; font-family: 'PT Sans Narrow'; font-size: 0.75rem;
    text-transform: uppercase; display: none;
}

/* --- АДАПТИВ --- */
@media (max-width: 600px) {
    .details-panel { padding: 20px; }
    .secondary-actions { grid-template-columns: 1fr 1fr; }
    .breadcrumb-nav .like-btn .like-label { display: none; }
    .action-row { flex-direction: row; }
    .action-row .btn-audio { padding: 0 10px; height: 50px; font-size: 0.65rem; }
    .action-row .btn-share-big { width: 50px; height: 50px; font-size: 0.8rem; }
    .meta-grid { flex-direction: column; gap: 12px; align-items: flex-start; }
}
