/**
 * GET4CARD premium motion system
 * Additive only — does not change layout, colors base, or structure.
 */

:root {
  --g4c-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --g4c-ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --g4c-ease-press: cubic-bezier(0.34, 1.4, 0.64, 1);
  --g4c-dur-micro: 160ms;
  --g4c-dur-ui: 240ms;
  --g4c-dur-panel: 280ms;
  --g4c-dur-section: 560ms;
  --g4c-shine-dur: 2.2s;
  --g4c-glow-pink: rgba(255, 45, 120, 0.55);
  --g4c-glow-soft: rgba(255, 45, 120, 0.38);
  --g4c-glow-hot: rgba(255, 45, 120, 0.72);
  --g4c-mx: 50%;
  --g4c-my: 50%;
}

/* ─── Shared keyframes ─── */
@keyframes g4c-fade-up {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes g4c-fade-scale {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes g4c-light-sweep {
  0% { transform: translate3d(-120%, 0, 0); }
  100% { transform: translate3d(120%, 0, 0); }
}

/* Card لمع: bottom-right → top-left (never restart on hover) */
@keyframes g4c-card-shine {
  0% { transform: translate3d(120%, 120%, 0); }
  100% { transform: translate3d(-120%, -120%, 0); }
}

@keyframes g4c-border-spin {
  to { --g4c-angle: 360deg; }
}

@keyframes g4c-float-soft {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -7px, 0); }
}

@keyframes g4c-pulse-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 45, 120, 0.0); opacity: 1; }
  50% { box-shadow: 0 0 0 6px rgba(255, 45, 120, 0.08); opacity: 0.92; }
}

@keyframes g4c-badge-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@keyframes g4c-heart-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.22); filter: drop-shadow(0 0 8px var(--g4c-glow-pink)); }
  100% { transform: scale(1); }
}

@keyframes g4c-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@keyframes g4c-gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes g4c-hero-glow {
  0%, 100% {
    box-shadow:
      0 12px 36px rgba(0, 0, 0, 0.35),
      0 0 0 1px rgba(255, 45, 120, 0.28),
      0 0 28px rgba(255, 45, 120, 0.28),
      0 0 64px rgba(255, 45, 120, 0.16);
  }
  50% {
    box-shadow:
      0 16px 44px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(255, 45, 120, 0.45),
      0 0 42px rgba(255, 45, 120, 0.42),
      0 0 90px rgba(255, 120, 60, 0.22);
  }
}

@keyframes g4c-btn-glow {
  0%, 100% {
    box-shadow:
      0 8px 22px rgba(190, 24, 93, 0.38),
      0 0 18px rgba(255, 45, 120, 0.32),
      0 0 0 1px rgba(255, 45, 120, 0.28) inset;
  }
  50% {
    box-shadow:
      0 10px 28px rgba(190, 24, 93, 0.48),
      0 0 28px rgba(255, 45, 120, 0.48),
      0 0 0 1px rgba(255, 180, 120, 0.35) inset;
  }
}

@property --g4c-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

/* ─── Buttons — stronger lightning / glow ─── */
.btn,
.hero-btn,
.od-btn,
.auth-link-btn,
.orders-filter-btn,
.orders-export-btn,
.add-funds-support-btn,
.product-card-buy,
.product-detail-btn-main,
.wallet-funds-btn,
.market-add-balance,
.sidebar-add-funds {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition:
    transform var(--g4c-dur-ui) var(--g4c-ease-out),
    box-shadow var(--g4c-dur-ui) var(--g4c-ease-out),
    border-color var(--g4c-dur-ui) ease,
    background var(--g4c-dur-ui) ease,
    color var(--g4c-dur-micro) ease,
    filter var(--g4c-dur-ui) ease !important;
}

.btn,
.hero-btn,
.od-btn,
.auth-link-btn,
.product-card-buy,
.product-detail-btn-main,
.orders-filter-btn,
.orders-export-btn,
.add-funds-support-btn {
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.22),
    0 0 14px rgba(255, 45, 120, 0.14);
}

