:root {
    --rkfvs-primary:            #000000;
    --rkfvs-accent:             #ff0000;
    --rkfvs-bg:                 #ffffff;
    --rkfvs-text:               #333333;
    --rkfvs-text-muted:         #888888;
    --rkfvs-border:             #e0e0e0;
    --rkfvs-shadow:             rgba(0, 0, 0, .1);
    --rkfvs-radius:             8px;
    --rkfvs-radius-sm:          4px;
    --rkfvs-transition:         .2s ease;
    --rkfvs-overlay-backdrop:   rgba(0, 0, 0, .6);
    --rkfvs-overlay-z:          99999;
    --rkfvs-filters-width:      250px;
    --rkfvs-gap:                16px;
    --rkfvs-gap-sm:             8px;
    --rkfvs-gap-lg:             24px;
    --rkfvs-skeleton-base:      #f0f0f0;
    --rkfvs-skeleton-highlight: #e0e0e0;
    --rkfvs-overlay-maxw: 96vw;
    --rkfvs-card-min:     180px;
}

body.rkfreevisualsearch-open {
    overflow: hidden;
}

.rkfvs-overlay__backdrop {
    position: fixed;
    inset: 0;
    background: var(--rkfvs-overlay-backdrop);
    z-index: calc(var(--rkfvs-overlay-z) - 1);
    opacity: 0;
    transition: opacity var(--rkfvs-transition);
    pointer-events: none;
}

.rkfvs-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--rkfvs-overlay-z);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--rkfvs-gap-lg);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--rkfvs-transition);
}

.rkfvs-overlay.rkfvs-overlay--open,
.rkfvs-overlay.rkfvs-overlay--open .rkfvs-overlay__backdrop {
    opacity: 1;
    pointer-events: auto;
}

.rkfvs-overlay__container {
    position: relative;
    z-index: var(--rkfvs-overlay-z);
    background: var(--rkfvs-bg);
    color: var(--rkfvs-text);
    border-radius: var(--rkfvs-radius);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, .3),
        0 4px  16px rgba(0, 0, 0, .15);
    width: 100%;
    max-width: var(--rkfvs-overlay-maxw, 1400px);
    max-height: calc(100vh - var(--rkfvs-gap-lg) * 2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.rkfvs-overlay__header {
    display: flex;
    align-items: center;
    gap: var(--rkfvs-gap-sm);
    padding: var(--rkfvs-gap) var(--rkfvs-gap-lg);
    border-bottom: 1px solid var(--rkfvs-border);
    flex-shrink: 0;
}

.rkfvs-search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--rkfvs-gap-sm);
    background: #f5f5f5;
    border: 1.5px solid var(--rkfvs-border);
    border-radius: var(--rkfvs-radius);
    padding: 0 var(--rkfvs-gap-sm);
    transition: border-color var(--rkfvs-transition), box-shadow var(--rkfvs-transition);
}

.rkfvs-search-box:focus-within {
    border-color: var(--rkfvs-accent);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, .08);
}

.rkfvs-search-icon {
    color: var(--rkfvs-text-muted);
    flex-shrink: 0;
}

.rkfvs-search-box__input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1rem;
    color: var(--rkfvs-text);
    padding: 12px 0;
    min-width: 0;
}

.rkfvs-search-box__input::placeholder {
    color: var(--rkfvs-text-muted);
}

.rkfvs-search-box__clear {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--rkfvs-text-muted);
    padding: 4px;
    border-radius: var(--rkfvs-radius-sm);
    flex-shrink: 0;
    transition: color var(--rkfvs-transition), background var(--rkfvs-transition);
}

.rkfvs-search-box__clear:hover {
    color: var(--rkfvs-text);
    background: var(--rkfvs-border);
}

