:root {
    --gallery-gap: 2rem;
}

@font-face {
    font-family: "Lora";
    src: url("/fonts/Lora-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: block;
}

body {
    margin: 0;
    padding: 0;

    overflow-x: hidden;
    box-sizing: border-box;

    /* Fallback color */
    background-color: #1e1e1e;

    background-image:
            linear-gradient(
                    rgba(0, 0, 0, 0.55),
                    rgba(0, 0, 0, 0.9)
            ),
            url("/images/home-bg.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

*, *::before, *::after {
    box-sizing: inherit;
}

.gallery-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.gallery-grid {
    width: 80vw;
    max-width: 100%;
    margin: 0 auto;
    column-count: 3;
    column-gap: var(--gallery-gap);
    padding: var(--gallery-gap) 0;
    padding-top: 8rem;
}

.gallery-item {
    display: inline-block;
    width: 100%;
    margin-bottom: var(--gallery-gap);
    break-inside: avoid;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    cursor: zoom-in;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Footer container under image */
.painting-footer {
    background: rgba(34, 34, 54, 0.64);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.6rem;
    border-radius: 0 0 6px 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.painting-footer:hover {
    background: rgba(1, 1, 26, 0.85);
}

/* ✅ Title under each card: Lora + 1rem */
.painting-title {
    flex: 1;
    font-family: "Lora";
    font-size: 1rem;
    font-weight: normal;
    color: #ffffff;
    margin: 0;
    padding-right: 0.5rem;
    letter-spacing: 1px;
    text-decoration: none;
    display: block;
}

.add-to-cart-btn {
    background: none;
    border: none;
    color: #ffd700;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s ease, transform 0.2s ease;
}

.add-to-cart-btn:hover {
    color: #ffffff;
    transform: scale(1.3);
}

.add-to-cart-btn.sold {
    color: red;
    cursor: not-allowed;
    transform: none !important;
    transition: none !important;
}

/* Overlay container */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: zoom-out;
    z-index: 9999;
    transition: opacity 0.25s ease;
    opacity: 0;
}

.image-overlay.visible {
    display: flex;
    opacity: 1;
}

.zoomed-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.zoomed-img.zoom-in {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 1200px) {
    :root { --gallery-gap: 2rem; }
    .gallery-grid { column-count: 2; }
}

@media (max-width: 768px) {
    :root { --gallery-gap: 1.25rem; }
    .gallery-grid {
        width: 90%;
        padding-top: 5rem;
    }
    .painting-footer {
        padding: 0.35rem 0.55rem;
    }
}

@media (max-width: 600px) {
    :root { --gallery-gap: 0.9rem; }
    .gallery-grid {
        width: 95%;
        column-gap: var(--gallery-gap);
    }
    .painting-footer {
        padding: 0.3rem 0.5rem;
    }
}

@media (max-width: 480px) {
    :root { --gallery-gap: 0.6rem; }
    .gallery-grid {
        width: 98%;
        padding-top: 4rem;
    }
    .painting-footer {
        padding: 0.3rem 0.45rem;
    }
}

@media (max-width: 360px) {
    :root { --gallery-gap: 0.4rem; }
    .gallery-grid { width: 99%; }
    .painting-footer {
        padding: 0.25rem 0.4rem;
    }
}

@media (max-width: 320px) {
    :root { --gallery-gap: 0.3rem; }
    .gallery-grid {
        width: 99.4%;
        padding-top: 3rem;
    }
    .painting-footer {
        padding: 0.25rem 0.4rem;
    }
}

@media (max-width: 280px) {
    :root { --gallery-gap: 0.2rem; }
    .gallery-grid { width: 99.6%; }
}

@media (max-width: 250px) {
    :root { --gallery-gap: 0.1rem; }
    .gallery-grid { width: 99.8%; }
}

.skylock-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}
