/* Focused homepage layout corrections for EZVIZ Vietnam. */

/* Center the highlighted deals row inside Flatsome's full-width section. */
body.home #main .row.row-hot {
  width: calc(100% - 32px) !important;
  max-width: 1440px !important;
  margin: 0 auto 28px !important;
  box-sizing: border-box;
}

/* Keep product cards in each home row aligned to one height. */
body.home #main .row:not(.slider) > .product-small > .col-inner {
  display: flex;
  height: 100%;
}

body.home #main .row:not(.slider) > .product-small .box,
body.home #main .row.row-hot .product-small .box {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
}

body.home #main .row:not(.slider) > .product-small .box-text,
body.home #main .row.row-hot .product-small .box-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

body.home #main .row:not(.slider) > .product-small .name,
body.home #main .row.row-hot .product-small .name {
  display: -webkit-box;
  height: 4.1em !important;
  min-height: 4.1em !important;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-height: 1.35;
}

body.home #main .row:not(.slider) > .product-small .price-wrapper,
body.home #main .row.row-hot .product-small .price-wrapper {
  margin-top: auto !important;
}

@media (max-width: 849px) {
  body.home #main .row.row-hot {
    width: calc(100% - 24px) !important;
  }
}

/* Polished, equal-height category tiles for the homepage category carousel. */
.home .product-category > .col-inner {
  height: 100%;
  overflow: hidden;
  border: 1px solid #e4ebf2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(24, 52, 78, .08), 0 0 0 1px rgba(35, 126, 194, .025);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.home .product-category > .col-inner:hover {
  transform: translateY(-4px);
  border-color: #cfe3f2;
  box-shadow: 0 14px 30px rgba(24, 52, 78, .13), 0 0 20px rgba(45, 143, 210, .10);
}

.home .product-category .box {
  height: 100%;
  margin: 0 !important;
  border-radius: inherit;
  background: #fff;
}

.home .product-category .box-image {
  overflow: hidden;
  background: linear-gradient(145deg, #f7fafd 0%, #eef4f8 100%);
}

.home .product-category .box-image img {
  display: block;
  width: 100%;
  transition: transform .35s ease;
}

.home .product-category > .col-inner:hover .box-image img {
  transform: scale(1.035);
}

.home .product-category .box-image .overlay {
  opacity: .08 !important;
}

.home .product-category .box-text {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  padding: 14px 14px 16px !important;
  background: #fff !important;
  color: #172a3d !important;
  text-shadow: none !important;
}

.home .product-category .header-title {
  min-height: 2.6em;
  margin: 0;
  color: #172a3d !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-transform: none !important;
}

.home .product-category .count {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 8px auto 0 !important;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf6fc;
  color: #126fae;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* Balance the promotion heading with the matching sale mark on the right. */
.home .row-hot .div-hot .icon-box {
  position: relative;
  display: block;
  min-height: 54px;
}

.home .row-hot .div-hot .icon-box-img {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0 !important;
}

.home .row-hot .div-hot .icon-box-text {
  width: 100%;
  padding: 0 52px !important;
  text-align: center !important;
}

.home .row-hot .div-hot .icon-box-text h1,
.home .row-hot .div-hot .icon-box-text p {
  text-align: center !important;
}

body.home #main .row.row-hot .div-hot .icon-box-text p {
  left: 0 !important;
}

.home .row-hot .div-hot .icon-box::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 38px;
  height: 38px;
  background: url("https://ezvizvietnam.com/wp-content/uploads/2020/06/icon-hot-deal.png") center / contain no-repeat;
  content: "";
}

/* Keep the three service cards even when their labels wrap. */
#header .header-block-block-1 .row-header .icon-box-text p {
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 849px) {
  .home .product-category .box-text {
    padding: 12px 10px 14px !important;
  }

  .home .product-category .header-title {
    font-size: 13px;
  }

  .home .row-hot .div-hot .icon-box-text {
    padding: 0 44px !important;
  }

  .home .row-hot .div-hot .icon-box::after {
    width: 32px;
    height: 32px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .home .product-category > .col-inner,
  .home .product-category .box-image img {
    transition: none;
  }
}


/* Homepage: show five products across on wide desktop screens. */
@media (min-width: 1200px) {
  body.home #main .row.load-more-product:not(.slider) > .product-small {
    flex: 0 0 20% !important;
    width: 20% !important;
    max-width: 20% !important;
  }
}

/* Footer social icons: muted brand colors with a light background. */
.footer-wrapper .social-icons.follow-icons .button.icon:not(.is-outline) {
  color: #3f5e78 !important;
  background-color: #edf2f6 !important;
  border-color: #d6e0e8 !important;
  box-shadow: none !important;
}
.footer-wrapper .social-icons.follow-icons .button.icon.facebook:not(.is-outline) { color: #446084 !important; }
.footer-wrapper .social-icons.follow-icons .button.icon.youtube:not(.is-outline) { color: #b74747 !important; }
.footer-wrapper .social-icons.follow-icons .button.icon:hover {
  background-color: #e1e8ef !important;
  border-color: #c7d3de !important;
}


/* Sale badge: keep the percentage text transparent so only one red background shows. */
body.home .badge-container .callout.badge .badge-inner.on-sale {
  background-color: #e02d35 !important;
  background-image: none !important;
}
body.home .badge-container .callout.badge .badge-inner.on-sale > .onsale {
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}


/* Sale badge: align percentage in pill. */
body.home .badge-container .callout.badge {
  width: 52px !important;
  height: 32px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  filter: drop-shadow(0 2px 4px rgba(22, 38, 54, .18));
}
body.home .badge-container .callout.badge .badge-inner.on-sale {
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #df3038 !important;
  color: #fff !important;
  line-height: 1 !important;
  text-align: center !important;
}
body.home .badge-container .callout.badge .badge-inner.on-sale > .onsale {
  display: block !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  transform: none !important;
}
