/* ==========================================================================
   HerbXMedica — responsive.css
   Every media query on the site lives in this file, ordered largest first,
   on Woodmart's breakpoints: 1200 / 1024 / 768 / 576.
   ========================================================================== */

/* ==========================================================================
   ≥ 1025px — desktop-only affordances
   ========================================================================== */
@media (min-width: 1025px) {
  :root { --hxm-pad-x: var(--hxm-gutter); }
}

@media (min-width: 769px) and (max-width: 1024px) {
  :root { --hxm-pad-x: 40px; }
}

/* ==========================================================================
   ≤ 1200px
   ========================================================================== */
@media (max-width: 1200px) {
  .hxm-mainbar__inner { gap: 18px; }
  .hxm-search { max-width: 420px; }
  .hxm-nav__link { padding-inline: 11px; }
  .hxm-utils__phone-label,
  .hxm-utils__phone-num { display: none; }
  .hxm-utils__phone { padding: 4px; }

  /* The nav row gets tight before the menu collapses — drop the shipping
     note first and keep the action. */
  .hxm-nav__note { display: none; }
  .hxm-nav__aside { padding-left: 14px; gap: 12px; }

  .hxm-mega { left: auto; right: -15px; }
  .hxm-mega__grid { grid-template-columns: 1fr 1fr 1.1fr; }
  .hxm-mega__promo { display: none; }

  .hxm-footer__main { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; }
  .hxm-footer__main > div:nth-child(4) { grid-column: span 1; }
  .hxm-footer__main > div:last-child { grid-column: span 2; }

  .hxm-ledger__strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* --- Shop / product --- */
  .hxm-shop { grid-template-columns: 244px minmax(0, 1fr); gap: 28px; }
  .hxm-single { gap: 32px; }
  .hxm-ingcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hxm-team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   ≤ 1024px  — tablet. Nav collapses into the drawer here.
   ========================================================================== */
@media (max-width: 1024px) {
  :root { --hxm-pad-x: 40px; }

  html { scroll-padding-top: 90px; }

  /* Header */
  .hxm-navbar { display: none; }
  .hxm-burger { display: inline-flex; }
  .hxm-mainbar__inner { height: 74px; gap: 14px; }
  .hxm-logo img { height: 40px; }
  .hxm-header.is-stuck .hxm-mainbar__inner { height: 64px; }
  .hxm-search { display: none; }
  .hxm-utils__phone { display: none; }

  /* Hero */
  .hxm-hero__slide { height: min(86vh, 700px); min-height: 520px; }
  .hxm-hero__controls { padding-bottom: 24px; }
  .hxm-hero__progress { max-width: 200px; }

  /* Trust */
  .hxm-trust__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 0; }
  .hxm-trust__item { padding: 16px 22px; }
  .hxm-trust__item:nth-child(odd) { border-left: 0; padding-left: 0; }
  .hxm-trust__item:nth-child(-n + 2) { padding-top: 0; }
  .hxm-trust__item:nth-child(n + 3) { border-top: 1px solid var(--hxm-line); padding-bottom: 0; }

  /* Cards and grids */
  .products.hxm-products { --hxm-cols: 3; }
  .hxm-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hxm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hxm-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hxm-posts > li:last-child { grid-column: span 2; }

  /* Ledger */
  .hxm-ledger { grid-template-columns: 1fr; gap: 34px; }
  .hxm-ledger__stage { max-width: 380px; }
  .hxm-ledger__strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* Split banner */
  .hxm-split { grid-template-columns: 1fr; }
  .hxm-split__media { min-height: 320px; order: -1; }
  .hxm-split__media img { position: static; height: 320px; }

  /* Deal */
  .hxm-deal { grid-template-columns: 1fr; gap: 32px; }
  .hxm-deal__media { max-width: 380px; }

  /* Promos */
  .hxm-promos { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .hxm-promo--tall { grid-row: span 1; min-height: 340px; grid-column: span 2; }

  /* Process — three across, then the timeline rewraps cleanly */
  .hxm-process { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
  .hxm-step:nth-child(3)::after { display: none; }

  /* Newsletter */
  .hxm-news { grid-template-columns: 1fr; }

  /* Footer */
  .hxm-footer__main { grid-template-columns: 1fr 1fr 1fr; }
  .hxm-footer__main > div:first-child { grid-column: span 3; }
  .hxm-footer__main > div:last-child { grid-column: span 3; }
  .hxm-footer__news-text,
  .hxm-footer__about { max-width: 52ch; }

  /* Quick view */
  .hxm-qv { grid-template-columns: 1fr; }
  .hxm-qv__media { border-radius: var(--hxm-r-lg) var(--hxm-r-lg) 0 0; aspect-ratio: 16 / 10; }

  /* Floating layer clears the mobile bottom bar */
  .hxm-bottombar { display: block; }
  .hxm-wa { right: 16px; bottom: 76px; width: 52px; height: 52px; }
  .hxm-wa__btn { width: 52px; height: 52px; }
  .hxm-wa__btn svg { width: 27px; height: 27px; }
  .hxm-wacard { width: min(300px, calc(100vw - 32px)); }
  body { padding-bottom: 58px; }

  /* --- Shop --- */
  .hxm-shop { grid-template-columns: minmax(0, 1fr); gap: 0; }
  [data-hxm-sidebar-desktop] { display: none; }
  .hxm-filterbtn { display: inline-flex; }
  .hxm-sidebar { position: static; max-height: none; overflow: visible; padding-right: 0; }
  .hxm-results--list .hxm-product { grid-template-columns: 180px minmax(0, 1fr); }

  /* --- Single product --- */
  .hxm-single { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .woocommerce-product-gallery { position: static; grid-template-columns: minmax(0, 1fr); }
  .hxm-gallery__thumbs { flex-direction: row; order: 2; overflow-x: auto; padding-bottom: 4px; }
  .hxm-gallery__thumb { width: 76px; flex: none; }
  .hxm-gallery__stage { cursor: pointer; }
  .hxm-ingcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hxm-stickybar { top: auto; bottom: 58px; border-bottom: 0; border-top: 1px solid var(--hxm-line); transform: translate3d(0, 120%, 0); }
  .hxm-stickybar__thumb, .hxm-stickybar__meta { display: none; }

  /* --- About / contact --- */
  .hxm-story { grid-template-columns: minmax(0, 1fr); }
  .hxm-founder { grid-template-columns: 200px minmax(0, 1fr); }
  .hxm-gallerygrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hxm-contact { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   ≤ 768px  — large phone / small tablet
   ========================================================================== */
@media (max-width: 768px) {
  :root { --hxm-pad-x: 20px; }

  .hxm-announce__close { right: 2px; }
  .hxm-announce__item { font-size: var(--hxm-fs-label-sm); padding-inline: 34px; }

  .hxm-hero__slide { height: auto; min-height: 0; padding-block: 96px 132px; }
  .hxm-hero__actions .hxm-btn { flex: 1 1 100%; }
  .hxm-hero__controls-inner { gap: 14px; }
  .hxm-hero__progress { display: none; }

  .products.hxm-products { --hxm-cols: 2; gap: 16px; }
  .hxm-slider__track { gap: 16px; }
  .hxm-slider__slide { flex-basis: calc((100% - (var(--hxm-per, 1) - 1) * 16px) / var(--hxm-per, 1)); }

  .hxm-product__body { padding: 14px 14px 16px; gap: 6px; }
  .hxm-product__foot { gap: 8px 10px; }
  .hxm-product__rail { opacity: 1; transform: none; }

  .hxm-sec-head { margin-bottom: 28px; }
  .hxm-cats { gap: 16px; }
  .hxm-cat { border-radius: var(--hxm-leaf-arc-sm); }
  .hxm-cat__body { padding: 18px 20px 20px; }
  .hxm-cat__count { opacity: 1; transform: none; }
  .hxm-cat__go { opacity: 1; transform: none; width: 36px; height: 36px; top: 16px; right: 16px; }

  .hxm-ledger__strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hxm-ledger__bars { margin-block: 24px; padding-block: 22px; }

  .hxm-promos { grid-template-columns: 1fr; gap: 16px; }
  .hxm-promo--tall { grid-column: span 1; min-height: 300px; }
  .hxm-promo { min-height: 260px; }

  .hxm-stats { gap: 16px; }
  .hxm-stat { padding: 22px 20px; }

  .hxm-posts { grid-template-columns: 1fr; gap: 16px; }
  .hxm-posts > li:last-child { grid-column: span 1; }

  .hxm-countdown__cell { min-width: 64px; }
  .hxm-countdown__num { font-size: var(--hxm-fs-md); padding: 11px 6px; }

  .hxm-news { padding: 28px 22px; }
  .hxm-news__row { flex-direction: column; }
  .hxm-news__submit { width: 100%; }

  .hxm-footer__main { grid-template-columns: 1fr 1fr; gap: 30px 24px; }
  .hxm-footer__main > div:first-child,
  .hxm-footer__main > div:last-child { grid-column: span 2; }
  .hxm-footer__trust { flex-direction: column; align-items: flex-start; }
  .hxm-footer__bottom { flex-direction: column; align-items: flex-start; }

  .hxm-modal { padding: 0; place-items: end center; }
  .hxm-modal__panel { border-radius: var(--hxm-r-lg) var(--hxm-r-lg) 0 0; max-height: 92vh; width: 100%; }

  .hxm-tabs__list { gap: 0 20px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .hxm-tabs__list::-webkit-scrollbar { display: none; }

  /* Process — stacked vertical timeline */
  .hxm-process { grid-template-columns: minmax(0, 1fr); gap: 0; }

  .hxm-step {
    padding: 0 0 30px 74px;
    min-height: 84px;
  }

  .hxm-step__marker { position: absolute; left: 0; top: 0; }

  .hxm-step::after {
    top: 58px;
    left: 26px;
    right: auto;
    width: 2px;
    height: calc(100% - 58px);
  }

  .hxm-step:nth-child(3)::after { display: block; }
  .hxm-step:last-child { padding-bottom: 0; }

  /* --- Shop --- */
  .hxm-toolbar { gap: 12px; }
  .hxm-toolbar__group { width: 100%; justify-content: space-between; }
  .hxm-toolbar .hxm-select { min-width: 0; flex: 1 1 140px; }
  .hxm-results--list .hxm-product { grid-template-columns: minmax(0, 1fr); }
  .hxm-results--list .hxm-product__body { padding: 16px 18px 20px; }
  .hxm-skeleton { min-height: 300px; }

  /* --- Single product --- */
  .hxm-benefits { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hxm-benefit { flex-direction: row; align-items: center; gap: 12px; }
  .hxm-ingcards { grid-template-columns: minmax(0, 1fr); }
  .hxm-tabgrid { grid-template-columns: minmax(0, 1fr); }
  .hxm-reviewsummary { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 22px; }
  .hxm-single__buyrow { flex-direction: column; align-items: stretch; }
  .hxm-single__buyrow .hxm-qty { align-self: flex-start; }
  .hxm-stickybar__inner { gap: 12px; }
  .hxm-stickybar__cta { flex: 1; }

  /* --- About / contact --- */
  .hxm-founder { grid-template-columns: minmax(0, 1fr); }
  .hxm-founder__media { max-width: 200px; }
  .hxm-gallerygrid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hxm-team { grid-template-columns: minmax(0, 1fr); }
  .hxm-contact__row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hxm-trustrow { grid-template-columns: minmax(0, 1fr); }
  .hxm-trustrow__item { flex-direction: row; justify-content: flex-start; text-align: left; gap: 12px; padding: 12px 16px; }
}

/* ==========================================================================
   ≤ 576px  — phone
   ========================================================================== */
@media (max-width: 576px) {
  .hxm-hero__slide { padding-block: 80px 124px; }
  .hxm-hero__stat { margin-top: 30px; padding-top: 18px; }

  .products.hxm-products { --hxm-cols: 1; }
  .woocommerce-loop-product__title { min-height: 0; }

  .hxm-cats { grid-template-columns: 1fr; }
  .hxm-stats { grid-template-columns: 1fr; }
  .hxm-trust__list { grid-template-columns: 1fr; }
  .hxm-trust__item { border-left: 0; padding: 14px 0; border-top: 1px solid var(--hxm-line); }
  .hxm-trust__item:first-child { border-top: 0; padding-top: 0; }

  .hxm-ledger__strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hxm-ledger__tab { padding: 12px 8px 14px; }
  .hxm-ledger__tab-img { width: 46px; height: 46px; }

  .hxm-review { padding: 24px 22px; }
  .hxm-review__tags { margin-left: 0; align-items: flex-start; width: 100%; }
  .hxm-review__product { text-align: left; }

  .hxm-countdown { gap: 6px; }
  .hxm-countdown__cell { min-width: 0; flex: 1; }
  .hxm-countdown__sep { padding-bottom: 26px; }

  .hxm-marquee__item,
  .hxm-marquee__item img { height: 50px; }
  .hxm-marquee__track { gap: 34px; }

  .hxm-btn { padding-inline: 20px; }
  .hxm-btn--lg { min-height: 52px; padding: 14px 24px; }

  .hxm-toolbar .hxm-select { flex: 1 1 100%; }
  .hxm-viewtoggle { width: 100%; }
  .hxm-viewtoggle__btn { flex: 1; }
  .hxm-pagehead__inner { flex-direction: column; align-items: flex-start; }
  .hxm-404__links .hxm-btn { flex: 1 1 100%; }
}

/* ==========================================================================
   Touch devices — hover-only affordances become permanent
   ========================================================================== */
@media (hover: none) {
  .hxm-product__rail { opacity: 1; transform: none; }

  /* Permanently visible on touch, so they must meet the 44px target size */
  .hxm-product__railbtn { width: 44px; height: 44px; }
  .hxm-product__railbtn svg { width: 19px; height: 19px; }
  .hxm-cat__go,
  .hxm-cat__count { opacity: 1; transform: none; }
  .hxm-btn::before { display: none; }
}

/* ==========================================================================
   Reduced motion — kill everything that moves on its own
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hxm-hero__slide.is-active .hxm-hero__media img { animation: none; transform: none; }
  .hxm-wa__pulse { animation: none; opacity: 0; }
  .hxm-marquee__track { animation: none; flex-wrap: wrap; }
  .hxm-preloader { transition: none; }
  .hxm-countdown__num.is-flip { animation: none; }
  .hxm-skeleton::after { animation: none; }
  [data-parallax] { transform: none; }
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
  .hxm-header, .hxm-drawer, .hxm-wa, .hxm-bottombar,
  .hxm-preloader, .hxm-modal, .hxm-footer__social { display: none; }
  body { background: var(--hxm-white); padding-bottom: 0; }
  .hxm-section { padding-block: 20px; break-inside: avoid; }
}
