/* =====================================================================
   ASAY hareket katmanı (paket 30)
   İnce, hızlı ve isteğe bağlıdır: hiçbir kural yerleşimi değiştirmez; "hareketi azalt" tercihinde animasyonların hiçbiri çalışmaz.
   ===================================================================== */

/* 1. Sayfalar arası yumuşak geçiş (Chrome, Edge ve Safari 18.2+; diğer tarayıcılar bu bloğu yok sayar) */
@media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
    ::view-transition-old(root) { animation: asay-page-out .14s ease-in both; }
    ::view-transition-new(root) { animation: asay-page-in .22s ease-out both; }
}
@keyframes asay-page-out { to { opacity: 0; } }
@keyframes asay-page-in { from { opacity: 0; } }

/* 2. Kaydırınca beliren bölümler: ilk ekranda olan hiçbir şey gizlenmez (bkz. store-motion.js) */
html.motion-ok [data-reveal]:not(.is-revealed) { opacity: 0; transform: translate3d(0, 20px, 0); }
html.motion-ok [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
    transition: opacity .65s cubic-bezier(.22, .7, .2, 1), transform .65s cubic-bezier(.22, .7, .2, 1);
    transition-delay: var(--reveal-delay, 0ms);
}
@media print { html.motion-ok [data-reveal] { opacity: 1 !important; transform: none !important; } }

