/* Motion is optional; layouts and interaction never depend on animation. */
@keyframes customer-card-enter {
    from { opacity: .35; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes customer-dialog-enter {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes customer-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
    body.customer-theme .storefront-header { animation: customer-fade-in 320ms ease-out; }
    body.customer-theme :is(.nav-item, .order-category, .fulfillment-option, .dashboard-page, .workspace-icon-button) {
        transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
    }
    body.customer-theme :is(.category-card, .product-card, .shop-promo, .more-card) {
        transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
    }
    body.customer-theme :is(.add-product, .cart-button, .checkout-button, .cart-checkout-button, .place-order-button, .slide-cta, .continue-shopping, .back-cart-button, .quantity-button, .carousel-arrows button) {
        transition: transform 160ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
    }
    body.customer-theme :is(input, select, textarea) { transition: border-color 180ms ease, box-shadow 180ms ease; }
    body.customer-theme .storefront-search { transition: border-color 180ms ease, box-shadow 180ms ease; }
    body.customer-theme .storefront-search:focus-within { box-shadow: 0 0 0 5px rgb(22 131 245 / 10%); }
    body.customer-theme :is(.nav-item .customer-nav-icon, .category-icon, .shop-promo-art, .shop-promo a span, .slide-cta span) {
        transition: transform 220ms ease;
    }
    body.customer-theme .product-card { animation: customer-card-enter 340ms ease-out backwards; }
    body.customer-theme .product-card:nth-child(3n + 2) { animation-delay: 45ms; }
    body.customer-theme .product-card:nth-child(3n) { animation-delay: 90ms; }
    body.customer-theme .cart-item { animation: customer-fade-in 220ms ease-out; }
    body.customer-theme .cart-bar.show { animation: customer-card-enter 280ms ease-out; }
    body.customer-theme .order-modal-overlay.show { animation: customer-fade-in 180ms ease-out; }
    body.customer-theme .order-modal-overlay.show .order-modal { animation: customer-dialog-enter 240ms cubic-bezier(.2, .7, .3, 1); }
    /* Keep the native dialog's centering transform intact. */
    body.customer-theme .service-info-dialog[open] { animation: customer-fade-in 220ms ease-out; }
    body.customer-theme .service-info-dialog[open]::backdrop { animation: customer-fade-in 180ms ease-out; }
    body.customer-theme :is(button, .slide-cta, .dashboard-page):not(:disabled):not([aria-disabled="true"]):active { transform: translateY(1px) scale(.98); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
    body.customer-theme :is(.category-card, .product-card, .shop-promo, .more-card):hover:not(:disabled) {
        transform: translateY(-3px); box-shadow: 0 8px 22px rgb(16 33 61 / 10%);
    }
    body.customer-theme .category-card:hover .category-icon { transform: rotate(-5deg); }
    body.customer-theme .shop-promo:hover .shop-promo-art { transform: translateY(-4px) rotate(-2deg); }
    body.customer-theme :is(.shop-promo a:hover span, .slide-cta:hover span) { transform: translateX(4px); }
    body.customer-theme .nav-item:hover .customer-nav-icon { transform: translateY(-2px); }
    body.customer-theme :is(.add-product, .cart-button, .checkout-button, .cart-checkout-button, .place-order-button, .slide-cta):hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgb(16 33 61 / 14%); }
}
@media (prefers-reduced-motion: reduce) {
    body.customer-theme *, body.customer-theme *::before, body.customer-theme *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    body.customer-theme :is(.category-card, .product-card, .shop-promo, .more-card):hover { transform: none; }
}