.rkfvs-search-box__shortcut {
    font-family: inherit;
    font-size: 11px;
    line-height: 1;
    padding: 3px 6px;
    background: var(--rkfvs-border);
    border-radius: var(--rkfvs-radius-sm);
    color: var(--rkfvs-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid #c6c6c6;
}

.rkfvs-overlay__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--rkfvs-radius-sm);
    color: var(--rkfvs-text-muted);
    transition: color var(--rkfvs-transition), background var(--rkfvs-transition);
    flex-shrink: 0;
}

.rkfvs-overlay__close:hover {
    color: var(--rkfvs-text);
    background: var(--rkfvs-border);
}

.rkfvs-overlay__close:focus-visible {
    outline: 2px solid var(--rkfvs-accent);
    outline-offset: 2px;
}

.rkfvs-overlay__body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.rkfvs-overlay__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: var(--rkfvs-gap-lg);
    gap: var(--rkfvs-gap);
    min-width: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--rkfvs-border) transparent;
}

.rkfvs-overlay__main::-webkit-scrollbar       { width: 6px; }
.rkfvs-overlay__main::-webkit-scrollbar-track { background: transparent; }
.rkfvs-overlay__main::-webkit-scrollbar-thumb { background: var(--rkfvs-border); border-radius: 3px; }

.rkfvs-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    min-height: 0;
    font-size: .8rem;
    color: var(--rkfvs-text-muted);
    min-height: 1.2em;
}

.rkfvs-status:empty {
    display: none;
}

.rkfvs-status__count {
    font-size: .85rem;
    color: var(--rkfvs-text-muted);
    font-weight: 500;
}

.rkfvs-status__time {
    font-weight: 400;
    opacity: .6;
}

.rkfvs-sort {
    appearance: none;
    -webkit-appearance: none;
    background: #f5f5f5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    border: 1px solid var(--rkfvs-border);
    border-radius: var(--rkfvs-radius-sm);
    padding: 6px 32px 6px 12px;
    font-size: .8rem;
    color: var(--rkfvs-text);
    cursor: pointer;
    transition: border-color var(--rkfvs-transition);
}

.rkfvs-sort:hover,
.rkfvs-sort:focus {
    border-color: var(--rkfvs-accent);
    outline: none;
}


.rkfvs-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--rkfvs-card-min, 180px), 1fr));
    gap: var(--rkfvs-gap);
    align-content: start;
}

.rkfvs-product {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--rkfvs-border);
    border-radius: var(--rkfvs-radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--rkfvs-text);
    background: var(--rkfvs-bg);
    transition:
        box-shadow   var(--rkfvs-transition),
        border-color var(--rkfvs-transition),
        transform    var(--rkfvs-transition);
    cursor: pointer;
    outline: none;
}

.rkfvs-product:hover,
.rkfvs-product:focus-visible {
    box-shadow: 0 4px 20px var(--rkfvs-shadow);
    border-color: var(--rkfvs-accent);
    transform: translateY(-2px);
}

.rkfvs-product--active {
    box-shadow: 0 4px 20px var(--rkfvs-shadow);
    border-color: var(--rkfvs-accent);
    outline: 2px solid var(--rkfvs-accent);
    outline-offset: -2px;
}

.rkfvs-product__image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rkfvs-product__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
    display: block;
}

.rkfvs-product__image:hover img {
    transform: scale(1.04);
}

.rkfvs-product__no-image {
    display: block;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        #f0f0f0, #f0f0f0 5px,
        #e8e8e8 5px, #e8e8e8 10px
    );
}

.rkfvs-product__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--rkfvs-gap-sm) var(--rkfvs-gap-sm) var(--rkfvs-gap) var(--rkfvs-gap-sm);
    flex: 1;
}

.rkfvs-product__name {
    margin: 0;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--rkfvs-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rkfvs-product__ref {
    font-size: .72rem;
    color: var(--rkfvs-text-muted);
    letter-spacing: .02em;
}

.rkfvs-product__manufacturer {
    font-size: .75rem;
    color: var(--rkfvs-text-muted);
    font-style: italic;
}

.rkfvs-product__price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rkfvs-primary);
    margin-top: auto;
}