.btn:hover,
.hero-btn:hover,
.od-btn:hover,
.product-card-buy:hover,
.product-detail-btn-main:hover,
.auth-link-btn:hover,
.orders-filter-btn:hover,
.orders-export-btn:hover,
.add-funds-support-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.28),
    0 0 22px rgba(255, 45, 120, 0.32),
    0 0 40px rgba(255, 45, 120, 0.16);
}

.btn:active,
.hero-btn:active,
.od-btn:active,
.product-card-buy:active,
.product-detail-btn-main:active,
.home-cat-card:active {
  transform: scale(0.97) translateY(0);
  transition-duration: 90ms;
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.28),
    0 0 10px rgba(255, 45, 120, 0.2);
}

.mobile-home-tab:active {
  transform: scale(0.97) translateY(0);
  transition-duration: 90ms;
  box-shadow: none;
}

.btn:focus-visible,
.hero-btn:focus-visible,
.product-card-buy:focus-visible,
.product-detail-btn-main:focus-visible,
.od-btn:focus-visible,
.auth-link-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(5, 7, 11, 0.9),
    0 0 0 4px rgba(255, 45, 120, 0.75),
    0 12px 36px rgba(255, 45, 120, 0.42),
    0 0 48px rgba(255, 45, 120, 0.28);
}

.btn-primary,
.od-btn-gradient,
.hero-ctas .btn-primary,
.market-guest-ctas .btn-primary,
.btn-primary.btn-sm,
.product-detail-btn-main {
  background-size: 180% 180%;
  animation: g4c-btn-glow 2.8s ease-in-out infinite;
  box-shadow:
    0 10px 28px rgba(190, 24, 93, 0.42),
    0 0 22px rgba(255, 45, 120, 0.38),
    0 0 48px rgba(255, 45, 120, 0.18),
    0 0 0 1px rgba(255, 45, 120, 0.32) inset;
}

.btn-primary:hover,
.od-btn-gradient:hover,
.hero-ctas .btn-primary:hover,
.market-guest-ctas .btn-primary:hover,
.product-detail-btn-main:hover {
  animation: none;
  box-shadow:
    0 16px 42px rgba(190, 24, 93, 0.55),
    0 0 36px rgba(255, 45, 120, 0.55),
    0 0 72px rgba(255, 120, 80, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.22) inset;
  filter: brightness(1.06);
}

/* Buttons: no auto لمع — constant sweep looked cheap. Cards keep shine below. */
.btn::before,
.hero-btn::before,
.od-btn::before,
.auth-link-btn::before,
.orders-filter-btn::before,
.orders-export-btn::before,
.add-funds-support-btn::before,
.product-card-buy::before,
.product-detail-btn-main::before,
.od-btn-gradient::before,
.wallet-funds-btn::before,
.market-add-balance::before,
.sidebar-add-funds::before,
.btn::after,
.hero-btn::after,
.od-btn::after,
.auth-link-btn::after,
.orders-filter-btn::after,
.orders-export-btn::after,
.add-funds-support-btn::after,
.product-card-buy::after,
.product-detail-btn-main::after,
.od-btn-gradient::after,
.wallet-funds-btn::after,
.market-add-balance::after,
.sidebar-add-funds::after {
  content: none;
  display: none;
  animation: none;
}

/* Keep labels above the shine */
.btn > *,
.hero-btn > *,
.od-btn > *,
.auth-link-btn > *,
.orders-filter-btn > *,
.orders-export-btn > *,
.add-funds-support-btn > *,
.product-card-buy > *,
.product-detail-btn-main > *,
.od-btn-gradient > *,
.wallet-funds-btn > *,
.market-add-balance > *,
.sidebar-add-funds > * {
  position: relative;
  z-index: 2;
}

.btn-outline,
.btn-ghost {
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.16),
    0 0 12px rgba(255, 45, 120, 0.1);
}

.btn-outline:hover,
.btn-ghost:hover {
  border-color: rgba(255, 45, 120, 0.55);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.22),
    0 0 24px rgba(255, 45, 120, 0.28),
    0 0 0 1px rgba(255, 45, 120, 0.22);
}

