/* Physis Peptides - Mobile optimized styles */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
}

img {
  max-width: 100%;
  height: auto;
}

/* Prevent hero image overflow on mobile */
.hero-img {
  width: 100%;
  height: auto;
  max-height: 55vh;
  object-fit: cover;
  object-position: center;
}

@media (min-width: 768px) {
  .hero-img {
    max-height: 75vh;
  }
}

/* Touch-friendly buttons */
a, button {
  -webkit-tap-highlight-color: transparent;
}

/* Cart badge safe area */
#persistent-cart-badge {
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  right: max(1rem, env(safe-area-inset-right));
}

/* Mobile nav spacing */
@media (max-width: 767px) {
  nav .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  h1 {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
  }
  
  .px-10 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Product cards on mobile */
@media (max-width: 640px) {
  #featured-grid,
  #shop-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
  }
  
  #featured-grid .p-5,
  #shop-grid .p-4 {
    padding: 0.75rem !important;
  }
  
  #featured-grid h3,
  #shop-grid h3 {
    font-size: 0.875rem !important;
  }
}

/* Prevent horizontal scroll from wide elements */
* {
  box-sizing: border-box;
}
