/* Theme engine — shared motion + commerce harmony for all themes */

@keyframes themePageIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

body[class*="theme-"].page-enter {
  animation: themePageIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.theme-classic.page-enter {
  animation: themePageIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Stagger grids */
body[class*="theme-"] [data-theme-stagger] > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.34, 1.45, 0.64, 1);
}
body[class*="theme-"] [data-theme-stagger].is-visible > * {
  opacity: 1;
  transform: none;
}

body[class*="theme-"]:not(.theme-classic) .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.34, 1.45, 0.64, 1);
}
body[class*="theme-"]:not(.theme-classic) .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ——— Cart / checkout / payment harmony ——— */
body[class*="theme-"]:not(.theme-classic) .cart-section.detail-shell {
  background: transparent;
  margin-top: 0;
  padding-top: 36px;
}

body[class*="theme-"]:not(.theme-classic) .checkout-steps {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg, 16px);
  padding: 16px 20px;
  box-shadow: var(--shadow-1);
}

body[class*="theme-"]:not(.theme-classic) .checkout-step.active {
  color: var(--text);
}
body[class*="theme-"]:not(.theme-classic) .checkout-step.active span {
  background: rgba(var(--primary-rgb), 0.15);
  color: var(--primary);
  border: 2px solid rgba(var(--primary-rgb), 0.35);
}
body[class*="theme-"]:not(.theme-classic) .checkout-step-line.active {
  background: var(--primary);
}

body[class*="theme-"]:not(.theme-classic) .cart-item,
body[class*="theme-"]:not(.theme-classic) .cart-summary-card,
body[class*="theme-"]:not(.theme-classic) .checkout-panel,
body[class*="theme-"]:not(.theme-classic) .order-summary,
body[class*="theme-"]:not(.theme-classic) .detail-card {
  background: var(--surface);
  border: 1px solid var(--outline);
  color: var(--text);
  box-shadow: var(--shadow-1);
}

body[class*="theme-"]:not(.theme-classic) .cart-item:hover {
  border-color: rgba(var(--primary-rgb), 0.35);
  box-shadow: var(--shadow-2);
}

body[class*="theme-"]:not(.theme-classic) .cart-summary-card h3,
body[class*="theme-"]:not(.theme-classic) .cart-item-body h3 {
  color: var(--text);
}

body[class*="theme-"]:not(.theme-classic) .cart-checkout-btn {
  background: var(--primary);
  color: var(--on-primary, #fff);
  border: none;
  font-weight: 700;
}

body[class*="theme-"]:not(.theme-classic) .cart-empty {
  background: var(--surface);
  border: 1px dashed rgba(var(--primary-rgb), 0.35);
  color: var(--text);
}

body[class*="theme-"]:not(.theme-classic) .cart-trust {
  color: var(--muted);
}

body[class*="theme-"]:not(.theme-classic) input,
body[class*="theme-"]:not(.theme-classic) textarea,
body[class*="theme-"]:not(.theme-classic) select,
body[class*="theme-"]:not(.theme-classic) .form-control {
  background: var(--surface);
  border: 1px solid var(--outline);
  color: var(--text);
}
body[class*="theme-"]:not(.theme-classic) input:focus,
body[class*="theme-"]:not(.theme-classic) textarea:focus,
body[class*="theme-"]:not(.theme-classic) select:focus {
  border-color: rgba(var(--primary-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

/* Trust marquee (Akım + optional) */
body[class*="theme-"] .trust-bar .container.trust-marquee-wrap {
  width: 100%;
  max-width: none;
  overflow: hidden;
  padding-inline: 0;
}
body[class*="theme-"] .trust-marquee-track {
  display: flex;
  width: max-content;
  animation: themeTrustMarquee 28s linear infinite;
}
@keyframes themeTrustMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  body[class*="theme-"].page-enter,
  body[class*="theme-"] .trust-marquee-track,
  body[class*="theme-"] [data-theme-stagger] > *,
  body[class*="theme-"]:not(.theme-classic) .reveal {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
}