/* ─── Product cards ─── */
.product-card,
.product-row {
  transition:
    transform var(--g4c-dur-ui) var(--g4c-ease-out),
    box-shadow var(--g4c-dur-ui) var(--g4c-ease-out),
    border-color var(--g4c-dur-ui) ease,
    filter var(--g4c-dur-ui) ease !important;
}

/* Auto تلميع — continuous diagonal: down-right → up-left.
   Never gated on hover/inview class toggles (those restart animation). */
.product-card::after {
  content: '';
  position: absolute;
  top: -35%;
  left: -35%;
  width: 55%;
  height: 170%;
  border-radius: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.85;
  background: linear-gradient(
    135deg,
    transparent 28%,
    rgba(255, 255, 255, 0.08) 42%,
    rgba(255, 255, 255, 0.38) 50%,
    rgba(255, 255, 255, 0.08) 58%,
    transparent 72%
  );
  transform: translate3d(120%, 120%, 0);
  animation: g4c-card-shine var(--g4c-shine-dur) linear infinite;
  animation-play-state: running;
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 45, 120, 0.38);
    box-shadow:
      0 18px 40px rgba(0, 0, 0, 0.28),
      0 0 0 1px rgba(255, 45, 120, 0.18),
      0 0 28px rgba(255, 45, 120, 0.12);
  }

  /* Do NOT touch ::after on hover — changing it restarts the shine */
  .product-card:hover .product-media img,
  .product-card:hover .product-media .product-fallback,
  .product-row:hover .thumb img {
    transform: scale(1.045);
    filter: brightness(1.06) contrast(1.03);
  }
}

/* Pause add-funds panel shine on page scroll only */
html.is-g4c-scrolling .add-funds-method::after,
html.is-g4c-scrolling .add-funds-balance::after {
  animation-play-state: paused !important;
}

/* Explicit: card shine keeps running even while scrolling / hovering */
html.is-g4c-scrolling .product-card::after,
.product-card:hover::after,
.product-card:active::after,
.product-card:focus-within::after {
  animation-play-state: running !important;
}

.product-media img,
.product-media .product-fallback,
.product-row .thumb img {
  transition:
    transform 420ms var(--g4c-ease-out),
    filter 420ms ease,
    opacity 320ms ease;
  transform-origin: center center;
}

.product-wishlist-btn {
  transition:
    transform var(--g4c-dur-micro) var(--g4c-ease-press),
    color var(--g4c-dur-micro) ease,
    background var(--g4c-dur-micro) ease,
    box-shadow var(--g4c-dur-ui) ease !important;
}

.product-wishlist-btn:active,
.product-wishlist-btn.is-active {
  animation: g4c-heart-pop 420ms var(--g4c-ease-press) 1;
}

.product-wishlist-btn.is-active {
  filter: drop-shadow(0 0 8px var(--g4c-glow-pink));
}

/* Animated border ring on hover (pseudo — keeps existing card fill) */
.product-card--shop::before,
.product-card--market::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  background: conic-gradient(
    from var(--g4c-angle, 0deg),
    transparent 0%,
    rgba(255, 45, 120, 0.08) 20%,
    rgba(255, 45, 120, 0.8) 30%,
    rgba(255, 180, 90, 0.4) 36%,
    transparent 50%,
    transparent 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: opacity var(--g4c-dur-ui) ease;
}

@media (hover: hover) and (pointer: fine) {
  .product-card--shop:hover::before,
  .product-card--market:hover::before {
    opacity: 1;
    animation: g4c-border-spin 2.8s linear infinite;
  }
}

/* ─── Category cards ─── */
.home-cat-card,
.category-chip,
.category-card {
  transition:
    transform var(--g4c-dur-ui) var(--g4c-ease-out),
    box-shadow var(--g4c-dur-ui) ease,
    border-color var(--g4c-dur-ui) ease,
    background var(--g4c-dur-ui) ease !important;
}

@media (hover: hover) and (pointer: fine) {
  .home-cat-card:hover,
  .category-chip:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22), 0 0 18px rgba(255, 45, 120, 0.1);
  }
}

/* ─── Hero / market welcome / banner — stronger image lighting ─── */
.market-hero,
.hero-visual,
.home-banner-slider {
  position: relative;
}

