/* Gallery Grid Layout (Bulletproof) */
.coloring-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 992px) {
    .coloring-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    /* Edge-to-Edge on Mobile */
    .coloring-gallery-grid {
        grid-template-columns: 1fr;
        padding: 0;
        margin-left: -1rem; /* Pull out of container padding */
        margin-right: -1rem;
        max-width: 100vw;
    }
}

/* Card Styling */
.coloring-gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 24px;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    background: #fff;
}

/* Visual Watermark Overlay on the Website */
.coloring-img-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.coloring-img-wrapper::after {
    content: "ColoringX.com";
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: rgba(100, 100, 100, 0.8);
    background: rgba(245, 245, 245, 0.9);
    padding: 3px 12px;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    pointer-events: none; /* Allows users to still right click the image */
    text-transform: uppercase;
}

@media (max-width: 480px) {
    .coloring-gallery-item {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 0; /* Remove internal padding on mobile */
        margin-bottom: 40px;
    }
}

.coloring-gallery-item:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* Image Styling */
.coloring-gallery-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 15px;
}

@media (max-width: 480px) {
    .coloring-gallery-image {
        border-radius: 0;
    }
}

/* Button Group */
.coloring-gallery-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

@media (max-width: 480px) {
    .coloring-gallery-actions {
        padding: 0 1rem; /* Keep buttons padded from screen edge */
    }
}