/* ═══════════════════════════════════════
   Breadcrumb wrapper (painting-specific padding)
═══════════════════════════════════════ */
.painting-breadcrumb {
    padding: calc(var(--nav-height) + 28px) 0 0;
    margin-bottom: 48px;
}

/* ═══════════════════════════════════════
   Галерея
═══════════════════════════════════════ */
.gallery-wrap {
    position: sticky;
    top: calc(var(--nav-height) + 24px);
}

.gallery-main-wrap {
    position: relative;
    overflow: hidden;
    background: var(--surface-2);
    aspect-ratio: 4/5;
    cursor: zoom-in;
}

.gallery-main-wrap::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px; height: 40px;
    background: rgba(12,12,12,.7);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: color .2s, border-color .2s;
    pointer-events: none;
}

.gallery-main-wrap:hover::after {
    color: var(--gold);
    border-color: var(--gold);
}

.gallery-main {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: opacity .18s ease, transform .4s ease;
    display: block;
}

.gallery-main--fade { opacity: 0; }

.gallery-main-wrap:hover .gallery-main { transform: scale(1.02); }

/* Плейсхолдер (когда фото нет) */
.gallery-placeholder {
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse 60% 60% at 50% 40%, rgba(201,160,96,.1) 0%, transparent 70%),
        linear-gradient(145deg, #1e1408 0%, #3a2510 40%, #1a1208 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-placeholder-icon {
    font-size: 48px;
    color: var(--text-subtle);
}

/* Превью */
.gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 72px; height: 72px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
    flex-shrink: 0;
    transition: border-color .2s;
}

.gallery-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s, opacity .2s;
}

.gallery-thumb:hover img { transform: scale(1.08); }
.gallery-thumb:hover { border-color: var(--text-muted); }

.gallery-thumb--active {
    border-color: var(--gold) !important;
}

/* ═══════════════════════════════════════
   Lightbox
═══════════════════════════════════════ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    backdrop-filter: blur(8px);
}

.lightbox--open {
    opacity: 1;
    pointer-events: all;
}

.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform .3s ease;
    user-select: none;
}

.lightbox-img--zoomed {
    transform: scale(1.8);
    cursor: zoom-out;
}

.lightbox-close {
    position: absolute;
    top: 24px; right: 24px;
    width: 44px; height: 44px;
    background: rgba(20,20,20,.8);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color .2s, border-color .2s;
    z-index: 10;
}

.lightbox-close:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.lightbox-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--text-subtle);
    white-space: nowrap;
}

/* ═══════════════════════════════════════
   Информационная панель
═══════════════════════════════════════ */
.painting-info-panel {
    padding-left: 16px;
}

.painting-category-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}

.painting-page-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 300;
    line-height: 1.1;
    color: var(--text);
    margin-bottom: 8px;
}

.painting-artist-line {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.painting-artist-line a { color: var(--text-muted); }
.painting-artist-line a:hover { color: var(--gold); }

/* Цена */
.painting-price-block {
    margin-bottom: 32px;
}

.painting-price-old {
    font-size: 14px;
    color: var(--text-subtle);
    text-decoration: line-through;
    margin-bottom: 4px;
}

.painting-price-current {
    font-family: 'Cormorant Garamond', serif;
    font-size: 40px;
    font-weight: 300;
    color: var(--text);
    line-height: 1;
}

.painting-price-current.has-discount { color: var(--gold); }

.painting-discount-badge {
    display: inline-block;
    background: var(--gold);
    color: #0c0c0c;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .1em;
    padding: 3px 8px;
    margin-left: 12px;
    vertical-align: middle;
    position: relative;
    top: -4px;
}

/* Единственный экземпляр */
.painting-unique-note {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border: 1px solid rgba(201,160,96,.25);
    background: rgba(201,160,96,.04);
    margin-bottom: 32px;
}

.painting-unique-icon {
    color: var(--gold);
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 3px;
}

.painting-unique-title {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 4px;
}

.painting-unique-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.65;
}

/* Кнопки */
.btn-in-cart {
    background: transparent !important;
    border-color: var(--gold) !important;
    color: var(--gold) !important;
    cursor: default;
}

.painting-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.painting-actions .btn-gold-fill,
.painting-actions .btn-gold {
    flex: 1;
    min-width: 140px;
    text-align: center;
}

.painting-availability {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.availability-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #4caf50;
    display: inline-block;
    flex-shrink: 0;
}

.availability-dot--low { background: #ff9800; }
.availability-dot--out { background: #666; }

/* Разделитель */
.info-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 28px 0;
}

/* Характеристики */
.specs-title {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 20px;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid var(--border);
}

.specs-table tr:last-child { border-bottom: none; }

.specs-table td {
    padding: 10px 0;
    font-size: 13px;
    vertical-align: top;
}

.specs-table td:first-child {
    color: var(--text-muted);
    width: 45%;
    padding-right: 12px;
}

.specs-table td:last-child { color: var(--text); }

/* Заметка о доставке */
.delivery-note {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--border);
    margin-top: 28px;
}

.delivery-note-icon {
    color: var(--gold);
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.delivery-note-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.7;
}

.delivery-note-text strong {
    display: block;
    color: var(--text);
    font-weight: 400;
    margin-bottom: 2px;
    font-size: 13px;
}

/* Багет и стекло */
.framing-price {
    display: block;
    margin-top: 6px;
    color: var(--text);
    font-size: 13px;
}

.framing-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    letter-spacing: .08em;
    color: var(--gold);
    text-decoration: none;
    transition: opacity .2s;
}

.framing-link:hover { opacity: .75; }

/* Подбор под интерьер */
.painting-consult-note {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.painting-consult-icon {
    color: var(--text-subtle);
    font-size: 14px;
    flex-shrink: 0;
}

.painting-consult-text a {
    color: var(--gold);
    text-decoration: none;
    transition: opacity .2s;
}

.painting-consult-text a:hover { opacity: .75; }

/* ═══════════════════════════════════════
   Toast уведомления (ошибки корзины)
═══════════════════════════════════════ */
.cart-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    z-index: 3000;
    padding: 14px 24px;
    font-size: 13px;
    letter-spacing: .03em;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    white-space: nowrap;
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}

.cart-toast--error {
    border-color: #c0392b;
    color: #e57373;
}

.cart-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════
   Описание
═══════════════════════════════════════ */
.painting-description-section {
    padding: 96px 0;
    border-top: 1px solid var(--border);
    margin-top: 80px;
}

.description-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 64px;
    align-items: start;
}

.description-sidebar-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    font-weight: 300;
    line-height: 1.2;
    color: var(--text);
    position: sticky;
    top: calc(var(--nav-height) + 32px);
}

.description-body {
    font-size: 15px;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.9;
}

.description-body p { margin-bottom: 20px; }
.description-body p:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════
   Похожие работы
═══════════════════════════════════════ */
.related-section {
    padding: 80px 0 96px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════
   Адаптив
═══════════════════════════════════════ */
@media (max-width: 991px) {
    .gallery-wrap { position: static; }
    .painting-info-panel { padding-left: 0; margin-top: 40px; }
    .painting-breadcrumb { margin-bottom: 32px; }
    .description-layout { grid-template-columns: 1fr; gap: 32px; }
    .description-sidebar-title { position: static; font-size: 28px; }
}

@media (max-width: 575px) {
    .painting-price-current { font-size: 32px; }
    .painting-actions { flex-direction: column; }
    .painting-actions .btn-gold-fill,
    .painting-actions .btn-gold { flex: unset; }
    .gallery-main-wrap { aspect-ratio: 1/1; }
    .painting-description-section { padding: 64px 0; }
}