.market-hero {
  border-radius: 22px;
  isolation: isolate;
  animation: g4c-hero-glow 4.5s ease-in-out infinite;
}

.market-hero::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(
    from var(--g4c-angle, 0deg),
    transparent 0%,
    rgba(255, 45, 120, 0.12) 14%,
    rgba(255, 45, 120, 0.95) 26%,
    rgba(255, 200, 120, 0.7) 34%,
    rgba(255, 45, 120, 0.35) 42%,
    transparent 55%,
    transparent 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 5;
  animation: g4c-border-spin 4.5s linear infinite;
  opacity: 1;
  filter: drop-shadow(0 0 12px rgba(255, 45, 120, 0.45));
}

.home-banner-slider {
  overflow: hidden;
  border-radius: 20px;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(255, 45, 120, 0.22),
    0 0 36px rgba(255, 45, 120, 0.28),
    0 0 72px rgba(255, 45, 120, 0.14);
}

.home-banner-slider::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 4;
  background: linear-gradient(
    120deg,
    transparent 34%,
    rgba(255, 255, 255, 0.16) 50%,
    transparent 66%
  );
  background-size: 240% 100%;
  animation: g4c-light-sweep 5s var(--g4c-ease-soft) infinite;
  mix-blend-mode: soft-light;
  opacity: 0.95;
}

.home-banner-slider::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 3;
  background:
    radial-gradient(ellipse 70% 55% at 20% 15%, rgba(255, 45, 120, 0.22), transparent 55%),
    radial-gradient(ellipse 55% 45% at 85% 80%, rgba(255, 160, 80, 0.14), transparent 50%);
  animation: g4c-gradient-shift 10s ease-in-out infinite;
  mix-blend-mode: screen;
  opacity: 0.75;
}

.home-banner-media img {
  transition: transform 8s var(--g4c-ease-soft), filter 600ms ease;
  filter: brightness(1.04) contrast(1.04);
}

.home-banner-slide.is-active .home-banner-media img {
  transform: scale(1.045);
  filter: brightness(1.08) contrast(1.06);
}

.market-welcome-copy > *,
.market-guest-ctas,
.hero-copy .hero-in {
  animation: g4c-fade-up var(--g4c-dur-section) var(--g4c-ease-out) both;
}

.market-welcome-eyebrow { animation-delay: 40ms; }
.market-welcome-name { animation-delay: 120ms; }
.market-welcome-summary { animation-delay: 200ms; }
.market-guest-ctas { animation-delay: 280ms; }

.hero-light,
.hero-floor-spark,
.hero-floor-ring {
  animation: g4c-float-soft 6.5s ease-in-out infinite;
}

.hero-light-b,
.hero-floor-ring.delay {
  animation-duration: 8.2s;
  animation-delay: -2s;
}

.hero {
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 20% 10%, rgba(255, 45, 120, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 70%, rgba(99, 102, 241, 0.08), transparent 55%);
  background-size: 140% 140%;
  animation: g4c-gradient-shift 14s ease-in-out infinite;
  opacity: 0.7;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

/* ─── Search ─── */
.product-search-dropdown:not([hidden]) {
  animation: g4c-fade-up var(--g4c-dur-panel) var(--g4c-ease-out);
}

.product-search-item {
  transition:
    background var(--g4c-dur-micro) ease,
    transform var(--g4c-dur-micro) var(--g4c-ease-out),
    opacity var(--g4c-dur-ui) ease;
  animation: g4c-fade-up 320ms var(--g4c-ease-out) both;
}

.product-search-item:nth-child(1) { animation-delay: 20ms; }
.product-search-item:nth-child(2) { animation-delay: 50ms; }
.product-search-item:nth-child(3) { animation-delay: 80ms; }
.product-search-item:nth-child(4) { animation-delay: 110ms; }
.product-search-item:nth-child(5) { animation-delay: 140ms; }
.product-search-item:nth-child(6) { animation-delay: 170ms; }
.product-search-item:nth-child(7) { animation-delay: 200ms; }
.product-search-item:nth-child(8) { animation-delay: 230ms; }

.product-search-item:hover,
.product-search-item.is-active {
  transform: translateX(3px);
}

[dir="rtl"] .product-search-item:hover,
[dir="rtl"] .product-search-item.is-active {
  transform: translateX(-3px);
}

.product-search-field {
  transition:
    border-color var(--g4c-dur-ui) ease,
    box-shadow var(--g4c-dur-ui) ease,
    transform var(--g4c-dur-ui) ease !important;
}

.product-search-field:focus-within {
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 45, 120, 0.28),
    0 0 22px rgba(255, 45, 120, 0.12) !important;
}

