/* -------------------------------------------------------------------------- */
/*                              Base Styles                                 */
/* -------------------------------------------------------------------------- */
.page-index {
  color: var(--text-main, #FFF1E8); /* Default text color for dark background */
  background-color: var(--background, #140C0C); /* Main background color */
}

/* -------------------------------------------------------------------------- */
/*                               HERO Section                               */
/* -------------------------------------------------------------------------- */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* Assuming shared.css sets body padding-top for header offset */
  margin-top: 0;
  width: 100%;
  box-sizing: border-box;
}

.page-index__hero-container {
  position: relative;
  margin: 0 auto;
  width: 100%;
  overflow: hidden;
}

.page-index__hero-image {
  width: 100%;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover; /* Default for desktop */
}

@media (min-width: 850px) {
  .page-index__hero-image img {
    aspect-ratio: 16/5;
    object-fit: cover;
  }
}

/* 🚨 Mobile HERO: Prevent cropping, ensure full image visibility */
@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;
    object-fit: contain !important; /* Forces full image to fit */
    max-height: none !important;
    display: block !important;
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: 10px !important; /* Ensure consistent small top padding on mobile */
  }
}

/* -------------------------------------------------------------------------- */
/*                           Products Section                               */
/* -------------------------------------------------------------------------- */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  box-sizing: border-box;
  background-color: var(--background, #140C0C);
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

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

.page-index__product-card {
  width: 100%;
  max-width: 300px; /* Max width for each card */
  border-radius: 0; /* No rounded corners */
  overflow: hidden;
  background: transparent; /* No background */
  box-shadow: none; /* No shadow */
  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; /* Max width for the image container */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-index__product-card-image img {
  max-width: 100%;
  width: 100%;
  height: auto; /* Maintain aspect ratio */
  display: block;
  border-radius: 0; /* No rounded corners */
  box-shadow: none; /* No shadow */
}

@media (max-width: 768px) {
  .page-index__products-section {
    padding: 40px 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll */
    box-sizing: border-box;
  }
  .page-index__products-container,
  .page-index__products-grid {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll */
    box-sizing: border-box;
  }
  .page-index__products-grid {
    grid-template-columns: repeat(2, 1fr); /* Mobile: 2 columns x 3 rows */
    gap: 15px;
  }
  .page-index__product-card,
  .page-index__product-card-image {
    max-width: 100%; /* Ensure cards/images don't exceed mobile width */
  }
  .page-index__product-card-image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
}

/* -------------------------------------------------------------------------- */
/*                         Decorative Main Title                            */
/* -------------------------------------------------------------------------- */
.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, #140C0C);
  color: var(--text-main, #FFF1E8);
}

.page-index__section-title {
  margin: 0;
  font-size: clamp(1.1rem, 4.5vw, 1.75rem); /* Responsive font size */
  line-height: 1.35;
  font-weight: bold;
  color: var(--gold, #F3C54D); /* Use Gold color for title */
}

.page-index__section-title-line {
  flex: 1;
  max-width: 80px;
  height: 2px;
  background-color: var(--border, #6A1E1E); /* Use Border color for lines */
  opacity: 0.6;
}

@media (max-width: 768px) {
  .page-index__section-title-wrap {
    padding: 20px 10px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
  }
  .page-index__section-title {
    font-size: clamp(1.25rem, 5vw, 1.5rem); /* Adjust font size for mobile */
    line-height: 1.4;
  }
  .page-index__section-title-line {
    max-width: 40px;
    height: 1px;
  }
}

/* -------------------------------------------------------------------------- */
/*                             Article Body (SEO)                           */
/* -------------------------------------------------------------------------- */
.page-index__article-body {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px; /* Adjust padding for desktop */
  box-sizing: border-box;
  overflow-x: hidden; /* Prevent horizontal scroll */
  background-color: var(--background, #140C0C);
  color: var(--text-main, #FFF1E8);
  line-height: 1.7;
}

.page-index__article-body h2 {
  margin: 2.5rem 0 1.5rem;
  font-size: 1.75rem;
  font-weight: bold;
  color: var(--gold, #F3C54D);
  line-height: 1.3;
}

.page-index__article-body h3 {
  margin: 1.75rem 0 1rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--primary, #C61F1F);
  line-height: 1.4;
}

.page-index__article-body p {
  margin-bottom: 1rem;
}

.page-index__article-body ul {
  list-style: disc inside;
  margin-bottom: 1rem;
  padding-left: 20px;
}

.page-index__article-body li {
  margin-bottom: 0.5rem;
}

.page-index__article-body a {
  color: var(--gold, #F3C54D);
  text-decoration: underline;
}

.page-index__article-body a:hover {
  color: var(--deep-red, #7E0D0D);
}

.page-index__article-figure {
  margin: 2rem auto;
  max-width: 800px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.page-index__article-figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px; /* Slightly rounded corners for article images */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-index__article-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.9em;
  color: rgba(255, 241, 232, 0.8);
}

.page-index__article-quote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  border-left: 4px solid var(--gold, #F3C54D);
  background-color: var(--card-bg, #2A1212);
  color: var(--text-main, #FFF1E8);
  font-style: italic;
  font-size: 1.1rem;
  border-radius: 4px;
}

/* -------------------------------------------------------------------------- */
/*                          General Image Styles                            */
/* -------------------------------------------------------------------------- */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* -------------------------------------------------------------------------- */
/*                            General Button Styles                         */
/* -------------------------------------------------------------------------- */
.page-index a[class*="btn"],
.page-index a[class*="button"] {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word;
}

.page-index__btn-primary {
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Custom button gradient */
  color: #ffffff;
  border: none;
}

.page-index__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* -------------------------------------------------------------------------- */
/*                           Mobile Responsiveness                          */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .page-index__article-body {
    padding: 32px 15px; /* Adjust padding for mobile */
    font-size: 16px;
  }
  .page-index__article-body h2 {
    font-size: clamp(1.25rem, 5vw, 1.5rem); /* Responsive font size for H2 */
    margin: 2rem 0 1rem;
  }
  .page-index__article-body h3 {
    font-size: clamp(1.1rem, 4.5vw, 1.25rem); /* Responsive font size for H3 */
    margin: 1.5rem 0 0.75rem;
  }
  .page-index__article-quote {
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-size: 1rem;
  }
  .page-index__article-figure {
    margin: 1.5rem auto;
  }
  .page-index__article-figure img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  /* General mobile image rules */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__products-section,
  .page-index__products-container,
  .page-index__products-grid,
  .page-index__article-body {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* General mobile button rules */
  .page-index a[class*="btn"],
  .page-index a[class*="button"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__cta-buttons,
  .page-index__button-group,
  .page-index__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
    display: flex;
    flex-direction: column; /* Ensure vertical stacking for multiple buttons */
  }
}