/* PartsDone ProductPage 1.4.0 */

/* Review summary on the left, brand visual on the right below the title. */
.product-info-main .my-2.flex:has(> [data-pd-product-brand]) {
    width: 100%;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.pd-product-brand {
    display: inline-flex;
    align-items: flex-end;
    justify-content: flex-end;
    flex: 0 0 auto;
    max-width: 135px;
    min-height: 29px;
    margin-left: auto;
    line-height: 1;
}

.pd-product-brand__image {
    display: block;
    width: auto;
    max-width: 135px;
    height: auto;
    max-height: 54px;
    object-fit: contain;
    object-position: right bottom;
}

.pd-product-brand__fallback {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #d8dee8;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

/* FitmentPro is already inside a Hyva section card. */
section[id="partsdone.product.fitment.section"] .pd-compatibility {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

section[id="partsdone.product.fitment.section"] .pd-compatibility__details {
    display: block;
}

section[id="partsdone.product.fitment.section"] .pd-compatibility__details > summary {
    display: none;
}

section[id="partsdone.product.fitment.section"] .pd-fitment-table__controls {
    margin-top: 0;
}

/* Main product image navigation. */
.pd-gallery-arrows-host {
    position: relative;
}

.pd-gallery-arrow {
    position: absolute;
    top: 50%;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(17, 24, 39, 0.14);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--color-fg, #111827);
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.14);
    cursor: pointer;
    transform: translateY(-50%);
    transition:
        background-color 150ms ease,
        border-color 150ms ease,
        box-shadow 150ms ease,
        opacity 150ms ease;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.pd-gallery-arrow--previous {
    left: 12px;
}

.pd-gallery-arrow--next {
    right: 12px;
}

.pd-gallery-arrow:hover {
    background: #fff;
    border-color: rgba(17, 24, 39, 0.24);
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.18);
}

.pd-gallery-arrow:active {
    box-shadow: 0 1px 4px rgba(17, 24, 39, 0.16);
}

.pd-gallery-arrow:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.pd-gallery-arrow__chevron {
    display: block;
    width: 10px;
    height: 10px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.pd-gallery-arrow--previous .pd-gallery-arrow__chevron {
    margin-left: 4px;
    transform: rotate(-135deg);
}

.pd-gallery-arrow--next .pd-gallery-arrow__chevron {
    margin-right: 4px;
    transform: rotate(45deg);
}

/* Pointer devices: controls appear only on hover or true keyboard focus. */
@media (hover: hover) and (pointer: fine) {
    .pd-gallery-arrow {
        opacity: 0;
        pointer-events: none;
    }

    .pd-gallery-arrows-host:hover .pd-gallery-arrow,
    .pd-gallery-arrows-host:has(.pd-gallery-arrow:focus-visible) .pd-gallery-arrow {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 767px) {
    .product-info-main .my-2.flex:has(> [data-pd-product-brand]) {
        gap: 10px;
    }

    .pd-product-brand {
        max-width: 99px;
        min-height: 24px;
    }

    .pd-product-brand__image {
        max-width: 99px;
        max-height: 40px;
    }

    .pd-gallery-arrow {
        width: 38px;
        height: 38px;
    }

    .pd-gallery-arrow--previous {
        left: 8px;
    }

    .pd-gallery-arrow--next {
        right: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pd-gallery-arrow {
        transition: none;
    }
}

/* Hyva 1.4.6 fullscreen overlay: keep the page visible behind the gallery. */
#gallery > :is([role="dialog"], [aria-modal="true"]) {
    background-color: rgba(255, 255, 255, 0.78) !important;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

#gallery > :is([role="dialog"], [aria-modal="true"]) #gallery-main {
    background-color: transparent !important;
}
