/**
 * Blue Paradise Dairy - Mobile & Tablet Fixes
 * Additional responsive improvements for all pages
 */

/* ═══════════════════════════════════════════════════════════════════════════
   GLOBAL MOBILE FIXES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Ensure touch targets are at least 44px */
@media (max-width: 768px) {
  a, button, input[type="submit"], .nav-link, .btn-primary, .btn-secondary,
  .cta-btn, .add-to-cart-btn, .product-btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* Improve text readability */
  body {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Prevent horizontal scroll */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Full-width containers */
  .container, .inner, .content, .section-inner,
  .farm-story-inner, .products-inner, .why-goat-milk-inner,
  .social-proof-inner, .process-inner, .cta-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Stack grids vertically */
  .product-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .benefit-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
  }

  .reviews-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
  }

  .process-timeline {
    grid-template-columns: 1fr !important;
    gap: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .process-timeline::before {
    display: none !important;
  }

  .farm-stats {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
    text-align: center;
  }

  .footer-brand {
    max-width: 100% !important;
  }

  .footer-social {
    justify-content: center;
  }

  /* Hero section mobile */
  .hero {
    min-height: auto;
    padding: 3rem 0;
  }

  .hero-text {
    max-width: 100%;
    text-align: center;
  }

  .hero-title {
    font-size: 2rem !important;
    line-height: 1.2;
  }

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

  .hero-cta-group {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .hero-cta-group a, .hero-cta-group button {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .hero-trust {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
  }

  .hero-badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }

  /* Hide decorative elements on mobile */
  .hero-goat,
  .floating-photos,
  .barn-silhouette,
  .particles-overlay,
  #farm-canvas {
    display: none !important;
  }

  /* Sections padding */
  section {
    padding: 3rem 1rem !important;
  }

  .section-title {
    font-size: 1.75rem !important;
    line-height: 1.2;
  }

  .section-header {
    margin-bottom: 2rem !important;
  }

  /* Farm story section */
  .farm-story-inner {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .farm-story-images {
    height: auto !important;
    min-height: 300px;
    order: -1;
  }

  .story-image-1 {
    position: relative !important;
    width: 100% !important;
    height: 250px !important;
    transform: none !important;
  }

  .story-image-2, .story-image-3 {
    display: none;
  }

  .farm-story-text {
    font-size: 1rem;
    text-align: center;
  }

  /* Product cards */
  .product-card {
    max-width: 350px;
    margin: 0 auto;
  }

  .product-content {
    padding: 1.25rem;
  }

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

  /* Buttons */
  .btn-primary, .btn-secondary, .cta-btn-white, .cta-btn-outline {
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
  }

  /* Announcement bar */
  .announcement {
    font-size: 0.8rem;
    padding: 0.75rem 1rem;
  }

  .announcement-content {
    flex-direction: column;
    gap: 0.5rem;
  }

  .live-indicator {
    display: none;
  }

  /* Header */
  .header {
    padding: 0.75rem 1rem;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  .logo-icon {
    width: 38px;
    height: 38px;
    font-size: 1.25rem;
  }

  /* Hide desktop nav items */
  .nav-phone, .nav-link {
    display: none !important;
  }

  .cart-trigger, .cart-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  /* CTA section */
  .cta-title {
    font-size: 1.5rem !important;
  }

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

  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .cta-buttons a {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* Scroll indicator */
  .scroll-indicator {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLET FIXES (768px - 1024px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 768px) and (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

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

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

  .process-timeline {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .farm-story-inner {
    grid-template-columns: 1fr !important;
    gap: 3rem;
  }

  .farm-story-images {
    order: -1;
  }

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

  .hero-goat {
    width: 250px !important;
    height: 250px !important;
    opacity: 0.5 !important;
  }

  .floating-photos {
    display: none !important;
  }

  .nav-link {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHOP PAGE SPECIFIC MOBILE FIXES
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .filter-bar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .filter-buttons {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .page-hero {
    padding: 2rem 1rem !important;
  }

  .page-hero-title {
    font-size: 1.75rem !important;
  }

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

  .products-toolbar {
    flex-direction: column;
    gap: 1rem;
  }

  /* Cart drawer */
  .cart-drawer {
    width: 100% !important;
    max-width: 100% !important;
  }

  .cart-item {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .cart-item-image {
    margin: 0 auto;
  }

  .cart-item-controls {
    justify-content: center;
  }

  /* Live activity notification */
  .live-activity {
    bottom: 10px;
    left: 10px;
    right: 10px;
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
  }

  /* Added notification */
  .added-notification {
    bottom: auto;
    top: 80px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTACT PAGE MOBILE FIXES
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .contact-form {
    order: 1;
  }

  .contact-info {
    order: 2;
  }

  .form-row {
    grid-template-columns: 1fr !important;
  }

  .contact-method {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FAQ PAGE MOBILE FIXES
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .faq-grid {
    grid-template-columns: 1fr !important;
  }

  .faq-item {
    padding: 1rem;
  }

  .faq-question {
    font-size: 1rem;
  }

  .faq-answer {
    font-size: 0.9rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY IMPROVEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Focus states */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid #C17F59;
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .particle, .scroll-progress, .cursor-dot, .cursor-ring {
    display: none !important;
  }
}

/* Print styles */
@media print {
  .header, .footer, .announcement, .scroll-progress,
  .mobile-menu-overlay, .mobile-menu-drawer, .cart-drawer,
  .particles-overlay, #farm-canvas {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
