/* The main image viewport is now the positioning context for the arrows */
.woocommerce-product-gallery .flex-viewport { position: relative; }

/* Neutralize flexslider's list wrappers */
.woocommerce-product-gallery .flex-direction-nav,
.woocommerce-product-gallery .flex-direction-nav li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Arrow button */
.woocommerce-product-gallery .flex-direction-nav a {
    position: absolute;
    top: 50%;                 /* centers on the big image now */
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 1;
    text-indent: 0;
    font-size: 0;             /* hide the "Previous/Next" text */
    color: transparent;
    z-index: 5;
    transition: background 0.2s ease, opacity 0.2s ease;
}

/* Chevron drawn with borders, no icon font needed */
.woocommerce-product-gallery .flex-direction-nav a::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    border-right: 2px solid #222;
    border-bottom: 2px solid #222;
}
.woocommerce-product-gallery .flex-prev { left: 12px; }
.woocommerce-product-gallery .flex-next { right: 12px; }
.woocommerce-product-gallery .flex-prev::before { transform: rotate(135deg); margin-left: 3px; }
.woocommerce-product-gallery .flex-next::before { transform: rotate(-45deg); margin-right: 3px; }

.woocommerce-product-gallery .flex-direction-nav a:hover { background: #fff; }

/* Dim arrow on first/last slide (loop is off) */
.woocommerce-product-gallery .flex-direction-nav a.flex-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}