/* books/autumn/css/gallery.css */

.gallery-hero {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 2rem 3rem 2rem;
    position: relative;
}

.gallery-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.gallery-subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Grid Layout for Square Images */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px; /* Increased gap */
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 1100px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}
@media (max-width: 600px) {
    .masonry-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .gallery-title { font-size: 2.5rem; }
}

/* Masonry Item as Square */
.masonry-item {
    aspect-ratio: 1 / 1;
    position: relative;
    border-radius: 24px; /* Rounder corners */
    overflow: hidden;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.masonry-item:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(239, 68, 68, 0.1);
}

.masonry-image {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 24px; /* Rounder corners */
    object-fit: cover; /* Fill the square with part of the images */
    transition: transform 0.5s ease;
}

.masonry-item:hover .masonry-image {
    transform: scale(1.05); /* Soft zoom in the card on hover */
}

/* The overlay layer */
.masonry-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none; /* Crucial so clicks hit the <a> tag */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 40%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.masonry-item:hover .masonry-overlay {
    opacity: 1;
}

.masonry-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.masonry-item:hover .masonry-title {
    transform: translateY(0);
}

/* Sales Integration Widget Styling */
.gallery-shop {
    margin: 5rem auto;
    max-width: 1200px;
    background: rgba(20, 20, 25, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gallery-shop::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.5), transparent);
}

.gallery-shop h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.gallery-shop p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}

.book-widget {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 500px;
    margin: 2rem auto 0;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.book-widget:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(239, 68, 68, 0.1);
}

.book-cover {
    width: 100%;
    max-width: 320px;
    border-radius: 4px;
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.8), -2px -2px 10px rgba(255, 255, 255, 0.05);
    transition: transform 0.5s ease;
}

.book-widget:hover .book-cover {
    transform: scale(1.02) rotate(-1deg);
}

.book-info {
    text-align: center;
}

.book-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
    color: white;
}

.book-info p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.btn-book {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.8), rgba(185, 28, 28, 0.8));
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-family: Arial, sans-serif;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-book:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 1), rgba(185, 28, 28, 1));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

/* Empty State visual strictly for development */
.empty-iframe-placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
