/* ════════════════════════════════════════
   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) {
  .header-inner {
    gap: 16px;
    padding: 12px 0;
  }

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

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

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(380px, 92vw);
    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;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-overflow-scrolling: touch;
  }

  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;
    -webkit-overflow-scrolling: touch;
  }

  .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: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--grey-200);
    background: var(--off-white);
    flex-shrink: 0;
  }

  .mobile-nav-account,
  .mobile-nav-cart {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    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: 18px;
    height: 18px;
    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;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--off-white);
  }

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

  .mega-main,
  .mega-main.mega-services {
    grid-template-columns: 1fr;
    padding: 16px 20px;
    gap: 20px;
  }

  .mega-featured {
    border-left: none;
    border-top: 1px solid var(--grey-200);
    border-radius: 0;
    padding: 20px;
  }

  .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 .btn-primary {
    display: none;
  }

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

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

  .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-bar .container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .trust-feature {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .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;
  }

  .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, 1fr);
  }

  .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 .container {
    gap: 0;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .checkout-step {
    padding: 0 12px;
    flex-shrink: 0;
  }

  .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 16px;
  }

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

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

  .header-inner {
    gap: 10px;
  }

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

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

  .trust-bar .container {
    grid-template-columns: 1fr;
  }

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

  .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;
  }

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

  .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;
}
