/**
 * ATSTIX Responsive & Accessibility Stylesheet
 * Breakpoints for Mobile, Tablet & prefers-reduced-motion
 */

/* ==========================================================================
   1. TABLET & DESKTOP (<= 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .playground-container {
    grid-template-columns: 1fr;
  }

  .playground-toolbox-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

/* ==========================================================================
   2. MOBILE & TABLET (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Cursor hidden on touch */
  #custom-cursor, #cursor-dot {
    display: none !important;
  }

  .section {
    padding: 5rem 0;
  }

  /* Mobile Navigation Drawer */
  .mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 8px;
  }

  .mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .mobile-menu-btn.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-menu-btn.is-active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: #0d0d14;
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  }

  .site-nav.is-mobile-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav .btn {
    width: 100%;
  }

  /* Hero adjustments */
  .hero-section {
    padding-top: 7rem;
  }

  .hero-celestial-moon {
    width: 120px;
    height: 120px;
    top: 5%;
    right: 4%;
    opacity: 0.65;
  }

  .hero-cosmic-planet {
    width: 60px;
    height: 60px;
    top: 10%;
    left: 4%;
    opacity: 0.55;
  }

  .hero-float-sticker {
    width: 60px;
    height: 60px;
  }

  .hero-rising-container {
    width: 220px;
    height: 220px;
    margin-left: -110px;
  }

  .hero-stats-ribbon {
    gap: 1.5rem;
  }

  .hero-stat-item {
    flex: 1 1 40%;
  }

  /* Product & Collections Grids */
  .collections-grid {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }

  .product-card {
    padding: 1.1rem;
  }

  .sticker-container {
    height: 140px;
  }

  .sticker-container svg {
    width: 115px;
    height: 115px;
  }

  .product-title {
    font-size: 1.05rem;
  }

  .product-price {
    font-size: 1.15rem;
  }

  .btn-add-cart {
    padding: 0.45rem 0.8rem;
    font-size: 0.78rem;
  }

  /* Pack Builder */
  .pack-builder-wrapper {
    padding: 1.5rem;
  }

  .pack-summary-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .pack-summary-footer .btn {
    width: 100%;
  }

  /* Playground Laptop */
  .playground-screen-wrap {
    padding: 1rem;
  }

  .laptop-lid {
    height: 290px;
  }

  .placed-sticker {
    width: 65px;
    height: 65px;
  }

  .playground-toolbox-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .playground-thumb {
    height: 70px;
    padding: 0.4rem;
  }

  /* Quick View Modal */
  .modal-quickview-content {
    grid-template-columns: 1fr;
    padding: 1.8rem;
    gap: 1.5rem;
  }

  .modal-3d-stage {
    min-height: 200px;
  }

  /* Checkout Modal */
  .checkout-modal-inner {
    padding: 1.8rem;
  }

  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .checkout-field-full {
    grid-column: span 1;
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ==========================================================================
   3. SMALL MOBILE (<= 480px)
   ========================================================================== */
@media (max-width: 480px) {
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .cta-box {
    padding: 3rem 1.2rem;
  }

  .cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-actions .btn {
    width: 100%;
  }

  .search-sort-bar {
    border-radius: var(--radius-lg);
    padding: 1rem;
  }

  .sort-wrap {
    width: 100%;
  }

  .sort-wrap select {
    width: 100%;
  }
}

/* ==========================================================================
   4. REDUCED MOTION ACCESSIBILITY
   ========================================================================== */
@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;
  }

  #custom-cursor, #cursor-dot {
    display: none !important;
  }

  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-rising-container {
    opacity: 1 !important;
    transform: none !important;
  }

  .parallax-decor-sticker {
    display: none;
  }
}
