/* ===================================
   Responsive Design - Media Queries
   =================================== */

/* Tablet Devices (768px - 1199px) */
@media screen and (max-width: 1199px) {
  .container {
    padding: 0 15px;
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.75rem; }

  .hero-title {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.3rem;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-detail-grid {
    gap: 40px;
  }

  .contact-grid {
    gap: 40px;
  }

  .cart-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Devices (< 768px) */
@media screen and (max-width: 767px) {
  /* Header & Navigation */
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-white);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    box-shadow: 0 10px 20px var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  #menu-toggle:checked ~ .nav-menu {
    max-height: 400px;
  }

  .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger span:nth-child(2) {
    opacity: 0;
  }

  .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  /* Hero Section */
  .hero {
    height: 70vh;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  /* Products Grid */
  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Features Grid */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  /* About Page */
  .about-hero h1 {
    font-size: 2rem;
  }

  .mission-grid {
    grid-template-columns: 1fr;
  }

  .craftsmanship-grid {
    grid-template-columns: 1fr;
  }

  /* Product Detail Page */
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .product-actions-large {
    flex-direction: column;
  }

  .tab-headers {
    flex-wrap: wrap;
  }

  .tab-header {
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  /* Contact Page */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 25px;
  }

  .contact-info-card {
    padding: 25px;
  }

  /* Cart Page */
  .cart-item {
    grid-template-columns: 80px 1fr;
    gap: 15px;
  }

  .cart-item-image {
    grid-column: 1 / -1;
    width: 100%;
    height: 200px;
  }

  .cart-item-remove {
    grid-column: 2;
    justify-self: end;
  }

  /* Newsletter Form */
  .newsletter-form {
    flex-direction: column;
  }

  .filter-container {
    gap: 10px;
  }

  .filter-btn {
    padding: 8px 20px;
    font-size: 0.9rem;
  }

  /* Section Padding */
  .section {
    padding: 50px 0;
  }

  /* Trust Badges */
  .trust-badges {
    flex-wrap: wrap;
    gap: 20px;
  }
}

/* Small Mobile Devices (< 480px) */
@media screen and (max-width: 479px) {
  .container {
    padding: 0 10px;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.3rem; }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .logo {
    font-size: 1.3rem;
  }

  .logo-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .product-card {
    border-radius: 8px;
  }

  .product-info {
    padding: 15px;
  }

  .product-name {
    font-size: 1.1rem;
  }

  .product-price {
    font-size: 1.3rem;
  }

  .feature-card {
    padding: 20px;
  }

  .feature-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .testimonial-card {
    padding: 20px;
  }

  .testimonial-text {
    font-size: 1rem;
  }

  .footer {
    padding: 40px 0 20px;
  }

  .footer-section {
    margin-bottom: 20px;
  }

  /* Form Elements */
  .form-input,
  .form-textarea {
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .quantity-selector {
    flex-wrap: wrap;
  }

  .product-actions-large {
    gap: 10px;
  }

  .cart-summary {
    padding: 20px;
  }

  .checkout-btn {
    padding: 12px;
    font-size: 1rem;
  }
}

/* Large Desktop Devices (> 1400px) */
@media screen and (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }

  .hero-title {
    font-size: 4.5rem;
  }

  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .btn,
  .filter-section,
  .newsletter-section {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .product-card,
  .feature-card {
    break-inside: avoid;
    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;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #E68A00;
    --secondary-color: #6B0000;
    --text-dark: #000000;
    --text-light: #333333;
  }

  .btn {
    border: 2px solid currentColor;
  }

  .product-card,
  .feature-card,
  .contact-form,
  .cart-summary {
    border: 2px solid var(--text-dark);
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-cream: #1a1a1a;
    --bg-white: #2d2d2d;
    --text-dark: #f0f0f0;
    --text-light: #b0b0b0;
    --border-color: #404040;
  }

  .header {
    background-color: var(--bg-white);
  }

  .product-card,
  .feature-card,
  .contact-form,
  .cart-summary {
    background-color: var(--bg-white);
  }
}

/* Landscape Orientation for Mobile */
@media screen and (max-width: 767px) and (orientation: landscape) {
  .hero {
    height: 50vh;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .section {
    padding: 30px 0;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn:hover,
  .nav-link:hover,
  .product-card:hover {
    transform: none;
  }

  .btn:active {
    transform: scale(0.95);
  }

  .product-card:active {
    transform: scale(0.98);
  }
}
