/* General page styles */
.page-index {
  background-color: var(--background-color, #0A0A0A); /* Fallback to default if not set in shared */
  color: var(--text-main-color, #FFF6D6); /* Main text color */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll */
  box-sizing: border-box;
}

/* Module 1: HERO主图区域 */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* shared đã xử lý body padding-top, đây chỉ là khoảng cách nhỏ */
  margin-top: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.page-index__hero-container {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.page-index__hero-image {
  width: 100%;
  margin: 0;
}

.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}

/* Desktop specific styles for HERO image */
@media (min-width: 850px) {
  .page-index__hero-image img {
    aspect-ratio: 16/5; /* Tỷ lệ khung hình 1920x600 */
    object-fit: cover;
  }
}

/* 🚨 Mobile specific styles for HERO image (max-width: 849px) - MUST USE !important for overrides */
@media (max-width: 849px) {
  .page-index__hero-section {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-index__hero-image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: unset !important; /* Hủy bỏ tỷ lệ khung hình cố định */
    object-fit: contain !important; /* Đảm bảo hình ảnh hiển thị đầy đủ, không bị cắt */
    max-height: none !important;
    display: block !important;
  }
}

/* 🚨 Mobile specific styles for HERO section (max-width: 768px) */
@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: 10px !important; /* Đảm bảo khoảng cách nhỏ trên di động */
  }
}

