/* assets/css/style.css */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.hero-section {
    background-size: cover;
    background-position: center;
}

.card {
    border-radius: 8px;
}

.category-card img {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* Price panel sticky positioning */
.price-panel {
    position: sticky;
    top: 20px;
    z-index: 100;
}

/* ===========================================
   GALLERY MASONRY LAYOUT
   =========================================== */
.gallery-section {
    padding-bottom: 2rem;
}

.gallery-masonry {
    column-count: 2;
    column-gap: 1rem;
}

@media (min-width: 576px) {
    .gallery-masonry {
        column-count: 2;
    }
}

@media (min-width: 768px) {
    .gallery-masonry {
        column-count: 3;
    }
}

@media (min-width: 992px) {
    .gallery-masonry {
        column-count: 4;
    }
}

/* Gallery Item */
.gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.gallery-item:hover img {
    opacity: 0.95;
}

.gallery-item-caption {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: #333;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

/* ===========================================
   LIGHTBOX OVERLAY
   =========================================== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Close button */
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    padding: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Navigation buttons */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    padding: 1rem 0.75rem;
    cursor: pointer;
    z-index: 10001;
    opacity: 0.7;
    transition: opacity 0.2s ease, background 0.2s ease;
    border-radius: 4px;
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

@media (max-width: 576px) {
    .lightbox-nav {
        padding: 0.75rem 0.5rem;
        font-size: 1.25rem;
    }
    
    .lightbox-prev {
        left: 0.5rem;
    }
    
    .lightbox-next {
        right: 0.5rem;
    }
}

/* Lightbox content */
.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(90vh - 100px);
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 0.3s ease;
}

.lightbox-info {
    text-align: center;
    color: #fff;
    margin-top: 1rem;
    max-width: 600px;
    padding: 0 1rem;
}

.lightbox-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.lightbox-description {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 0.5rem;
}

.lightbox-counter {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .lightbox-close {
        top: 0.5rem;
        right: 0.75rem;
        font-size: 2rem;
    }
    
    .lightbox-info {
        margin-top: 0.75rem;
    }
    
    .lightbox-title {
        font-size: 1rem;
    }
    
    .lightbox-description {
        font-size: 0.85rem;
    }
}

/* Loading state for images */
.gallery-item img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    min-height: 100px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===========================================
   INFINITE SCROLL
   =========================================== */

/* Hidden items - in DOM but not displayed */
.gallery-hidden {
    display: none;
}

/* Reveal animation */
.gallery-reveal {
    animation: galleryFadeIn 0.4s ease forwards;
}

@keyframes galleryFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll trigger area */
.gallery-scroll-trigger {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-loader {
    padding: 1rem;
}
