/* ============================================= */
/* FITNESS BOX — Mobile & Responsive Optimizations */
/* Tested: 320px, 375px, 414px, 640px, 768px,    */
/* 1024px, 1440px                                 */
/* ============================================= */

/* ── 1. Base mobile typography ──────────────── */
@media (max-width: 640px) {
  body { font-size: 15px; }
  h1, h2, h3 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
}

/* ── 2. Hero section mobile fixes ───────────── */
@media (max-width: 1023px) {
  .hero-v2 { min-height: auto !important; padding-bottom: 4rem; }
  .hero-v2 .min-h-\[90vh\] {
    min-height: auto !important;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

@media (max-width: 640px) {
  .hero-v2 .lg\:col-span-7 { text-align: left !important; }
  .hero-v2 h1 {
    font-size: 3.5rem !important;     /* Increased for more impact */
    font-weight: 900 !important;      /* Extra bold */
    line-height: 1 !important;
    letter-spacing: -0.04em !important;
  }
  .hero-v2 .cycle-container { margin-top: 0.75rem !important; }
  .hero-v2 .script-headline {
    font-size: 1.25rem !important;     /* 20px */
    margin-top: 1.5rem !important;
  }
  .hero-v2 .max-w-lg {
    margin-left: 0 !important;
    margin-right: auto !important;
    font-size: 0.95rem !important;
    text-align: left !important;
  }
  .hero-v2 .flex.flex-wrap {
    justify-content: flex-start !important;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .hero-v2 .flex.flex-wrap > a {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }
  .hero-v2 .grid-cols-3 {
    max-width: 320px !important;
    margin: 2rem auto 0 !important;
  }
  .hero-v2 .grid-cols-3 .text-3xl,
  .hero-v2 .grid-cols-3 .md\:text-4xl {
    font-size: 1.75rem !important;     /* 28px */
  }
  .hero-v2 .grid-cols-3 .text-\[10px\] {
    font-size: 9px !important;
  }

  .hero-v2 .grid-cols-3 {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1rem !important;
    max-width: 100% !important;
  }

}

/* ── 3. Hero right column - show on mobile ── */
@media (max-width: 1023px) {
  .hero-v2 .lg\:col-span-5 { 
    display: block !important; 
    margin-top: 2rem;
    text-align: center;
  }
}

/* ── 4. Marquee strip mobile ───────────────── */
@media (max-width: 640px) {
  .marquee-track {
    font-size: 0.7rem !important;
    gap: 1.5rem !important;
  }
}

/* ── 5. SHOP_BY_CATEGORY mobile fixes ──────── */
@media (max-width: 640px) {
  section h2.paint-stroke-h,
  section h2.stagger-item.paint-stroke-h {
    font-size: 1.875rem !important;     /* 30px */
    line-height: 1.15 !important;
  }
  .grid-cols-2.md\:grid-cols-3.lg\:grid-cols-6 {
    gap: 0.75rem !important;
  }
  .absolute.top-3.left-3.bg-fb-green {
    font-size: 9px !important;
    padding: 3px 6px !important;
  }
}

/* ── 6. PROMO_MARKER strip mobile ─────────── */
@media (max-width: 640px) {
  section.bg-fb-green.py-3 .flex.flex-wrap {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem !important;
  }
  section.bg-fb-green.py-3 .font-display {
    font-size: 0.95rem !important;
  }
}

/* ── 7. FEATURED_PRODUCTS mobile fixes ─────── */
@media (max-width: 640px) {
  .product-card .pt-4.pb-2.px-3 {
    padding: 0.75rem 0.5rem 0.5rem !important;
  }
  .product-card h3 {
    font-size: 0.875rem !important;
    line-height: 1.25 !important;
  }
  .product-card .text-xs { font-size: 0.7rem !important; }
  .product-card .stars { font-size: 0.75rem !important; }
  .tab-btn {
    padding: 0.6rem 0.75rem !important;
    font-size: 0.7rem !important;
  }
  .grid-cols-2.lg\:grid-cols-4 {
    gap: 0.75rem !important;
  }
}
/* ── 8. WHY_FITNESS_BOX mobile fixes ───────── */
@media (max-width: 1023px) {
  .grid.lg\:grid-cols-12 .lg\:col-span-5 { order: 1; }
  .grid.lg\:grid-cols-12 .lg\:col-span-7 { order: 2; }
}
@media (max-width: 640px) {
  section .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem 1.5rem !important;
  }
  section .grid-cols-4 > div .font-display.font-black.text-3xl {
    font-size: 1.75rem !important;
  }
  section .absolute.-bottom-6.-right-6 {
    bottom: -1rem !important;
    right: -0.5rem !important;
    padding: 0.75rem !important;
  }
  section .absolute.-bottom-6.-right-6 .font-display.text-4xl {
    font-size: 2rem !important;
  }
}

/* ── 9. BIG_PROMO_BANNER mobile fixes ──────── */
@media (max-width: 1023px) {
  section.relative.overflow-hidden.bg-fb-black .grid.md\:grid-cols-2 {
    gap: 2rem !important;
  }
}
@media (max-width: 640px) {
  section h2.text-4xl.md\:text-6xl {
    font-size: 2rem !important;
    line-height: 1.1 !important;
  }
  section .section-cycle { font-size: 1.5rem !important; }
  section .grid-cols-2.gap-4 { gap: 0.75rem !important; }
  section .grid-cols-2.gap-4 > div { padding: 1rem !important; }
  section .grid-cols-2.gap-4 .font-display.font-black.text-3xl {
    font-size: 1.75rem !important;
  }
}

/* ── 10. TESTIMONIALS mobile fixes ────────── */
@media (max-width: 640px) {
  section.bg-fb-bg .grid.md\:grid-cols-3 { gap: 1rem !important; }
  section.bg-fb-bg .bg-white.p-8 { padding: 1.25rem !important; }
  section.bg-fb-bg p.leading-relaxed {
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
  }
}

/* ── 11. NEWSLETTER mobile fixes ──────────── */
@media (max-width: 640px) {
  section.bg-fb-green.py-20 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  section.bg-fb-green .max-w-4xl h2 { font-size: 1.75rem !important; }
  section.bg-fb-green .max-w-4xl p { font-size: 0.875rem !important; }
  section.bg-fb-green form.stagger-item {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
  section.bg-fb-green form input,
  section.bg-fb-green form button {
    width: 100%;
    text-align: center;
  }
}

/* ── 12. HEADER mobile fixes ─────────────── */
@media (max-width: 640px) {
  header.main-header > div.max-w-7xl {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    gap: 0.5rem !important;
  }
  header.main-header .flex.items-center.gap-2 a span,
  header.main-header .flex.items-center.gap-2 a div {
    font-size: 9px !important;
  }
  header.main-header .flex.items-center.gap-2 svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
  }
  header .custom-logo {
    max-height: 40px !important;
    max-width: 140px !important;
  }
}

/* ── 13. Floating WhatsApp CTA - move up ───── */
@media (max-width: 640px) {
  .floating-cta {
    bottom: 16px !important;
    right: 16px !important;
    width: 50px !important;
    height: 50px !important;
  }
  .floating-cta svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
  }
}

/* ── 14. Scroll-down button - reposition ──── */
@media (max-width: 640px) {
  #scroll-down-btn {
    transform: scale(0.85);
    opacity: 0.8;
  }
}

