/*
 * Enhanced Mobile Responsiveness for AJ Group Theme
 * Additional mobile-first improvements
 */

/* Enhanced Mobile Variables */
@media (max-width: 768px) {
  :root {
    --mobile-padding: 1rem;
    --mobile-gap: 0.75rem;
    --mobile-header-height: 60px;
    --mobile-font-scale: 0.9;
  }
}

/* Mobile-First Header Improvements */
@media (max-width: 768px) {
  .site-header {
    height: var(--mobile-header-height);
    padding: 0;
  }
  
  .nav-container {
    padding: 0 var(--mobile-padding);
    gap: var(--mobile-gap);
  }
  
  .site-logo {
    gap: 0.5rem;
  }
  
  .logo-mark {
    width: 35px;
    height: 35px;
  }
  
  .site-title {
    font-size: 1.1rem;
  }
  
  .site-description {
    display: none;
  }
  
  .header-actions {
    gap: 0.5rem;
  }
  
  .search-toggle,
  .theme-toggle,
  .mobile-menu-toggle {
    width: 35px;
    height: 35px;
  }
  
  .header-whatsapp {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .header-whatsapp .btn-text {
    display: none;
  }
}

/* Enhanced Mobile Navigation */
.mobile-navigation {
  backdrop-filter: blur(20px);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

.mobile-nav-close {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-menu {
  list-style: none;
  margin: 0;
  padding: var(--spacing-lg);
}

.mobile-nav-menu li {
  margin-bottom: var(--spacing-sm);
}

.mobile-nav-menu a {
  display: flex;
  align-items: center;
  padding: var(--spacing-md);
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.mobile-nav-menu a:hover {
  background: var(--bg-glass);
  color: var(--primary-color);
}

/* Enhanced Hero Section for Mobile */
@media (max-width: 768px) {
  .hero-section {
    padding: calc(var(--mobile-header-height) + 2rem) var(--mobile-padding) 3rem;
    min-height: 100vh;
  }
  
  .hero-container {
    gap: 2rem;
    text-align: center;
  }
  
  .hero-badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  .hero-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
  }
  
  .hero-cta {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.5rem;
  }
  
  .hero-stats {
    flex-direction: row;
    justify-content: space-around;
    gap: 1rem;
    margin-top: 2rem;
  }
  
  .stat-item {
    text-align: center;
    flex: 1;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .stat-label {
    font-size: 0.8rem;
  }
  
  .hero-visual {
    order: -1;
    margin-bottom: 1rem;
  }
  
  .hero-card {
    max-width: 100%;
    margin: 0 auto;
  }
}

/* Enhanced Product Grid for Mobile */
@media (max-width: 768px) {
  .products-section {
    padding: 3rem var(--mobile-padding);
  }
  
  .section-header {
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .section-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }
  
  .section-description {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }
  
  .product-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
  }
  
  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
  }
  
  .filter-btn.active,
  .filter-btn:hover {
    background: var(--primary-color);
    color: var(--text-inverse);
    border-color: var(--primary-color);
  }
  .product-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
  }
  
  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }
  
  .product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
  }
  
  .product-content {
    padding: 1rem;
  }
  
  .product-name {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
  }
  
  .product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
  }
  
  .product-price {
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
  }
  
  .product-stock {
    font-size: 0.875rem;
  }
  
  .product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .product-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

/* Enhanced Product Cards for Very Small Screens */
@media (max-width: 768px) {
  .product-card {
    max-width: 100%;
  }
  
  .product-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-btn {
    width: 100%;
    text-align: center;
  }
}

/* Touch-Friendly Improvements */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .filter-btn,
  .nav-menu a,
  .mobile-nav-menu a {
    min-height: 44px;
    min-width: 44px;
  }
  
  .product-card:hover {
    transform: none;
  }
  
  .product-card:active {
    transform: scale(0.98);
  }
  
  .btn:active {
    transform: scale(0.95);
  }
}

/* Mobile-Specific Utilities */
.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }
  
  .desktop-only {
    display: none;
  }
}

/* Enhanced Mobile Animations */
@media (max-width: 768px) {
  .hero-content > * {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
  }
  
  .hero-badge {
    animation-delay: 0.1s;
  }
  
  .hero-title {
    animation-delay: 0.2s;
  }
  
  .hero-description {
    animation-delay: 0.3s;
  }
  
  .hero-cta {
    animation-delay: 0.4s;
  }
  
  .hero-stats {
    animation-delay: 0.5s;
  }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
  .hero-background {
    background-attachment: scroll;
  }
  
  .floating-element {
    display: none;
  }
  
  .hero-particles {
    display: none;
  }
  
  * {
    -webkit-tap-highlight-color: transparent;
  }
}

/* Improved Mobile Scrolling */
@media (max-width: 768px) {
  body {
    -webkit-overflow-scrolling: touch;
  }
  
  .mobile-navigation {
    -webkit-overflow-scrolling: touch;
  }
}

/* Mobile-Specific Loading States */
@media (max-width: 768px) {
  .btn.loading {
    pointer-events: none;
  }
  
  .btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