.rkfvs-product__stock {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 2px 6px;
    border-radius: var(--rkfvs-radius-sm);
    display: inline-block;
    align-self: flex-start;
}

.rkfvs-product__stock--in  { background: #e8f5e9; color: #2e7d32; }
.rkfvs-product__stock--out { background: #fce4ec; color: #c62828; }


.rkfvs-product--skeleton {
    pointer-events: none;
    cursor: default;
}

.rkfvs-product--skeleton:hover,
.rkfvs-product--skeleton:focus-visible {
    box-shadow: none;
    border-color: var(--rkfvs-border);
    transform: none;
}

.rkfvs-skeleton {
    background: linear-gradient(
        90deg,
        var(--rkfvs-skeleton-base) 25%,
        var(--rkfvs-skeleton-highlight) 50%,
        var(--rkfvs-skeleton-base) 75%
    );
    background-size: 200% 100%;
    animation: rkfvs-shimmer 1.4s infinite ease-in-out;
    border-radius: var(--rkfvs-radius-sm);
}

.rkfvs-skeleton.rkfvs-product__image {
    aspect-ratio: 1 / 1;
    border-radius: 0;
}

.rkfvs-skeleton--title  { height: 14px; width: 90%; margin-top: 4px; }
.rkfvs-skeleton--text   { height: 11px; width: 75%; }
.rkfvs-skeleton--short  { width: 50%; }


.rkfvs-popular {
    display: flex;
    flex-direction: column;
    gap: var(--rkfvs-gap-lg);
}

.rkfvs-popular__section {
    display: flex;
    flex-direction: column;
    gap: var(--rkfvs-gap-sm);
}

.rkfvs-popular h5 {
    margin: 0;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--rkfvs-text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rkfvs-popular h5 svg { opacity: .6; }

.rkfvs-popular__bestsellers h5       { color: var(--rkfvs-accent); }
.rkfvs-popular__bestsellers h5 svg   { opacity: .8; }

.rkfvs-popular__grid { margin-top: var(--rkfvs-gap-sm); }

.rkfvs-popular__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rkfvs-gap-sm);
}

.rkfvs-popular__tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #f5f5f5;
    border: 1px solid var(--rkfvs-border);
    border-radius: 100px;
    font-size: .85rem;
    color: var(--rkfvs-text);
    cursor: pointer;
    transition:
        background     var(--rkfvs-transition),
        border-color   var(--rkfvs-transition),
        color          var(--rkfvs-transition);
}

.rkfvs-popular__tag:hover {
    background: var(--rkfvs-accent);
    border-color: var(--rkfvs-accent);
    color: #fff;
}

.rkfvs-popular__tag:focus-visible {
    outline: 2px solid var(--rkfvs-accent);
    outline-offset: 2px;
}


.rkfvs-load-more {
    display: flex;
    justify-content: center;
    padding: var(--rkfvs-gap) 0;
}

.rkfvs-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--rkfvs-border);
    border-top-color: var(--rkfvs-accent);
    border-radius: 50%;
    animation: rkfvs-spin .6s linear infinite;
}


.rkfvs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--rkfvs-gap-sm);
    padding: calc(var(--rkfvs-gap-lg) * 2);
    text-align: center;
    color: var(--rkfvs-text-muted);
}

.rkfvs-empty svg         { opacity: .4; }
.rkfvs-empty__text       { margin: 0; font-size: 1rem; font-weight: 600; color: var(--rkfvs-text); }
.rkfvs-empty__suggestion { margin: 0; font-size: .875rem; }

.rkfvs-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--rkfvs-gap-sm);
    padding: var(--rkfvs-gap-lg);
    color: var(--rkfvs-text-muted);
    text-align: center;
}

.rkfvs-error p { margin: 0; font-size: .9rem; }

