/* ==========================================
   AegisHut - Responsive Stylesheet
   ========================================== */

/* Tablet & Below (1024px and below) */
@media (max-width: 1024px) {
  :root {
    --container-padding: 1.5rem;
  }

  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }
}

/* Mobile & Small Tablets (768px and below) */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
  }

  /* Typography */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }

  /* Header & Navigation */
  .header-container {
    padding: 0 var(--spacing-md);
  }

  .logo img {
    height: 30px;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: white;
    padding: var(--spacing-lg);
    gap: var(--spacing-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    padding: var(--spacing-sm);
    border-bottom: 1px solid var(--color-border);
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  /* Mobile Dropdown Menu */
  .nav-item-with-dropdown .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-top: 0;
    min-width: auto;
    box-shadow: none;
    border: none;
    padding: var(--spacing-sm) 0 0 var(--spacing-md);
    background: transparent;
  }

  .dropdown-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }

  .dropdown-column {
    gap: var(--spacing-xs);
  }

  .dropdown-category {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: var(--spacing-xs) 0;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text);
  }

  .dropdown-item {
    font-size: 0.875rem;
    padding: 6px 0 6px var(--spacing-md);
    border-left: 2px solid var(--color-border);
    margin-left: 0;
  }

  .dropdown-item:hover {
    background: transparent;
    border-left-color: var(--color-primary);
    color: var(--color-primary);
  }

  .dropdown-arrow {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .search-icon {
    margin-left: auto;
  }

  /* Hero */
  .hero {
    height: 400px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  /* Grids */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid {
    gap: var(--spacing-md);
  }

  /* About Grid */
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .footer {
    padding: var(--spacing-xl) 0 var(--spacing-md);
  }

  /* Filter Buttons */
  .filter-container {
    justify-content: center;
  }

  .filter-btn {
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
  }

  /* Pagination */
  .pagination {
    gap: 0.5rem;
  }

  .pagination-link,
  .pagination-current {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  /* Cards */
  .product-info,
  .blog-content {
    padding: var(--spacing-sm);
  }

  .product-title {
    font-size: 1rem;
  }

  .blog-title {
    font-size: 1.125rem;
  }

  /* Section */
  .section {
    padding: var(--spacing-xl) 0;
  }

  .section-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-lg);
  }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
  :root {
    --container-padding: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 1.5rem;
    --spacing-2xl: 2rem;
  }

  /* Typography */
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.125rem; }

  .hero {
    height: 300px;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  /* Grids */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .grid {
    gap: var(--spacing-sm);
  }

  /* About Grid */
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-content .btn {
    margin-top: var(--spacing-lg);
  }

  /* Filter */
  .filter-container {
    gap: 0.5rem;
  }

  /* Cards */
  .product-card:hover,
  .blog-card:hover {
    transform: none;
  }

  .product-image,
  .blog-image {
    aspect-ratio: 4 / 3;
  }

  /* Pagination */
  .pagination {
    flex-wrap: wrap;
  }

  /* Footer */
  .social-links {
    justify-content: center;
  }

  .footer-bottom {
    font-size: 0.85rem;
  }
}

/* Large Desktop (1400px and above) */
@media (min-width: 1400px) {
  .hero-title {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 2.5rem;
  }
}

/* Print Styles */
@media print {
  .header,
  .menu-toggle,
  .filter-container,
  .pagination,
  .footer {
    display: none;
  }

  body {
    font-size: 12pt;
    color: black;
  }

  a {
    text-decoration: underline;
    color: black;
  }

  .product-card,
  .blog-card {
    border: 1px solid black;
    page-break-inside: avoid;
  }
}

/* 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;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --color-border: #000000;
  }

  .product-card,
  .blog-card,
  .filter-btn,
  .pagination-link {
    border-width: 2px;
  }
}