/* Module 2: Sản phẩm trưng bày */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  box-sizing: border-box;
  background-color: var(--background-color, #0A0A0A);
  overflow-x: hidden;
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.page-index__products-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(6, 1fr); /* Desktop: 6 cột một hàng */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-index__product-card {
  width: 100%;
  max-width: 300px; /* Chiều rộng tối đa cho mỗi thẻ sản phẩm */
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  transition: transform 0.3s ease;
}

.page-index__product-card:hover {
  transform: translateY(-3px);
}

.page-index__product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-index__product-card-image {
  width: 100%;
  max-width: 300px; /* Chiều rộng tối đa cho hình ảnh sản phẩm */
  overflow: hidden;
}

.page-index__product-card-image img {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

/* 🚨 Mobile specific styles for Product display (max-width: 768px) - MUST USE !important for overrides */
@media (max-width: 768px) {
  .page-index__products-section {
    padding: 40px 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-index__products-container, 
  .page-index__products-grid {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-index__products-grid {
    grid-template-columns: repeat(2, 1fr); /* Mobile: 2 cột x 3 hàng */
    gap: 15px;
  }
  .page-index__product-card,
  .page-index__product-card-image {
    max-width: 100% !important;
    width: 100% !important;
  }
  .page-index__product-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}

/* Module 3: Tiêu đề chính trang trí */
.page-index__section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  padding: 24px 12px;
  box-sizing: border-box;
  text-align: center;
  background-color: var(--background-color, #0A0A0A);
  color: var(--text-main-color, #FFF6D6);
  overflow-x: hidden;
}
.page-index__section-title {
  margin: 0;
  font-size: clamp(1.1rem, 4.5vw, 1.75rem); /* Kích thước font chữ thích ứng */
  line-height: 1.35;
  font-weight: bold;
  color: var(--text-main-color, #FFF6D6);
  text-shadow: 0 0 8px var(--glow-color, #FFD36B); /* Thêm hiệu ứng phát sáng nhẹ */
}
.page-index__section-title-line {
  flex: 1;
  max-width: 80px;
  height: 2px;
  opacity: 0.6;
  background-color: var(--border-color, #3A2A12);
}

/* 🚨 Mobile specific styles for Decorative H1 (max-width: 768px) */
@media (max-width: 768px) {
  .page-index__section-title-line {
    max-width: 40px;
  }
  .page-index__section-title {
    font-size: clamp(1.25rem, 5vw, 1.5rem); /* Điều chỉnh kích thước font cho di động */
    padding: 0 5px; /* Thêm padding ngang để tránh văn bản chạm cạnh */
  }
}

/* Module 4: Nội dung SEO dài */
.page-index__article-body {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px 48px;
  box-sizing: border-box;
  overflow-x: hidden;
  background-color: var(--background-color, #0A0A0A);
  color: var(--text-main-color, #FFF6D6);
}
.page-index__article-body h2 {
  margin: 2rem 0 1rem;
  color: var(--text-main-color, #FFF6D6);
  text-shadow: 0 0 5px rgba(255, 211, 107, 0.4); /* Hiệu ứng phát sáng nhẹ */
  font-size: 1.75rem; /* Kích thước mặc định cho h2 */
}
.page-index__article-body h3 {
  margin: 1.25rem 0 0.75rem;
  color: var(--text-main-color, #FFF6D6);
  font-size: 1.4rem; /* Kích thước mặc định cho h3 */
}
.page-index__article-body p,
.page-index__article-body ul,
.page-index__article-body li {
  margin-bottom: 1rem;
  color: var(--text-main-color, #FFF6D6);
}
.page-index__article-body ul {
  list-style: disc;
  padding-left: 20px;
}
.page-index__article-figure {
  margin: 1.5rem auto;
  max-width: 800px;
  text-align: center;
  background-color: var(--card-bg-color, #111111);
  padding: 10px;
  border-radius: 5px;
}
.page-index__article-figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}
.page-index__article-figure figcaption {
  color: var(--text-main-color, #FFF6D6);
  margin-top: 0.5rem;
  font-size: 0.9em;
}
.page-index__article-quote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--primary-color, #F2C14E);
  background-color: var(--card-bg-color, #111111);
  color: var(--text-main-color, #FFF6D6);
  font-style: italic;
  border-radius: 0 5px 5px 0;
}

/* Call to Action Buttons */
.page-index__cta-buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  justify-content: center;
  flex-wrap: wrap; /* Cho phép xuống dòng trên màn hình nhỏ */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding: 0 15px; /* Đảm bảo padding ở các cạnh */
}

.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 150px;
  max-width: 100%; /* Đảm bảo nút không tràn */
  box-sizing: border-box;
  white-space: normal; /* Cho phép văn bản xuống dòng */
  word-wrap: break-word; /* Cho phép văn bản xuống dòng */
}

.page-index__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #FFF6D6; /* Văn bản màu trắng để tương phản */
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(242, 193, 78, 0.4);
}

.page-index__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242, 193, 78, 0.6);
}

.page-index__btn-secondary {
  background: transparent;
  color: var(--primary-color, #F2C14E);
  border: 2px solid var(--primary-color, #F2C14E);
}

.page-index__btn-secondary:hover {
  background: var(--primary-color, #F2C14E);
  color: var(--background-color, #0A0A0A); /* Văn bản tối trên nền màu chính */
  transform: translateY(-2px);
}

/* 🚨 Mobile specific styles for Long SEO Body and general elements (max-width: 768px) - MUST USE !important for overrides */
@media (max-width: 768px) {
  .page-index__article-body {
    padding: 0 12px 32px;
    font-size: 16px;
    line-height: 1.5;
  }
  .page-index__article-body h2 {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
  }
  .page-index__article-body h3 {
    font-size: clamp(1.1rem, 4.5vw, 1.3rem);
    margin-top: 1rem;
    margin-bottom: 0.6rem;
  }
  .page-index__article-figure {
    padding: 5px;
  }
  
  /* 🚨 Mobile specific styles for CTA Buttons (max-width: 768px) */
  .page-index__cta-buttons {
    flex-direction: column !important; /* Xếp chồng nút theo chiều dọc */
    gap: 10px !important;
    padding: 0 15px !important;
  }
  .page-index__btn-primary,
  .page-index__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* 🚨 Mobile specific styles for General Images (max-width: 768px) */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
}