/* ============================================
   GALLERY PAGE MOBILE STYLES
   ============================================ */

/* Gallery Section */
.gallery-section {
    padding: 60px 30px;
}

/* Gallery Filter Buttons */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid #e8e0d5;
    background: #fff;
    color: #3d2317;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #3d2317;
    color: #fff;
    border-color: #3d2317;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item.show {
    opacity: 1;
    transform: scale(1);
}

.gallery-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px;
    background: linear-gradient(transparent, rgba(42, 26, 15, 0.9));
    color: #fff;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-info h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.gallery-info p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.gallery-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #c9a227;
}

/* Empty Gallery */
.empty-gallery {
    text-align: center;
    padding: 80px 20px;
}

.empty-gallery i {
    color: #8b5a2b;
    margin-bottom: 20px;
}

.empty-gallery h3 {
    font-family: 'Cinzel', serif;
    color: #3d2317;
    margin-bottom: 10px;
}

.empty-gallery p {
    color: #666;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-caption {
    color: #fff;
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 15px;
    }
}

/* Large Mobile (768px and below) */
@media (max-width: 768px) {
    .gallery-section {
        padding: 40px 15px;
    }
    
    /* Filter buttons - horizontal scroll */
    .gallery-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 10px 15px;
        margin: 0 -15px 30px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .gallery-filters::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        flex-shrink: 0;
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    
    /* 2-column grid */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* Always show overlay on mobile (no hover) */
    .gallery-overlay {
        transform: translateY(0);
        padding: 20px 15px;
        background: linear-gradient(transparent, rgba(42, 26, 15, 0.85));
    }
    
    .gallery-info h3 {
        font-size: 0.95rem;
    }
    
    .gallery-info p {
        font-size: 0.8rem;
    }
    
    .gallery-price {
        font-size: 1rem;
    }
    
    /* Lightbox touch targets */
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 48px;
        height: 48px;
        background: rgba(255, 255, 255, 0.2);
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .gallery-item {
        border-radius: 8px;
    }
    
    .gallery-overlay {
        padding: 15px 10px;
    }
    
    .gallery-info h3 {
        font-size: 0.85rem;
        margin-bottom: 3px;
    }
    
    .gallery-info p {
        font-size: 0.75rem;
        margin-bottom: 3px;
    }
    
    .gallery-price {
        font-size: 0.9rem;
    }
    
    .filter-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}