/* Banner image zoom modal (Visualizer). */
.js-trigger-zoom {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 10;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}
.js-trigger-zoom:hover,
.js-trigger-zoom:focus {
    background: #f5f5f5;
}

#tire-zoom-modal {
    position: fixed;
    inset: 0;
    z-index: 9999999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.6);
}
strong.js-zoom-footer-name {
    font-weight: 500;
}
#tire-zoom-modal.is-open {
    display: flex;
}
.zoom-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1100px, 100%);
    height: min(760px, 100%);
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}
.zoom-levels {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
}
.zoom-levels-label {
    display: block;
    padding-bottom: 4px;
    margin-bottom: 6px;
    border-bottom: 1px solid #ccc;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: #777;
}
.zoom-levels .js-zoom-btn {
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    font-size: 16px;
    color: #999;
}
.zoom-levels .js-zoom-btn.is-active {
    color: #222;
}
.zoom-levels .js-zoom-btn:hover,
.zoom-levels .js-zoom-btn:focus {
    background: none;
    color: #222;
}
.zoom-levels .zoom-dot {
    margin: 0 6px;
    color: #aaa;
}
#close-zoom-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    font-size: 28px;
    line-height: 1;
    color: #444;
}
.zoom-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    /* Clear the zoom-level header and the arrows, so a zoomed image stays inside its box. */
    margin: 80px 76px 12px;
}
#zoomed-tire-image {
    max-width: 80%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
/* Zoomed: the image follows the pointer so every part of the tire can be seen. */
.zoom-stage.is-zoomed { cursor: move; touch-action: none; }
.zoom-stage.is-zoomed #zoomed-tire-image { transition: transform 0.3s ease, transform-origin 0.1s linear; }
.zoom-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 44px;
    height: 44px;
    padding: 0;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: none;
    font-size: 22px;
    color: #333;
}
.zoom-nav:hover,
.zoom-nav:focus {
    background: #f5f5f5;
    color: #333;
}
.zoom-prev { left: 16px; }
.zoom-next { right: 16px; }
.zoom-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid #eee;
    font-size: 14px;
}
.zoom-footer img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

@media (max-width: 767px) {
    .zoom-panel { height: 100%; }
    .zoom-stage { margin: 72px 48px 8px; }
    #zoomed-tire-image { max-width: 100%; }
    .zoom-nav { width: 36px; height: 36px; }
    .zoom-prev { left: 8px; }
    .zoom-next { right: 8px; }
}

/* Page scroll lock while the zoom modal is open. */
html.bwo-zoom-open,
html.bwo-zoom-open body { overflow: hidden; }
#tire-zoom-modal { overscroll-behavior: contain; }

/* Loading placeholder (reuses the grid's .skeleton-block shimmer). */
.zoom-stage { position: relative; }
.zoom-skeleton { display: none; position: absolute; width: min(420px, 55%); height: 80%; border-radius: 16px; }
.zoom-stage.is-loading .zoom-skeleton { display: block; }
.zoom-stage.is-loading #zoomed-tire-image { opacity: 0; }