.rkfvs-overlay__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: var(--rkfvs-gap-sm) var(--rkfvs-gap-lg);
    border-top: 1px solid var(--rkfvs-border);
    flex-shrink: 0;
}

.rkfvs-overlay__powered {
    font-size: .75rem;
    color: var(--rkfvs-text-muted);
}

.rkfvs-filters {
    width: var(--rkfvs-filters-width);
    flex-shrink: 0;
    border-right: 1px solid var(--rkfvs-border);
    overflow-y: auto;
    padding: var(--rkfvs-gap-lg) var(--rkfvs-gap);
    display: flex;
    flex-direction: column;
    gap: var(--rkfvs-gap-lg);
    scrollbar-width: thin;
    scrollbar-color: var(--rkfvs-border) transparent;
}

.rkfvs-filters::-webkit-scrollbar       { width: 4px; }
.rkfvs-filters::-webkit-scrollbar-thumb { background: var(--rkfvs-border); border-radius: 2px; }
.rkfvs-filters:empty                    { display: none; }

.rkfvs-filters__header {
    padding-bottom: var(--rkfvs-gap-sm);
    margin-bottom: var(--rkfvs-gap-sm);
    border-bottom: 2px solid var(--rkfvs-primary);
    flex-shrink: 0;
}

.rkfvs-filters__title {
    margin: 0;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--rkfvs-primary);
}

.rkfvs-filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--rkfvs-gap-sm);
}

.rkfvs-filter-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding-bottom: var(--rkfvs-gap-sm);
    border-bottom: 1px solid var(--rkfvs-border);
    user-select: none;
}

.rkfvs-filter-group__header:hover .rkfvs-filter-group__title {
    color: var(--rkfvs-primary);
}

.rkfvs-filter-group__title {
    margin: 0;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--rkfvs-text-muted);
    font-weight: 700;
    border-bottom: none;
    padding-bottom: 0;
    flex: 1;
}

.rkfvs-filter-group__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--rkfvs-text-muted);
    border-radius: var(--rkfvs-radius-sm);
    flex-shrink: 0;
    transition: color var(--rkfvs-transition), background var(--rkfvs-transition);
    padding: 0;
}

.rkfvs-filter-group__toggle:hover {
    color: var(--rkfvs-primary);
    background: rgba(0, 0, 0, .04);
}

.rkfvs-filter-group__toggle svg {
    transition: transform .2s ease;
}

.rkfvs-filter-group__toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.rkfvs-filter-group__items,
.rkfvs-filter-group__collapsible {
    overflow: hidden;
    transition: none;
}

.rkfvs-filter-group__items:not([style*="display: none"]),
.rkfvs-filter-group__collapsible:not([style*="display: none"]) {
    margin-top: var(--rkfvs-gap-sm);
}

.rkfvs-filter-group__items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rkfvs-filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 6px 8px;
    background: none;
    border: none;
    border-radius: var(--rkfvs-radius-sm);
    cursor: pointer;
    font-size: .85rem;
    color: var(--rkfvs-text);
    text-align: left;
    transition: background var(--rkfvs-transition), color var(--rkfvs-transition);
}

.rkfvs-filter-item > span:first-child {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rkfvs-filter-item:hover {
    background: #f5f5f5;
    color: var(--rkfvs-primary);
}

.rkfvs-filter-item:focus-visible {
    outline: 2px solid var(--rkfvs-accent);
    outline-offset: 0;
}

.rkfvs-filter-item.active {
    background: rgba(255, 0, 0, .06);
    color: var(--rkfvs-accent);
    font-weight: 600;
}

.rkfvs-filter-item.active .rkfvs-filter-count {
    background: var(--rkfvs-accent);
    color: #fff;
}

.rkfvs-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 18px;
    padding: 0 5px;
    background: var(--rkfvs-border);
    border-radius: 100px;
    font-size: .7rem;
    font-weight: 600;
    color: var(--rkfvs-text-muted);
    flex-shrink: 0;
    margin-left: var(--rkfvs-gap-sm);
    transition: background var(--rkfvs-transition), color var(--rkfvs-transition);
}


