/* Mobile / tablet — site khách TadaFarm */

@media (max-width: 991.98px) {
  body.theme-buyer .msn-main,
  body.theme-buyer main.container {
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }

  body.theme-buyer.has-mobile-bar .page-wrap {
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Navbar mobile */
@media (max-width: 991.98px) {
  body.theme-buyer .navbar-buyer .container {
    max-width: 100%;
  }

  body.theme-buyer #buyerNav.navbar-collapse {
    margin-top: 0.5rem;
    padding: 0.5rem 0 1rem;
    border-top: 1px solid rgba(90, 130, 62, 0.2);
  }

  body.theme-buyer #buyerNav .navbar-nav {
    gap: 0 !important;
  }

  body.theme-buyer #buyerNav .nav-link,
  body.theme-buyer #buyerNav .btn {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    padding: 0.65rem 0.25rem;
    font-size: 1rem;
  }

  body.theme-buyer #buyerNav .nav-item {
    width: 100%;
  }

  body.theme-buyer #buyerNav .btn-nav-cta {
    width: 100%;
    justify-content: center;
    margin-top: 0.35rem;
  }

  body.theme-buyer .navbar-buyer .navbar-toggler {
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.5rem;
  }
}

/* Hero */
@media (max-width: 767.98px) {
  body.theme-buyer .hero {
    padding: 1.25rem 0 0.75rem;
  }

  body.theme-buyer .hero h1.display-5 {
    font-size: clamp(1.35rem, 5.5vw, 1.75rem);
    line-height: 1.25;
  }

  body.theme-buyer .hero .tagline.lead {
    font-size: 0.95rem;
    margin-top: 0.75rem !important;
  }

  body.theme-buyer .hero .d-flex.flex-wrap.gap-3 {
    flex-direction: column;
    gap: 0.65rem !important;
  }

  body.theme-buyer .hero .d-flex.flex-wrap.gap-3 .btn {
    width: 100%;
    margin: 0;
  }

  body.theme-buyer .hero-logo {
    max-height: 140px;
  }

  body.theme-buyer .organic-wave {
    width: 260px;
    height: 260px;
    top: -80px;
    left: -60px;
  }
}

/* Thanh hành động cố định dưới màn hình */
.buyer-mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem max(0.75rem, env(safe-area-inset-left)) calc(0.5rem + env(safe-area-inset-bottom, 0px)) max(0.75rem, env(safe-area-inset-right));
  background: rgba(253, 249, 240, 0.97);
  border-top: 2px solid rgba(90, 130, 62, 0.35);
  box-shadow: 0 -6px 20px rgba(45, 66, 33, 0.12);
  backdrop-filter: blur(8px);
}

.buyer-mobile-bar__cta {
  flex: 1.4;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: #fff !important;
  background: linear-gradient(180deg, #e04a3a 0%, var(--tada-red, #d63e2d) 100%);
  border: 1px solid #b83224;
}

.buyer-mobile-bar__link {
  flex: 1;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.7rem 0.5rem;
  border-radius: 999px;
  color: var(--tada-green-dark, #2d4221) !important;
  background: #fff;
  border: 2px solid var(--tada-green, #5a823e);
}

.buyer-mobile-bar__link--active {
  background: rgba(123, 160, 64, 0.18);
}

/* Footer trên mobile khi có thanh dưới */
@media (max-width: 991.98px) {
  body.theme-buyer.has-mobile-bar footer {
    padding-bottom: 0.5rem;
  }
}
