/* NEW FEATURE START: Actual Product Photos */

/* ── Section ──────────────────────────────────── */
.actual-product-photos {
    margin: 0 0 1.25rem 0;
    padding: 0;
}

.app-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.app-section-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* ── Carousel (Desktop) ───────────────────────── */
.app-desktop-only {
    display: none;
}
@media (min-width: 768px) {
    .app-desktop-only {
        display: block;
    }
}

.app-carousel-container {
    position: relative;
    overflow: hidden;
    margin: 0 -4px;
    border-radius: 8px;
}

.app-carousel-track {
    display: flex;
    transition: transform 0.35s ease;
}

.app-carousel-slide {
    flex: 0 0 25%;
    padding: 0 4px;
    box-sizing: border-box;
}
.app-carousel-slide figure {
    margin: 0;
}
.app-carousel-slide img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    background: #f3f4f6;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.app-carousel-slide figcaption {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 4px;
    text-align: center;
}

.app-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(255,255,255,0.9);
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #374151;
    transition: background 0.15s;
}
.app-carousel-arrow:hover {
    background: #fff;
}
.app-carousel-prev {
    left: 4px;
}
.app-carousel-next {
    right: 4px;
}

/* ── Mobile Grid (Facebook-style) ─────────────── */
.app-mobile-only {
    display: none;
}
@media (max-width: 767px) {
    .app-mobile-only {
        display: grid;
        gap: 4px;
    }
}

.app-mobile-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    display: block;
    background: #f3f4f6;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.app-grid-1 { grid-template-columns: 1fr; }
.app-grid-1 img { aspect-ratio: 4/3; }

.app-grid-2 { grid-template-columns: 1fr 1fr; }
.app-grid-2 img { aspect-ratio: 4/3; }

.app-grid-3 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
}
.app-grid-3 .app-grid-item:first-child { grid-column: 1/-1; }
.app-grid-3 .app-grid-item:first-child img { aspect-ratio: 16/9; }
.app-grid-3 .app-grid-item:not(:first-child) img { aspect-ratio: 4/3; }

.app-grid-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.app-grid-4 img { aspect-ratio: 1/1; }

/* ── Lightbox ─────────────────────────────────── */
.app-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 96px 56px;
    box-sizing: border-box;
}
.app-lightbox-overlay[hidden] {
    display: none;
}

.app-lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 150px);
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

.app-lightbox-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
}

.app-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.app-lightbox-close:hover {
    background: rgba(255,255,255,0.3);
}

.app-lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.app-lightbox-arrow:hover {
    background: rgba(255,255,255,0.3);
}

.app-lightbox-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0,0,0,0.5);
    padding: 4px 14px;
    border-radius: 20px;
}

.app-lightbox-prev {
    left: 24px;
}

.app-lightbox-next {
    right: 24px;
}

@media (min-width: 1024px) {
    .app-lightbox-img {
        max-width: min(1100px, calc(100vw - 220px));
    }
}

@media (max-width: 767px) {
    .app-lightbox-overlay {
        padding: 64px 16px 52px;
    }

    .app-lightbox-arrow {
        width: 42px;
        height: 42px;
        font-size: 24px;
    }

    .app-lightbox-prev {
        left: 12px;
    }

    .app-lightbox-next {
        right: 12px;
    }
}

/* ── Hover effect (desktop) ───────────────────── */
@media (min-width: 768px) {
    .app-carousel-slide img:hover,
    .app-mobile-grid img:hover {
        opacity: 0.85;
        transition: opacity 0.15s;
    }
}

/* ── Scroll-in reveal ─────────────────────────── */
/* JS adds [data-app-photo-reveal] up front, then toggles .is-visible via
   IntersectionObserver as each photo scrolls into view — a soft fade + rise,
   staggered slightly per item so the group doesn't pop in as one flat block. */
[data-app-photo-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--app-reveal-delay, 0s);
}
[data-app-photo-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    [data-app-photo-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* NEW FEATURE END: Actual Product Photos */
