/* ============================================
   1. ACCESSIBILITY IMPROVEMENTS
   ============================================ */

skip-to-content {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  top: -9999px !important;
  left: -9999px !important;
}

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

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   2. LOADING STATES & SKELETON SCREENS
   ============================================ */

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.product-skeleton {
  background: linear-gradient(135deg, #0a0a0a 0%, #111 100%);
  border-radius: 16px;
  padding: 16px;
}

/* ============================================
   3. ERROR / EMPTY STATES
   ============================================ */

.error-state,
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #ccc;
}

/* ============================================
   4. SEARCH
   ============================================ */

.search-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 960px) {
  .search-container { display: none; }
}

/* ============================================
   5. QUICK VIEW MODAL
   ============================================ */

.quick-view-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}

.quick-view-modal.active {
  opacity: 1;
  visibility: visible;
}

.quick-view-content {
  background: #1a1a1a;
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  transform: translateY(20px);
  transition: transform .3s ease;
}

.quick-view-modal.active .quick-view-content {
  transform: translateY(0);
}

/* ============================================
   6. FILTERS
   ============================================ */

.filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

/* ============================================
   7. WISHLIST
   ============================================ */

.wishlist-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
}

/* ============================================
   8. SAFE ANIMATIONS (TEBEX FRIENDLY)
   ============================================ */

/* Animación SOLO visual, sin controlar visibilidad */
@keyframes slideUp {
  from {
    transform: translateY(30px);
  }
  to {
    transform: translateY(0);
  }
}

/* Base visible SIEMPRE */
.animate-stagger > * {
  transform: translateY(0);
  animation: slideUp 0.5s ease-out;
}

/* Stagger timing */
.animate-stagger > *:nth-child(1) { animation-delay: .05s; }
.animate-stagger > *:nth-child(2) { animation-delay: .1s; }
.animate-stagger > *:nth-child(3) { animation-delay: .15s; }
.animate-stagger > *:nth-child(4) { animation-delay: .2s; }
.animate-stagger > *:nth-child(5) { animation-delay: .25s; }
.animate-stagger > *:nth-child(6) { animation-delay: .3s; }

/* ============================================
   9. RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .quick-view-content {
    max-width: 100%;
    margin: 16px;
  }
}

/* ============================================
   10. REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ================================
   TEBEX PRODUCT VISIBILITY FIX
   ================================ */

.store-products article.product {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  transform: none !important;
}
