/* ========================================================================
   HP STEEL - main.css
   CSS DÙNG CHUNG cho toàn site: tiện ích, header, banner trang trong,
   breadcrumb, lưới sản phẩm, footer. Dùng biến màu khai báo ở style.css.

   CSS riêng từng trang tách ở:
   - assets/css/home.css            (trang chủ)
   - assets/css/single-product.css  (chi tiết sản phẩm)
   - assets/css/about.css           (trang Giới thiệu)

   Lý do chọn / Số liệu / Đối tác / Tin tức nằm ở đây (không phải home.css)
   vì được TÁI SỬ DỤNG ở cả trang chủ, trang Giới thiệu và/hoặc trang Tin tức.
   ===================================================================== */

/* ---- Tiện ích chung ---- */
.hp-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 8vw;
}

.hp-section {
  padding: 60px 0;
}

.hp-section--gray {
  background: var(--hp-gray-bg);
}

.hp-section-title {
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  color: var(--hp-dark);
  margin-bottom: 8px;
}

.hp-section-sub {
  text-align: center;
  color: #666;
  margin-bottom: 40px;
}

.hp-btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 100em;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  border: none;
  transition: background .2s, color .2s;
}

.hp-btn--red {
  background: var(--hp-red);
  color: #fff;
}

.hp-btn--red:hover {
  background: var(--hp-red-dark);
  color: #fff;
}

.hp-btn--outline {
  border: 1.5px solid #fff;
  color: #fff;
  background: transparent;
}

.hp-btn--outline:hover {
  background: #fff;
  color: var(--hp-red);
}

.hp-btn--outline-red {
  border: 1.5px solid var(--hp-red);
  color: var(--hp-red);
  background: transparent;
}

.hp-btn--outline-red:hover {
  background: var(--hp-red);
  color: #fff;
}

/* ---- Header ---- */
.hp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--hp-border);
}

.hp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.hp-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 20px;
  color: var(--hp-red);
}

.hp-logo-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--hp-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.hp-logo img {
  display: inline-block;
  width: 55px;
  height: 55px;
}

.hp-nav .hp-nav-list {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}

.hp-nav .hp-nav-list a {
  font-size: 16px;
  color: #444;
  font-weight: 700;
  transition: color .2s;
}

.hp-nav .hp-nav-list a:hover,
.hp-nav .hp-nav-list .current-menu-item>a {
  color: var(--hp-red);
}

.hp-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hp-hotline {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  color: #333;
}

.hp-hotline b {
  color: var(--hp-red);
}

.hp-menu-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  color: var(--hp-dark);
}

/* ---- Banner trang trong (dưới header) ---- */
.hp-page-banner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 240px;
  background: var(--hp-dark) center / cover no-repeat; /* màu nền fallback khi chưa set ảnh */
}

/* Lớp phủ tối để chữ trắng luôn đọc được trên mọi ảnh. */
.hp-page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .15));
}

.hp-page-banner__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 420px;
  width: 100%;
  text-align: left;
}

.hp-page-banner__title {
  font-size: 46px;
  color: #fff;
  margin-bottom: 10px;
  text-transform: capitalize;
}

.hp-breadcrumb {
  font-size: 14px;
  color: #d5d5d5;
}

.hp-breadcrumb a {
  color: #d5d5d5;
  transition: color .2s;
}

.hp-breadcrumb a:hover {
  color: #fff;
}

.hp-breadcrumb span[aria-current] {
  color: #fff;
  font-weight: 600;
}

.hp-breadcrumb__sep {
  margin: 0 4px;
  color: rgba(255, 255, 255, .45);
}

/* ---- Lưới sản phẩm (archive sản phẩm + section sản phẩm nổi bật) ---- */
.hp-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.hp-product-card {
  background: #fff;
  border: 1px solid var(--hp-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}

.hp-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.hp-product-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
}

.hp-product-card .hp-card-body {
  padding: 18px;
  text-align: center;
}

.hp-product-card h3 {
  font-size: 17px;
  color: var(--hp-dark);
  margin-bottom: 6px;
}

