/* ==========================================================================
   pic-show.css
   The "conveyor belt" picture show - a Swiper-based slider showing the
   current picture large and centered with the neighboring pictures
   peeking in on either side, left/right arrows to move one at a time
   (no autoplay), a close (X) button top-right, and a title/price
   caption bar at the bottom. Two ways it's used (both driven by
   js/pic-show.js from plain markup, no per-page glue code needed):

   - .pic-show--modal   full-screen overlay, opened when a portfolio
                        thumbnail is clicked
   - .pic-show--inline  embedded directly in the page and already
                        showing on load (the homepage picture show)
   ========================================================================== */

.pic-show-noscroll {
    overflow: hidden;
}

.pic-show {
    position: relative;
}

.pic-show.is-closed {
    display: none !important;
}

/* ---- modal variant: full-screen overlay -------------------------------- */
.pic-show--modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 10, 10, 0.96);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 70px 0 100px;
}

/* ---- inline variant: embedded in the page flow -------------------------- */
.pic-show--inline {
    background: var(--art-dark, #2a2a2a);
    border-radius: 15px;
    padding: 50px 0 80px;
    overflow: hidden;
}

/* ---- close (X) button, top-right, both variants -------------------------- */
.pic-show-close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 20;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.pic-show-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* ---- the Swiper slider itself -------------------------------------------- */
.pic-show-swiper {
    width: 100%;
    overflow: hidden;
}

.pic-show-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.35;
    transition: opacity 0.3s ease;
}

.pic-show-swiper .swiper-slide-active {
    opacity: 1;
}

