/* PINTEREST MASONRY GALLERY GRID */
.pinterest-gallery-grid {
    column-count: 4;
    column-gap: 20px;
    width: 100%;
}

@media (max-width: 1200px) {
    .pinterest-gallery-grid {
        column-count: 3;
        column-gap: 18px;
    }
}

@media (max-width: 768px) {
    .pinterest-gallery-grid {
        column-count: 2;
        column-gap: 14px;
    }
}

@media (max-width: 480px) {
    .pinterest-gallery-grid {
        column-count: 1;
        column-gap: 0;
    }
}

.pinterest-card {
    position: relative;
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
    background-color: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.22) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    cursor: pointer;
}

.pinterest-card.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.pinterest-card.animate-in:hover,
.pinterest-card:hover {
    transform: translateY(-6px) scale(1.015) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
    border-color: #000000 !important;
}

.pinterest-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    transition: transform 0.45s ease;
}

.pinterest-card:hover img {
    transform: scale(1.06);
}

/* PINTEREST HOVER OVERLAY: SHOWS JUST THE NAME OF THAT PRODUCT */
.pinterest-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.55) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 22px 18px;
    opacity: 0;
    transition: opacity 0.35s ease;
    border-radius: 16px;
    pointer-events: none;
}

.pinterest-card:hover .pinterest-overlay {
    opacity: 1;
}

.pinterest-title {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    transform: translateY(12px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.pinterest-card:hover .pinterest-title {
    transform: translateY(0);
}

/* CSS LIGHTBOX MODAL */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 82vh;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    background-color: #ffffff;
    padding: 8px;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -20px;
    right: -20px;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10005;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: var(--primary-red, #b3001e);
    transform: scale(1.1);
}

.lightbox-caption {
    color: #ffffff;
    text-align: center;
    margin-top: 16px;
    font-size: 1.15rem;
    font-weight: 700;
}