.rkfvs-price-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rkfvs-gap-sm);
    font-size: .85rem;
    font-weight: 600;
    color: var(--rkfvs-text);
}

.rkfvs-price-sep { color: var(--rkfvs-text-muted); }

.rkfvs-price-slider {
    position: relative;
    height: 36px;
    display: flex;
    align-items: center;
}

.rkfvs-price-track {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--rkfvs-border);
    border-radius: 2px;
}

.rkfvs-price-range {
    position: absolute;
    height: 4px;
    background: var(--rkfvs-accent);
    border-radius: 2px;
}

.rkfvs-price-input {
    position: absolute;
    width: 100%;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
}

.rkfvs-price-input::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--rkfvs-accent);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    cursor: pointer;
    pointer-events: all;
    position: relative;
    z-index: 1;
}

.rkfvs-price-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--rkfvs-accent);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    cursor: pointer;
    pointer-events: all;
}

.rkfvs-price-input--max { z-index: 2; }

.rkfvs-price-reset {
    background: none;
    border: 1px solid var(--rkfvs-border);
    border-radius: var(--rkfvs-radius-sm);
    padding: 4px 10px;
    font-size: .72rem;
    color: var(--rkfvs-text-muted);
    cursor: pointer;
    align-self: flex-start;
    margin-top: 2px;
    transition: color var(--rkfvs-transition), border-color var(--rkfvs-transition);
}

.rkfvs-price-reset:hover {
    color: var(--rkfvs-accent);
    border-color: var(--rkfvs-accent);
}

.rkfvs-filter-toggle {
    display: none;
    align-items: center;
    gap: var(--rkfvs-gap-sm);
    padding: 8px 16px;
    background: var(--rkfvs-primary);
    color: #fff;
    border: none;
    border-radius: var(--rkfvs-radius);
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--rkfvs-transition);
}

.rkfvs-filter-toggle:hover,
.rkfvs-filter-toggle.active {
    background: var(--rkfvs-accent);
}

.rkfvs-filter-toggle:focus-visible {
    outline: 2px solid var(--rkfvs-accent);
    outline-offset: 2px;
}

.rkfvs-results-section-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: 2px 0 8px;
    margin-top: 4px;
}

.rkfvs-results-section-header:first-child {
    margin-top: 0;
}

.rkfvs-results-section-header--exact {
    color: var(--rkfvs-accent);
    border-bottom: 1px solid var(--rkfvs-accent);
    opacity: .9;
}

.rkfvs-results-section-header--related {
    color: var(--rkfvs-text-muted);
    border-bottom: 1px solid var(--rkfvs-border);
}

.rkfvs-results-section-header--indirect {
    color: var(--rkfvs-text-muted);
    border-bottom: 1px dashed var(--rkfvs-border);
    opacity: .75;
}

.rkfvs-product--exact {
    border-color: var(--rkfvs-accent);
    box-shadow: 0 0 0 2px var(--rkfvs-accent), 0 4px 16px rgba(0, 0, 0, .1);
    position: relative;
}

.rkfvs-product--exact:hover,
.rkfvs-product--exact:focus-visible {
    box-shadow: 0 0 0 2px var(--rkfvs-accent), 0 6px 24px rgba(0, 0, 0, .14);
    transform: translateY(-2px);
}

.rkfvs-product__exact-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--rkfvs-accent);
    background: color-mix(in srgb, var(--rkfvs-accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--rkfvs-accent) 30%, transparent);
    border-radius: var(--rkfvs-radius-sm);
    padding: 2px 6px;
    margin-bottom: 2px;
    order: -1;
    align-self: flex-start;
}

