/* ===== MOBILE RESPONSIVE ENHANCEMENTS ===== */

/* Extra small devices (landscape phones and down) */
@media (max-width: 576px) {
  html {
    font-size: 14px;
  }

  body {
    font-size: 14px;
  }

  .container {
    padding: 0 1rem;
  }

  section {
    padding: 2rem 0;
  }

  .navbar {
    position: sticky;
  }

  .navbar-container {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }

  .logo {
    flex: 1 0 100%;
    font-size: 1.2rem;
  }

  .logo img {
    height: 30px;
    width: 30px;
  }

  .nav-links {
    gap: 0.5rem;
    flex: 1 0 100%;
  }

  .nav-buttons {
    flex: 1 0 100%;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .product-card {
    box-shadow: none;
    border: 1px solid var(--light-border);
  }

  .product-image {
    height: 150px;
  }

  .product-info {
    padding: 1rem;
  }

  .product-name {
    font-size: 1rem;
  }

  .product-price {
    font-size: 1.2rem;
  }

  .card {
    padding: 1rem;
    box-shadow: none;
    border: 1px solid var(--light-border);
  }

  .modal-content {
    width: 100%;
    max-width: none;
    margin: 1rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  table {
    font-size: 0.8rem;
    box-shadow: none;
    border: 1px solid var(--light-border);
  }

  th,
  td {
    padding: 0.5rem;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .auth-form {
    width: 100%;
    max-width: 100%;
    margin: 1rem;
    padding: 1.5rem;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-info {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    width: 200px;
  }

  .admin-content {
    margin-left: 0;
    padding: 1rem 0.5rem;
  }

  .dashboard-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .referral-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .referral-stat {
    padding: 1rem;
  }

  .copy-code {
    flex-direction: column;
  }

  .copy-code input {
    width: 100%;
  }

  .referral-item {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Small devices (landscape phones) */
@media (min-width: 576px) and (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .auth-form {
    max-width: 450px;
  }

  .about-section {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    width: 220px;
  }

  .admin-content {
    margin-left: 220px;
  }
}

/* Medium devices (tablets) */
@media (min-width: 768px) and (max-width: 992px) {
  .navbar-container {
    padding: 1rem 1.5rem;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-sidebar {
    width: 220px;
  }

  .admin-content {
    margin-left: 220px;
    padding: 1.5rem;
  }
}

/* Large devices (desktops) */
@media (min-width: 992px) {
  .section-title {
    font-size: 2.5rem;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .dashboard-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .admin-sidebar {
    width: 250px;
  }

  .admin-content {
    margin-left: 250px;
    padding: 2rem;
  }
}

/* Extra large devices (large desktops) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
  .hero {
    padding: 2rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  section {
    padding: 1.5rem 0;
  }
}

/* Print styles */
@media print {
  .navbar,
  .footer,
  .btn-outline,
  .nav-buttons,
  .admin-sidebar {
    display: none !important;
  }

  .admin-content {
    margin-left: 0;
  }

  .modal {
    display: none !important;
  }

  body {
    background-color: white;
  }

  .card {
    box-shadow: none;
    border: 1px solid var(--light-border);
  }
}

/* High DPI screens */
@media (min-resolution: 192dpi) {
  .product-card,
  .card,
  .modal-content {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn {
    padding: 0.8rem 1.5rem;
    min-height: 44px;
    min-width: 44px;
  }

  a {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
  }

  .product-card:hover {
    transform: none;
  }

  .navbar-container {
    padding: 1.2rem;
  }

  .nav-links {
    gap: 1.5rem;
  }
}

/* Authentication pages responsive */
@media (max-width: 576px) {
  .auth-container {
    padding: 1rem;
  }

  .auth-form-wrapper {
    padding: 2rem 1.5rem;
    max-width: 100%;
    border-radius: 0.8rem;
  }

  .auth-store-name {
    font-size: 1.4rem;
  }

  .auth-title {
    font-size: 1.2rem;
  }

  .auth-form input,
  .auth-form select {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .auth-btn {
    padding: 0.8rem;
    font-size: 0.95rem;
  }

  .btn-google {
    padding: 0.8rem;
    font-size: 0.9rem;
  }
}

@media (min-width: 576px) and (max-width: 768px) {
  .auth-form-wrapper {
    max-width: 400px;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