.hp-product-card p {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
}

.hp-product-card .hp-link {
  color: var(--hp-red);
  font-weight: 600;
  font-size: 14px;
}

/* ---- Lý do chọn / Điểm mạnh (Trang chủ + Giới thiệu) ---- */
.hp-section-reasons {
  padding-top: 0;
}

.hp-reasons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.hp-reason {
  position: relative;
  display: block;
  padding: 32px 12px 18px;
  border: 2px solid var(--hp-red);
  border-radius: 16px;
}

.hp-reason .hp-icon {
  position: absolute;
  top: -28px;
  left: calc(50% - 28px);
  width: 56px;
  height: 56px;
  padding: 5px;
  background: var(--hp-red-dark);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 3px solid white;
}

.hp-reason .hp-icon img {
  display: inline;
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
  object-fit: contain;
}

.hp-reason h4 {
  font-size: 18px;
  color: var(--hp-red);
  margin-bottom: 0;
}

.hp-reason p {
  font-size: 14px;
  color: #666;
  margin-bottom: 0;
}

/* ---- Dải số liệu (Trang chủ + Giới thiệu) ---- */
.hp-stats {
  background: var(--hp-red);
  color: #fff;
}

.hp-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.hp-stat-num {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
}

.hp-stat-suffix {
  font-size: 38px;
  font-weight: 700;
}

.hp-stat-label {
  font-size: 14px;
  color: #f3c9c9;
  margin-top: 4px;
}

/* ---- Logo đối tác - swiper tự chạy (Trang chủ + Giới thiệu) ---- */
.home-partners {
  background: #fff;
  padding: 34px 0;
  border-bottom: 1px solid var(--hp-border);
}

.home-partners .swiper-wrapper {
  transition-timing-function: linear;
  align-items: center;
}

.home-partners .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-partners .swiper-slide .hp-partner-item {
  display: flex;
  width: 100%;
  max-height: 120px;
  justify-content: center;
  align-items: center;
}

.home-partners .swiper-slide img {
  display: block;
  width: auto;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ---- Thẻ tin tức - dùng ở Trang chủ (mới nhất) + Trang Tin tức (toàn bộ) ---- */
.hp-news {
  background: var(--hp-gray-bg);
}

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

.hp-news__heading {
  text-align: center;
  font-size: 32px;
  color: var(--hp-dark);
  text-transform: uppercase;
  margin-bottom: 40px;
}

.hp-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 44px;
}

.hp-news-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}

.hp-news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.hp-news-card__thumb {
  position: relative;
  display: block;
}

.hp-news-card__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Badge ngày: nửa trong nửa ngoài mép dưới ảnh như mẫu. */
.hp-news-card__date {
  position: absolute;
  right: 20px;
  bottom: 0;
  transform: translateY(50%);
  z-index: 2;
  background: var(--hp-red);
  color: #fff;
  text-align: center;
  padding: 9px 13px;
  line-height: 1.1;
  border-radius: 4px;
}

.hp-news-card__date b {
  display: block;
  font-size: 20px;
  font-weight: 700;
}

.hp-news-card__date span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.hp-news-card__body {
  padding: 34px 22px 24px;
}

.hp-news-card__cat {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--hp-red);
  margin-bottom: 8px;
}

.hp-news-card__title {
  font-size: 17px;
  line-height: 1.4;
  margin: 0;
}

.hp-news-card__title a {
  color: var(--hp-dark);
  transition: color .2s;
}

.hp-news-card__title a:hover {
  color: var(--hp-red);
}

.hp-news-card__excerpt {
  font-size: 14px;
  color: #666;
  margin: 8px 0 0;
}

.hp-news__more {
  text-align: center;
}

/* ---- Nội dung bài viết (WYSIWYG) - Giới thiệu + mô tả mở rộng sản phẩm ---- */
.hp-entry-content h2 {
  display: block;
  font-size: 26px;
  line-height: 1.6;
  color: var(--hp-dark);
}

.hp-entry-content h3 {
  display: block;
  font-size: 22px;
  line-height: 1.6;
  color: var(--hp-dark);
}

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