/* ─── Dropdowns / modals / alerts ─── */
.nav-dropdown.is-open,
.nav-profile-menu.is-open,
[data-dropdown].is-open {
  animation: g4c-fade-scale var(--g4c-dur-panel) var(--g4c-ease-out);
}

.sidebar-backdrop,
.nav-dropdown-backdrop,
.modal-backdrop,
.sheet-backdrop {
  transition: opacity var(--g4c-dur-panel) ease !important;
}

.modal,
.sheet,
.ai-agent-panel-sheet,
.membership-sheet,
.auth-card {
  transition:
    transform var(--g4c-dur-panel) var(--g4c-ease-out),
    opacity var(--g4c-dur-panel) ease !important;
}

.flash,
.alert,
.toast,
.api-copy-toast,
[role="alert"] {
  animation: g4c-fade-up 380ms var(--g4c-ease-out);
}

/* ─── Filters / order status ─── */
.orders-filter-btn,
.orders-tabs a,
[data-orders-tab] {
  transition:
    background var(--g4c-dur-ui) ease,
    border-color var(--g4c-dur-ui) ease,
    color var(--g4c-dur-ui) ease,
    box-shadow var(--g4c-dur-ui) ease,
    transform var(--g4c-dur-micro) var(--g4c-ease-out) !important;
}

.orders-filter-btn.is-active,
.orders-tabs a.is-active,
[data-orders-tab].is-active {
  box-shadow: 0 0 0 1px rgba(255, 45, 120, 0.35), 0 8px 20px rgba(255, 45, 120, 0.12);
}

.orders-status-pill {
  transition:
    background var(--g4c-dur-ui) ease,
    color var(--g4c-dur-ui) ease,
    box-shadow var(--g4c-dur-ui) ease,
    transform var(--g4c-dur-ui) var(--g4c-ease-press);
  animation: g4c-fade-scale 320ms var(--g4c-ease-out);
}

.orders-status.is-info .orders-status-pill,
.orders-status.is-warning .orders-status-pill {
  animation: g4c-fade-scale 320ms var(--g4c-ease-out), g4c-pulse-soft 2.8s ease-in-out infinite;
}

/* ─── Wallet / cart badges ─── */
.header-wallet-chip,
[data-wallet-balance],
.wallet-balance-value {
  transition:
    transform var(--g4c-dur-ui) var(--g4c-ease-out),
    box-shadow var(--g4c-dur-ui) ease,
    opacity var(--g4c-dur-ui) ease;
}

.header-wallet-chip.is-g4c-updated,
[data-wallet-balance].is-g4c-updated {
  animation: g4c-fade-up 420ms var(--g4c-ease-out);
}

.floating-cart-badge,
.mobile-home-tab-count,
.store-nav-badge,
.cart-count,
[data-cart-count] {
  transition: transform var(--g4c-dur-micro) var(--g4c-ease-press);
}

.floating-cart-badge.is-g4c-bump,
.mobile-home-tab-count.is-g4c-bump,
.store-nav-badge.is-g4c-bump,
[data-cart-count].is-g4c-bump {
  animation: g4c-badge-pop 420ms var(--g4c-ease-press);
}

/* ─── Navigation / bottom bar ─── */
.mobile-home-tab {
  transition:
    color var(--g4c-dur-ui) ease,
    transform var(--g4c-dur-ui) var(--g4c-ease-out) !important;
}

.mobile-home-tab-icon {
  transition:
    transform var(--g4c-dur-ui) var(--g4c-ease-out),
    color var(--g4c-dur-ui) ease !important;
}

.mobile-home-tab.is-active .mobile-home-tab-icon {
  transform: none;
}