/* ── 15. Floating hero cards - show on mobile ─ */
@media (max-width: 480px) {
  .floating-card { display: block !important; }
}

/* ── 16. WooCommerce archive mobile ─────────── */
@media (max-width: 640px) {
  .woocommerce-page .summary.entry-summary { padding-top: 1.5rem; }
  .woocommerce-page .related.products ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
  }
  .woocommerce-page .woocommerce-tabs { padding: 1rem !important; }
  .woocommerce table.shop_table { font-size: 0.8rem !important; }
  .woocommerce table.shop_table td,
  .woocommerce table.shop_table th {
    padding: 0.5rem !important;
  }
}

/* ── 17. ABOUT + CONTACT page fixes ────────── */
@media (max-width: 640px) {
  .page-about-hero,
  .page-contact-hero {
    padding: 64px 0 48px !important;
  }
  .grid-cols-1.lg\:grid-cols-12 { gap: 1.5rem !important; }
}

/* ── 18. Cycle words stable width (no conflict - main.css handles it) */

/* ── 19. Improve touch targets ────────────── */
@media (max-width: 1023px) {
  .tab-btn,
  .btn-primary,
  .btn-green,
  .btn-outline-white,
  button[aria-label] {
    min-height: 44px;
  }
}

/* ── 20. Reduce parallax on mobile ────────── */
@media (max-width: 640px) {
  /* Parallax is kept but can be tuned if it causes performance issues */
}

/* ── 21. Product title clamp ──────────────── */
.product-card h3 a,
.product-card h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 22. Section spacing ──────────────────── */
@media (max-width: 640px) {
  section.py-16, section.py-20, section.py-24, section.py-32,
  section.md\:py-20, section.md\:py-24, section.md\:py-32 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
}

/* ── 23. Ribbon responsive ────────────────── */
@media (max-width: 640px) {
  .ribbon {
    font-size: 0.65rem !important;
    padding: 0.4rem 0.75rem !important;
  }
}

/* ── 24. Stars review text ───────────────── */
@media (max-width: 640px) {
  .stars { font-size: 0.75rem !important; }
}

/* ── 25. Print styles ─────────────────────── */
@media print {
  .floating-cta,
  .scroll-progress,
  #pageLoader,
  #scroll-down-btn {
    display: none !important;
  }
}

/* ── 26. Landscape mobile fix ─────────────── */
@media (max-width: 1023px) and (orientation: landscape) {
  .hero-v2 { min-height: auto !important; }
  .hero-v2 .min-h-\[90vh\] { min-height: auto !important; }
}
