/* 
 * Responsive CSS - Styles for different screen sizes
 */

/* Base responsive grid - Mobile first approach */
@media (max-width: 639px) {
  /* Mobile styles */
  
  /* Header */
  .main-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
  }
  
  /* Product layout */
  .product-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-6);
  }
  
  /* Product gallery */
  .main-image-container {
    height: auto;
  }
  
  .thumbnails {
    justify-content: center;
  }
  
  /* Product actions */
  .product-actions {
    flex-direction: column;
  }
  
  /* Product bundle */
  .bundle-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-6);
  }
  
  .bundle-items {
    flex-direction: column;
    gap: var(--spacing-4);
  }
  
  .bundle-plus {
    padding: var(--spacing-2) 0;
  }
  
  /* Related products */
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-4);
  }
  
  /* Footer */
  .footer-columns {
    grid-template-columns: 1fr;
    gap: var(--spacing-6);
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
    border-radius: var(--border-radius);
  }
  
  .newsletter-form input {
    margin-bottom: var(--spacing-2);
  }
  
  /* Tabs */
  .tabs-header {
    flex-wrap: wrap;
  }
  
  .tab-button {
    flex: 1 0 auto;
    text-align: center;
    padding: var(--spacing-2) var(--spacing-3);
  }

  /* Modals */
  .modal {
    max-width: 100%;
    max-height: 90vh;
  }

  .color-comparison {
    grid-template-columns: 1fr;
  }

  /* Size chart */
  .size-chart-table {
    font-size: var(--font-size-xs);
  }
}

@media (min-width: 640px) and (max-width: 767px) {
  /* Small tablet styles */
  
  .main-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
  }
  
  .product-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-6);
  }
  
  .bundle-container {
    grid-template-columns: 1fr;
  }
  
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  /* Tablet styles */
  
  .product-layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-6);
  }
  
  .bundle-items {
    flex-wrap: wrap;
  }
  
  .bundle-item {
    flex: 0 0 calc(50% - var(--spacing-4));
  }
  
  .bundle-plus {
    flex: 0 0 100%;
    justify-content: center;
    padding: var(--spacing-2) 0;
  }
  
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  /* Desktop styles */
  
  .mobile-menu-toggle {
    display: none;
  }
  
  .product-layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-8);
  }
  
  /* Product gallery specific desktop styles */
  .main-image-container {
    height: auto;
  }
  
  /* Enhanced features for desktop */
  .product-card:hover .quick-add {
    opacity: 1;
    transform: translateY(0);
  }
  
  .bundle-items {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .related-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .footer-columns {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Specific responsive adjustments */

/* Adjustments for modal on smaller screens */
@media (max-width: 639px) {
  .modal {
    width: 95%;
  }
  
  .modal-header {
    padding: var(--spacing-3) var(--spacing-4);
  }
  
  .modal-content {
    padding: var(--spacing-4);
  }
  
  .size-chart-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .color-comparison {
    grid-template-columns: 1fr;
  }
}

/* Horizontal scrolling sections */
@media (max-width: 767px) {
  .scroll-btn {
    display: none;
  }
  
  .pair-with-items {
    padding-bottom: var(--spacing-4);
  }
  
  .product-card {
    width: 200px;
  }
}

/* Fine-tune product images */
@media (min-width: 1024px) {
  .main-image-container:hover .image-zoom-lens {
    display: block;
  }
}

/* Tab panel adjustments */
@media (max-width: 767px) {
  .tab-panel {
    padding: var(--spacing-4) 0;
  }
}

/* Enhanced touch interactions for mobile */
@media (max-width: 767px) {
  .color-swatch {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .size-button {
    min-width: 3.5rem;
    height: 3.5rem;
  }
  
  .quantity-btn {
    width: 3rem;
    height: 3rem;
  }
}

/* Improved accessibility for high contrast mode */
@media (forced-colors: active) {
  .color-swatch,
  .mini-color-swatch {
    border: 2px solid currentColor;
  }
  
  .active {
    outline: 2px solid currentColor;
  }
}

/* Preferred color schemes support */
@media (prefers-color-scheme: dark) {
  :root {
    /* Dark mode adjustments would go here if we wanted to support it */
    /* Currently we're sticking with the light scheme only */
  }
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .product-actions,
  .pair-with,
  .product-bundle,
  .related-products {
    display: none;
  }
  
  .product-layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-6);
  }
  
  .tabs-header {
    display: none;
  }
  
  .tab-panel {
    display: block;
    margin-bottom: var(--spacing-6);
    page-break-inside: avoid;
  }
}