/*--------------------------------------------*/
/* 1) IMPORT FONTS (remove if unused)         */
/*--------------------------------------------*/
@import url("https://fonts.googleapis.com/css2?family=Lato:wght@100;400;700&display=swap");

/*--------------------------------------------*/
/* 2) GLOBAL RESET                            */
/*--------------------------------------------*/
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --dx-primary: #327179;
  --dx-mint: #e6f4f1;
}

/*--------------------------------------------*/
/* 3) BODY STYLES                             */
/*--------------------------------------------*/
body {
  font-family: "Xanh Mono", monospace;
  line-height: 1.5;
  background-color: #f8f8f8;
  color: #333;
}

/*--------------------------------------------*/
/* 5) CARD GRID CONTAINER                     */
/*--------------------------------------------*/
.product-lines .card-container-pl {
  display: grid;
  /* default: 3 columns on large screens */
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 2.5rem 10rem;
}

/*--------------------------------------------*/
/* 6) INDIVIDUAL CARD                         */
/*--------------------------------------------*/
.product-lines .card-pl {
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  /* no extra margin—grid gap handles spacing */
}

.product-lines .card-pl:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/*--------------------------------------------*/
/* 7) CARD IMAGE (square by default)          */
/*--------------------------------------------*/
.product-lines .card-image-pl {
  width: 100%;
  padding-top: 100%; /* 1:1 aspect ratio */
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  min-height: 200px;
}

/*--------------------------------------------*/
/* 8) CARD CONTENT (title + button)           */
/*--------------------------------------------*/
.product-lines .card-content-pl {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  flex: 1;
}

.product-lines .card-title-pl {
  font-size: 1.125rem; /* ≈18px */
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #222;
  text-align: center;
  word-wrap: break-word;
}

.product-lines .card-button-pl {
  background-color: var(--dx-primary);
  color: #ffffff;
  text-decoration: none;
  padding: 0.75rem;
  font-size: 0.875rem; /* ≈14px */
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 1rem;
}

.product-lines .card-button-pl:hover {
  background-color: var(--dx-mint);
  color: black;
}

/*--------------------------------------------*/
/* 9) RESPONSIVE BREAKPOINTS                  */
/*--------------------------------------------*/

/*── 9a) Up to 1200px: switch 3 → 2 columns ──*/
@media (max-width: 1200px) {
  .product-lines .card-container-pl {
    grid-template-columns: repeat(2, 1fr);
    margin: 2rem 5rem;
  }
}

/*── 9b) Up to 768px: keep 2 columns, shrink margins, and reduce image height ──*/
@media (max-width: 768px) {
  .product-lines .card-container-pl {
    grid-template-columns: repeat(2, 1fr);
    margin: 2rem 2rem;
  }
  /* Shrink banner margins/text */
  .page-title-pl {
    margin: 1rem 2rem;
    padding: 2.5rem 1rem;
  }
  .page-title-text-pl {
    font-size: 2.5rem;
  }
  /* Make images shorter so title/button fit */
  .product-lines .card-image-pl {
    padding-top: 75%; /* 75% of width instead of 100% */
  }
}

/*── 9c) Up to 480px: collapse to single column (optional) ──*/
@media (max-width: 480px) {
  .product-lines .card-container-pl {
    grid-template-columns: repeat(2, 1fr);
    margin: 1.5rem 1rem;
  }
  .page-title-pl {
    margin: 1rem 1rem;
    padding: 2rem 1rem;
  }
  .page-title-text-pl {
    font-size: 2rem;
  }
  /*
    If you want to force two cards per row even on very tiny phones,
    simply delete or comment out this entire @media (max-width: 480px) block.
  */
}
