.magic-product-gallery .product-main-image:has(.defro-spin-panel) {
    position: relative;
}

.defro-spin-active > .defro-static-photo {
    visibility: hidden;
}

.defro-static-photo {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.defro-static-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.defro-spin-panel {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 10px 10px 12px;
    background: #fff;
}

.defro-spin-panel[hidden] {
    display: none;
}

.defro-spin-surface {
    min-height: 0;
    cursor: zoom-in;
    touch-action: pan-y;
    user-select: none;
}

.defro-spin-surface.is-dragging {
    cursor: grabbing;
}

.defro-spin-surface img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    object-fit: contain;
    pointer-events: none;
}

.defro-spin-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    font-size: .875rem;
}

.defro-spin-controls button {
    width: 44px;
    height: 44px;
    flex: none;
    border: 1px solid #d8d1cb;
    border-radius: 5px;
    background: #fff;
    color: #211c18;
    cursor: pointer;
    font: inherit;
    font-size: 1.2rem;
}

.defro-spin-controls button:hover {
    border-color: #9e3e21;
}

.image-thumbnails .thumbnail[data-gallery-kind] {
    position: relative;
}

.defro-gallery-label {
    position: absolute;
    inset: auto 0 0;
    padding: 2px 1px;
    background: rgb(255 255 255 / 94%);
    color: #211c18;
    text-align: center;
    font-size: .625rem;
    line-height: 1.15;
    pointer-events: none;
}

.defro-photo-dialog {
    width: min(94vw, 1080px);
    max-height: 92dvh;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: white;
    color: #211c18;
}

.defro-photo-dialog::backdrop {
    background: rgb(0 0 0 / 75%);
}

.defro-photo-dialog-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
}

.defro-photo-dialog-bar strong {
    flex: 1 1 14rem;
}

.defro-photo-dialog-bar button {
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid #d8d1cb;
    border-radius: 5px;
    background: #fff;
    color: inherit;
    cursor: pointer;
}

html:has(.defro-photo-dialog.is-spin[open]) {
    overflow: hidden;
}

.defro-photo-dialog.is-spin[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
}

.defro-photo-dialog.is-spin .defro-spin-panel {
    position: static;
    min-height: 0;
}

.defro-photo-dialog.is-spin .defro-spin-surface {
    cursor: grab;
    touch-action: none;
}

.defro-photo-dialog.is-spin .defro-spin-surface.is-dragging {
    cursor: grabbing;
}

.defro-photo-dialog.is-spin .defro-spin-open-hint,
.defro-photo-dialog.is-spin .defro-photo-canvas,
.defro-photo-dialog.is-spin [data-defro-photo-zoom] {
    display: none;
}

.defro-photo-canvas {
    max-height: 78dvh;
    overflow: auto;
}

.defro-photo-canvas img {
    display: block;
    max-width: 100%;
    max-height: 78dvh;
    margin-inline: auto;
    object-fit: contain;
}

.defro-photo-dialog.is-zoomed .defro-photo-canvas img {
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0;
}

[data-defro-configuration] .product-option-groups {
    min-width: 0;
    container: defro-options / inline-size;
}

[data-defro-configuration] .product-option-choices {
    grid-template-columns: minmax(0, 1fr);
}

[data-defro-configuration] .product-option-card img {
    width: min(136px, 100%);
}

[data-defro-configuration] .option-card-copy {
    overflow-wrap: anywhere;
}

@container defro-options (min-width: 33.5rem) {
    [data-defro-configuration] .product-option-choices:has(> .option-choice:nth-child(2)) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container defro-options (min-width: 33.5rem) and (max-width: 45rem) {
    [data-defro-configuration] .product-option-choices:has(> .option-choice:nth-child(2)) .product-option-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (width > 800px) {
    [data-defro-configuration] #model-description .description-section-row.with-media > .description-section-text {
        align-self: center;
    }
}

.defro-article-links {
    margin-block: 32px 0;
    padding-block: 24px;
    border-block: 1px solid #e5e5df;
}

.defro-article-links h2 {
    margin: 0 0 14px;
    font-size: 1.25rem;
}

.defro-article-links ul {
    display: grid;
    gap: 10px;
    margin: 0 0 16px;
    padding-inline-start: 1.3rem;
}

.defro-article-links li a {
    text-decoration: underline;
    text-underline-offset: .18em;
}