@supports not (background: color-mix(in srgb, red 10%, transparent)) {
    .rkfvs-product__exact-badge {
        background: rgba(255, 0, 0, .08);
        border-color: rgba(255, 0, 0, .25);
    }
}

.rkfvs-results .rkfvs-product { animation: rkfvs-fade-in .2s ease both; }
.rkfvs-results .rkfvs-product:nth-child(1)  { animation-delay: 0s; }
.rkfvs-results .rkfvs-product:nth-child(2)  { animation-delay: .03s; }
.rkfvs-results .rkfvs-product:nth-child(3)  { animation-delay: .06s; }
.rkfvs-results .rkfvs-product:nth-child(4)  { animation-delay: .09s; }
.rkfvs-results .rkfvs-product:nth-child(5)  { animation-delay: .12s; }
.rkfvs-results .rkfvs-product:nth-child(6)  { animation-delay: .15s; }
.rkfvs-results .rkfvs-product:nth-child(7)  { animation-delay: .18s; }
.rkfvs-results .rkfvs-product:nth-child(8)  { animation-delay: .21s; }
.rkfvs-results .rkfvs-product:nth-child(9)  { animation-delay: .24s; }
.rkfvs-results .rkfvs-product:nth-child(10) { animation-delay: .27s; }
.rkfvs-results .rkfvs-product:nth-child(11) { animation-delay: .30s; }
.rkfvs-results .rkfvs-product:nth-child(12) { animation-delay: .33s; }

.rkfvs-overlay[data-animation="fade"],
.rkfvs-overlay[data-animation="fade"] .rkfvs-overlay__container {
    transition: opacity .22s ease;
}
.rkfvs-overlay[data-animation="fade"]:not(.rkfvs-overlay--open)           { opacity: 0; }
.rkfvs-overlay[data-animation="fade"].rkfvs-overlay--open                 { opacity: 1; }

.rkfvs-overlay[data-animation="slide-up"] {
    transition: opacity .25s ease;
}
.rkfvs-overlay[data-animation="slide-up"] .rkfvs-overlay__container {
    transition: opacity .25s ease, transform .25s cubic-bezier(.22, .61, .36, 1);
}
.rkfvs-overlay[data-animation="slide-up"]:not(.rkfvs-overlay--open)                          { opacity: 0; }
.rkfvs-overlay[data-animation="slide-up"]:not(.rkfvs-overlay--open) .rkfvs-overlay__container { opacity: 0; transform: translateY(24px); }
.rkfvs-overlay[data-animation="slide-up"].rkfvs-overlay--open                                 { opacity: 1; }
.rkfvs-overlay[data-animation="slide-up"].rkfvs-overlay--open .rkfvs-overlay__container       { opacity: 1; transform: translateY(0); }

.rkfvs-overlay[data-animation="scale"] {
    transition: opacity .22s ease;
}
.rkfvs-overlay[data-animation="scale"] .rkfvs-overlay__container {
    transition: opacity .22s ease, transform .22s cubic-bezier(.22, .61, .36, 1);
    transform-origin: top center;
}
.rkfvs-overlay[data-animation="scale"]:not(.rkfvs-overlay--open)                          { opacity: 0; }
.rkfvs-overlay[data-animation="scale"]:not(.rkfvs-overlay--open) .rkfvs-overlay__container { opacity: 0; transform: scale(.95); }
.rkfvs-overlay[data-animation="scale"].rkfvs-overlay--open                                 { opacity: 1; }
.rkfvs-overlay[data-animation="scale"].rkfvs-overlay--open .rkfvs-overlay__container       { opacity: 1; transform: scale(1); }

@keyframes rkfvs-spin {
    to { transform: rotate(360deg); }
}

@keyframes rkfvs-shimmer {
    0%  { background-position:  200% 0; }
    to  { background-position: -200% 0; }
}

@keyframes rkfvs-fade-in {
    0%  { opacity: 0; }
    to  { opacity: 1; }
}

