/*
 * NewGreen home theme layer.
 * Scoped to body.home-page so the existing site structure stays intact.
 */

.home-page {
  background: #ffffff;
  --brand-green: #006b3f;
  --brand-green-dark: #005330;
  --brand-green-soft: rgba(0, 107, 63, 0.16);
}

.home-page .js-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.home-page .js-preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.home-page .preloader-inner {
  position: relative;
  width: 142px;
  height: 40px;
  background: #ffffff;
}

.home-page .preloader-inner .dot {
  position: absolute;
  top: 12px;
  left: 15px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-green);
  animation: newgreen-dot 2.8s infinite;
}

.home-page .preloader-inner .dots {
  margin-top: 12px;
  margin-left: 31px;
  animation: newgreen-dots 2.8s infinite;
}

.home-page .preloader-inner .dots span {
  display: block;
  float: left;
  width: 16px;
  height: 16px;
  margin-left: 16px;
  border-radius: 50%;
  background: var(--brand-green);
}

.home-page .hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 78px;
  background: #ffffff;
}

.home-page .hero:before,
.home-page .hero:after {
  display: none;
}

.home-page .hero:before {
  left: 0;
  top: 16px;
  width: 212px;
  height: 653px;
  background-image: url("../img/newgreen/banner-dec-left.png");
}

.home-page .hero:after {
  right: 0;
  top: 20px;
  width: min(68vw, 980px);
  height: 680px;
  background-image: url("../img/newgreen/banner-dec-right.png");
  background-position: top right;
}

.home-page .hero .container,
.home-page .hero .row,
.home-page .hero .intro-excerpt,
.home-page .hero .hero-img-wrap {
  position: relative;
  z-index: 2;
}

.home-page .hero .intro-excerpt {
  max-width: 560px;
}

.home-page .hero h1 {
  margin-bottom: 24px;
  color: var(--brand-green);
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.16;
  font-weight: 800;
  background: linear-gradient(90deg, var(--brand-green) 0%, #078950 55%, var(--brand-green-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-page .hero p {
  color: #2a2a2a;
  font-size: 15px;
  line-height: 2;
}

.home-page .btn {
  border-radius: 23px;
}

.home-page .btn.btn-secondary {
  color: #ffffff;
  background: var(--brand-green);
  border-color: var(--brand-green);
  border-bottom: 2px solid var(--brand-green-dark);
}

.home-page .btn.btn-secondary:hover {
  background: var(--brand-green-dark);
  border-color: var(--brand-green-dark);
}

.home-page .btn.btn-white-outline {
  color: var(--brand-green);
  border-color: rgba(0, 107, 63, 0.25);
}

.home-page .btn.btn-white-outline:hover {
  color: #ffffff;
  background: var(--brand-green);
  border-color: var(--brand-green);
}

.home-page .hero .hero-img-wrap {
  min-height: 420px;
}

.home-page .hero .hero-img-wrap:before {
  display: none;
}

.home-page .hero .hero-img-wrap img {
  position: absolute;
  right: 0;
  top: -4%;
  left: auto;
  width: min(96%, 650px);
  max-width: 650px;
  filter: drop-shadow(0 26px 36px rgba(42, 42, 42, 0.22));
  animation: newgreen-product-float 4.4s ease-in-out infinite;
}

.home-page .product-section,
.home-page .why-choose-section,
.home-page .we-help-section,
.home-page .home-soil-section,
.home-page .popular-product {
  background: #ffffff;
}

.home-page .feature.feature-link,
.home-page .popular-product .product-item-sm,
.home-page .we-help-section .imgs-grid img,
.home-page .why-choose-section .img-wrap img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-page .feature.feature-link:hover,
.home-page .popular-product .product-item-sm:hover {
  transform: translateY(-6px);
}

.home-page .feature .icon:before {
  background: var(--brand-green-soft);
}

.home-page .custom-list li:before {
  border-color: var(--brand-green);
}

.home-page .home-products-mobile-action {
  display: none;
}

.home-page .home-soil-section {
  padding: 72px 0 64px;
}

.home-page .home-soil-product {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
}

.home-page .home-soil-product img {
  width: min(100%, 280px);
  max-height: 500px;
  object-fit: contain;
  filter: drop-shadow(0 22px 28px rgba(32, 39, 36, 0.12));
}

.home-page .home-soil-content {
  max-width: 820px;
}

.home-page .home-soil-label {
  display: none;
}

.home-page .home-soil-content .section-title {
  margin-bottom: 12px;
  color: #008000;
  font-size: clamp(34px, 3vw, 48px);
  font-weight: 800;
}

.home-page .home-soil-content h3 {
  margin-bottom: 18px;
  color: #1d2e28;
  font-size: 22px;
  font-weight: 800;
}

.home-page .home-soil-list {
  margin: 0;
  padding-left: 22px;
  color: #1f3029;
  font-size: 17px;
  line-height: 1.75;
}

.home-page .home-soil-list li {
  margin-bottom: 4px;
}

.home-page .home-soil-action {
  margin: 20px 0 0;
}

.home-page .home-soil-detail-image {
  margin-top: 36px;
}

.home-page .home-soil-detail-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.home-page .ng-animate {
  opacity: 0;
  transform: translate3d(0, 36px, 0);
  transition: opacity 0.8s ease, transform 0.8s ease;
  transition-delay: var(--ng-delay, 0s);
}

.home-page .ng-animate.ng-left {
  transform: translate3d(-42px, 0, 0);
}

.home-page .ng-animate.ng-right {
  transform: translate3d(42px, 0, 0);
}

.home-page .ng-animate.ng-zoom {
  transform: scale(0.94);
}

.home-page .ng-animate.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

@keyframes newgreen-dot {
  50% {
    transform: translateX(96px);
  }
}

@keyframes newgreen-dots {
  50% {
    transform: translateX(-31px);
  }
}

@keyframes newgreen-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-16px);
  }
}

