/* =========================
   AGP ETSY GALLERY V2
========================= */

.agp-gallery {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: stretch;
}

/* ---------- THUMB WRAPPER ---------- */

.agp-thumbs-wrapper {
    position: relative;
    width: 110px;
}

/* ---------- THUMB LIST ---------- */

.agp-thumbs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 110px;

    height: 100%;        /* KEY */
    overflow-y: auto;
}


.agp-thumbs::-webkit-scrollbar {
    display: none;
}

/* Fade edges */
.agp-thumbs::before,
.agp-thumbs::after {
    content: "";
    position: sticky;
    left: 0;
    right: 0;
    height: 30px;
    pointer-events: none;
    z-index: 5;
}

.agp-thumbs::before {
    top: 0;
    background: linear-gradient(to bottom, #fff, transparent);
}

.agp-thumbs::after {
    bottom: 0;
    background: linear-gradient(to top, #fff, transparent);
}

/* ---------- THUMBNAILS ---------- */

.agp-thumb {
    width: 100px;
    height: 100px;
    min-height: 100px;     /* IMPORTANT */
    flex: 0 0 auto;        /* PREVENT FLEX SQUISH */
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid #ddd;
    cursor: pointer;
    box-sizing: border-box;
}


.agp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

.agp-thumb:hover img,
.agp-thumb.active img {
    opacity: 1;
}

.agp-thumb.active {
    border-color: #444;
}

/* ---------- SCROLL BUTTONS ---------- */

.agp-scroll {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #333;          /* solid dark grey */
    color: #fff;
    cursor: pointer;
    z-index: 10;

    display: flex;             /* CENTER ICON */
    align-items: center;
    justify-content: center;

    font-size: 14px;
    line-height: 1;
}


.agp-scroll.up { top: -14px; }
.agp-scroll.down { bottom: -14px; }

.agp-scroll:hover {
    background: #111;
}
/* ---------- MAIN IMAGE ---------- */

.agp-main {
    display: flex;
    align-items: center;
}


.agp-main-img {
    width: 100%;
    aspect-ratio: 1 / 1;   /* forces square */
    object-fit: cover;     /* removes grey bars */
    border-radius: 16px;   /* clearly visible */
    display: block;
    background: none;      /* kill grey background */
}


/* ---------- FB SHARE SAFETY ---------- */
.agp-thumbs .fb-share-wrapper,
.agp-thumbs .fb-share-btn {
    display: none !important;
}

/* ---------- MOBILE ---------- */
@media (max-width: 768px) {
    .agp-gallery {
        flex-direction: column;
    }

    .agp-thumbs-wrapper {
        width: 100%;
    }

    .agp-thumbs {
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
    }

    .agp-thumb {
        width: 90px;
        height: 90px;
        flex: 0 0 auto;
    }
}
