/* Product gallery and checkout layout for the VederaNord child theme. */
@media (min-width: 992px) {
    #buy_form #product-offer > .product-gallery { flex: 0 0 62%; max-width: 62%; }
    #buy_form #product-offer > .product-info { flex: 0 0 38%; max-width: 38%; }
}

@media (min-width: 1300px) {
    #buy_form #product-offer > .product-gallery { flex-basis: 65%; max-width: 65%; }
    #buy_form #product-offer > .product-info { flex-basis: 35%; max-width: 35%; }
}

#buy_form #gallery .vd-photo-trigger {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

#buy_form #gallery .vd-photo-trigger:focus-visible {
    outline: 2px solid #223640;
    outline-offset: -3px;
}

#buy_form #gallery .vd-photo-trigger img { cursor: inherit; }

.vd-photo-trigger::after {
    content: '+';
    position: absolute;
    inset-inline-end: 8px;
    bottom: 8px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid #d7dedf;
    border-radius: 50%;
    background: rgb(255 255 255 / .92);
    color: #223640;
    font-size: 1.3rem;
    line-height: 1;
}

.vd-photo-viewer:not([open]) { display: none; }

.vd-photo-viewer[open] {
    position: fixed;
    inset: 0;
    margin: auto;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    max-width: none;
    max-height: none;
    padding: 0;
    border: 0;
    background: #fff;
    color: #223640;
    overflow: hidden;
}

.vd-photo-viewer::backdrop { background: rgb(22 33 41 / .82); }
html:has(.vd-photo-viewer[open]) { overflow: hidden; }

.vd-photo-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    padding: max(4px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 4px 8px;
    border-bottom: 1px solid #d7dedf;
    background: #fafaf7;
}

.vd-photo-control {
    min-width: 44px;
    min-height: 44px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 2px;
    color: inherit;
    background: transparent;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.vd-photo-control:hover,.vd-photo-control[aria-pressed='true'] { border-color: #d7dedf; background: #eff1ef; }
.vd-photo-control:focus-visible { outline: 2px solid #223640; outline-offset: -2px; }
.vd-photo-control:disabled { opacity: .5; cursor: default; }
.vd-photo-zoom { margin-inline-start: 6px; font-size: .9rem; }
.vd-photo-count { font-variant-numeric: tabular-nums; }

.vd-photo-stage {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    padding: 4px;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.vd-photo-stage img:not([hidden]) {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
}

.vd-photo-stage.is-zoomed {
    display: flex;
    overflow: auto;
    touch-action: auto;
}

.vd-photo-stage.is-zoomed img:not([hidden]) {
    flex: none;
    width: var(--vd-zoom-width);
    height: var(--vd-zoom-height);
    max-width: none;
    max-height: none;
    margin: auto;
}

.vd-photo-stage:focus-visible { outline: 2px solid #223640; outline-offset: -3px; }

.vd-product-pickup { display: block; margin-top: .25rem; font-size: .875rem; }

#register-customer #existing-customer .customer-login-buttons > .form-row > div { flex: 0 0 100%; max-width: 100%; }
#register-customer #existing-customer .customer-login-buttons .btn { white-space: normal; overflow-wrap: normal; }
#register-customer .vd-guest-link, .basket .vd-cart-shortcut { display: none; }

@media (max-width: 991.98px) {
    #buy_form #product-offer > .product-gallery { padding-inline: 4px; }
    #buy_form #product-offer .product-info-inner { padding-top: .5rem; }
    #buy_form #image_wrapper:not(.fullscreen) #gallery .js-gallery-images.square { aspect-ratio: 1 / .85; }
    #buy_form #image_wrapper:not(.fullscreen) #gallery .js-gallery-images.square::before { padding-top: 85%; }
    #buy_form #product-offer .product-headline h1 { font-size: clamp(1.4rem, 4.55vw, 2rem); margin-bottom: .5rem; }

    #content-wrapper.is-item-list .productbox-title .text-clamp-2 {
        -webkit-line-clamp: 3;
        max-height: none;
        overflow-wrap: anywhere;
    }

    .vd-photo-viewer[open] { width: 100%; height: 100%; }

    .basket .vd-cart-shortcut {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px 16px;
        padding: 10px 12px;
        margin-bottom: 1rem;
        border: 1px solid #d7dedf;
        background: #fafaf7;
    }

    .vd-cart-shortcut a, #register-customer .vd-guest-link { min-height: 44px; }
    .vd-cart-shortcut small, .vd-cart-shortcut strong { display: block; }
    #register-customer .vd-guest-link { display: block; margin-bottom: .75rem; }
    #register-customer #customer { scroll-margin-top: 11rem; }
}