@keyframes rkfvs-slide-up-in {
    0%  { opacity: 0; transform: translateY(24px); }
    to  { opacity: 1; transform: translateY(0); }
}

@keyframes rkfvs-scale-in {
    0%  { opacity: 0; transform: scale(.95); }
    to  { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .rkfvs-overlay,
    .rkfvs-overlay .rkfvs-overlay__container,
    .rkfvs-results .rkfvs-product,
    .rkfvs-skeleton {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 767px) {

    .rkfvs-overlay {
        padding: 0;
        align-items: flex-start;
    }

    .rkfvs-overlay__container {
        border-radius: 0;
        max-height: 100dvh;
        height: 100dvh;
        max-width: 100%;
    }

    .rkfvs-overlay__header {
        padding: var(--rkfvs-gap-sm) var(--rkfvs-gap);
    }

    .rkfvs-search-box__input {
        padding: 14px 0;
        font-size: 1rem;
    }

    .rkfvs-overlay__close {
        width: 44px;
        height: 44px;
    }

    .rkfvs-filters {
        display: none;
        position: fixed;
        inset: auto 0 0;
        width: 100%;
        max-height: 60vh;
        border-right: none;
        border-top: 2px solid var(--rkfvs-border);
        border-radius: var(--rkfvs-radius) var(--rkfvs-radius) 0 0;
        padding: var(--rkfvs-gap-lg) var(--rkfvs-gap);
        background: var(--rkfvs-bg);
        z-index: calc(var(--rkfvs-overlay-z) + 1);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, .15);
        overflow-y: auto;
        transform: translateY(100%);
        transition: transform .3s cubic-bezier(.22, .61, .36, 1);
    }

    .rkfvs-filters.rkfvs-filters--drawer-open {
        display: flex;
        transform: translateY(0);
    }

    .rkfvs-filter-toggle {
        display: inline-flex;
        position: fixed;
        bottom: var(--rkfvs-gap);
        left: 50%;
        transform: translate(-50%);
        z-index: var(--rkfvs-overlay-z);
        box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
    }

    .rkfvs-results {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--rkfvs-gap-sm);
    }

    .rkfvs-product__name  { font-size: .8rem; }
    .rkfvs-product__price { font-size: .9rem; }

    .rkfvs-overlay__main { padding: var(--rkfvs-gap); }

    .rkfvs-popular__tag  { padding: 8px 16px; font-size: .9rem; }
    .rkfvs-filter-item   { padding: 10px 8px; font-size: .9rem; }

    .rkfvs-search-box__shortcut { display: none; }

    .rkfvs-overlay__footer { padding: var(--rkfvs-gap-sm); }
}

@media (min-width: 768px) and (max-width: 1023px) {

    .rkfvs-overlay {
        padding: var(--rkfvs-gap);
        align-items: flex-start;
    }

    .rkfvs-overlay__container {
        max-height: calc(100vh - var(--rkfvs-gap) * 2);
    }

    .rkfvs-filters {
        width: 200px;
    }

    .rkfvs-results {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .rkfvs-filter-group__title { font-size: .7rem; }
}

@media (min-width: 1024px) {

    .rkfvs-overlay {
        padding: var(--rkfvs-gap);
        padding-top: 4vh;
        align-items: flex-start;
    }

    .rkfvs-overlay__container {
        max-height: 90vh;
        max-width: var(--rkfvs-overlay-maxw, 96vw);
    }

    .rkfvs-filters {
        width: var(--rkfvs-filters-width);
    }

    .rkfvs-results {
        grid-template-columns: repeat(auto-fill, minmax(var(--rkfvs-card-min, 180px), 1fr));
    }
}

@media (min-width: 1400px) {

    .rkfvs-overlay__container {
        max-width: var(--rkfvs-overlay-maxw, 96vw);
    }

    .rkfvs-results {
        grid-template-columns: repeat(auto-fill, minmax(var(--rkfvs-card-min, 180px), 1fr));
    }
}