/* =============================================================================
   Sevart Gallery — collections.css
   Collections page: filter bar, product grid, product cards.
   Also used on single artwork page (single-artwork.css appended later).
   ============================================================================= */


/* ─── Page Header ───────────────────────────────────────────────────────────── */

.collections-page {
    padding-top: var(--nav-height);
    min-height: 100vh;
}

.collections-page__header {
    padding-top: 60px;
    padding-bottom: 0;
}

.collections-page__title {
    font-size: var(--text-3xl);
    margin-top: 8px;
}

.collections-page__empty {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--color-text-muted);
    padding: 80px 0;
    text-align: center;
}

.collections-page__grid-wrap {
    padding-top: 48px;
    padding-bottom: 96px;
}


/* ─── Filter Bar ────────────────────────────────────────────────────────────── */

.filter-bar {
    border-bottom: 1px solid var(--color-border);
    margin-top: 28px;
}

.filter-bar__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 28px;
}

.filter-bar__btn {
    font-family: var(--font-sans);
    font-size: 12px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    padding: 8px 20px;
    border: 1px solid var(--color-border-mid);
    color: var(--color-text-mid);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    white-space: nowrap;
}

.filter-bar__btn:hover {
    border-color: var(--color-dark);
    color: var(--color-dark);
}

.filter-bar__btn--active {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: #FAF7F4;
}

.filter-bar__btn--active:hover {
    color: #FAF7F4;
}


/* ─── Collections Grid ──────────────────────────────────────────────────────── */

.collections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 24px;
}

/* ─── Product Card ──────────────────────────────────────────────────────────── */

.product-card {
    display: flex;
    flex-direction: column;
}

.product-card__image-wrap {
    display: block;
    overflow: hidden;
    margin-bottom: 18px;
    position: relative;
    aspect-ratio: 1 / 1;   /* square — works for both portrait and landscape */
    background: var(--color-bg-alt);
    text-decoration: none;
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* object-position set per-image via inline style from focal_point ACF field */
    display: block;
    transition: transform var(--transition-slow);
}


/* ─── Product Card ──────────────────────────────────────────────────────────── */

.product-card {
    display: flex;
    flex-direction: column;
}

.product-card__image-wrap {
    display: block;
    overflow: hidden;
    margin-bottom: 18px;
    position: relative;
    /* No forced aspect-ratio — each artwork displays at its natural proportions */
    background: var(--color-bg-alt);
    text-decoration: none;
}

.product-card__image {
    width: 100%;
    height: auto;           /* natural height — no cropping ever */
    display: block;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-card__image {
    transform: scale(1.04);
}

/* Placeholder */
.product-card__placeholder {
    width: 100%;
    height: 100%;
    background-color: #E8E4DE;
    background-image: repeating-linear-gradient(
        45deg, transparent, transparent 14px,
        #D6D1C9 14px, #D6D1C9 15px
    );
}

/* Gold bar slides in from left on hover */
.product-card__hover-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.product-card:hover .product-card__hover-bar {
    transform: scaleX(1);
}

/* Text */
.product-card__category {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin: 0 0 6px;
}

.product-card__title {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    font-weight: 400;
    color: var(--color-dark);
    margin: 0 0 6px;
    line-height: 1.3;
}

.product-card__title a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

.product-card__title a:hover {
    color: var(--color-gold);
}

.product-card__finish {
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0 0 4px;
    line-height: 1.5;
}

.product-card__dims {
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--color-text-faint);
    margin: 0;
}



/* =============================================================================
   Artwork Detail Page
   ============================================================================= */

.artwork-page {
    padding-top: var(--nav-height);
    min-height: 100vh;
}

.artwork-page__inner {
    padding-top: 40px;
    padding-bottom: 96px;
}

/* Back link */
.artwork-page__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 12px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    text-decoration: none;
    margin-bottom: 48px;
    transition: color var(--transition-fast);
}

.artwork-page__back:hover {
    color: var(--color-dark);
}

/* Two-column layout */
.artwork-page__layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 72px;
    align-items: start;  /* sidebar anchors to top of image, not mid-height */
}

/* ── Images column ── */

.artwork-main-image {
    margin-bottom: 12px;
    background: var(--color-bg-alt);
}

/* Button wraps the image — makes the whole image clickable */
.artwork-main-image__btn {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    overflow: hidden;
}

.artwork-main-image__img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease, opacity 0.25s ease;
}