.mobile-home-tab.is-active .mobile-home-tab-icon svg {
  transform: scale(1.06);
  transition: transform var(--g4c-dur-ui) var(--g4c-ease-out);
}

.mobile-home-tab--fab.is-active .mobile-home-tab-fab {
  box-shadow: 0 10px 26px rgba(255, 45, 120, 0.38);
  transform: scale(1.04);
  transition: transform var(--g4c-dur-ui) var(--g4c-ease-out), box-shadow var(--g4c-dur-ui) ease;
}

.site-header a,
.nav-link,
.sidebar-dash-link {
  transition: color var(--g4c-dur-micro) ease, opacity var(--g4c-dur-micro) ease, transform var(--g4c-dur-micro) ease;
}

/* ─── Section entrance (JS adds .is-g4c-inview) ─── */
[data-g4c-reveal],
.g4c-reveal-ready .home-section,
.g4c-reveal-ready .account-card,
.g4c-reveal-ready .wallet-tx-card,
.g4c-reveal-ready .orders-card,
.g4c-reveal-ready .product-grid > .product-card,
.g4c-reveal-ready .catalog-grid > .product-card {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity var(--g4c-dur-section) var(--g4c-ease-out),
    transform var(--g4c-dur-section) var(--g4c-ease-out);
  transition-delay: var(--g4c-stagger, 0ms);
}

[data-g4c-reveal].is-g4c-inview,
.g4c-reveal-ready .home-section.is-g4c-inview,
.g4c-reveal-ready .account-card.is-g4c-inview,
.g4c-reveal-ready .wallet-tx-card.is-g4c-inview,
.g4c-reveal-ready .orders-card.is-g4c-inview,
.g4c-reveal-ready .product-grid > .product-card.is-g4c-inview,
.g4c-reveal-ready .catalog-grid > .product-card.is-g4c-inview {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Image reveal */
.g4c-reveal-ready img.g4c-img-reveal:not(.is-g4c-inview),
img[data-g4c-img]:not(.is-g4c-inview) {
  opacity: 0;
  transform: scale(0.98);
}

.g4c-reveal-ready img.g4c-img-reveal.is-g4c-inview,
img[data-g4c-img].is-g4c-inview {
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 520ms var(--g4c-ease-out),
    transform 520ms var(--g4c-ease-out);
}

/* Skeletons / placeholders that already exist */
.skeleton,
.placeholder-shine,
[class*="skeleton"],
.product-media.is-loading::after {
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.14) 45%,
    rgba(255, 255, 255, 0.04) 90%
  );
  background-size: 200% 100%;
  animation: g4c-shimmer 1.4s linear infinite;
}

/* Auth forms */
.auth-screen-body .auth-card,
.auth-screen-body .auth-panel {
  animation: g4c-fade-up 560ms var(--g4c-ease-out);
}

.auth-screen-body .btn-primary,
.auth-screen-body .auth-submit {
  /* inherit CTA light sweep */
}

/* Empty / error states */
.empty-state,
.error-state,
.orders-empty,
.wishlist-empty,
.cart-empty {
  animation: g4c-fade-up 480ms var(--g4c-ease-out);
}

/* Subtle page enter — does not block navigation */
html.g4c-motion-boot #main {
  animation: g4c-fade-up 420ms var(--g4c-ease-out);
}

/* Links */
a.link-more {
  transition: color var(--g4c-dur-micro) ease, transform var(--g4c-dur-micro) ease, letter-spacing var(--g4c-dur-ui) ease;
}

a.link-more:hover {
  transform: translateX(2px);
}

[dir="rtl"] a.link-more:hover {
  transform: translateX(-2px);
}

/* Parallax helper class (JS sets --g4c-parallax) */
[data-g4c-parallax] {
  transform: translate3d(0, var(--g4c-parallax, 0px), 0);
  will-change: transform;
}

/* Required delivery fields attention + shake */
@keyframes buy-now-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.product-customer-fields.is-attention {
  outline: 2px solid rgba(255, 45, 120, 0.55);
  outline-offset: 4px;
  border-radius: 16px;
}

