.vi-gallery {
    min-width: 0;
    --vi-photo-ink: #102d52;
    --vi-photo-accent: #1857ba;
}
.vi-gallery__stage {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid #dbe5f1;
    border-radius: 16px;
    background: radial-gradient(ellipse at 50% 30%, #f9fbff 15%, #e4edf9 100%);
}
.vi-gallery__photo {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    touch-action: pan-y;
    cursor: zoom-in;
}
.vi-gallery__photo img, .vi-gallery__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.vi-gallery__photo img { position: absolute; inset: 0; }
.vi-gallery__placeholder { aspect-ratio: 4 / 3; height: auto; }
.vi-gallery__zoom, .vi-gallery__nav, .vi-gallery__close, .vi-gallery__count {
    position: absolute;
    display: grid;
    place-items: center;
    background: #fff;
    color: var(--vi-photo-ink);
    border: 1px solid #d8e4f1;
    border-radius: 50%;
    box-shadow: 0 3px 12px #102d5222;
}
.vi-gallery__zoom { top: 12px; right: 12px; width: 40px; height: 40px; }
.vi-gallery__nav, .vi-gallery__close {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    font: 600 28px/1 system-ui, sans-serif;
    cursor: pointer;
}
.vi-gallery__nav { top: 50%; transform: translateY(-50%); }
.vi-gallery__nav--prev { left: 12px; }
.vi-gallery__nav--next { right: 12px; }
.vi-gallery__count {
    pointer-events: none;
    right: 12px;
    bottom: 12px;
    padding: 6px 11px;
    border-radius: 999px;
    font: 700 13px/1.2 system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
}
.vi-gallery__rail {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 5px 3px 7px;
    margin-top: 7px;
    scrollbar-width: thin;
    scrollbar-color: #9bb4d6 transparent;
}
.vi-gallery__thumb {
    flex: 0 0 clamp(61px, 12vw, 86px);
    display: block;
    padding: 3px;
    border: 2px solid #dbe5f1;
    background: #fff;
    border-radius: 9px;
}
.vi-gallery__thumb img {
    aspect-ratio: 1.35;
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
}
.vi-gallery__thumb[aria-current="true"] { border-color: var(--vi-photo-accent); background: #eef5ff; }
.vi-gallery button:hover { background: #eaf2fe; }
.vi-gallery :is(a, button):focus-visible { outline: 3px solid var(--vi-photo-accent); outline-offset: 2px; }
.vi-gallery .vi-gallery__photo:focus-visible { outline-offset: -4px; }
.vi-gallery__lightbox {
    position: fixed;
    inset: 0;
    width: min(96vw, 1300px);
    height: 92vh;
    height: 92dvh;
    max-width: none;
    max-height: none;
    padding: clamp(8px, 2vw, 24px);
    margin: auto;
    border: 1px solid #6884a4;
    border-radius: 14px;
    background: #0b192a;
}
.vi-gallery__lightbox:not([open]) { display: none; }
.vi-gallery__lightbox::backdrop { background: #071321e8; }
.vi-gallery__lightbox img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    touch-action: pan-y;
    user-select: none;
}
.vi-gallery__close { top: 12px; right: 12px; }
.vi-listing__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; margin-bottom: 14px; }
.vi-area-shell .vi-listing--stock { max-width: none; }
.vi-source-stock { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 275px), 1fr)); gap: 10px; }
.vi-source-card { display: flex; align-items: center; gap: 11px; padding: 8px; border: 1px solid #dbe5f1; border-radius: 10px; }
.vi-source-card > div:last-child { min-width: 0; overflow-wrap: anywhere; }
.vi-source-card > img, .vi-source-card__blank { flex: 0 0 auto; width: clamp(80px, 21vw, 118px); height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 7px; background: #e9eff8; }
.vi-source-card h3 { font-size: clamp(1rem, 2.2vw, 1.2rem); line-height: 1.18; margin: 0; }
.vi-source-card p { margin: 4px 0; color: #365477; }
.vi-source-card form { margin: 0; }
.vi-source-card .button { min-height: 40px; padding: 4px 11px; }
.vi-listing code { overflow-wrap: anywhere; }
.vi-catalog-shell .catalog-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.vi-catalog-measures { grid-column: 1 / -1; }
.vi-catalog-measures summary { cursor: pointer; color: #153e77; font-weight: 700; padding-block: 5px; }
.vi-catalog-measures > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 540px; }
.vi-catalog-shell .catalog-form .vi-catalog-measures input { width: 100%; min-width: 0; }
@media (max-width: 760px) {
    .vi-catalog-shell .catalog-form { grid-template-columns: 1fr; }
    .vi-source-card .button { min-height: 44px; }
    .vi-area-shell .area-tools .text-link { grid-column: 1 / -1; }
}
.site-nav .brand, .site-footer .brand {
    display: inline-block;
    width: clamp(148px, 18vw, 218px);
    aspect-ratio: 3 / 1;
    flex: 0 0 auto;
    background: url("logo-valor-imperdivel.webp") center / contain no-repeat;
}
.site-nav .brand > *, .site-footer .brand > * { display: none; }
.site-footer .brand {
    border: 5px solid white;
    border-radius: 8px;
    background-color: white;
}
.vi-area-shell .vi-listing { max-width: 740px; }
.vi-listing h2, .vi-listing-editor h2 { margin-bottom: .35rem; }
.vi-listing__fields { display: grid; gap: 12px; margin-top: 18px; }
.vi-listing__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 18px; }
.vi-listing__item { font-weight: 700; }
.vi-listing__details {
    margin-top: 8px;
    border-top: 1px solid #dbe5f1;
    padding: 12px 0 0;
}
.vi-listing__details > summary {
    cursor: pointer;
    color: #153e77;
    font-weight: 700;
    padding: 5px 0;
}
.vi-listing__details > :not(summary) { margin-top: 9px; }
.vi-listing__hint { color: #45607d; font-size: .88rem; }
.vi-listing__secondary {
    background: transparent;
    border: 0;
    min-height: 44px;
    padding: 4px 0;
    font: inherit;
    font-weight: 700;
    color: #153e77;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
@media (max-width: 760px) {
    .vi-product-shell .product-layout { margin-block: 16px 22px; gap: 18px; }
    .vi-product-shell .product-layout h1 { font-size: clamp(2rem, 7.5vw, 3.3rem); overflow-wrap: anywhere; }
    .vi-product-shell .detail-list { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); column-gap: 10px; }
    .vi-product-shell .detail-list dd { overflow-wrap: anywhere; }
    .vi-product-shell .vi-product-quote { width: 100%; justify-content: center; }
    .vi-gallery__stage { border-radius: 12px; }
    .vi-gallery__nav--prev { left: 8px; }
    .vi-gallery__nav--next { right: 8px; }
    .home .category-card .category-text { padding-inline-start: 11px; }
    .home .category-card .category-text strong { font-size: clamp(1.35rem, 5.3vw, 1.78rem); }
    .home .measure-form input, .vi-catalog-shell select, .vi-catalog-shell input,
    .vi-area-shell select, .vi-area-shell input, .vi-area-shell textarea,
    .vi-product-shell select, .vi-product-shell input, .vi-product-shell textarea { font-size: 16px; }
    .vi-catalog-shell .filter-tabs, .vi-area-shell .area-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 2px 2px 7px;
        margin-bottom: 13px;
        scrollbar-width: thin;
    }
    .vi-catalog-shell .filter-tabs a, .vi-area-shell .area-tabs a {
        flex: 0 0 auto;
        min-height: 44px;
        align-items: center;
        white-space: nowrap;
    }
    .vi-catalog-shell .catalog-form, .vi-area-shell .form-card,
    .vi-area-shell .data-panel, .vi-product-shell .form-card { padding: clamp(12px, 3vw, 19px); }
    .vi-area-shell .area-tools, .vi-catalog-shell .catalog-form {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: end;
    }
    .vi-area-shell .area-tools > *, .vi-catalog-shell .catalog-form > * { min-width: 0; }
    .vi-area-shell .area-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vi-catalog-shell .catalog-form label:first-of-type, .vi-area-shell .area-tools label:first-of-type,
    .vi-catalog-shell .catalog-form .button, .vi-area-shell .area-tools .button { grid-column: 1 / -1; }
    .vi-catalog-shell .catalog-form label:not(:first-of-type) input { width: 100%; min-width: 0; }
    .vi-catalog-shell .catalog-form .button, .vi-area-shell .area-tools .button,
    .vi-area-shell .form-actions .button, .vi-product-shell .vi-product-quote { min-height: 44px; }
    .vi-catalog-shell .product-card, .home .product-card { overflow-wrap: anywhere; }
    .vi-area-shell .tyre-fields .form-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vi-area-shell .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .vi-area-shell .stat { font-size: .77rem; padding: 9px 6px; }
    .vi-area-shell .table-scroll table { min-width: 580px; }
    .vi-listing__actions .button, .vi-listing__actions .vi-listing__secondary {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        text-align: center;
    }
    .vi-listing__actions .text-link { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 390px) {
    .vi-area-shell .tyre-fields .form-layout { grid-template-columns: 1fr; }
    .vi-gallery__zoom { width: 34px; height: 34px; top: 8px; right: 8px; }
    .vi-gallery__count { right: 8px; bottom: 8px; }
}
