/* ========================================================================
   HP STEEL - home.css
   CSS RIÊNG TRANG CHỦ: banner slider, giới thiệu, tabs danh mục sản phẩm.
   Chỉ được enqueue ở trang chủ (xem functions.php).

   Lý do chọn / Dải số liệu / Đối tác / Tin tức đã chuyển sang main.css vì
   được tái sử dụng ở trang Giới thiệu và/hoặc trang Tin tức.
   ===================================================================== */

/* ---- Banner / Swiper ---- */
.hp-banner {
  position: relative;
}

.hp-banner .swiper {
  width: 100%;
}

.hp-banner .swiper-slide {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}

.hp-banner .swiper-slide .hp-slide-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1920 / 750;
  overflow: hidden;
}

.hp-banner .swiper-slide .hp-slide-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hp-banner .hp-slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  max-width: 760px;
  padding: 0 20px;
}

.hp-banner .hp-slide-content h2 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #fff;
  line-height: 1.2;
}

.hp-banner .hp-slide-content p {
  font-size: 18px;
  color: #e8e8e8;
  margin-bottom: 26px;
}

.hp-banner .swiper-button-next,
.hp-banner .swiper-button-prev {
  color: #fff;
}

.hp-banner .swiper-pagination-bullet-active {
  background: var(--hp-red);
}

/* ---- Intro ---- */
.hp-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hp-intro .hp-intro__label {
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--hp-red-dark);
  margin-bottom: 0;
}

.hp-intro h2 {
  font-size: 36px;
  color: var(--hp-red);
  margin-bottom: 32px;
  text-transform: capitalize;
}

.hp-intro .hp-intro__desc {
  margin-bottom: 56px;
}

.hp-intro p {
  color: #333;
  margin-bottom: 18px;
}

.hp-intro img {
  border-radius: 12px;
  width: 100%;
  height: auto;
}

/* ---- Tabs danh mục sản phẩm ---- */
.site-main .hp-section-tabs-cat {
  margin-bottom: 0;
}

.hp-pt {
  background: var(--hp-dark);
  color: #fff;
  padding-bottom: 0;
  overflow: hidden;
}

.hp-pt__label {
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--hp-red);
  margin-bottom: 10px;
}

.hp-pt__heading {
  text-align: center;
  font-size: 32px;
  color: #fff;
  margin-bottom: 40px;
  text-transform: capitalize;
}

.hp-pt__pane {
  display: none;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
}

.hp-pt__pane.is-active {
  display: grid;
  animation: hp-pt-fade .4s ease;
}

@keyframes hp-pt-fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.hp-pt__title {
  font-size: 26px;
  color: #fff;
  margin-bottom: 18px;
}

.hp-pt__desc {
  color: #c9c9c7;
  margin-bottom: 28px;
}

.hp-pt__desc p {
  margin-bottom: 14px;
}

.hp-pt__more {
  display: inline-block;
  background: transparent;
  color: #fff;
  font-weight: 700;
  padding: 8px 20px;
  border: 2px solid rgba(255, 255, 255, .35);
  transition: all .3s ease-in-out;
  border-radius: 100em;
}

.hp-pt__more:hover {
  background: var(--hp-red);
  color: white;
  border-color: white;
}

.hp-pt__image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 480;
  object-fit: cover;
  border-radius: 8px;
}

.hp-pt__nav {
  display: flex;
  margin-top: 50px;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  background: rgba(255, 255, 255, .06);
}

.hp-pt__tab {
  flex: 1;
  padding: 18px 12px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}

.hp-pt__tab:hover {
  background: rgba(255, 255, 255, .1);
}

.hp-pt__tab.is-active {
  background: var(--hp-red);
}

/* ---- Responsive (riêng trang chủ) ---- */
@media(max-width:900px) {

  .hp-intro {
    grid-template-columns: 1fr;
  }

  .hp-banner .swiper-slide {
    min-height: 400px;
  }

  .hp-banner .hp-slide-content h2 {
    font-size: 30px;
  }

  /* Tabs sản phẩm: xếp dọc nội dung, tab bar cuộn ngang. */
  .hp-pt__pane {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .hp-pt__pane.is-active .hp-pt__image {
    order: -1;
  }

  .hp-pt__heading {
    font-size: 26px;
  }

  .hp-pt__nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .hp-pt__tab {
    flex: 0 0 auto;
    padding: 15px 20px;
    font-size: 15px;
  }
}
