/* ===== RESPONSIVE ENHANCEMENTS ===== */

/* Mobile-first responsive adjustments */
@media (max-width: 992px) {
	
	.user-actions span {
    display: none;
}

	.search-bar {
    flex: 1;
    margin: 0 20px;
    position: relative;
    display: none;
}
	
  /* Header adjustments for mobile */
  .header-content {
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .logo {
    order: 1;
    font-size: 1.5rem;
  }
  
  .mobile-menu-btn {
    display: block;
    order: 2;
    margin-left: auto;
  }
  
  .search-bar {
    order: 4;
    margin: 15px 0 0;
    width: 100%;
  }
  
  .user-actions {
    order: 3;
    gap: 15px;
  }
  
  /* Navigation adjustments */
  .main-nav {
    display: none;
  }
  
  /* Auth container adjustments */
  .auth-container {
    padding: 25px 20px;
    margin: 20px 15px;
  }
  
  /* Form adjustments */
  .auth-form input {
    padding: 14px 15px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Social buttons adjustments */
  .social-buttons {
    flex-direction: column;
  }
  
  /* Product detail adjustments */
  .product-actions {
    flex-direction: column;
  }
  
  .add-to-cart-btn, .buy-now-btn {
    width: 100%;
  }
  
  /* Footer adjustments */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

@media (max-width: 576px) {
  /* Further mobile optimizations */
  .auth-container {
    padding: 20px 15px;
    margin: 15px 10px;
  }
  
  .auth-header h2 {
    font-size: 1.5rem;
  }
  
  .product-title {
    font-size: 1.5rem;
  }
  
  .current-price {
    font-size: 1.8rem;
  }
  
  .original-price {
    font-size: 1.1rem;
  }
  
  /* Tab navigation for small screens */
  .tabs-header {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
  }
  
  .tab-btn {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
  
  /* Mobile menu improvements */
  .mobile-menu {
    width: 85%;
    max-width: 300px;
  }
  
  .mobile-menu-nav ul li a {
    padding: 16px 20px;
    font-size: 1rem;
  }
  
  /* Cart sidebar improvements */
  .cart-sidebar {
    width: 90%;
    max-width: 320px;
  }
  
  .cart-item {
    flex-direction: column;
    text-align: center;
  }
  
  .cart-item-img {
    margin: 0 auto;
  }
}

/* ===== PROFESSIONAL ENHANCEMENTS ===== */

/* Improved focus states for accessibility */
.auth-form input:focus,
.search-bar input:focus,
.quantity-input:focus,
.tab-btn:focus,
.social-btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Enhanced button hover effects */
.auth-form button:hover,
.add-to-cart-btn:hover,
.buy-now-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Smooth transitions for all interactive elements */
button, a, input, select {
  transition: var(--transition);
}

/* Improved mobile menu animation */
.mobile-menu {
  transition: transform 0.3s ease-out;
}

/* Better touch targets for mobile */
.auth-form button,
.add-to-cart-btn,
.buy-now-btn,
.tab-btn,
.social-btn {
  min-height: 44px; /* Minimum touch target size */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Enhanced form styling */
.form-group {
  position: relative;
  margin-bottom: 25px;
}

.auth-form label {
  margin-bottom: 10px;
  font-weight: 600;
}

/* Improved image handling for responsive design */
img {
  max-width: 100%;
  height: auto;
}

.main-image img {
  transition: opacity 0.3s ease;
}

.thumbnail {
  cursor: pointer;
}

/* Better mobile navigation experience */
.mobile-menu-nav ul li a {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--light-gray);
  font-weight: 500;
}

.mobile-menu-nav ul li a i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

/* Enhanced cart experience on mobile */
.cart-item {
  padding: 15px 0;
}

.cart-item-title {
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Improved loading states */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Better error states for forms */
.auth-form input:invalid {
  border-color: var(--danger-color);
}

.auth-form input:valid {
  border-color: var(--success-color);
}

/* Enhanced product gallery for mobile */
@media (max-width: 768px) {
  .main-image {
    height: 300px;
  }
  
  .thumbnail-container {
    justify-content: center;
  }
  
  .thumbnail {
    width: 60px;
    height: 60px;
  }
}

/* Improved typography hierarchy for mobile */
@media (max-width: 768px) {
  .product-title {
    font-size: 1.5rem;
  }
  
  .product-description {
    font-size: 0.95rem;
  }
  
  .specs-title {
    font-size: 1.1rem;
  }
}

/* Better spacing on mobile */
@media (max-width: 768px) {
  .main-content {
    padding: 20px 0;
  }
  
  .product-detail-page {
    padding: 20px 0;
  }
  
  .product-gallery,
  .product-details {
    padding: 20px;
  }
}

/* Enhanced tab navigation for touch devices */
.tab-btn {
  user-select: none;
}

/* Improved select element styling */
select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--light-gray);
  border-radius: var(--border-radius);
  font-size: 1rem;
  background-color: white;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
}

/* Prevent horizontal scrolling on mobile */
body {
  overflow-x: hidden;
}

/* Improved touch feedback for buttons */
button:active,
a:active {
  transform: scale(0.98);
}

/* Better visibility for status messages */
.success-message {
  font-weight: 500;
  display: flex;
  align-items: center;
}

.success-message::before {
  content: '✓';
  margin-right: 10px;
  font-size: 1.2rem;
}

/* Enhanced product grid for mobile */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
  }
}

/* Improved footer on mobile */
@media (max-width: 768px) {
  footer {
    padding: 40px 0 20px;
  }
  
  .footer-column {
    margin-bottom: 25px;
  }
  
  .footer-bottom {
    padding-top: 20px;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 10px;
  }
}

/* Better contrast for accessibility */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #2E7D32;
    --primary-dark: #1B5E20;
    --dark-color: #000;
  }
  
  .auth-form input {
    border-width: 2px;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}