/* 3. Ürün kartları: görsel yumuşakça belirir, üzerine gelince hafifçe büyür; düğmeler dokunuşa yanıt verir */
@media (prefers-reduced-motion: no-preference) {
    .product-card .product-image img { transition: opacity .35s ease, transform .55s cubic-bezier(.22, .7, .2, 1); }
    .product-card .product-image img.is-loading { opacity: 0; }
    .add-cart { transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .12s ease, box-shadow .2s ease; }
    .add-cart:active:not(:disabled) { transform: scale(.975); }
    .favorite-button, .compare-button { transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .product-card:hover .product-image img { transform: scale(1.05); }
    .product-card .favorite-button:hover, .product-card .compare-button:hover { transform: scale(1.1); }
}
.add-cart:focus-visible, .favorite-button:focus-visible, .compare-button:focus-visible { outline: 2px solid #087f79; outline-offset: 2px; }

/* "Sepete Ekle" sonrası kısa onay hâli ve sepet rozeti */
body.store-enterprise .add-cart.is-added,
body.store-enterprise .product-card .add-cart.is-added { background: #0b7a5c !important; border-color: #0b7a5c !important; color: #fff !important; }
@keyframes asay-bump { 0% { transform: scale(1); } 40% { transform: scale(1.38); } 100% { transform: scale(1); } }
@keyframes asay-pop { 0% { transform: scale(1); } 35% { transform: scale(1.3); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: no-preference) {
    .store-cart-count.is-bump { animation: asay-bump .5s cubic-bezier(.3, 1.6, .5, 1); }
    .favorite-button.is-popping { animation: asay-pop .42s cubic-bezier(.3, 1.5, .5, 1); }
}

/* 4. Ana sayfa kahraman alanı: otomatik geçişin ilerleme çubuğu */
.asay-hero-progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; height: 3px; overflow: hidden; background: rgba(255, 255, 255, .16); pointer-events: none; }
.asay-hero-progress > i { display: block; width: 100%; height: 100%; background: rgba(255, 255, 255, .88); transform: scaleX(0); transform-origin: left center; }
.asay-hero-progress.is-running > i { animation: asay-progress 6s linear forwards; }
.asay-hero-progress.is-paused > i { animation-play-state: paused; }
@keyframes asay-progress { to { transform: scaleX(1); } }

/* 5. Tükenen kartlarda "Gelince Haber Ver" düğmesi ve penceresi */
body.store-enterprise .product-card .add-cart.is-notify { background: #fff !important; color: #087f79 !important; border: 1px solid #087f79 !important; }
body.store-enterprise .product-card .add-cart.is-notify:hover { background: #eaf7f5 !important; }
/* Dar kartlarda etiket tek satırda kalır: yazı düğmenin kendi genişliğine göre küçülür, çok darsa simge gizlenir. Kapsayıcı sorgusu olmayan eski tarayıcılarda görünüm değişmez. */
@supports (container-type: inline-size) {
    body.store-enterprise .product-card .add-cart.is-notify { container-type: inline-size; }
    body.store-enterprise .product-card .add-cart.is-notify > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: min(1em, calc((100cqw - 26px) / 9)); }
    @container (max-width: 128px) {
        body.store-enterprise .product-card .add-cart.is-notify .asay-icon { display: none; }
        body.store-enterprise .product-card .add-cart.is-notify > span { font-size: min(1em, calc(100cqw / 9)); }
    }
}
.asay-notify { width: min(440px, calc(100vw - 28px)); max-width: none; padding: 0; border: 0; background: transparent; color: #0a2b42; }
.asay-notify::backdrop { background: rgba(7, 28, 44, .56); backdrop-filter: blur(3px); }
.asay-notify-panel { position: relative; padding: 26px 26px 22px; border-radius: 18px; background: #fff; box-shadow: 0 28px 80px rgba(3, 25, 40, .35); font-family: inherit; }
.asay-notify-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f1f6f7; color: #4d6676; font-size: 22px; line-height: 1; cursor: pointer; }
.asay-notify-close:hover { background: #e3edef; color: #0a2b42; }
.asay-notify-head { display: flex; align-items: center; gap: 14px; padding-right: 34px; }
.asay-notify-bell { flex: 0 0 46px; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: #e3f6f3; color: #087f79; }
.asay-notify-bell svg { width: 22px; height: 22px; }
.asay-notify h2 { margin: 0; font-size: 19px; line-height: 1.25; color: #0a2b42; }
.asay-notify-product { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: #5b7384; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.asay-notify-form { margin-top: 18px; display: grid; gap: 8px; }
.asay-notify-form label { font-size: 13px; font-weight: 700; color: #274558; }
.asay-notify-form input { width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 14px; border: 1px solid #cfdde3; border-radius: 11px; background: #fff; color: #0a2b42; font: inherit; font-size: 15px; }
.asay-notify-form input:focus { outline: 2px solid #087f79; outline-offset: 1px; border-color: #087f79; }
.asay-notify-error { margin: 0; font-size: 13px; line-height: 1.45; color: #b4503c; }
.asay-notify-submit { min-height: 46px; padding: 11px 18px; border: 1px solid #087f79; border-radius: 11px; background: #087f79; color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.asay-notify-submit:hover { background: #066961; border-color: #066961; }
.asay-notify-submit:disabled { opacity: .65; cursor: progress; }
.asay-notify-note { margin: 2px 0 0; font-size: 12px; line-height: 1.55; color: #6a7f8c; }
.asay-notify-done { margin-top: 6px; display: grid; gap: 10px; justify-items: center; text-align: center; }
.asay-notify-done[hidden], .asay-notify-form[hidden], .asay-notify-error[hidden], .asay-notify-head[hidden] { display: none; }
.asay-notify-check { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #e3f6f3; color: #087f79; font-size: 28px; font-weight: 700; }
.asay-notify-done p { margin: 0; font-size: 14px; line-height: 1.6; color: #40586a; }
.asay-notify-done .asay-notify-submit { min-width: 140px; margin-top: 4px; }
@keyframes asay-sheet-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes asay-check-in { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: no-preference) {
    .asay-notify[open] .asay-notify-panel { animation: asay-sheet-in .28s cubic-bezier(.2, .8, .2, 1); }
    .asay-notify-done:not([hidden]) .asay-notify-check { animation: asay-check-in .5s cubic-bezier(.3, 1.4, .5, 1); }
}
@media (max-width: 560px) {
    .asay-notify { width: 100%; margin: auto 0 0; }
    .asay-notify-panel { padding: 24px 20px calc(22px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; }
}
