/* ============================================
   Satya Sports — Responsive Design
   Mobile-First Approach
   ============================================ */

/* --- Extra Small Devices (< 375px) --- */
@media (max-width: 374px) {
  .section-title {
    font-size: 1.5rem;
  }

  .hero {
    min-height: 70vh;
  }

  .hero-content h1 {
    font-size: 1.75rem !important;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.813rem;
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 0.875rem;
  }

  .product-card .product-info {
    padding: 12px;
  }

  .product-card .product-name {
    font-size: 0.813rem;
  }

  .product-card .price-current {
    font-size: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }
}

/* --- Small Devices (375px - 639px) --- */
@media (max-width: 639px) {
  :root {
    --section-padding: 48px;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .section-subtitle {
    font-size: 0.938rem;
  }

  .page-banner {
    padding: 100px 0 40px;
  }

  .page-banner h1 {
    font-size: 1.75rem;
  }

  /* Navbar Mobile */
  .navbar .desktop-nav {
    display: none;
  }

  .navbar .mobile-toggle {
    display: flex;
  }

  .navbar .nav-actions .desktop-only {
    display: none;
  }

  /* Hero Mobile */
  .hero {
    min-height: 80vh;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 0.938rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  /* Stats Mobile */
  .stat-number {
    font-size: 2.25rem;
  }

  .stat-label {
    font-size: 0.813rem;
  }

  /* Category Cards */
  .category-card {
    aspect-ratio: 16/10;
  }

  .category-card .category-name {
    font-size: 1rem;
  }

  /* Product Cards */
  .product-card .product-actions {
    flex-direction: column;
  }

  .product-card .product-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Footer */
  .footer {
    padding: 48px 0 20px;
    text-align: center;
  }

  .footer-grid {
    gap: 32px;
  }

  /* Toast */
  .toast-container {
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 20px;
  }

  .toast {
    min-width: auto;
    max-width: none;
    width: 100%;
  }

  /* Back to Top */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }

  /* Filters Mobile */
  .filters-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    z-index: 1003;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    background: var(--white);
    overflow-y: auto;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.1);
  }

  .filters-sidebar.active {
    transform: translateX(0);
  }

  .filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }

  .filter-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Cart Page Mobile */
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-summary {
    position: static;
    width: 100%;
  }

  /* Product Detail Mobile */
  .product-gallery {
    order: -1;
  }

  .product-detail-grid {
    flex-direction: column;
  }

  .product-thumbnails {
    flex-direction: row;
    overflow-x: auto;
  }

  /* Admin Mobile */
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 72px;
    bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
  }

  .admin-sidebar.active {
    transform: translateX(0);
  }

  /* Contact Page */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Modal */
  .modal-content {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: var(--radius-lg);
  }
}

/* --- Medium Devices (640px - 767px) --- */
@media (min-width: 640px) and (max-width: 767px) {
  :root {
    --section-padding: 60px;
  }

  .section-title {
    font-size: 2rem;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .navbar .desktop-nav {
    display: none;
  }

  .navbar .mobile-toggle {
    display: flex;
  }

  .filters-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    z-index: 1003;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    background: var(--white);
    overflow-y: auto;
  }

  .filters-sidebar.active {
    transform: translateX(0);
  }
}

/* --- Tablet Devices (768px - 1023px) --- */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --section-padding: 72px;
  }

  .section-title {
    font-size: 2.25rem;
  }

  .hero-content h1 {
    font-size: 3rem;
  }

  .navbar .desktop-nav {
    display: none;
  }

  .navbar .mobile-toggle {
    display: flex;
  }

  .stat-number {
    font-size: 2.75rem;
  }

  /* Admin */
  .admin-sidebar {
    width: 220px;
  }
}

/* --- Desktop (1024px+) --- */
@media (min-width: 1024px) {
  .navbar .desktop-nav {
    display: flex;
  }

  .navbar .mobile-toggle {
    display: none;
  }

  .hero-content h1 {
    font-size: 3.5rem;
  }

  .hero-content p {
    font-size: 1.125rem;
    max-width: 560px;
  }

  .section-title {
    font-size: 2.5rem;
  }

  /* Product Grid */
  .products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
  }

  .filters-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }

  /* Product Detail */
  .product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
  }
}

/* --- Large Desktop (1280px+) --- */
@media (min-width: 1280px) {
  .hero-content h1 {
    font-size: 4rem;
  }

  .section-title {
    font-size: 2.75rem;
  }

  .container-custom {
    max-width: 1280px;
  }
}

/* --- Extra Large (1536px+) --- */
@media (min-width: 1536px) {
  .container-custom {
    max-width: 1440px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .navbar,
  .footer,
  .back-to-top,
  .toast-container,
  .mobile-menu,
  .mobile-menu-overlay {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .hero {
    min-height: auto;
    padding: 20px 0;
  }
}

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

  .hover-lift:hover,
  .hover-scale:hover,
  .product-card:hover,
  .card:hover {
    transform: none;
  }

  .marquee-track {
    animation: none;
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
  .product-card .product-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent 50%);
  }

  .product-card:hover {
    transform: none;
  }

  .hover-lift:hover {
    transform: none;
    box-shadow: var(--shadow-md);
  }

  .btn:hover {
    transform: none;
  }

  /* Larger touch targets */
  .btn {
    min-height: 48px;
    min-width: 48px;
  }

  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .filter-chip {
    min-height: 40px;
    padding: 8px 16px;
  }

  .qty-selector button {
    width: 48px;
    height: 48px;
  }
}

/* ============================================
   LANDSCAPE MOBILE
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding: 80px 0 40px;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .page-banner {
    padding: 90px 0 30px;
  }
}