/* Hover: subtle zoom */
.artwork-main-image__btn:hover .artwork-main-image__img {
    transform: scale(1.025);
}

/* Zoom icon — appears on hover */
.artwork-main-image__zoom {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(250, 247, 244, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-dark);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.artwork-main-image__btn:hover .artwork-main-image__zoom {
    opacity: 1;
    transform: translateY(0);
}

.artwork-main-image__placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    background-color: #E8E4DE;
    background-image: repeating-linear-gradient(
        45deg, transparent, transparent 14px,
        #D6D1C9 14px, #D6D1C9 15px
    );
}


/* ── Lightbox ── */

.artwork-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.artwork-lightbox.is-open {
    opacity: 1;
    pointer-events: all;
}

.artwork-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 9, 8, 0.92);
    cursor: zoom-out;
}

.artwork-lightbox__content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.artwork-lightbox__img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.artwork-lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    width: 44px;
    height: 44px;
    background: rgba(250, 247, 244, 0.12);
    border: 1px solid rgba(250, 247, 244, 0.2);
    border-radius: 50%;
    color: #FAF7F4;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.artwork-lightbox__close:hover {
    background: rgba(250, 247, 244, 0.22);
}

/* Thumbnail strip */
.artwork-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.artwork-thumb {
    display: block;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    background: var(--color-bg-alt);
    cursor: pointer;
    transition: border-color 0.2s ease, opacity 0.2s ease;
    /* Portrait ratio — matches artwork-thumb registered size */
    aspect-ratio: 4 / 5;
}

.artwork-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease, opacity 0.2s ease;
}

.artwork-thumb:hover {
    opacity: 0.88;
}

.artwork-thumb:hover img {
    transform: scale(1.06);
}

.artwork-thumb--active {
    border-color: var(--color-gold);
}

.artwork-thumb--active img {
    opacity: 1;
}

/* ── Sidebar ── */

.artwork-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 24px);
}

.artwork-sidebar__title {
    font-size: var(--text-3xl);
    margin-bottom: 24px;
}

.artwork-sidebar__rule {
    width: 40px;
    height: 1px;
    background: var(--color-gold);
    margin-bottom: 32px;
}

.artwork-sidebar__desc {
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--color-text-mid);
    line-height: 1.85;
    margin-bottom: 36px;
}

/* Specs table */
.artwork-specs {
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 24px 0;
    margin-bottom: 36px;
}

.artwork-specs__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 14px;
}

.artwork-specs__row:last-child {
    margin-bottom: 0;
}

.artwork-specs__label {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-text-muted);
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.artwork-specs__value {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-dark);
    text-align: right;
}

/* Related works */
.artwork-related {
    margin-top: 96px;
}

.artwork-related__divider {
    margin-bottom: 56px;
}

/* ─── Collections Pagination ────────────────────────────────────────────────── */

.collections-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 56px 0 16px;
    flex-wrap: wrap;
}

.collections-pagination .page-numbers {
    font-family: var(--font-sans);
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--color-text-mid);
    text-decoration: none;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border-mid);
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.collections-pagination .page-numbers:hover {
    border-color: var(--color-dark);
    color: var(--color-dark);
}

/* Active page */
.collections-pagination .page-numbers.current {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: #FAF7F4;
}

/* Prev / Next arrows */
.collections-pagination .prev.page-numbers,
.collections-pagination .next.page-numbers {
    width: auto;
    padding: 0 16px;
    letter-spacing: 0.1em;
}

/* Dots */
.collections-pagination .page-numbers.dots {
    border: none;
    cursor: default;
    color: var(--color-text-muted);
}

.collections-pagination .page-numbers.dots:hover {
    background: none;
    color: var(--color-text-muted);
}


/* ─── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .artwork-page__layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .artwork-sidebar {
        position: static;
    }

    .artwork-main-image__img {
        max-height: 70vh;
    }

    .collections-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px 16px;
    }
}

@media (max-width: 600px) {
    .artwork-main-image__img {
        max-height: 60vh;
    }

    .artwork-sidebar__title {
        font-size: var(--text-2xl);
    }

    .artwork-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }

    .collections-page__title {
        font-size: var(--text-2xl);
    }

    .collections-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px 12px;
    }

    .filter-bar__inner {
        gap: 6px;
    }

    .filter-bar__btn {
        font-size: 11px;
        padding: 7px 14px;
    }
}