* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Ngăn tràn ngang */
}

.product-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 30px;
      padding: 20px;
      max-width: 1200px;
      margin: auto;
} 

.product-item {
     border: 1px solid #ddd;
      border-radius: 10px;
      background: #fff;
      width: 280px;
      text-align: center;
      overflow: hidden;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      transition: 0.3s;
}

.product-item:hover{
     transform: translateY(-5px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.product-item h2,p{
  padding-top: 5px;
  font-family: sans-serif;
  padding-left: 0px;
  font-size: 16px;
}

.product-item img {
      width: 100%;
      height: 200px;
      object-fit: contain;
      background: #fff; }

 #product-view {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      margin: 20px auto;
      max-width: 1200px;
      box-sizing: border-box;
    }
    
    /* Hình ảnh sản phẩm */
    .product-image {
      flex: 1 1 40%;
      max-width: 500px;
      padding: 10px;
      box-sizing: border-box;
    }

    .product-image img {
      width: 100%;
      height: 280px;
      display: block;
      border-radius: 4px;
    }
    /* Mô tả bên cạnh */
    .product-description {
      flex: 1 1 50%;
      padding: 0px;
      box-sizing: border-box;
    }
    .product-description h1 {
      margin-left: 0px;
      margin-top: 0px;
      font-size: 1.8rem;
    }
    .product-description h2 {
      padding-top: 100px;
      padding: 0px;
      font-weight: bolder;
      color: red;
      margin-left: 50px;
      line-height: 1.6;
    }

    .product-description p {
      padding: 0px;
      font-weight: bolder;
      /* color: red; */
      margin-left: 50px;
      line-height: 1.6;
      font-weight: 200;
      padding-bottom: 110px;
    }


    

/* MOBILE: Điện thoại nhỏ hơn hoặc bằng 480px */
@media (max-width: 480px) {
  body {
    background-color: #fff;
    overflow-x: hidden; /* tránh tràn ngang */
  }

  /* Grid sản phẩm: 2 cột */
  .product-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
  }

  /* Card sản phẩm */
  .product-item {
    padding: 8px;
    border-radius: 8px;
    width: 100% !important; /* chặn width cứng */
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  }

  /* Ảnh sản phẩm */
  .product-item img {
    width: 100%;
    height: 140px;           /* cân đối với màn nhỏ */
    object-fit: contain;     /* hiện rõ sản phẩm, không méo */
    border-radius: 6px;
    background: #fff;
  }

  /* Tiêu đề và mô tả */
  .product-item h2,
  .product-item p {
    font-size: 11px;         /* to hơn 8px để dễ đọc */
    margin: 4px 0 0;
    line-height: 1.3;
    text-align: center;
  }

  /* Khối chi tiết sản phẩm */
  #product-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    margin: 0 auto;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Ảnh sản phẩm chính */
  .product-image {
    flex: none;
    width: 100%;
    max-width: 100%;
    margin-bottom: 12px;
  }
  .product-image img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 6px;
  }

  /* Mô tả sản phẩm */
  .product-description {
    flex: none;
    width: 100%;
    padding: 0 8px;
    box-sizing: border-box;
    text-align: left;
  }
  .product-description h1 {
    font-size: 18px;
    margin: 0 0 8px;
    padding-left: 0;
  }
  .product-description h2 {
    font-size: 15px;
    margin: 0 0 10px;
    color: red;
    line-height: 1.4;
  }
  .product-description p {
    font-size: 13px;
    margin: 0 0 14px;
    line-height: 1.4;
  }
}



    