/* ═══════════════════════════════════════════════════════════
   BASE STYLES - Global Resets & Typography
   ═══════════════════════════════════════════════════════════ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.store-unavailable-section {
  min-height: calc(100vh - var(--header-height, 72px));
  display: grid;
  align-items: center;
  padding: calc(var(--header-height, 72px) + var(--space-12)) 0 var(--space-16);
  background: var(--bg-secondary);
}

.store-unavailable-card {
  max-width: 620px;
  margin: 0 auto;
  padding: var(--space-10);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.store-unavailable-card h1 {
  margin-bottom: var(--space-4);
}

.store-unavailable-card p {
  margin-bottom: 0;
  line-height: var(--leading-relaxed);
}

.static-fallback-notice {
  position: relative;
  z-index: calc(var(--z-sticky, 100) - 1);
  margin-top: var(--header-height, 72px);
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
  color: #7c2d12;
}

.static-fallback-notice .container {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.static-fallback-notice strong {
  flex: 0 0 auto;
}

.static-fallback-notice span {
  flex: 1;
  line-height: var(--leading-normal);
}

.static-fallback-notice button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 var(--space-4);
  border: 1px solid #fb923c;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: #7c2d12;
  font: inherit;
  font-weight: var(--font-semibold);
  cursor: pointer;
}

@media (max-width: 640px) {
  .static-fallback-notice .container {
    align-items: stretch;
    flex-direction: column;
  }
}

*:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ═══ TYPOGRAPHY ═══ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

/* ═══ IMAGES ═══ */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ═══ BUTTONS ═══ */
button {
  font-family: var(--font-primary);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all var(--transition-base);
}

/* ═══ CONTAINER ═══ */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

/* ═══ SECTION SPACING ═══ */
.section {
  padding: var(--space-16) 0;
}

.section-sm {
  padding: var(--space-12) 0;
}

.section-lg {
  padding: var(--space-24) 0;
}

/* ═══ UTILITIES ═══ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
  
  .section {
    padding: var(--space-12) 0;
  }
  
  .container {
    padding: 0 var(--space-4);
  }
}

/* ═══════════════════════════════════════════════════════════
   SCROLL ANIMATIONS - Advanced Section & Card Transitions
   ═══════════════════════════════════════════════════════════ */

/* Section animations */
.section-animate {
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-animate.section-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card stagger animations */
.card-animate {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-animate.card-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Smooth section transitions */
section {
  position: relative;
  overflow: hidden;
}

section::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to bottom, var(--bg-primary), transparent);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  z-index: 1;
}

section.section-visible::before {
  opacity: 1;
}

/* Parallax-like subtle effect on scroll */
@media (prefers-reduced-motion: no-preference) {
  .hero-content,
  .section-header {
    transition: transform 0.3s ease-out;
  }
}

/* Spinner for loading states */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .section-animate,
  .card-animate {
    opacity: 1;
    transform: none;
  }
}
