/* ════════════════════════════════════════
   WOOPW HTML THEME — RESPONSIVE
   Mobile-first enhancements for all pages
════════════════════════════════════════ */

/* ── Mobile menu toggle (hidden on desktop) ── */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--grey-200);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--transition), background var(--transition);
}

.mobile-menu-toggle:hover {
  border-color: var(--teal);
}

.mobile-menu-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--dark-50);
  z-index: 250;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.nav-open {
  overflow: hidden;
}

body.nav-open .mobile-nav-overlay {
  display: block;
  opacity: 1;
}

body.nav-open .mobile-menu-toggle .mobile-menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .mobile-menu-toggle .mobile-menu-bar:nth-child(2) {
  opacity: 0;
}

body.nav-open .mobile-menu-toggle .mobile-menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile drawer header/footer (hidden on desktop) */
.mobile-nav-header,
.mobile-nav-footer,
.mobile-nav-cta {
  display: none;
}

.mobile-nav-body {
  display: contents;
}

/* ── Tablet & below (1024px) ── */
@media (max-width: 1024px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .utility-bar,
  .site-header,
  .site-main,
  .hero,
  .condition-hero,
  .page-default-hero {
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
  }

  .container,
  .utility-bar .container,
  .site-header .container {
    max-width: 100%;
    min-width: 0;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 240;
  }

  .header-inner {
    gap: 10px;
    padding: 12px 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .logo,
  .logo--image {
    min-width: 0;
    max-width: min(260px, 68vw);
    overflow: visible;
  }

  .logo img,
  .logo--image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
  }

  .mobile-menu-toggle {
    display: flex;
    order: 3;
    margin-left: auto;
  }

  .header-actions {
    order: 4;
    gap: 8px;
    min-width: 0;
  }

  .header-actions .icon-btn,
  .mobile-menu-toggle {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(380px, 92vw);
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    background: var(--white);
    box-shadow: -8px 0 40px var(--dark-15);
    z-index: 300;
    overflow: hidden;
    overflow-x: hidden;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  body.nav-open .main-nav {
    transform: translateX(0);
  }

  .mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--grey-200);
    background: var(--white);
    flex-shrink: 0;
  }

  .mobile-nav-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--navy);
  }

  .mobile-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--grey-200);
    border-radius: 10px;
    background: var(--white);
    color: var(--navy);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
  }

  .mobile-nav-close:hover {
    border-color: var(--teal);
    color: var(--teal);
  }

  .mobile-nav-body {
    display: block;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mobile-nav-body::-webkit-scrollbar {
    display: none;
  }

  .mobile-nav-cta {
    display: block;
    padding: 16px 20px;
    border-top: 1px solid var(--grey-200);
    background: var(--white);
    flex-shrink: 0;
  }

  .mobile-nav-shop-all {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 15px;
  }

  .mobile-nav-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--grey-200);
    background: var(--off-white);
    flex-shrink: 0;
  }

  .mobile-nav-account,
  .mobile-nav-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    min-height: 56px;
    padding: 11px 10px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    color: var(--navy);
    background: var(--white);
    border: 1px solid var(--grey-200);
    transition: border-color var(--transition), background var(--transition);
  }

  .mobile-nav-account svg,
  .mobile-nav-cart svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
  }

  .mobile-nav-account:hover,
  .mobile-nav-cart:hover {
    border-color: var(--teal);
    color: var(--teal);
  }

  .mobile-menu-toggle {
    z-index: 301;
  }

  body.nav-open .mobile-menu-toggle {
    opacity: 0;
    pointer-events: none;
  }

  .nav-item {
    position: relative;
    border-bottom: 1px solid var(--grey-100);
  }

  .nav-item > a {
    padding: 16px 24px;
    font-size: 15px;
    justify-content: space-between;
  }

  .mega-menu,
  .mega-menu.mega-wide {
    position: static;
    width: 100%;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--off-white);
    --mega-scroll-max: min(55vh, 420px);
    max-height: none;
    overflow: visible;
  }

  .nav-item.open .mega-menu {
    display: block;
    transform: none;
  }

  .mega-main,
  .mega-main.mega-services {
    grid-template-columns: 1fr;
    padding: 16px 20px;
    gap: 20px;
    max-height: var(--mega-scroll-max, min(55vh, 420px));
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--grey-400) var(--grey-100);
  }

  .mega-main::-webkit-scrollbar {
    width: 8px;
  }

  .mega-main::-webkit-scrollbar-thumb {
    background: var(--grey-300);
    border-radius: 999px;
  }

  .mega-featured {
    border-left: none;
    border-top: 1px solid var(--grey-200);
    border-radius: 0;
    padding: 20px;
    max-height: var(--mega-scroll-max, min(55vh, 420px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mega-overlay {
    display: none !important;
  }

  .section-header {
    margin-bottom: 32px;
  }

  .section-header p {
    font-size: 15px;
  }

  .hero {
    padding: clamp(48px, 8vw, 80px) 0;
  }

  .hero-sub {
    font-size: 16px;
  }

  .hero-trust {
    gap: 16px;
  }

  .trust-sep {
    display: none;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
  }

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

  .cta-banner .btn-primary,
  .cta-banner .btn-white,
  .cta-banner .btn-outline-white {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .cta-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  /* Inner pages */
  .condition-hero-grid,
  .product-hero-grid,
  .service-hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-right-col,
  .service-hero-image,
  .mission-image,
  .brand-image {
    display: none;
  }

  .calc-grid,
  .about-grid,
  .contact-grid,
  .checkout-grid,
  .consult-grid,
  .mission-grid,
  .brand-grid {
    grid-template-columns: 1fr;
  }

  .checkout-grid .order-summary,
  .consult-sidebar,
  .service-sidebar,
  .contact-sidebar {
    position: static;
  }

  .product-gallery {
    position: static;
  }

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

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

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

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

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

  .how-steps {
    flex-wrap: wrap;
    gap: 20px;
  }

  .how-step {
    flex: 0 0 calc(33.333% - 14px);
  }

  .how-step::after {
    display: none;
  }
}

/* ── Mobile (768px) ── */
@media (max-width: 768px) {
  .utility-bar {
    display: none;
  }

  .header-actions .header-cta-btn {
    display: none;
  }

  /* Hide search only; keep account + cart visible */
  .header-actions .icon-btn-search {
    display: none;
  }

  .header-actions .icon-btn-search.pm-show-mobile {
    display: none !important;
  }

  .header-search-dropdown {
    padding: 16px 0;
  }

  .header-search-dropdown .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-search-dropdown .als-wrap,
  .header-search-dropdown .als-panel {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    position: relative;
    right: auto;
    left: auto;
    transform: none;
  }

  .header-search-dropdown .als-form {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .header-search-dropdown .als-field {
    width: 100%;
    min-width: 0;
  }

  .header-search-dropdown .als-submit {
    width: 100%;
    min-width: 0;
    padding: 14px 18px;
  }

  .header-search-dropdown .als-suggestions {
    position: relative;
    left: auto;
    right: auto;
    width: 100%;
  }

  .blog-page .blog-search-toolbar .als-wrap,
  .blog-page .blog-search-toolbar .als-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    position: relative;
    right: auto;
    left: auto;
    transform: none;
  }

  .blog-page .blog-search-toolbar .als-form {
    flex-direction: column;
    align-items: stretch;
  }

  .blog-page .blog-search-toolbar .als-submit {
    width: 100%;
    min-width: 0;
  }

  .header-actions .icon-btn-account,
  .header-actions .cart-btn {
    display: none;
  }

  .logo {
    font-size: 17px;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
  }

  .hero h1 {
    font-size: clamp(28px, 8vw, 40px);
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn-white,
  .hero-ctas .btn-outline-white {
    justify-content: center;
    text-align: center;
  }

  .hero-trust {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .trust-features {
    display: flex;
    grid-template-columns: none;
    gap: 0;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .trust-features::-webkit-scrollbar {
    display: none;
  }

  .trust-feature {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 16px 8px;
  }

  .trust-carousel-arrows {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 12px 0 0;
  }

  .product-grid,
  .category-grid,
  .reviews-grid,
  .blog-grid,
  .related-grid,
  .other-grid,
  .values-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .reviews-grid {
    display: flex;
    grid-template-columns: none;
    gap: 16px;
    margin: 0 calc(-1 * clamp(20px, 4vw, 48px)) 36px;
    padding: 4px clamp(20px, 4vw, 48px) 8px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-padding-left: clamp(20px, 4vw, 48px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .reviews-grid::-webkit-scrollbar {
    display: none;
  }

  .reviews-grid .review-card {
    flex: 0 0 min(86vw, 360px);
    scroll-snap-align: start;
    min-height: 0;
  }

  .mobile-carousel-arrows {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 14px 0 36px;
  }

  .team-carousel-arrows {
    margin-bottom: 0;
  }

  .video-scroll {
    gap: 0;
    margin: 0 calc(-1 * clamp(20px, 4vw, 48px));
    padding: 8px clamp(20px, 4vw, 48px) 18px;
    scroll-snap-type: x mandatory;
    scroll-padding-left: clamp(20px, 4vw, 48px);
  }

  .video-card {
    flex: 0 0 calc(100vw - (2 * clamp(20px, 4vw, 48px)));
    width: calc(100vw - (2 * clamp(20px, 4vw, 48px)));
    max-width: 360px;
    margin-right: 16px;
    scroll-snap-align: start;
  }

  .team-section .team-photos {
    display: flex;
    grid-template-columns: none;
    gap: 16px;
    margin: 28px calc(-1 * clamp(20px, 4vw, 48px)) 0;
    padding: 4px clamp(20px, 4vw, 48px) 10px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-padding-left: clamp(20px, 4vw, 48px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .team-section .team-photos::-webkit-scrollbar {
    display: none;
  }

  .team-section .team-photo {
    flex: 0 0 min(82vw, 320px);
    width: min(82vw, 320px);
    aspect-ratio: 4/5;
    scroll-snap-align: start;
  }

  .site-footer {
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-brand .logo {
    justify-content: center;
  }

  .footer-brand p {
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

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

  .footer-col ul {
    padding: 0;
  }

  .pharmacy-details-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 24px;
    text-align: center;
  }

  .footer-pharmacy {
    text-align: center;
  }

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

  .wl-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
  }

  .wl-stat {
    padding: 16px 10px;
  }

  .wl-stat-num {
    font-size: 26px;
  }

  .wl-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 24px;
  }

  .wl-feature-tag {
    width: 100%;
    justify-content: flex-start;
    padding: 11px 16px;
    font-size: 14px;
  }

  .wl-content .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 14px 18px;
    font-size: 14px;
    text-align: center;
    white-space: normal;
  }

  .wl-calculator {
    margin-top: 28px;
    border-radius: 18px;
  }

  .calc-header {
    padding: 18px 20px;
    align-items: center;
  }

  .calc-header-icon {
    width: 44px;
    height: 44px;
  }

  .calc-header h3 {
    font-size: 20px;
    line-height: 1.15;
  }

  .calc-header p {
    font-size: 14px;
    line-height: 1.45;
  }

  .calc-embed-area {
    min-height: 0;
    padding: 0;
    background: var(--white);
    overflow: hidden;
  }

  .calc-embed-area iframe {
    height: 560px;
    min-height: 0;
  }

  .embed-placeholder {
    width: 100%;
    padding: 18px;
    border: 1px dashed var(--grey-200);
    border-radius: 14px;
    background: var(--off-white);
  }

  .embed-placeholder svg,
  .embed-placeholder code {
    display: none;
  }

  .faq-question {
    padding: 16px 18px;
    font-size: 14px;
  }

  .faq-answer {
    padding: 0 18px 16px;
    font-size: 14px;
  }

  /* Page heroes */
  .contact-hero,
  .about-hero,
  .service-hero,
  .conditions-hero,
  .thankyou-hero {
    padding: clamp(40px, 6vw, 56px) 0;
  }

  .contact-methods .container {
    grid-template-columns: 1fr;
  }

  .contact-method {
    border-right: none;
    border-bottom: 1px solid var(--grey-200);
  }

  .contact-method:last-child {
    border-bottom: none;
  }

  .cf-row,
  .form-row,
  .co-row {
    grid-template-columns: 1fr;
  }

  .info-bar .container {
    flex-direction: column;
  }

  .info-bar-item {
    border-right: none;
    border-bottom: 1px solid var(--grey-200);
  }

  .info-bar-item:last-child {
    border-bottom: none;
  }

  .tabs-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    padding: 12px 16px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Checkout steps: see checkout.css */

  .step-indicator {
    gap: 4px;
    overflow-x: auto;
  }

  .step-ind-label {
    font-size: 10px;
  }

  .radio-group {
    flex-direction: column;
  }

  .how-step {
    flex: 0 0 calc(50% - 10px);
  }

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

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

  .order-recap-grid,
  .expect-grid,
  .referral-grid {
    grid-template-columns: 1fr;
  }

  .sticky-cta-text span {
    display: none;
  }

  .sticky-cta .container {
    flex-wrap: wrap;
    gap: 12px;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 16px;
  }

  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-bar .container {
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
  }
}

/* ── Small mobile (480px) ── */
@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }

  .utility-bar .container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    text-align: center;
  }

  .utility-bar span,
  .utility-bar a {
    font-size: 12px;
    line-height: 1.35;
  }

  .utility-links {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  :root {
    --section-pad: clamp(40px, 10vw, 60px);
  }

  .pharmacy-details-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    gap: 6px;
  }

  .logo,
  .logo--image {
    max-width: min(240px, 72vw);
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions .icon-btn,
  .mobile-menu-toggle {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 10px;
  }

  .header-actions .icon-btn svg,
  .mobile-menu-toggle svg {
    width: 17px;
    height: 17px;
  }

  .mobile-nav-footer {
    gap: 8px;
    padding: 12px 14px;
  }

  .mobile-nav-account,
  .mobile-nav-cart {
    font-size: 12px;
    gap: 6px;
    min-height: 52px;
  }

  .weight-loss-section {
    padding: 40px 0;
  }

  .wl-stats {
    grid-template-columns: 1fr;
  }

  .wl-stat {
    padding: 16px 14px;
  }

  .wl-content .btn-primary {
    font-size: 13px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .calc-header {
    gap: 12px;
    padding: 16px 18px;
  }

  .calc-header h3 {
    font-size: 18px;
  }

  .calc-header p {
    font-size: 13px;
  }

  .hero-card-categories {
    flex-wrap: wrap;
  }

  .cat-tag {
    font-size: 12px;
    padding: 6px 12px;
  }

  .team-grid-full,
  .team-photos {
    grid-template-columns: 1fr;
  }

  .how-step {
    flex: 0 0 100%;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .sticky-cta .container {
    flex-direction: column;
    text-align: center;
  }

  .sticky-cta-actions {
    width: 100%;
    flex-direction: column;
  }

  .sticky-cta-actions .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .contact-form-card,
  .checkout-form-card,
  .consult-form-card {
    padding: 24px 20px;
  }

  .condition-card,
  .service-card {
    padding: 20px;
  }
  .shop-section .product-card,
  .product-card {
    padding: 0;
  }

  .section-header h2 {
    font-size: clamp(24px, 6vw, 32px);
  }

  .btn-primary,
  .btn-white,
  .btn-secondary {
    padding: 12px 24px;
    font-size: 14px;
  }

  .mega-col a {
    padding: 10px;
  }

  .partners-grid {
    gap: 24px;
  }

  .partner-logo {
    min-width: 100px;
  }
}

/* ── Touch & accessibility ── */
@media (hover: none) and (pointer: coarse) {
  .btn-primary:hover,
  .btn-white:hover,
  .product-card:hover,
  .category-card:hover {
    transform: none;
  }

  .nav-item > a,
  .icon-btn,
  .mobile-menu-toggle,
  .faq-question {
    min-height: 44px;
  }
}

/* ── Prevent horizontal overflow ── */
img,
video,
iframe,
table {
  max-width: 100%;
  height: auto;
}

.site-main {
  overflow-x: clip;
}
