/* SITE_MOTION_V1
 *
 * Quiet interaction feedback only.
 * No looping animation, no pulsing CTA, no parallax.
 */

/* ---------- Home AI entry ---------- */

.home-ai-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    margin: 4px 0 28px;
    padding: 17px 20px;

    border: 1px solid #cfe3ed;
    border-radius: 8px;

    background:
        linear-gradient(
            135deg,
            #f7fcfe 0%,
            #ffffff 72%
        );

    box-shadow:
        0 3px 14px rgba(0, 0, 0, .045);

    animation:
        site-soft-reveal .28s ease-out both;
}

.home-ai-entry-copy {
    min-width: 0;
}

.home-ai-entry-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 4px;

    color: #087eb6;

    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
}

.home-ai-entry-kicker-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 27px;
    height: 27px;

    border-radius: 50%;

    background: #087eb6;
    color: #fff;

    font-size: 10px;
    line-height: 1;
    letter-spacing: .04em;
}

.home-ai-entry-title {
    margin: 0;

    color: #333;

    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.home-ai-entry-text {
    margin: 4px 0 0;

    color: #666;

    font-size: 13px;
    line-height: 1.45;
}

.home-ai-entry-button {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 8px 15px;

    border: 0;
    border-radius: 6px;

    background: #087eb6;
    color: #fff;

    font: inherit;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 3px 10px rgba(8, 126, 182, .18);

    transition:
        transform .15s ease,
        box-shadow .15s ease,
        background .15s ease;
}

.home-ai-entry-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 5px 13px rgba(8, 126, 182, .24);
}

.home-ai-entry-button:focus-visible {
    outline: 3px solid rgba(8, 126, 182, .24);
    outline-offset: 3px;
}


/* ---------- Home catalogue ---------- */

.legacy-home .main-catalog-item {
    transition:
        transform .17s ease;
}

.legacy-home .main-catalog-item:hover {
    transform: translateY(-2px);
}

.legacy-home .main-catalog-item-sublink {
    transition:
        background-color .13s ease,
        color .13s ease,
        padding-left .13s ease;
}

.legacy-home .main-catalog-item-sublink:hover {
    padding-left: 7px;
}


/* ---------- Home product carousel ---------- */

.legacy-home #main-items .item {
    transition:
        transform .17s ease,
        box-shadow .17s ease;
}

.legacy-home #main-items .item:hover {
    transform: translateY(-2px);

    box-shadow:
        0 6px 16px rgba(0, 0, 0, .07);
}

.legacy-home .carousel-tovar-button {
    transition:
        transform .14s ease,
        box-shadow .14s ease;
}

.legacy-home .carousel-tovar-button:hover {
    transform: translateY(-1px);
}


/* ---------- AI responses ---------- */

.ai-catalog-assistant-status:not([hidden]),
.ai-catalog-assistant-results:not([hidden]) {
    animation:
        site-soft-reveal .2s ease-out both;
}


/* ---------- Common buttons/links ---------- */

.footer-order-online,
.request-widget-link {
    transition:
        opacity .14s ease,
        transform .14s ease;
}

.footer-order-online:hover {
    transform: translateY(-1px);
}


/* ---------- Animation ---------- */

@keyframes site-soft-reveal {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ---------- Mobile ---------- */

@media (max-width: 700px) {
    .home-ai-entry {
        display: block;

        margin-bottom: 20px;
        padding: 15px;
    }

    .home-ai-entry-title {
        font-size: 18px;
    }

    .home-ai-entry-button {
        width: 100%;
        min-height: 42px;
        margin-top: 13px;
    }

    /*
     * Hover transforms provide no benefit on touch layouts.
     */
    .legacy-home .main-catalog-item:hover,
    .legacy-home #main-items .item:hover,
    .legacy-home .carousel-tovar-button:hover {
        transform: none;
    }
}


/* ---------- Accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
    .home-ai-entry,
    .ai-catalog-assistant-status:not([hidden]),
    .ai-catalog-assistant-results:not([hidden]) {
        animation: none !important;
    }

    .legacy-home .main-catalog-item,
    .legacy-home .main-catalog-item-sublink,
    .legacy-home #main-items .item,
    .legacy-home .carousel-tovar-button,
    .home-ai-entry-button,
    .footer-order-online,
    .request-widget-link {
        transition: none !important;
    }

    .legacy-home .main-catalog-item:hover,
    .legacy-home #main-items .item:hover,
    .legacy-home .carousel-tovar-button:hover,
    .home-ai-entry-button:hover,
    .footer-order-online:hover {
        transform: none !important;
    }
}


/* =========================================================
 * SITE_MOTION_V2
 * Small interaction feedback only.
 * ========================================================= */


/* ---------- Request counter ---------- */

.request-widget-count {
    display: inline-block;
    transform-origin: left center;
}

.request-widget-count.is-request-count-updated {
    animation:
        site-request-count-bump .34s ease-out both;
}

@keyframes site-request-count-bump {
    0% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.10);
    }

    72% {
        transform: scale(.98);
    }

    100% {
        transform: scale(1);
    }
}


/* ---------- AI result cards ---------- */

.ai-catalog-assistant-results:not([hidden])
.ai-catalog-assistant-option {
    animation:
        site-option-reveal .18s ease-out both;
}

.ai-catalog-assistant-results:not([hidden])
.ai-catalog-assistant-options
.ai-catalog-assistant-option:nth-child(2) {
    animation-delay: .025s;
}

.ai-catalog-assistant-results:not([hidden])
.ai-catalog-assistant-options
.ai-catalog-assistant-option:nth-child(3) {
    animation-delay: .05s;
}