@keyframes newgreen-product-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-12px) rotate(1deg);
  }
}

@media (max-width: 991.98px) {
  .home-page .hero {
    padding: 56px 0 52px;
    text-align: center;
  }

  .home-page .hero .intro-excerpt {
    max-width: 100%;
  }

  .home-page .hero .hero-img-wrap {
    min-height: 360px;
    margin-top: 24px;
  }

  .home-page .hero .hero-img-wrap img {
    left: 50%;
    right: auto;
    top: 0;
    width: min(82%, 430px);
    max-width: 430px;
    transform: translateX(-50%);
    animation-name: newgreen-product-float-mobile;
  }
}

@media (max-width: 575.98px) {
  .home-page .hero {
    padding: 34px 0 30px;
    text-align: left;
  }

  .home-page .hero .row {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(118px, 0.88fr);
    gap: 12px;
    align-items: center;
    margin-right: 0;
    margin-left: 0;
  }

  .home-page .hero .row > div {
    width: auto;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
  }

  .home-page .hero h1 {
    margin-bottom: 10px;
    font-size: clamp(24px, 7.2vw, 30px);
    line-height: 1.2;
  }

  .home-page .hero p {
    margin-bottom: 14px !important;
    font-size: 11px;
    line-height: 1.65;
  }

  .home-page .hero .intro-excerpt > p:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0 !important;
  }

  .home-page .hero .btn {
    margin-right: 0 !important;
    padding: 7px 10px;
    border-radius: 18px;
    font-size: 10px;
    white-space: nowrap;
  }

  .home-page .hero .hero-img-wrap {
    min-height: 210px;
    margin-top: 0;
  }

  .home-page .hero .hero-img-wrap img {
    top: 50%;
    left: 50%;
    width: 155%;
    max-width: 230px;
    transform: translate(-50%, -50%);
    animation: none;
  }

  .home-page .product-section {
    padding: 42px 0 36px;
  }

  .home-page .product-section .home-best-seller-intro {
    margin-bottom: 16px !important;
  }

  .home-page .product-section .home-best-seller-intro > p:last-child {
    display: none;
  }

  .home-page .product-section .home-best-seller-intro > p.mb-4 {
    margin-bottom: 0 !important;
    font-size: 13px;
    line-height: 1.65;
  }

  .home-page .product-section .product-item {
    padding: 9px 8px 11px;
  }

  .home-page .product-section .product-item .product-thumbnail {
    height: 112px;
    margin-bottom: 8px;
  }

  .home-page .product-section .product-item h3 {
    min-height: 32px;
    margin-bottom: 5px;
    font-size: 12px;
  }

  .home-page .product-section .product-item strong {
    font-size: 14px !important;
  }

  .home-page .home-products-mobile-action {
    display: block;
    margin-top: 4px;
    text-align: center;
  }

  .home-page .home-products-mobile-action .btn {
    min-width: 0;
    padding: 8px 18px;
    border-radius: 18px;
    font-size: 12px;
  }

  .home-page .we-help-section {
    padding: 42px 0;
  }

  .home-page .home-soil-section {
    padding: 42px 0;
  }

  .home-page .home-soil-product {
    min-height: 0;
  }

  .home-page .home-soil-product img {
    width: min(72%, 220px);
    max-height: 360px;
  }

  .home-page .home-soil-content {
    max-width: 100%;
  }

  .home-page .home-soil-content .section-title {
    margin-bottom: 8px;
    font-size: 30px;
    line-height: 1.25;
  }

  .home-page .home-soil-content h3 {
    margin-bottom: 12px;
    font-size: 17px;
    line-height: 1.45;
  }

  .home-page .home-soil-list {
    padding-left: 18px;
    font-size: 12px;
    line-height: 1.65;
  }

  .home-page .home-soil-list li {
    margin-bottom: 5px;
  }

  .home-page .home-soil-action {
    margin-top: 15px;
  }

  .home-page .home-soil-detail-image {
    margin-top: 22px;
  }

  .home-page .home-soil-detail-image img {
    border-radius: 8px;
  }

  .home-page .home-benefits-section {
    padding: 34px 0 42px;
  }

  .home-page .home-benefits-section .row {
    --bs-gutter-y: 0;
  }

  .home-page .home-benefits-section .row > div {
    margin-bottom: 18px !important;
  }

  .home-page .home-benefits-section .row > div:last-child {
    margin-bottom: 0 !important;
  }

  .home-page .home-benefits-section .product-item-sm {
    display: grid !important;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
  }

  .home-page .home-benefits-section .product-item-sm .thumbnail {
    width: 78px;
    min-width: 78px;
    height: 78px;
    margin-right: 0;
  }

  .home-page .home-benefits-section .product-item-sm .thumbnail:before {
    right: 2px;
    bottom: 2px;
    width: 64px;
    height: 64px;
  }

  .home-page .home-benefits-section .product-item-sm .thumbnail img {
    width: 78px;
    height: 78px;
    object-fit: contain;
  }

  .home-page .home-benefits-section .product-item-sm .pt-3 {
    padding-top: 0 !important;
  }

  .home-page .home-benefits-section .product-item-sm h3 {
    margin-bottom: 5px;
    font-size: 13px;
    line-height: 1.4;
  }

  .home-page .home-benefits-section .product-item-sm p {
    margin-bottom: 0;
    font-size: 11px;
    line-height: 1.55;
  }

  .home-page .why-choose-section {
    padding: 38px 0 42px;
  }

  .home-page .why-choose-section .section-title {
    margin-bottom: 8px;
    font-size: 24px;
    line-height: 1.35;
  }

  .home-page .why-choose-section .section-title + p {
    margin-bottom: 0;
    font-size: 12px;
    line-height: 1.65;
  }

  .home-page .home-order-channels-grid {
    --bs-gutter-x: 12px;
    --bs-gutter-y: 12px;
    margin-top: 22px !important;
    margin-right: 0;
    margin-bottom: 24px !important;
    margin-left: 0;
    width: 100%;
  }

  .home-page .home-order-channels-grid > div {
    display: flex;
    width: 50%;
    max-width: 50%;
    padding-right: 6px;
    padding-left: 6px;
  }

  .home-page .home-order-channels-grid .order-channel {
    display: flex;
    width: 100%;
    min-height: 180px;
    margin-bottom: 0;
    padding: 10px 8px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .home-page .home-order-channels-grid .order-channel-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 8px;
  }

  .home-page .home-order-channels-grid .order-channel-icon img {
    max-width: 56px;
    max-height: 56px;
  }

  .home-page .home-order-channels-grid .order-channel h3 {
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 1.4;
  }

  .home-page .home-order-channels-grid .order-channel p {
    margin: 0;
    font-size: 11px;
    line-height: 1.55;
  }

  .home-page .why-choose-section .img-wrap {
    margin-top: 4px;
  }
}

@keyframes newgreen-float-mobile {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-14px);
  }
}

@keyframes newgreen-product-float-mobile {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateX(-50%) translateY(-10px) rotate(1deg);
  }
}