.pic-show-swiper .swiper-slide img {
    max-width: 100%;
    max-height: 62vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    /* Keep the picture crisp through Swiper's hardware-accelerated
       transform transitions rather than a blurry filter/scale. */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.pic-show--inline .pic-show-swiper .swiper-slide img {
    max-height: 46vh;
}
/* ---- left / right arrows -------------------------------------------------- */
.pic-show-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pic-show-arrow:hover {
    background: var(--art-accent, #e5bb89);
    color: #2a2a2a;
    border-color: var(--art-accent, #e5bb89);
}

.pic-show-arrow.swiper-button-disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

.pic-show-arrow--prev {
    left: 16px;
}

.pic-show-arrow--next {
    right: 16px;
}

/* ---- caption bar: title, description excerpt, price ----------------------
   Restructured into a vertical stack to fit the new description
   excerpt between the title and price - previously this only ever
   held a single title+price row side by side. */
.pic-show-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 30px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    color: #fff;
    text-align: center;
}

.pic-show-caption-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.pic-show-caption-price {
    font-size: 16px;
    color: var(--art-accent, #e5bb89);
    font-weight: 700;
    white-space: nowrap;
}

.pic-show-caption-price:empty,
.pic-show-caption-title:empty {
    display: none;
}

/* ---- description excerpt + "Read more" link (inside the caption) ------ */
.pic-show-description-text {
    max-width: 480px;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #ddd;
    /* clamp to 2 lines with an ellipsis - full text is always
       available on the picture's own pPic page via the link below */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.pic-show-description-more {
    font-size: 12px;
    font-weight: 600;
    color: var(--art-accent, #e5bb89);
    text-decoration: none;
    letter-spacing: 0.3px;
}

.pic-show-description-more:hover {
    color: #fff;
}

.pic-show-description-text.is-hidden,
.pic-show-description-more.is-hidden {
    display: none;
}

/* ---- "Buy" button inside the picture-show (modal/portfolio only,
   never shown in inline/homepage mode) - and the "like" button next
   to it, which DOES show in both modes. Both sit in a shared row
   positioned above the (now taller, since it can include a
   description excerpt) caption area. -------------------------------- */
.pic-show-actions-row {
    position: absolute;
    left: 50%;
    bottom: 108px;
    transform: translateX(-50%);
    z-index: 16;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pic-show-buy-form {
    margin: 0;
}

.pic-show-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pic-show-like-btn:hover {
    border-color: #e0575c;
    color: #e0575c;
}

.pic-show-like-btn.is-liked {
    background: rgba(224, 87, 92, 0.15);
    border-color: #e0575c;
    color: #e0575c;
}

.pic-show-buy-btn {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 10px;
    border: 1px solid var(--art-accent, #e5bb89);
    background: var(--art-accent, #e5bb89);
    color: #2a2a2a;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.pic-show-buy-btn:hover {
    background: transparent;
    color: #fff;
}

.pic-show-buy-form.is-hidden {
    display: none;
}

/* "Not Available for Sale" - shown in the same spot the Buy button
   occupies, for a picture explicitly priced "$0". */
.pic-show-not-for-sale {
    margin: 0;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 10px;
    color: #ddd;
    font-size: 13px;
    font-style: italic;
    white-space: nowrap;
}

.pic-show-not-for-sale.is-hidden {
    display: none;
}

/* Matches portrait phones (narrow width) AND landscape phones (width
   grows past 767px when rotated, but height - what was the original
   portrait width - stays well under it). A tablet rotated to landscape
   has height >=768, so it's correctly excluded from this, unlike every
   common phone. Without the second condition, rotating a phone to
   landscape silently turned this whole block off, since landscape
   phone widths are typically 780-930px+ - comfortably past a plain
   max-width: 767px check. */
@media (max-width: 767px), (max-height: 767px) and (orientation: landscape) {
    /* Modal (portfolio click-through) - true full-screen, edge to edge.
       No more top/bottom padding boxing the image into a small area -
       the swiper now fills the entire viewport height, and the
       close/arrows/caption/actions controls float as overlays on top
       of the photo (they already have semi-transparent backgrounds,
       so this reads as a normal full-screen photo viewer). height is
       declared twice on purpose: 100vh first as a safe fallback, then
       100dvh (dynamic viewport height, accounts for the mobile
       browser's address bar showing/hiding) for browsers that support
       it - unsupported browsers simply ignore the second line and
       keep the 100vh fallback. */
    .pic-show--modal {
        padding: 0;
        height: 100vh;
        height: 100dvh;
    }
    .pic-show--modal .pic-show-swiper {
        height: 100%;
    }
    .pic-show--modal .pic-show-swiper .swiper-slide {
        height: 100%;
    }
    .pic-show--modal .pic-show-swiper .swiper-slide img {
        max-height: 100%;
        max-width: 100%;
        border-radius: 0;
    }

    /* Inline (homepage showcase) - this one stays embedded in the
       normal scrollable page (there's no close button, it's not a
       takeover), so it can't reasonably lock to the full viewport
       height without breaking scrolling past it - but it's now
       dramatically larger than before, close to filling the screen
       while still just being a section of the page. */
    .pic-show--inline .pic-show-swiper .swiper-slide img {
        max-height: 88vh;
    }

    .pic-show-arrow { width: 40px; height: 40px; font-size: 16px; }
    .pic-show-arrow--prev { left: 6px; }
    .pic-show-arrow--next { right: 6px; }
    .pic-show-caption {
        padding: 12px 16px;
        flex-direction: column;
        gap: 2px;
    }
    .pic-show-description-text {
        max-width: 100%;
    }
    .pic-show-actions-row {
        bottom: 96px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Phone in landscape specifically (not portrait - this is scoped
   tighter than the block above, to exactly the case in the screenshot
   where the like button and price/buy pill were sitting on top of the
   photo itself). Landscape height on a real phone, after the
   browser's own address bar/tab bar eat into it, is often only
   250-350px - nowhere near enough room to show the photo AND a
   caption/actions row without them overlapping the image. Rather than
   try to squeeze both into that little space, this hides everything
   except the photo and the close/prev/next controls, so "the whole
   image, nothing else" is genuinely what you get. */
@media (max-height: 767px) and (orientation: landscape) {
    .pic-show-actions-row,
    .pic-show-caption {
        display: none;
    }
}
