.hcm-smart-gallery-wrapper {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

.hcm-gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    /* Soft shadow + rounded corners for Apple-level quality */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    opacity: 0; /* Wait for JS or GSAP */
    background: #f0f0f0;
}

.hcm-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

/* Hover Effects */
.hcm-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.hcm-gallery-item:hover img {
    transform: scale(1.05);
}

/* --- LIGHTBOX STYLES --- */
.hcm-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
}

.hcm-lightbox-toolbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    z-index: 2;
}

.hcm-lightbox-counter {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 1px;
}

.hcm-lightbox-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.hcm-lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.hcm-lightbox-prev, .hcm-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.hcm-lightbox-prev { left: 20px; }
.hcm-lightbox-next { right: 20px; }

.hcm-lightbox-prev:hover, .hcm-lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

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

.hcm-lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.hcm-lightbox-caption {
    color: white;
    margin-top: 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    font-weight: 300;
    text-align: center;
}

