/* 模板10交互反馈：跟随公共主色，仅改变视觉。 */
body button:not(:disabled), body input[type="submit"], body input[type="button"],
body input[type="image"], body .button, body .finance-submit,
body .product-primary, body .messages-primary, body .site-footer-item,
body .w-quick-item {
    transition: transform .16s ease, filter .16s ease;
    -webkit-tap-highlight-color: transparent;
}
body button:not(:disabled):active, body input[type="submit"]:active,
body input[type="button"]:active, body input[type="image"]:active,
body .button:active, body .finance-submit:active,
body .product-primary:active, body .messages-primary:active,
body .site-footer-item:active, body .w-quick-item:active {
    transform: scale(.90);
    filter: brightness(.96);
}
.w-collapse .w-icon { transition: transform .28s ease; }
.w-collapse[aria-expanded="true"] .w-icon { transform: rotate(180deg); }
.w-collapse[aria-expanded="false"] .w-icon { transform: rotate(0deg); }
.t5-image-loading {
    background-image: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.65) 48%, transparent 75%) !important;
    background-color: var(--theme-primary-soft, #edf7e8) !important;
    background-size: 220% 100% !important;
    animation: t5-skeleton-sweep 1.6s ease-in-out infinite;
}
.t5-image-arrived { animation: t5-image-arrive .3s ease-out; }
@keyframes t5-skeleton-sweep { from { background-position: 180% 0; } to { background-position: -80% 0; } }
@keyframes t5-image-arrive { from { opacity: .3; } to { opacity: 1; } }
.t5-success-toast {
    position: fixed;
    z-index: 100000;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 32px);
    padding: 14px 20px;
    border: 1px solid var(--theme-primary-border, #d6e8d1);
    border-radius: 16px;
    background: #fff;
    color: #183b22;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    font-size: 14px;
    line-height: 1.6;
}
.t5-success-toast svg { width: 24px; height: 24px; flex-shrink: 0; color: var(--theme-primary); }
.t5-success-toast path {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: t5-check-draw .45s .1s ease forwards;
}
@keyframes t5-check-draw { to { stroke-dashoffset: 0; } }
.t5-cart-flight {
    position: fixed;
    z-index: 99999;
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 14px;
    pointer-events: none;
    border: 2px solid var(--theme-primary);
    box-shadow: 0 5px 18px rgba(0,0,0,.15);
}
@media (prefers-reduced-motion: reduce) {
    body button, body input, body a { transition: none !important; }
    .w-collapse .w-icon { transition: none; }
    .t5-image-loading, .t5-image-arrived, .t5-success-toast path { animation: none; }
    .t5-success-toast path { stroke-dashoffset: 0; }
}

/* 旧版Chrome同样让分享遮罩完整覆盖视口。 */
.product-share { top: 0; right: 0; bottom: 0; left: 0; }

/* 点击波纹为独立浮层，保留按钮的定位、文字和提交参数。 */
.t5-click-wave {
    position: fixed;
    z-index: 100001;
    pointer-events: none;
    border-radius: inherit;
    overflow: hidden;
}
.t5-click-wave span {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--theme-primary, #18882e);
    box-shadow: 0 0 0 1px rgba(255,255,255,.4);
    opacity: .24;
    transform: translate(-50%,-50%);
}
.t5-submit-spinner {
    position: fixed;
    z-index: 100002;
    width: 17px;
    height: 17px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    pointer-events: none;
    animation: t5-submit-spin .75s linear infinite;
}
.t5-loading-button { cursor: wait !important; }
@keyframes t5-submit-spin { to { transform: rotate(360deg); } }

html body input.t5-field-error[aria-invalid="true"],
html body textarea.t5-field-error[aria-invalid="true"] {
    border-color: #cc4c54 !important;
}
.t5-field-error-message { margin: 7px 0 0; font-size: 12px; line-height: 1.6; color: #bf3f49; }
@media (prefers-reduced-motion: reduce) {
    .t5-click-wave { display: none; }
    .t5-submit-spinner { animation: none; border-right-color: currentColor; }
    .store-products > .item { transition: none; }
    .store-products > .item:hover { transform: none; }
}

/* 商品卡片由实际鼠标进入触发，兼容移动外观窗口和旧版Chrome。 */
html body .t5-product-lift {
    position: relative;
    transition: transform .24s ease, box-shadow .24s ease;
}
html body .t5-product-lift.is-t5-hovered {
    transform: translateY(-7px);
    box-shadow: 0 12px 24px rgba(25, 65, 30, .16);
    z-index: 2;
}
@media (prefers-reduced-motion: reduce) {
    html body .t5-product-lift { transition: none; }
    html body .t5-product-lift.is-t5-hovered { transform: none; }
}
