/* /assets/css/masonry.css */
.catalog-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    padding-top: 120px;
}

/* Barra de Filtros Lateral */
.filter-sidebar {
    position: sticky;
    top: 120px;
    height: calc(100vh - 150px);
}

.search-wrapper {
    margin-bottom: 35px;
}

.search-input {
    width: 100%;
    padding: 12px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-main);
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--text-main);
}

.filter-group {
    margin-bottom: 30px;
}

.filter-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-weight: 500;
}

.filter-list {
    list-style: none;
}

.filter-item {
    margin-bottom: 10px;
}

.filter-link {
    text-decoration: none;
    color: var(--text-main);
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: color 0.3s;
    cursor: pointer;
}

.filter-link:hover, .filter-link.active {
    color: var(--accent-gold);
}

/* Cuadrícula Estable */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    width: 100%;
}

.masonry-item {
    background-color: var(--surface-color);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border-radius: 4px;
}

.masonry-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.masonry-item:hover img {
    transform: scale(1.03);
}

.item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.masonry-item:hover .item-overlay {
    opacity: 1;
}

.item-info-short h4 {
    color: #FFFFFF;
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 400;
}

/* Lightbox Premium (Pantalla Completa) */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(244, 242, 238, 0.98); 
    z-index: 2000;
    display: none;
    grid-template-columns: 1fr 400px;
}

.lightbox.active {
    display: grid;
}

.lightbox-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.lightbox-img-wrapper {
    max-width: 90%;
    max-height: 90vh;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.lightbox-img-wrapper.zoomed {
    transform: scale(1.8);
    cursor: zoom-out;
}

.lightbox-img-wrapper img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-sidebar {
    border-left: 1px solid var(--border-color);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--surface-color);
}

.lightbox-close {
    position: absolute;
    top: 40px;
    right: 40px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-main);
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    border-radius: 0;
    cursor: pointer;
}

.btn-download {
    background: var(--text-main);
    color: white;
    border: none;
}

.btn-share {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

@media (max-width: 1000px) {
    .catalog-layout { grid-template-columns: 1fr; }
    .filter-sidebar { position: static; height: auto; }
    .masonry-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .lightbox { grid-template-columns: 1fr; }
    .lightbox-sidebar { display: none; }
}