.hp-entry-content table {
  width: 100%;
  max-width: 860px;
  margin-inline: auto;
}

.hp-entry-content table td {
  padding: 8px 16px;
  vertical-align: middle;
}

.hp-entry-content table td p {
  margin-bottom: 0;
}

.hp-entry-content table tr:first-child td {
  background: #ccc;
  font-weight: 700;
}

.hp-entry-content table td:not(:first-child) {
  text-align: center;
}

.hp-entry-content table:has(td[rowspan="2"]) td {
  text-align: center;
}

/* ---- Phân trang (archive sản phẩm, danh mục...) ---- */
.hp-pagination {
  margin-top: 44px;
}

.hp-pagination .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hp-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 6px;
  border-radius: 100em;
  border: 1.5px solid var(--hp-border);
  background: #fff;
  color: var(--hp-dark);
  font-size: 15px;
  font-weight: 600;
  transition: background .2s, color .2s, border-color .2s;
}

.nav-links > .page-numbers:first-child {
    padding-left: 6px;
}

.hp-pagination a.page-numbers:hover {
  border-color: var(--hp-red);
  color: var(--hp-red);
}

.hp-pagination .page-numbers.current {
  background: var(--hp-red);
  border-color: var(--hp-red);
  color: #fff;
}

.hp-pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
  color: #999;
}

/* Nút trước/sau: nổi bật hơn số trang bằng viền đỏ sẵn có. */
.hp-pagination .prev.page-numbers,
.hp-pagination .next.page-numbers {
  border-color: var(--hp-red);
  color: var(--hp-red);
  font-size: 17px;
}

.hp-pagination .prev.page-numbers:hover,
.hp-pagination .next.page-numbers:hover {
  background: var(--hp-red);
  color: #fff;
}

@media(max-width:560px) {

  .hp-pagination .page-numbers {
    min-width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

/* ---- Liên hệ ---- */
.hp-contact {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
}

/* ---- Footer ---- */
.hp-footer {
  background: var(--hp-dark);
  color: #bbb;
  padding: 50px 0 20px;
}

.hp-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.3fr;
  gap: 30px;
  margin-bottom: 30px;
}

.hp-footer-col h4 {
  color: #fff;
  font-size: 17px;
  margin-bottom: 16px;
}

.hp-footer-col p {
  font-size: 14px;
}

.hp-footer-brand {
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 12px;
}

.hp-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hp-footer-col li {
  padding: 5px 0;
  font-size: 14px;
}

.hp-footer-col a {
  color: #bbb;
  transition: color .2s;
}

.hp-footer-col a:hover {
  color: #fff;
}

.hp-footer-contact .hp-fc-icon {
  display: inline-block;
  width: 20px;
}

.hp-copyright {
  text-align: center;
  border-top: 1px solid #444;
  padding-top: 20px;
  font-size: 13px;
  color: #888;
}

/* ---- Responsive (phần dùng chung) ---- */
@media(max-width:900px) {

  .hp-product-grid,
  .hp-reasons,
  .hp-stats-grid,
  .hp-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .hp-page-banner {
    min-height: 170px;
  }

  .hp-page-banner__title {
    font-size: 26px;
  }

  /* Header: ẩn nav ngang, hiện nút toggle, menu xổ dọc. */
  .hp-menu-toggle {
    display: block;
  }

  .hp-hotline {
    display: none;
  }

  .hp-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--hp-border);
    display: none;
  }

  .hp-nav.is-open {
    display: block;
  }

  .hp-nav .hp-nav-list {
    flex-direction: column;
    gap: 0;
  }

  .hp-nav .hp-nav-list li {
    border-top: 1px solid var(--hp-border);
  }

  .hp-nav .hp-nav-list a {
    display: block;
    padding: 14px 20px;
  }
}

@media(max-width:560px) {

  .hp-product-grid,
  .hp-reasons,
  .hp-stats-grid,
  .hp-news-grid,
  .hp-footer-grid {
    grid-template-columns: 1fr;
  }
}