.product-customer-fields.is-shaking,
.product-customer-field.is-shaking,
.product-customer-input.is-shaking,
.product-customer-select.is-shaking,
.auth-field.is-shaking {
  animation: buy-now-shake 0.55s ease-in-out;
}

.product-customer-field.is-invalid .product-customer-input,
.product-customer-field.is-invalid .product-customer-select,
.product-customer-field.is-invalid .product-customer-textarea,
.product-customer-input.is-invalid,
.product-customer-select.is-invalid,
.auth-field.is-invalid .auth-input-wrap {
  border-color: rgba(255, 45, 120, 0.75) !important;
  box-shadow: 0 0 0 3px rgba(255, 45, 120, 0.18) !important;
}

/* ─── Add Funds — entrance + same لمع speed ─── */
.add-funds-page .add-funds-head {
  animation: g4c-fade-up 0.42s var(--g4c-ease-out) both;
}

.add-funds-page .add-funds-balance {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation: g4c-fade-up 0.42s var(--g4c-ease-out) both;
}

.add-funds-page .add-funds-method,
.add-funds-page .add-funds-step,
.add-funds-page .add-funds-fee,
.add-funds-page .add-funds-important,
.add-funds-page .add-funds-support,
.add-funds-page .add-funds-others {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation: g4c-fade-up 0.42s var(--g4c-ease-out) both;
}

.add-funds-balance::after,
.add-funds-method::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 42%;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.24) 50%,
    transparent 100%
  );
  transform: translate3d(-120%, 0, 0);
  animation: g4c-light-sweep var(--g4c-shine-dur) var(--g4c-ease-soft) infinite;
  animation-delay: 0s;
  opacity: 0.7;
  will-change: transform;
}

.add-funds-balance > *,
.add-funds-method > * {
  position: relative;
  z-index: 3;
}

.wallet-funds-btn:hover,
.market-add-balance:hover,
.sidebar-add-funds:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 26px rgba(255, 45, 120, 0.38),
    0 0 18px rgba(255, 45, 120, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .btn-primary::after,
  .od-btn-gradient::after,
  .btn::after,
  .hero-btn::after,
  .od-btn::after,
  .auth-link-btn::after,
  .product-card-buy::after,
  .product-detail-btn-main::after,
  .orders-filter-btn::after,
  .orders-export-btn::after,
  .add-funds-support-btn::after,
  .wallet-funds-btn::after,
  .market-add-balance::after,
  .sidebar-add-funds::after,
  .add-funds-method::after,
  .add-funds-balance::after,
  .market-hero::before,
  .home-banner-slider::after,
  .home-banner-slider::before,
  .hero::after,
  .btn-primary,
  .od-btn-gradient,
  .market-hero {
    animation: none !important;
  }

  .btn::after,
  .hero-btn::after,
  .od-btn::after,
  .auth-link-btn::after,
  .product-card-buy::after,
  .product-detail-btn-main::after,
  .wallet-funds-btn::after,
  .market-add-balance::after,
  .sidebar-add-funds::after,
  .product-card::after,
  .add-funds-method::after,
  .add-funds-balance::after {
    opacity: 0.25 !important;
    transform: none !important;
    animation: none !important;
    will-change: auto !important;
  }

  .btn-primary,
  .od-btn-gradient,
  .market-hero,
  .home-banner-slider {
    box-shadow:
      0 8px 22px rgba(190, 24, 93, 0.28),
      0 0 16px rgba(255, 45, 120, 0.2) !important;
  }

  [data-g4c-reveal],
  .g4c-reveal-ready .home-section,
  .g4c-reveal-ready .product-grid > .product-card,
  .market-welcome-copy > *,
  .market-guest-ctas,
  .add-funds-page .add-funds-head,
  .add-funds-page .add-funds-balance,
  .add-funds-page .add-funds-method,
  .add-funds-page .add-funds-step,
  .add-funds-page .add-funds-fee,
  .add-funds-page .add-funds-important,
  .add-funds-page .add-funds-support,
  .add-funds-page .add-funds-others,
  html.g4c-motion-boot #main {
    opacity: 1 !important;
    transform: none !important;
  }
}
