:root {
    --gold: #D4AF37;
    --dark: #0A0A0A;
    --glass: rgba(255, 255, 255, 0.03);
    --white: #FFFFFF;
}

.lookbook-container {
    padding: 120px 5% 60px; /* Space for navbar */
    max-width: 1600px;
    margin: 0 auto;
}

.lookbook-header {
    text-align: center;
    margin-bottom: 60px;
}

.lookbook-header p {
    color: #ccc;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 15px auto 0;
}

/* Masonry Grid with CSS Grid */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    grid-auto-rows: 250px; /* Defines the base height for the "rows" */
    gap: 20px;
    grid-auto-flow: dense; /* Fills gaps automatically */
}

/* Standard Item */
.masonry-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    background: var(--glass);
    transition: transform 0.4s ease;
}

/* Spanning classes to create varying sizes */
.item-tall {
    grid-row: span 2; /* Occupies two rows of 250px */
}

.item-horizontal {
    grid-column: span 2; /* Occupies two columns */
}

.masonry-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
}

/* Hover Effect for Luxury Aesthetic */
.masonry-item:hover img {
    transform: scale(1.05);
}

/* Text Overlay and Link */
.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%; /* Gradual dark fade */
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--white);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.4s ease;
}

.masonry-item:hover .item-overlay {
    opacity: 1; /* Revealed on hover */
}

.item-overlay h3 {
    font-family: 'Cinzel', serif;
    font-weight: 400;
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: var(--white);
}

.shop-link {
    color: var(--gold);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 2px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.shop-link:hover {
    color: #fff;
}

/* Responsive and Mobile */
@media (max-width: 768px) {
    .masonry-grid {
        grid-template-columns: 1fr; /* Stack images on mobile */
        grid-auto-rows: auto; /* Reset row height for stack */
    }
    .item-tall, .item-horizontal {
        grid-row: span 1; /* Reset spans for stacked mobile */
        grid-column: span 1;
    }
    .masonry-item {
        height: 350px; /* Consistent height for mobile stack */
    }
    .item-overlay {
        opacity: 1; /* Keep text visible on mobile since no hover */
        height: 100%;
        background: rgba(0,0,0,0.5); /* Full overlay for better reading */
    }
}