.ai-catalog-assistant-results:not([hidden])
.ai-catalog-assistant-options
.ai-catalog-assistant-option:nth-child(4) {
    animation-delay: .075s;
}

@keyframes site-option-reveal {
    from {
        opacity: 0;
        transform: translateY(3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ---------- Press feedback ---------- */

.ai-global-launcher:active,
.ai-catalog-assistant-submit:active:not(:disabled),
.ai-catalog-assistant-request-button:active:not(:disabled),
.ai-global-product-context-actions button:active,
.legacy-home .carousel-tovar-button:active,
.legacy-home .carouselprev:active,
.legacy-home .carouselnext:active,
.footer-order-online:active {
    transform: translateY(1px) scale(.99);
}


/*
 * Product page controls have complex legacy/mobile geometry.
 * Use brightness instead of transforms so layout rules remain
 * completely untouched.
 */
.global[data-rebuild="visual-product-preview-v1"]
.request-qty-button:active,

.global[data-rebuild="visual-product-preview-v1"]
.request-add-button:active {
    filter: brightness(.96);
}


/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .request-widget-count.is-request-count-updated,
    .ai-catalog-assistant-results:not([hidden])
    .ai-catalog-assistant-option {
        animation: none !important;
    }

    .ai-global-launcher:active,
    .ai-catalog-assistant-submit:active:not(:disabled),
    .ai-catalog-assistant-request-button:active:not(:disabled),
    .ai-global-product-context-actions button:active,
    .legacy-home .carousel-tovar-button:active,
    .legacy-home .carouselprev:active,
    .legacy-home .carouselnext:active,
    .footer-order-online:active {
        transform: none !important;
    }

    .global[data-rebuild="visual-product-preview-v1"]
    .request-qty-button:active,

    .global[data-rebuild="visual-product-preview-v1"]
    .request-add-button:active {
        filter: none !important;
    }
}


/* =========================================================
 * PRODUCT_REQUEST_SUCCESS_FEEDBACK_V1
 * Runs only after a confirmed user-initiated cart write.
 * ========================================================= */

.global[data-rebuild="visual-product-preview-v1"]
.request-added-state.is-request-just-added {
    display: inline-block;

    animation:
        site-request-added-confirm .38s ease-out both;
}

@keyframes site-request-added-confirm {
    0% {
        opacity: .25;
        transform: translateY(3px) scale(.98);
    }

    55% {
        opacity: 1;
        transform: translateY(-1px) scale(1.015);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .global[data-rebuild="visual-product-preview-v1"]
    .request-added-state.is-request-just-added {
        animation: none !important;
    }
}


/* =========================================================
 * CATALOG_INTERACTION_MOTION_V1
 *
 * Quiet navigation feedback.
 * Product-image popup mechanics remain untouched.
 * ========================================================= */


/* ---------- Category tiles ---------- */

.legacy-category
#main-catalog-right
.catalog-mid-item {
    transition:
        transform .16s ease,
        box-shadow .16s ease,
        border-color .16s ease;
}

.legacy-category
#main-catalog-right
.catalog-mid-item a {
    transition:
        color .13s ease;
}

@media (hover: hover) and (pointer: fine) {
    .legacy-category
    #main-catalog-right
    .catalog-mid-item:hover {
        transform: translateY(-2px);

        box-shadow:
            0 5px 14px rgba(0, 0, 0, .07);
    }
}


/* ---------- Leaf product links ---------- */

/*
 * Do not transform .catalog2_href_item_title:
 * legacy CSS uses its hover state to show the large preview.
 * We only smooth the existing text-color transition.
 */
.legacy-category
.catalog2_href_item_title_inner {
    transition:
        color .13s ease;
}


/* ---------- Search results ---------- */

.legacy-search-page
.search-result-item {
    transition:
        background-color .14s ease,
        box-shadow .14s ease;
}

.legacy-search-page
.search-result-item:hover,
.legacy-search-page
.search-result-item:focus-within {
    background-color:
        rgba(8, 126, 182, .025);

    box-shadow:
        inset 3px 0 0 rgba(8, 126, 182, .20);
}

.legacy-search-page
.search-result-link {
    transition:
        color .13s ease;
}


/* ---------- Keyboard focus ---------- */

.legacy-category
.catalog-mid-item a:focus-visible,

.legacy-category
.catalog2_href_item_title:focus-visible,

.legacy-category
.top_sub_cat:focus-visible,

.legacy-category
.catalog-menu-href1:focus-visible,

.legacy-category
.catalog-menu-href2:focus-visible,

.legacy-category
.catalog-menu-href3:focus-visible,

.legacy-category
.catalog-menu-href4:focus-visible,

.legacy-category
.catalog-menu-href5:focus-visible,

.legacy-search-page
.search-result-link:focus-visible {
    outline:
        2px solid rgba(8, 126, 182, .45);

    outline-offset: 3px;

    border-radius: 2px;
}


/* ---------- Touch layouts ---------- */

@media (max-width: 700px) {
    .legacy-category
    #main-catalog-right
    .catalog-mid-item:hover {
        transform: none;
    }
}


/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .legacy-category
    #main-catalog-right
    .catalog-mid-item,

    .legacy-category
    #main-catalog-right
    .catalog-mid-item a,

    .legacy-category
    .catalog2_href_item_title_inner,

    .legacy-search-page
    .search-result-item,

    .legacy-search-page
    .search-result-link {
        transition: none !important;
    }

    .legacy-category
    #main-catalog-right
    .catalog-mid-item:hover {
        transform: none !important;
    }
}
